26 #ifndef OOMPH_ONE_D_LAGRANGIAN_MESH_TEMPLATE_CC
27 #define OOMPH_ONE_D_LAGRANGIAN_MESH_TEMPLATE_CC
46 template<
class ELEMENT>
48 const unsigned& n_element,
52 :
OneDMesh<ELEMENT>(n_element, length, time_stepper_pt),
53 Undef_eulerian_posn_pt(undef_eulerian_posn_pt)
56 MeshChecker::assert_geometric_element<QElementGeometricBase, ELEMENT>(1);
77 template<
class ELEMENT>
79 const unsigned& n_element,
84 :
OneDMesh<ELEMENT>(n_element, xmin, xmax, time_stepper_pt),
85 Undef_eulerian_posn_pt(undef_eulerian_posn_pt)
88 MeshChecker::assert_geometric_element<QElementGeometricBase, ELEMENT>(1);
107 template<
class ELEMENT>
111 ELEMENT* cast_element_pt =
dynamic_cast<ELEMENT*
>(finite_element_pt(0));
114 unsigned n_lagrangian_type = cast_element_pt->nnodal_lagrangian_type();
118 if (n_lagrangian_type > 1)
121 unsigned n_p = cast_element_pt->nnode_1d();
126 unsigned long n_node = nnode();
127 for (
unsigned long n = 0; n < n_node; n++)
129 node_pt(n)->xi_gen(1, 0) = 0.5 * xstep;
137 template<
class ELEMENT>
144 unsigned n_dim = node_pt(0)->ndim();
147 ELEMENT* cast_element_pt =
dynamic_cast<ELEMENT*
>(finite_element_pt(0));
151 unsigned n_lagrangian_type = cast_element_pt->nnodal_lagrangian_type();
162 unsigned long n_node = nnode();
165 for (
unsigned long n = 0; n < n_node; n++)
168 xi[0] = node_pt(n)->xi(0);
171 Undef_eulerian_posn_pt->d2position(xi,
R, a, dadxi);
174 for (
unsigned i = 0;
i < n_dim;
i++)
177 node_pt(n)->x_gen(0,
i) =
R[
i];
179 if (n_lagrangian_type > 1)
185 node_pt(n)->x_gen(1,
i) =
/////////////////////////////////////////////////////////////////////
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...
void assign_default_element_gradients()
Set the default gradients of the elements.
1D mesh consisting of N one-dimensional elements from the QElement family.
////////////////////////////////////////////////////////////////// //////////////////////////////////...
void set_lagrangian_nodal_coordinates()
Make the current configuration the undeformed one by setting the nodal Lagrangian coordinates to thei...
////////////////////////////////////////////////////////////////////// //////////////////////////////...
//////////////////////////////////////////////////////////////////// ////////////////////////////////...