47 for (
unsigned t =
ndt();
t > 0;
t--)
99 for (
unsigned t =
ndt();
t > 0;
t--)
132 std::string
err(
"Tried to get the temporal error from a non-adaptive");
133 err +=
" time stepper.";
146 std::string
err =
"This implementation of midpoint can only work with a ";
147 err +=
"single time stepper, try using IMR instead (but check ";
148 err +=
"your Jacobian and residual calculations very carefully for "
177 for (
unsigned i = 0;
i < problem_pt->
ndof();
i++)
208 const unsigned ndof = problem_pt->
ndof();
213 for (
unsigned i = 0;
i < ndof;
i++)
248 using namespace StringConversion;
256 std::string
err =
"Got different values doing midpoint update via "
257 "extracted dofs than doing it in place!";
A class that represents a collection of data; each Data object may contain many different individual ...
A vector in the mathematical sense, initially developed for linear algebra type applications....
A Generalised Element class.
unsigned long eqn_number(const unsigned &ieqn_local) const
Return the global equation number corresponding to the ieqn_local-th local equation number.
Data *& internal_data_pt(const unsigned &i)
Return a pointer to i-th internal data object.
unsigned ninternal_data() const
Return the number of internal data objects.
void calculate_predicted_values(Data *const &data_pt)
Dummy - just check that the values that problem::calculate_predicted_values() has been called right.
void shift_time_values(Data *const &data_pt)
This function advances the Data's time history so that we can move on to the next timestep.
void shift_time_positions(Node *const &node_pt)
This function advances the time history of the positions at a node.
unsigned ndt() const
Number of timestep increments that are required by the scheme.
double temporal_error_in_value(Data *const &data_pt, const unsigned &i)
Compute the error in the value i in a Data structure zero here – overwrite for specific scheme.
bool Update_pinned
Should we update pinned variables after the half-step?
void actions_after_timestep(Problem *problem_pt)
Take problem from t={n+1/2} to t=n+1 by algebraic update and restore time step.
void set_weights()
Setup weights for time derivative calculations.
void actions_before_timestep(Problem *problem_pt)
Half the timestep before starting solve.
Node *& node_pt(const unsigned long &n)
Return pointer to global node n.
unsigned long nnode() const
Return number of nodes in the mesh.
GeneralisedElement *& element_pt(const unsigned long &e)
Return pointer to element e.
unsigned long nelement() const
Return number of elements in the mesh.
Nodes are derived from Data, but, in addition, have a definite (Eulerian) position in a space of a gi...
unsigned ndim() const
Return (Eulerian) spatial dimension of the node.
virtual bool position_is_a_copy() const
Return whether any position coordinate has been copied (always false)
unsigned nposition_type() const
Number of coordinate types needed in the mapping between local and global coordinates.
double & x_gen(const unsigned &k, const unsigned &i)
Reference to the generalised position x(k,i). ‘Type’: k; Coordinate direction: i.
An OomphLibError object which should be thrown when an run-time error is encountered....
////////////////////////////////////////////////////////////////// //////////////////////////////////...
unsigned long ndof() const
Return the number of dofs.
double & dof(const unsigned &i)
i-th dof in the problem
bool & use_predictor_values_as_initial_guess()
unsigned nglobal_data() const
Return the number of global data values.
Data *& global_data_pt(const unsigned &i)
Return a pointer to the the i-th global data object.
unsigned ntime_stepper() const
Return the number of time steppers.
Mesh *& mesh_pt()
Return a pointer to the global mesh.
void get_dofs(DoubleVector &dofs) const
Return the vector of dofs, i.e. a vector containing the current values of all unknowns.
Time *& time_pt()
Return a pointer to the global time object.
TAdvectionDiffusionReactionElement<NREAGENT,DIM,NNODE_1D> elements are isoparametric triangular DIM-d...
DenseMatrix< double > Weight
Storage for the weights associated with the timestepper.
void check_predicted_values_up_to_date() const
Check that the predicted values are the ones we want.
unsigned ntstorage() const
Return the number of doubles required to represent history (one for steady)
bool adaptive_flag() const
Function to indicate whether the scheme is adaptive (false by default)
Time *const & time_pt() const
Access function for the pointer to time (const version)
int Predictor_storage_index
The time-index in each Data object where predicted values are stored. -1 if not set.
double & time()
Return the current value of the continuous time.
double & dt(const unsigned &t=0)
Return the value of the t-th stored timestep (t=0: present; t>0: previous).
std::string to_string(T object, unsigned float_precision=8)
Conversion function that should work for anything with operator<< defined (at least all basic types).
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
void post_midpoint_update(Data *dat_pt, const bool &update_pinned)
Local (not exported in header) helper function to handle midpoint update on a data object.