Skip to content

Commit

Permalink
Fixed initailization order
Browse files Browse the repository at this point in the history
  • Loading branch information
jrenaud90 committed Dec 2, 2024
1 parent 410289b commit 9b14730
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions CyRK/cy/cysolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ CySolverBase::CySolverBase(
const double* t_eval,
const size_t len_t_eval,
PreEvalFunc pre_eval_func) :
t_start(t_start),
t_end(t_end),
diffeq_ptr(diffeq_ptr),
size_of_args(size_of_args),
len_t_eval(len_t_eval),
num_extra(num_extra),
use_dense_output(use_dense_output),
pre_eval_func(pre_eval_func),
status(0),
num_y(num_y),
storage_sptr(storage_sptr)
num_extra(num_extra),
storage_sptr(storage_sptr),
t_start(t_start),
t_end(t_end),
{
// Parse inputs
this->capture_extra = num_extra > 0;
Expand Down
12 changes: 6 additions & 6 deletions CyRK/cy/cysolver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ class CySolverBase {


public:
// Differential equation information
DiffeqFuncType diffeq_ptr = nullptr;

// Integration step information
size_t max_num_steps = 0;

Expand All @@ -111,9 +114,6 @@ class CySolverBase {
std::vector<char> args_char_vec = std::vector<char>();
char* args_ptr = nullptr;

// Differential equation information
DiffeqFuncType diffeq_ptr = nullptr;

// t_eval information
std::vector<double> t_eval_vec = std::vector<double>();
double* t_eval_ptr = t_eval_vec.data();
Expand All @@ -122,9 +122,6 @@ class CySolverBase {
bool skip_t_eval = false;
bool use_t_eval = false;

// Function to send to diffeq which is called before dy is calculated
PreEvalFunc pre_eval_func = nullptr;

// Keep bools together to reduce size
bool direction_flag = false;
bool reset_called = false;
Expand All @@ -134,6 +131,9 @@ class CySolverBase {

// Dense (Interpolation) Attributes
bool use_dense_output = false;

// Function to send to diffeq which is called before dy is calculated
PreEvalFunc pre_eval_func = nullptr;

// PySolver Attributes
bool use_pysolver = false;
Expand Down

0 comments on commit 9b14730

Please sign in to comment.