ElasticInclinedPlaneProblem< ELEMENT, TIMESTEPPER > Class Template Reference
+ Inheritance diagram for ElasticInclinedPlaneProblem< ELEMENT, TIMESTEPPER >:

Public Member Functions

 ElasticInclinedPlaneProblem (const unsigned &nx, const unsigned &ny, const double &length)
 
void actions_after_implicit_timestep ()
 
- Public Member Functions inherited from InclinedPlaneProblem< ELEMENT, ElasticLineFluidInterfaceElement< ELEMENT > >
 InclinedPlaneProblem (const unsigned &nx, const unsigned &ny, const double &length)
 Generic Constructor (empty) More...
 
void solve_steady ()
 Solve the steady problem. More...
 
void timestep (const double &dt, const unsigned &n_tsteps)
 Take n_tsteps timesteps of size dt. More...
 
void actions_before_implicit_timestep ()
 
void make_traction_elements ()
 
void make_free_surface_elements ()
 
void complete_build ()
 
 ~InclinedPlaneProblem ()
 Generic desructor to clean up the memory allocated in the problem. More...
 

Additional Inherited Members

- Protected Attributes inherited from InclinedPlaneProblem< ELEMENT, ElasticLineFluidInterfaceElement< ELEMENT > >
MeshBulk_mesh_pt
 Bulk fluid mesh. More...
 
MeshTraction_mesh_pt
 Mesh for the traction elements that are added at inlet and outlet. More...
 
MeshSurface_mesh_pt
 Mesh for the free surface elements. More...
 
MeshPoint_mesh_pt
 Mesh for the point elements at each end of the free surface. More...
 
std::string Output_prefix
 Prefix for output files. More...
 

Constructor & Destructor Documentation

◆ ElasticInclinedPlaneProblem()

template<class ELEMENT , class TIMESTEPPER >
ElasticInclinedPlaneProblem< ELEMENT, TIMESTEPPER >::ElasticInclinedPlaneProblem ( const unsigned nx,
const unsigned ny,
const double length 
)
inline
693  :
695  (nx,ny,length)
696  {
697  //Set the name
698  this->Output_prefix = "elastic";
699 
700  //Create our one and only timestepper, with adaptive timestepping
701  this->add_time_stepper_pt(new TIMESTEPPER);
702 
703  //Create the bulk mesh
705  nx,ny,length,1.0,this->time_stepper_pt());
706 
707  //Set the consititutive law for the elements
708  unsigned n_element = this->Bulk_mesh_pt->nelement();
709  //Loop over all the fluid elements
710  for(unsigned e=0;e<n_element;e++)
711  {
712  //Cast to a fluid element
713  ELEMENT *temp_pt = dynamic_cast<ELEMENT*>(
714  this->Bulk_mesh_pt->element_pt(e));
715  //Set the constitutive law
716  temp_pt->constitutive_law_pt() =
718  }
719 
720  //Create the traction elements
721  this->make_traction_elements();
722  //Create the free surface element
724 
725  //Add all sub meshes to the problem
726  this->add_sub_mesh(this->Bulk_mesh_pt);
727  this->add_sub_mesh(this->Traction_mesh_pt);
728  this->add_sub_mesh(this->Surface_mesh_pt);
729  this->add_sub_mesh(this->Point_mesh_pt);
730  //Create the global mesh
731  this->build_global_mesh();
732 
733  //Complete the rest of the build
734  this->complete_build();
735  } //end of constructor
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Create an Elastic mesh for the problem.
Definition: inclined_plane.cc:667
Definition: inclined_plane.cc:139
Mesh * Bulk_mesh_pt
Bulk fluid mesh.
Definition: inclined_plane.cc:144
std::string Output_prefix
Prefix for output files.
Definition: inclined_plane.cc:156
Mesh * Traction_mesh_pt
Mesh for the traction elements that are added at inlet and outlet.
Definition: inclined_plane.cc:147
Mesh * Surface_mesh_pt
Mesh for the free surface elements.
Definition: inclined_plane.cc:150
Mesh * Point_mesh_pt
Mesh for the point elements at each end of the free surface.
Definition: inclined_plane.cc:153
GeneralisedElement *& element_pt(const unsigned long &e)
Return pointer to element e.
Definition: mesh.h:448
unsigned long nelement() const
Return number of elements in the mesh.
Definition: mesh.h:590
ConstitutiveLaw * Constitutive_law_pt
Pointer to constitutive law.
Definition: TwenteMeshGluing.cpp:65
const unsigned nx
Definition: ConstraintElementsUnitTest.cpp:30
const unsigned ny
Definition: ConstraintElementsUnitTest.cpp:31

References Global_Physical_Variables::Constitutive_law_pt, e(), Mesh_Parameters::nx, and Mesh_Parameters::ny.

Member Function Documentation

◆ actions_after_implicit_timestep()

template<class ELEMENT , class TIMESTEPPER >
void ElasticInclinedPlaneProblem< ELEMENT, TIMESTEPPER >::actions_after_implicit_timestep ( )
inline

Update Lagrangian positions after each timestep (updated-lagrangian approach)

740  {
741  //Now loop over all the nodes and reset their Lagrangian coordinates
742  unsigned n_node = this->Bulk_mesh_pt->nnode();
743  for(unsigned n=0;n<n_node;n++)
744  {
745  //Cast node to an elastic node
746  SolidNode* temp_pt =
747  static_cast<SolidNode*>(this->Bulk_mesh_pt->node_pt(n));
748  for(unsigned j=0;j<2;j++) {temp_pt->xi(j) = temp_pt->x(j);}
749  }
750  } //end of actions_after_implicit_timestep
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
unsigned long nnode() const
Return number of nodes in the mesh.
Definition: mesh.h:596
Node *& node_pt(const unsigned long &n)
Return pointer to global node n.
Definition: mesh.h:436
double & x(const unsigned &i)
Return the i-th nodal coordinate.
Definition: nodes.h:1060
Definition: nodes.h:1686
double & xi(const unsigned &i)
Reference to i-th Lagrangian position.
Definition: nodes.h:1883
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2

References j, n, oomph::Node::x(), and oomph::SolidNode::xi().


The documentation for this class was generated from the following file: