1 #ifndef PSPM_PSPM_SOLVER_H_ 2 #define PSPM_PSPM_SOLVER_H_ 55 void addSpecies(
int _J,
double _xb,
double _xm,
bool log_breaks,
Species_Base* _mod,
int n_extra_vars,
double input_birth_flux = -1);
56 void addSpecies(std::vector<double> xbreaks,
Species_Base* _mod,
int n_extra_vars,
double input_birth_flux = -1);
73 void updateEnv(
double t, std::vector<double>::iterator S, std::vector<double>::iterator dSdt);
75 void calcRates_FMU(
double t, std::vector<double>::iterator S, std::vector<double>::iterator dSdt);
77 void calcRates_iFMU(
double t, std::vector<double>::iterator S, std::vector<double>::iterator dSdt);
78 void stepU_iFMU(
double t, std::vector<double> &S, std::vector<double> &dSdt,
double dt);
80 void calcRates_EBT(
double t, std::vector<double>::iterator S, std::vector<double>::iterator dSdt);
84 void calcRates_CM(
double t, std::vector<double>::iterator S, std::vector<double>::iterator dSdt);
89 template<
typename AfterStepFunc>
90 void step_to(
double tstop, AfterStepFunc &afterStep_user);
96 std::vector<double>
u0_out(
double t);
102 template<
typename wFunc>
103 double integrate_x(wFunc w,
double t,
int species_id);
106 template<
typename wFunc>
113 #include "../src/solver.tpp" 114 #include "../src/size_integrals.tpp"
void calcRates_FMU(double t, std::vector< double >::iterator S, std::vector< double >::iterator dSdt)
std::vector< double > state
bool integral_interpolate
void removeDeadCohorts_EBT()
void stepU_iFMU(double t, std::vector< double > &S, std::vector< double > &dSdt, double dt)
void copyStateToCohorts(std::vector< double >::iterator state_begin)
void calcRates_iFMU(double t, std::vector< double >::iterator S, std::vector< double >::iterator dSdt)
double integrate_wudx_above(wFunc w, double t, double xlow, int species_id)
Computes the partial integral for the specified species.
std::vector< double > newborns_out(double t)
double integrate_x(wFunc w, double t, int species_id)
Computes the integral for the specified species. For details, see integrate_wudx_above.
std::vector< double > rates
void addSpecies(int _J, double _xb, double _xm, bool log_breaks, Species_Base *_mod, int n_extra_vars, double input_birth_flux=-1)
void setEnvironment(EnvironmentBase *_env)
double ode_initial_step_size
void copyCohortsToState()
void updateEnv(double t, std::vector< double >::iterator S, std::vector< double >::iterator dSdt)
void resizeStateFromSpecies()
void resetState(double t0=0)
std::vector< Species_Base * > species_vec
void calcRates_EBT(double t, std::vector< double >::iterator S, std::vector< double >::iterator dSdt)
Solver(PSPM_SolverType _method, std::string ode_method="rk45ck")
std::vector< double > getDensitySpecies_EBT(int k, std::vector< double > breaks)
void step_to(double tstop, AfterStepFunc &afterStep_user)
void calcRates_CM(double t, std::vector< double >::iterator S, std::vector< double >::iterator dSdt)
void addSystemVariables(int _s)
struct Solver::@1 control
double calcSpeciesBirthFlux(int k, double t)
std::vector< double > u0_out(double t)