26#ifndef OOMPH_ELASTIC_PROBLEMS_HEADER
27#define OOMPH_ELASTIC_PROBLEMS_HEADER
31#include <oomph-lib-config.h>
138 template<
class TIMESTEPPER>
159 template<
class TIMESTEPPER>
211 template<
class TIMESTEPPER>
222 std::ostringstream error_message;
224 <<
"SolidICProblem::set_newmark_initial_condition_directly()\n"
225 <<
"can only be called for Newmark type timestepper whereas\n "
226 <<
"you've called it for " <<
timestepper_pt->type() << std::endl;
230 "SolidICProblem::set_newmark_initial_condition_directly()",
290 ->variable_position_pt());
319 ->variable_position_pt());
335 oomph_info <<
"Number of equations in big problem: "
355 template<
class TIMESTEPPER>
367 std::ostringstream error_message;
369 <<
"SolidICProblem::set_newmark_initial_condition_consistently()\n"
370 <<
"can only be called for Newmark type timestepper whereas\n "
371 <<
"you've called it for " <<
timestepper_pt->type() << std::endl;
375 "SolidICProblem::set_newmark_initial_condition_consistently()",
447 ->variable_position_pt();
527 for (
unsigned i = 0;
i < Nelement;
i++)
535 elem_pt->enable_solve_for_consistent_newmark_accel();
538 elem_pt->multiplier_fct_pt() = multiplier_fct_pt;
580 "No positional dofs should be pinned at this stage!",
598 <<
"Max. residual after assigning consistent initial conditions: "
602 std::ostringstream error_message;
603 error_message <<
"Residual is bigger than allowed! [Current tolerance: "
605 error_message <<
"This is probably because you've not specified the "
606 <<
"correct multiplier \n(the product of growth factor "
607 <<
"and timescale ratio [the non-dim density]). \nPlease "
608 <<
"check the Solid Mechanics Theory Tutorial for "
610 <<
"If you're sure that the residual is OK, overwrite "
611 <<
"the default tolerance using\n";
613 <<
"SolidICProblem::max_residual_after_consistent_newton_ic()"
615 <<
"or recompile without the PARANOID flag." << std::endl;
631 oomph_info <<
"Number of equations in big problem: "
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....
///////////////////////////////////////////////////////////////////// ///////////////////////////////...
unsigned long eqn_number(const unsigned &ieqn_local) const
Return the global equation number corresponding to the ieqn_local-th local equation number.
TimeStepper *& time_stepper_pt()
Access function for pointer to time stepper: Null if object is not time-dependent.
Base class for all linear solvers. This merely defines standard interfaces for linear solvers,...
virtual void solve(Problem *const &problem_pt, DoubleVector &result)=0
Solver: Takes pointer to problem and returns the results vector which contains the solution of the li...
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.
An OomphLibError object which should be thrown when an run-time error is encountered....
////////////////////////////////////////////////////////////////// //////////////////////////////////...
unsigned long assign_eqn_numbers(const bool &assign_local_eqn_numbers=true)
Assign all equation numbers for problem: Deals with global data (= data that isn't attached to any el...
void newton_solve()
Use Newton method to solve the problem.
virtual void get_residuals(DoubleVector &residuals)
Return the fully-assembled residuals Vector for the problem: Virtual so it can be overloaded in for m...
LinearSolver *& linear_solver_pt()
Return a pointer to the linear solver object.
double & time()
Return the current value of continuous time.
Mesh *& mesh_pt()
Return a pointer to the global mesh.
////////////////////////////////////////////////////////////////////// //////////////////////////////...
double(* MultiplierFctPt)(const Vector< double > &xi)
Pointer to function that computes the "multiplier" for the inertia terms in the consistent determinat...
///////////////////////////////////////////////////////////////////// ///////////////////////////////...
void set_newmark_initial_condition_consistently(Problem *problem_pt, Mesh *mesh_pt, TIMESTEPPER *timestepper_pt, SolidInitialCondition *ic_pt, const double &dt, SolidFiniteElement::MultiplierFctPt multiplier_fct_pt=0)
Setup initial condition for time-integration with Newmark's method. Past displacements and velocities...
void backup_original_state()
Backup original state of all data associated with mesh.
Vector< Vector< Data * > > Backup_ext_data
Vector of Vectors to store pointers to exernal data in the elements.
void operator=(const SolidICProblem &)=delete
Broken assignment operator.
void setup_problem()
Change pinned status of all data associated with mesh so that the IC problem can be solved.
void set_static_initial_condition(Problem *problem_pt, Mesh *mesh_pt, SolidInitialCondition *ic_pt, const double &time)
Force the elastic structure that is discretised on the specified mesh to deform in the shape of the i...
SolidICProblem(const SolidICProblem &)=delete
Broken copy constructor.
Vector< int > Backup_pinned
Vector to store pinned status of all data.
double Max_residual_after_consistent_newton_ic
Max. tolerated residual after application of consistent Newmark IC. Used to check if we have specifie...
void reset_original_state()
Reset original state of all data associated with mesh.
double & max_residual_after_consistent_newton_ic()
Max. tolerated residual after application of consistent Newmark IC. Used to check if we have specifie...
SolidInitialCondition * IC_pt
Pointer to initial condition object.
void set_newmark_initial_condition_directly(Problem *problem_pt, Mesh *mesh_pt, TIMESTEPPER *timestepper_pt, SolidInitialCondition *ic_pt, const double &dt)
Setup initial condition for time-integration with Newmark's method. History values are assigned to th...
void actions_before_newton_solve()
Update the problem specs before solve. (empty)
SolidICProblem()
Constructor. Initialise pointer to IC object to NULL. Create a dummy mesh that can be deleted when st...
void set_static_initial_condition(Problem *problem_pt, Mesh *mesh_pt, SolidInitialCondition *ic_pt)
Force the elastic structure that is discretised on the specified mesh to deform in the shape of the i...
void actions_after_newton_solve()
Update after solve (empty)
A class to specify the initial conditions for a solid body. Solid bodies are often discretised with H...
unsigned & ic_time_deriv()
Which time derivative are we currently assigning?
GeomObject *& geom_object_pt()
(Reference to) pointer to geom object that specifies the initial condition
A Class for nodes that deform elastically (i.e. position is an unknown in the problem)....
//////////////////////////////////////////////////////////////////////
virtual unsigned nprev_values() const =0
Number of previous values available: 0 for static, 1 for BDF<1>,...
unsigned ntstorage() const
Return the number of doubles required to represent history (one for steady)
Time *const & time_pt() const
Access function for the pointer to time (const version)
double & time()
Return the current value of the continuous time.
//////////////////////////////////////////////////////////////////// ////////////////////////////////...
OomphInfo oomph_info
Single (global) instantiation of the OomphInfo object – this is used throughout the library as a "rep...