26#ifndef OOMPH_ELASTIC_PROBLEMS_HEADER
27#define OOMPH_ELASTIC_PROBLEMS_HEADER
31#include <oomph-lib-config.h>
101#if defined(OOMPH_HAS_MUMPS) && \
102 defined(OOMPH_ENABLE_MUMPS_AS_DEFAULT_LINEAR_SOLVER)
117#if defined(OOMPH_HAS_MUMPS) && \
118 defined(OOMPH_ENABLE_MUMPS_AS_DEFAULT_LINEAR_SOLVER)
159 template<
class TIMESTEPPER>
180 template<
class TIMESTEPPER>
224#if defined(OOMPH_HAS_MUMPS) && \
225 defined(OOMPH_ENABLE_MUMPS_AS_DEFAULT_LINEAR_SOLVER)
241 template<
class TIMESTEPPER>
252 std::ostringstream error_message;
254 <<
"SolidICProblem::set_newmark_initial_condition_directly()\n"
255 <<
"can only be called for Newmark type timestepper whereas\n "
256 <<
"you've called it for " <<
timestepper_pt->type() << std::endl;
260 "SolidICProblem::set_newmark_initial_condition_directly()",
290#if defined(OOMPH_HAS_MUMPS) && \
291 defined(OOMPH_ENABLE_MUMPS_AS_DEFAULT_LINEAR_SOLVER)
327 ->variable_position_pt());
356 ->variable_position_pt());
372 oomph_info <<
"Number of equations in big problem: "
392 template<
class TIMESTEPPER>
404 std::ostringstream error_message;
406 <<
"SolidICProblem::set_newmark_initial_condition_consistently()\n"
407 <<
"can only be called for Newmark type timestepper whereas\n "
408 <<
"you've called it for " <<
timestepper_pt->type() << std::endl;
412 "SolidICProblem::set_newmark_initial_condition_consistently()",
442#if defined(OOMPH_HAS_MUMPS) && \
443 defined(OOMPH_ENABLE_MUMPS_AS_DEFAULT_LINEAR_SOLVER)
492 ->variable_position_pt();
572 for (
unsigned i = 0;
i < Nelement;
i++)
580 elem_pt->enable_solve_for_consistent_newmark_accel();
583 elem_pt->multiplier_fct_pt() = multiplier_fct_pt;
599#if defined(OOMPH_HAS_MUMPS) && \
600 defined(OOMPH_ENABLE_MUMPS_AS_DEFAULT_LINEAR_SOLVER)
633 "No positional dofs should be pinned at this stage!",
651 <<
"Max. residual after assigning consistent initial conditions: "
655 std::ostringstream error_message;
656 error_message <<
"Residual is bigger than allowed! [Current tolerance: "
658 error_message <<
"This is probably because you've not specified the "
659 <<
"correct multiplier \n(the product of growth factor "
660 <<
"and timescale ratio [the non-dim density]). \nPlease "
661 <<
"check the Solid Mechanics Theory Tutorial for "
663 <<
"If you're sure that the residual is OK, overwrite "
664 <<
"the default tolerance using\n";
666 <<
"SolidICProblem::max_residual_after_consistent_newton_ic()"
668 <<
"or recompile without the PARANOID flag." << std::endl;
684 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....
Dummy mesh that can be created and deleted in SolidICProblem.
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.
SolidFiniteElement class.
double(* MultiplierFctPt)(const Vector< double > &xi)
Pointer to function that computes the "multiplier" for the inertia terms in the consistent determinat...
IC problem for an elastic body discretised on a given (sub)-mesh. We switch the elements' residuals a...
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.
~SolidICProblem()
Destructor.
MumpsSolver * Mumps_solver_pt
Pointer to mumps solver.
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...
SuperLUSolver * SuperLU_solver_pt
Pointer to mumps solver.
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)....
SuperLU Project Solver class. This is a combined wrapper for both SuperLU and SuperLU Dist....
TAdvectionDiffusionReactionElement<NREAGENT,DIM,NNODE_1D> elements are isoparametric triangular DIM-d...
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.
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
OomphInfo oomph_info
Single (global) instantiation of the OomphInfo object – this is used throughout the library as a "rep...