30 #ifndef OOMPH_ONE_D_LAGRANGIAN_MESH_TEMPLATE_CC 31 #define OOMPH_ONE_D_LAGRANGIAN_MESH_TEMPLATE_CC 53 template <
class ELEMENT>
59 OneDMesh<ELEMENT>(n_element,length,time_stepper_pt),
60 Undef_eulerian_posn_pt(undef_eulerian_posn_pt)
63 MeshChecker::assert_geometric_element<QElementGeometricBase,ELEMENT>(1);
84 template <
class ELEMENT>
91 OneDMesh<ELEMENT>(n_element,xmin,xmax,time_stepper_pt),
95 MeshChecker::assert_geometric_element<QElementGeometricBase,ELEMENT>(1);
115 template<
class ELEMENT>
122 unsigned n_lagrangian_type = cast_element_pt->nnodal_lagrangian_type();
126 if(n_lagrangian_type > 1)
129 unsigned n_p = cast_element_pt->nnode_1d();
134 unsigned long n_node =
nnode();
135 for(
unsigned long n=0;n<n_node;n++) {
node_pt(n)->
xi_gen(1,0) = 0.5*xstep;}
142 template <
class ELEMENT>
156 unsigned n_lagrangian_type = cast_element_pt->nnodal_lagrangian_type();
167 unsigned long n_node =
nnode();
170 for(
unsigned long n=0;n<n_node;n++)
179 for(
unsigned i=0;
i<n_dim;
i++)
184 if(n_lagrangian_type > 1)
void assign_undeformed_positions()
Assign the undeformed Eulerian positions to the nodes.
OneDLagrangianMesh(const unsigned &n_element, const double &length, GeomObject *undef_eulerian_posn_pt, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass number of elements, length, pointer to GeomObject that defines the undeformed Euler...
unsigned ndim() const
Return (Eulerian) spatial dimension of the node.
SolidNode * node_pt(const unsigned long &n)
Return a pointer to the n-th global SolidNode.
double & xi(const unsigned &i)
Reference to i-th Lagrangian position.
double & xi_gen(const unsigned &k, const unsigned &i)
Reference to the generalised Lagrangian position. `Type': k; 'Coordinate direction: i...
virtual void d2position(const Vector< double > &zeta, RankThreeTensor< double > &ddrdzeta) const
2nd derivative of position Vector w.r.t. to coordinates: = ddrdzeta(alpha,beta,i). Evaluated at current time.
double & x_gen(const unsigned &k, const unsigned &i)
Reference to the generalised position x(k,i).
GeomObject * Undef_eulerian_posn_pt
Undeformed Eulerian shape.
unsigned long nnode() const
Return number of nodes in the mesh.
FiniteElement * finite_element_pt(const unsigned &e) const
Upcast (downcast?) to FiniteElement (needed to access FiniteElement member functions).
void assign_default_element_gradients()
Set the default gradients of the elements.
Base class for time-stepping schemes. Timestepper provides an approximation of the temporal derivativ...
void set_lagrangian_nodal_coordinates()
Make the current configuration the undeformed one by setting the nodal Lagrangian coordinates to thei...