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>
89 if (el_pt->
dim() != 1)
91 std::string err =
"OneDMesh is only for 1D elements";
93 err, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
120 template<
class ELEMENT>
128 const unsigned& n_element,
129 const double& length,
131 :
OneDMesh<ELEMENT>(n_element, length, time_stepper_pt)
142 const unsigned& n_element,
146 :
OneDMesh<ELEMENT>(n_element, xmin, xmax, time_stepper_pt)
A general Finite Element class.
unsigned dim() const
Return the spatial dimension of the element, i.e. the number of local coordinates required to paramet...
Base class for line meshes (meshes made of 1D line elements)
static Steady< 0 > Default_TimeStepper
Default Steady Timestepper, to be used in default arguments to Mesh constructors.
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...
An OomphLibError object which should be thrown when an run-time error is encountered....
Intermediate mesh class that implements the mesh adaptation functions specified in the RefineableMesh...
void setup_binary_tree_forest()
Set up BinaryTreeForest. Wipes any existing tree structure and regards the currently active elements ...
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...
////////////////////////////////////////////////////////////////////// //////////////////////////////...
std::string string(const unsigned &i)
Return the i-th string or "" if the relevant string hasn't been defined.
//////////////////////////////////////////////////////////////////// ////////////////////////////////...