78 for(
unsigned i=0;
i<2;
i++)
81 for(
unsigned j=0;
j<5;
j++)
104 unsigned order()
const {
return 2; }
156 const unsigned n_value = data_pt->
nvalue();
159 for(
unsigned j=0;
j<n_value;
j++)
164 for(
unsigned t=1;
t<=2;
t++)
187 const unsigned n_dim = node_pt->
ndim();
192 for(
unsigned i=0;
i<n_dim;
i++)
199 for(
unsigned k=0;
k<n_position_type;
k++)
202 for(
unsigned t=1;
t<=2;
t++)
233 const unsigned n_time_value =
ntstorage();
236 const unsigned n_value = data_pt->
nvalue();
239 for(
unsigned t=0;
t<n_time_value;
t++)
245 for(
unsigned j=0;
j<n_value;
j++)
258 const unsigned n_value = data_pt->
nvalue();
266 for(
unsigned j=0;
j<n_value;
j++)
272 for(
unsigned t=2;
t>0;
t--)
292 const unsigned n_dim = node_pt->
ndim();
300 double velocity[n_position_type][n_dim];
306 for(
unsigned i=0;
i<n_dim;
i++)
308 for(
unsigned k=0;
k<n_position_type;
k++)
313 for(
unsigned t=0;
t<n_tstorage;
t++)
322 for(
unsigned i=0;
i<n_dim;
i++)
328 for(
unsigned k=0;
k<n_position_type;
k++)
331 for(
unsigned t=2;
t>0;
t--)
365 unsigned ndt()
const {
return 2; }
446 "SelfStartingBDF2::set_predictor_weights_bdf1()",
459 "SelfStartingBDF2::calculate_predicted_weights_bdf1()",
468 Node*
const &node_pt)
471 "SelfStartingBDF2::calculate_predicted_positions_bdf1()",
482 "SelfStartingBDF2::set_error_weights_bdf1()",
490 Node*
const &node_pt,
const unsigned &
i)
493 "SelfStartingBDF2::temporal_error_in_position_bdf1()",
506 "SelfStartingBDF2::temporal_error_in_value_bdf1()",
523 Weight(1,0) = 1.0/dt + 1.0/(dt + dtprev);
524 Weight(1,1) = -(dt + dtprev)/(dt*dtprev);
525 Weight(1,2) = dt/((dt+dtprev)*dtprev);
566 unsigned n_value = data_pt->
nvalue();
568 for(
unsigned j=0;
j<n_value;
j++)
574 double predicted_value = 0.0;
577 for(
unsigned i=1;
i<4;
i++)
593 Node*
const &node_pt)
599 unsigned n_dim = node_pt->
ndim();
601 for(
unsigned j=0;
j<n_dim;
j++)
607 double predicted_value = 0.0;
610 for(
unsigned i=1;
i<4;
i++)
616 node_pt->
x(4,
j) = predicted_value;
634 (1.0 + 3.0*(dtprev/dt) + 4.0*
pow((dtprev/dt),2.0) +
635 2.0*
pow((dtprev/dt),3.0));
644 Node*
const &node_pt,
const unsigned &
i)
int i
Definition: BiCGSTAB_step_by_step.cpp:9
void set_value(const unsigned &i, const double &value_)
Definition: nodes.h:271
virtual bool is_a_copy() const
Definition: nodes.h:253
unsigned nvalue() const
Return number of values stored in data object (incl pinned ones).
Definition: nodes.h:483
double value(const unsigned &i) const
Definition: nodes.h:293
void resize(const unsigned long &n)
Definition: matrices.h:498
double & x(const unsigned &i)
Return the i-th nodal coordinate.
Definition: nodes.h:1060
double & x_gen(const unsigned &k, const unsigned &i)
Definition: nodes.h:1126
unsigned ndim() const
Return (Eulerian) spatial dimension of the node.
Definition: nodes.h:1054
virtual bool position_is_a_copy() const
Return whether any position coordinate has been copied (always false)
Definition: nodes.h:1113
unsigned nposition_type() const
Definition: nodes.h:1016
Definition: oomph_definitions.h:222
Self-starting BDF2 timestepper class.
Definition: self_starting_BDF2_timestepper.h:37
void calculate_predicted_positions_bdf1(Node *const &node_pt)
Function to calculate predicted positions at a node (BDF1)
Definition: self_starting_BDF2_timestepper.h:467
void set_error_weights_bdf1()
Function to set the error weights corresponding to BDF1.
Definition: self_starting_BDF2_timestepper.h:479
unsigned order() const
Return the actual order of the scheme.
Definition: self_starting_BDF2_timestepper.h:104
bool BDF1_mode
Definition: self_starting_BDF2_timestepper.h:51
Vector< double > Predictor_weight
Private data for the predictor weights.
Definition: self_starting_BDF2_timestepper.h:41
void set_weights_bdf1()
Set the weights to those corresponding to BDF1.
Definition: self_starting_BDF2_timestepper.h:423
void set_weights()
Definition: self_starting_BDF2_timestepper.h:349
void assign_initial_values_impulsive(Data *const &data_pt)
Definition: self_starting_BDF2_timestepper.h:153
bool bdf1_mode()
Flag to indicate if the timestepper is working in BDF1 mode.
Definition: self_starting_BDF2_timestepper.h:120
void assign_initial_positions_impulsive(Node *const &node_pt)
Definition: self_starting_BDF2_timestepper.h:184
void turn_on_bdf1_mode()
Definition: self_starting_BDF2_timestepper.h:110
double Error_weight
Private data for the error weight.
Definition: self_starting_BDF2_timestepper.h:44
void shift_time_positions(Node *const &node_pt)
Definition: self_starting_BDF2_timestepper.h:289
double temporal_error_in_value_bdf2(Data *const &data_pt, const unsigned &i)
Compute the error in the value i in a Data structure (BDF2)
Definition: self_starting_BDF2_timestepper.h:661
void set_error_weights_bdf2()
Function to set the error weights corresponding to BDF2.
Definition: self_starting_BDF2_timestepper.h:626
void calculate_predicted_values_bdf2(Data *const &data_pt)
Function to calculate predicted data values in a Data object (BDF2)
Definition: self_starting_BDF2_timestepper.h:560
double temporal_error_in_value_bdf1(Data *const &data_pt, const unsigned &i)
Compute the error in the value i in a Data structure (BDF1)
Definition: self_starting_BDF2_timestepper.h:502
void set_weights_bdf2()
Set the weights to those corresponding to BDF2.
Definition: self_starting_BDF2_timestepper.h:519
void operator=(const SelfStartingBDF2 &)
Broken assignment operator.
Definition: self_starting_BDF2_timestepper.h:98
void set_predictor_weights_bdf1()
Function to set the predictor weights corresponding to BDF1.
Definition: self_starting_BDF2_timestepper.h:439
void shift_time_values(Data *const &data_pt)
Definition: self_starting_BDF2_timestepper.h:255
SelfStartingBDF2(const SelfStartingBDF2 &)
Broken copy constructor.
Definition: self_starting_BDF2_timestepper.h:92
void turn_off_bdf1_mode()
Definition: self_starting_BDF2_timestepper.h:124
double temporal_error_in_position_bdf1(Node *const &node_pt, const unsigned &i)
Compute the error in the position i at a node (BDF1)
Definition: self_starting_BDF2_timestepper.h:489
void set_predictor_weights_bdf2()
Function to set the predictor weights corresponding to BDF2.
Definition: self_starting_BDF2_timestepper.h:537
double(* InitialConditionFctPt)(const double &t)
Definition: self_starting_BDF2_timestepper.h:223
void undo_make_steady()
Definition: self_starting_BDF2_timestepper.h:135
SelfStartingBDF2(const bool &adaptive=false)
Definition: self_starting_BDF2_timestepper.h:57
unsigned ndt() const
Number of timestep increments that need to be stored by the scheme.
Definition: self_starting_BDF2_timestepper.h:365
void calculate_predicted_positions_bdf2(Node *const &node_pt)
Function to calculate predicted positions at a node (BDF2)
Definition: self_starting_BDF2_timestepper.h:592
void assign_initial_data_values(Data *const &data_pt, Vector< InitialConditionFctPt > initial_value_fct)
Definition: self_starting_BDF2_timestepper.h:228
double temporal_error_in_position_bdf2(Node *const &node_pt, const unsigned &i)
Compute the error in the position i at a node (BDF2)
Definition: self_starting_BDF2_timestepper.h:643
unsigned nprev_values() const
Number of previous values available.
Definition: self_starting_BDF2_timestepper.h:362
void calculate_predicted_values_bdf1(Data *const &data_pt)
Function to calculate predicted data values in a Data object (BDF1)
Definition: self_starting_BDF2_timestepper.h:456
Definition: timesteppers.h:231
DenseMatrix< double > Weight
Storage for the weights associated with the timestepper.
Definition: timesteppers.h:237
Time * Time_pt
Pointer to discrete time storage scheme.
Definition: timesteppers.h:234
unsigned ntstorage() const
Definition: timesteppers.h:601
std::string Type
Definition: timesteppers.h:241
bool Is_steady
Definition: timesteppers.h:251
bool adaptive_flag() const
Function to indicate whether the scheme is adaptive (false by default)
Definition: timesteppers.h:623
void time_derivative(const unsigned &i, Data *const &data_pt, Vector< double > &deriv)
Definition: timesteppers.h:502
double & time()
Return current value of continous time.
Definition: timesteppers.h:332
bool Adaptive_Flag
Definition: timesteppers.h:245
double & dt(const unsigned &t=0)
Definition: timesteppers.h:136
double & time()
Return the current value of the continuous time.
Definition: timesteppers.h:123
char char char int int * k
Definition: level2_impl.h:374
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 pow(const bfloat16 &a, const bfloat16 &b)
Definition: BFloat16.h:625
int adaptive
Definition: jeffery_hamel.cc:106
double velocity(const double &t)
Angular velocity as function of time t.
Definition: jeffery_orbit.cc:107
void broken_assign(const std::string &class_name)
Issue error message and terminate execution.
Definition: oomph_utilities.cc:195
void broken_copy(const std::string &class_name)
Issue error message and terminate execution.
Definition: oomph_utilities.cc:212
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10
t
Definition: plotPSD.py:36
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2