26 #ifndef OOMPH_ONE_D_MESH_HEADER
27 #define OOMPH_ONE_D_MESH_HEADER
31 #include <oomph-lib-config.h>
35 #include "../generic/line_mesh.h"
36 #include "../generic/refineable_line_mesh.h"
50 template<
class ELEMENT>
60 TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper)
74 TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper)
88 FiniteElement* el_pt =
new ELEMENT;
89 if (el_pt->dim() != 1)
91 std::string err =
"OneDMesh is only for 1D elements";
93 err, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
113 void build_mesh(TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper);
120 template<
class ELEMENT>
122 public RefineableLineMesh<ELEMENT>
128 const unsigned& n_element,
129 const double& length,
130 TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper)
131 :
OneDMesh<ELEMENT>(n_element, length, time_stepper_pt)
135 this->setup_binary_tree_forest();
142 const unsigned& n_element,
145 TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper)
146 :
OneDMesh<ELEMENT>(n_element, xmin, xmax, time_stepper_pt)
150 this->setup_binary_tree_forest();
1D mesh consisting of N one-dimensional elements from the QElement family.
OneDMesh(const unsigned &n_element, const double &xmin, const double &xmax, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass number of elements, n_element, minimum coordinate, xmin, maximum coordinate,...
void build_mesh(TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Generic mesh constuction routine, called by all constructors.
unsigned N
Number of elements.
void check_1d() const
Mesh can only be built with 1D elements (but can be either T or Q so can't use the normal assert_geom...
double Length
Length of the domain.
double Xmin
Minimum coordinate.
double Xmax
Maximum coordinate.
OneDMesh(const unsigned &n_element, const double &length, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass number of elements, n_element, length of domain, length, and pointer to timestepper...
Refineable version of the OneDMesh.
RefineableOneDMesh(const unsigned &n_element, const double &xmin, const double &xmax, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor that allows the specification of minimum and maximum values of x coordinates....
RefineableOneDMesh(const unsigned &n_element, const double &length, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass number of elements, n_element, length of domain, length, and pointer to timestepper...
////////////////////////////////////////////////////////////////////// //////////////////////////////...