1 #include <dpsim/MNASolverDynInterface.h>
8 int example_solve(
double *rhs_values,
double *lhs_values);
9 void example_log(
const char *str);
10 void example_cleanup(
void);
12 static const char *PLUGIN_NAME =
"plugin.so";
17 .lu_decomp = example_decomp,
18 .solve = example_solve,
19 .cleanup = example_cleanup,
23 if (name == NULL || strcmp(name, PLUGIN_NAME) != 0) {
24 printf(
"error: name mismatch\n");
27 return &example_plugin;
31 example_plugin.log(
"initialize");
36 example_plugin.log(
"decomp");
40 int example_solve(
double *rhs_values,
double *lhs_values) {
41 example_plugin.log(
"solve");
45 void example_cleanup(
void) { example_plugin.log(
"cleanup"); }
47 void example_log(
const char *str) { puts(str); }