61 for(
unsigned n=0;n<n_node;n++)
70 OOMPH_CURRENT_FUNCTION,
71 OOMPH_EXCEPTION_LOCATION);
76 unsigned ndim=node_pt->
ndim();
85 throw OomphLibError(
"Wasn't able to cast to SolidFiniteElement\n",
86 OOMPH_CURRENT_FUNCTION,
87 OOMPH_EXCEPTION_LOCATION);
94 for(
unsigned i=0;
i<ndim;
i++)
97 for(
unsigned k=0;k<ntype;k++)
105 unsigned nval=node_pt->
nvalue();
106 for (
unsigned ival=0;ival<nval;ival++)
116 for(
unsigned i=0;
i<Nelement;
i++)
126 throw OomphLibError(
"Wasn't able to cast to SolidFiniteElement\n",
127 OOMPH_CURRENT_FUNCTION,
128 OOMPH_EXCEPTION_LOCATION);
140 if(
FSIWallElement* fsi_elem_pt = dynamic_cast<FSIWallElement*>(elem_pt))
142 fsi_elem_pt->exclude_external_load_data();
149 for (
unsigned j=0;j<nint;j++)
154 unsigned nval=data_pt->
nvalue();
155 for (
unsigned ival=0;ival<nval;ival++)
167 "Automatic assignment of initial conditions doesn't work yet\n";
169 "for elasticity elements with internal solid dofs (pressures)\n";
172 OOMPH_CURRENT_FUNCTION,
173 OOMPH_EXCEPTION_LOCATION);
192 oomph_info <<
"# of dofs for wall initial guess" 216 for(
unsigned n=0;n<n_node;n++)
225 OOMPH_CURRENT_FUNCTION,
226 OOMPH_EXCEPTION_LOCATION);
231 unsigned ndim=node_pt->
ndim();
240 throw OomphLibError(
"Wasn't able to cast to SolidFiniteElement\n",
241 OOMPH_CURRENT_FUNCTION,
242 OOMPH_EXCEPTION_LOCATION);
250 for(
unsigned i=0;
i<ndim;
i++)
253 for(
unsigned k=0;k<ntype;k++)
261 unsigned nval=node_pt->
nvalue();
262 for (
unsigned ival=0;ival<nval;ival++)
272 for(
unsigned i=0;
i<Nelement;
i++)
281 throw OomphLibError(
"Wasn't able to cast to SolidFiniteElement\n",
282 OOMPH_CURRENT_FUNCTION,
283 OOMPH_EXCEPTION_LOCATION);
292 for (
unsigned j=0;j<next;j++)
304 for (
unsigned j=0;j<nint;j++)
309 unsigned nval=data_pt->
nvalue();
310 for (
unsigned ival=0;ival<nval;ival++)
323 "Automatic assignment of initial conditions doesn't work yet\n";
325 "for elasticity elements with internal solid dofs (pressures)\n";
328 OOMPH_CURRENT_FUNCTION,
329 OOMPH_EXCEPTION_LOCATION);
369 for(
unsigned n=0;n<n_node;n++)
378 OOMPH_CURRENT_FUNCTION,
379 OOMPH_EXCEPTION_LOCATION);
384 unsigned ndim=node_pt->
ndim();
393 throw OomphLibError(
"Wasn't able to cast to SolidFiniteElement\n",
394 OOMPH_CURRENT_FUNCTION,
395 OOMPH_EXCEPTION_LOCATION);
402 for(
unsigned i=0;
i<ndim;
i++)
405 for(
unsigned k=0;k<ntype;k++)
417 unsigned nval=node_pt->
nvalue();
418 for (
unsigned ival=0;ival<nval;ival++)
423 node_pt->
unpin(ival);
431 for(
unsigned i=0;
i<Nelement;
i++)
441 throw OomphLibError(
"Wasn't able to cast to SolidFiniteElement\n",
442 OOMPH_CURRENT_FUNCTION,
443 OOMPH_EXCEPTION_LOCATION);
449 disable_solve_for_consistent_newmark_accel();
455 if(
FSIWallElement* fsi_elem_pt = dynamic_cast<FSIWallElement*>(elem_pt))
457 fsi_elem_pt->include_external_load_data();
464 for (
unsigned j=0;j<next;j++)
477 for (
unsigned j=0;j<nint;j++)
482 unsigned nval=data_pt->
nvalue();
483 for (
unsigned ival=0;ival<nval;ival++)
488 data_pt->
unpin(ival);
499 "Automatic assignment of initial conditions doesn't work yet\n";
501 "for elasticity elements with internal solid dofs (pressures)\n";
504 OOMPH_CURRENT_FUNCTION,
505 OOMPH_EXCEPTION_LOCATION);
560 double backup_time=0.0;
565 if (timestepper_pt!=0)
602 if (timestepper_pt!=0)
613 oomph_info <<
"Number of equations in big problem: " void unpin(const unsigned &i)
Unpin the i-th stored variable.
void newton_solve()
Use Newton method to solve the problem.
This is a base class for all SolidFiniteElements that participate in FSI computations. These elements provide interfaces and generic funcionality for the two additional roles that SolidFiniteElements play in FSI problems:They parameterise the domain boundary for the fluid domain. To allow them to play this role, FSIWallElements are derived from the SolidFiniteElement and the GeomObject class, indicating that the every specific FSIWallElement must implement the pure virtual function GeomObject::position(...) which should compute the position vector to a point in the SolidFiniteElement, parametrised by its local coordinates.In FSI problems fluid exerts a traction onto the wall and this traction must be added to any other load terms (such as an external pressure acting on an elastic pipe) that are already applied to the SolidFiniteElements by other means.
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?
void unpin_position(const unsigned &i)
Unpin the nodal position.
SolidInitialCondition *& solid_ic_pt()
Pointer to object that describes the initial condition.
GeomObject *& geom_object_pt()
(Reference to) pointer to geom object that specifies the initial condition
Mesh *& mesh_pt()
Return a pointer to the global mesh.
unsigned nvalue() const
Return number of values stored in data object (incl pinned ones).
Dummy mesh that can be created and deleted in SolidICProblem.
OomphCommunicator * communicator_pt()
access function to the oomph-lib communicator
void pin(const unsigned &i)
Pin the i-th stored variable.
unsigned add_external_data(Data *const &data_pt, const bool &fd=true)
unsigned long nelement() const
Return number of elements in the mesh.
void flush_external_data()
Flush all external data.
unsigned nexternal_data() const
Return the number of external data objects.
unsigned nnodal_position_type() const
Return the number of coordinate types that the element requires to interpolate the geometry between t...
void backup_original_state()
Backup original state of all data associated with mesh.
unsigned ndim() const
Return (Eulerian) spatial dimension of the node.
TimeStepper *& time_stepper_pt()
Access function for pointer to time stepper: Null if object is not time-dependent.
virtual bool has_internal_solid_data()
Return whether there is internal solid data (e.g. discontinuous solid pressure). At present...
void pin_position(const unsigned &i)
Pin the nodal position.
void assign_initial_values_impulsive()
Initialise data and nodal positions to simulate impulsive start from initial configuration/solution.
void reset_original_state()
Reset original state of all data associated with mesh.
OomphCommunicator * Communicator_pt
The communicator for this problem.
GeneralisedElement *& element_pt(const unsigned long &e)
Return pointer to element e.
Data *& internal_data_pt(const unsigned &i)
Return a pointer to i-th internal data object.
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...
A class that represents a collection of data; each Data object may contain many different individual ...
SolidInitialCondition * IC_pt
Pointer to initial condition object.
double & time()
Return the current value of the continuous time.
Node *& node_pt(const unsigned long &n)
Return pointer to global node n.
unsigned long nnode() const
Return number of nodes in the mesh.
Data *& external_data_pt(const unsigned &i)
Return a pointer to i-th external data object.
unsigned ninternal_data() const
Return the number of internal data objects.
A Class for nodes that deform elastically (i.e. position is an unknown in the problem). The idea is that the Eulerian positions are stored in a Data object and the Lagrangian coordinates are stored in addition. The pointer that addresses the Eulerian positions is set to the pointer to Value in the Data object. Hence, SolidNode uses knowledge of the internal structure of Data and must be a friend of the Data class. In order to allow a mesh to deform via an elastic-style equation in deforming-domain problems, the positions are stored separately from the values, so that elastic problems may be combined with any other type of problem.
Time *const & time_pt() const
Access function for the pointer to time (const version)
std::string string(const unsigned &i)
Return the i-th string or "" if the relevant string hasn't been defined.
bool is_pinned(const unsigned &i) const
Test whether the i-th variable is pinned (1: true; 0: false).
Vector< int > Backup_pinned
Vector to store pinned status of all data.
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...
Vector< Vector< Data * > > Backup_ext_data
Vector of Vectors to store pointers to exernal data in the elements.
bool problem_has_been_distributed()
Access to Problem_has_been_distributed flag.
bool position_is_pinned(const unsigned &i)
Test whether the i-th coordinate is pinned, 0: false; 1: true.
Base class for time-stepping schemes. Timestepper provides an approximation of the temporal derivativ...
SolidFiniteElement class.
bool Problem_has_been_distributed
Has the problem been distributed amongst multiple processors?
double & time()
Return the current value of continuous time.
An oomph-lib wrapper to the MPI_Comm communicator object. Just contains an MPI_Comm object (which is ...