26 #ifndef CASADI_MA27_INTERFACE_HPP
27 #define CASADI_MA27_INTERFACE_HPP
29 #include "casadi/core/linsol_internal.hpp"
30 #include <casadi/interfaces/hsl/casadi_linsol_ma27_export.h>
33 void ma27id_(
int* ICNTL,
double* CNTL);
34 void ma27ad_(
int *N,
int *NZ,
const int *IRN,
const int* ICN,
35 int *IW,
int* LIW,
int* IKEEP,
int *IW1,
36 int* NSTEPS,
int* IFLAG,
int* ICNTL,
37 double* CNTL,
int *INFO,
double* OPS);
38 void ma27bd_(
int *N,
int *NZ,
const int *IRN,
const int* ICN,
39 double* A,
int* LA,
int* IW,
int* LIW,
40 int* IKEEP,
int* NSTEPS,
int* MAXFRT,
41 int* IW1,
int* ICNTL,
double* CNTL,
43 void ma27cd_(
int *N,
double* A,
int* LA,
int* IW,
44 int* LIW,
double* W,
int* MAXFRT,
45 double* RHS,
int* IW1,
int* NSTEPS,
46 int* ICNTL,
double* CNTL);
63 struct CASADI_LINSOL_MA27_EXPORT Ma27Memory :
public LinsolMemory {
77 std::vector<double> nz;
95 std::vector<double> w;
98 std::vector<int> ikeep;
117 class CASADI_LINSOL_MA27_EXPORT Ma27Interface :
public LinsolInternal {
121 Ma27Interface(
const std::string& name,
const Sparsity& sp);
124 static LinsolInternal* creator(
const std::string& name,
const Sparsity& sp) {
125 return new Ma27Interface(name, sp);
129 ~Ma27Interface()
override;
132 void init(
const Dict& opts)
override;
135 void* alloc_mem()
const override {
return new Ma27Memory();}
138 int init_mem(
void* mem)
const override;
141 void free_mem(
void *mem)
const override {
delete static_cast<Ma27Memory*
>(mem);}
144 int nfact(
void* mem,
const double* A)
const override;
147 casadi_int neig(
void* mem,
const double* A)
const override;
150 casadi_int rank(
void* mem,
const double* A)
const override;
153 int solve(
void* mem,
const double* A,
double* x, casadi_int nrhs,
bool tr)
const override;
156 static const std::string meta_doc;
159 const char* plugin_name()
const override {
return "ma27";}
162 std::string class_name()
const override {
return "Ma27Interface";}
165 static ProtoFunction* deserialize(DeserializingStream& s) {
return new Ma27Interface(s); }
169 explicit Ma27Interface(DeserializingStream& s) : LinsolInternal(s) {}
GenericType::Dict Dict
C++ equivalent of Python's dict or MATLAB's struct.