30#ifndef OOMPH_MESH_AS_GEOMETRIC_OBJECT_HEADER
31#define OOMPH_MESH_AS_GEOMETRIC_OBJECT_HEADER
35#include <oomph-lib-config.h>
61 namespace MeshAsGeomObject_Helper
70 SamplePointContainerParameters*& sample_point_container_parameters_pt);
119 throw OomphLibError(
"Wrong sample_point_container_parameters_pt",
179 static_cast<unsigned>(dim[1]));
198 std::ostringstream error_message;
199 error_message <<
"Unable to dynamic cast element: " << std::endl
200 <<
"into a FiniteElement: GeomObject representation is "
219 typedef std::set<Data*>::iterator
IT;
254 oomph_info <<
"Sample_point_container_version = "
382 "Ignoring the use_coordinate_as_initial_guess argument.",
383 "MeshAsGeomObject::locate_zeta()",
425 std::ostringstream error_message;
426 error_message <<
"Cannot locate zeta ";
429 error_message <<
zeta[
i] <<
" ";
431 error_message << std::endl;
CGAL-based SamplePointContainer.
NonRefineableBinArray class.
RefineableBinArray class.
Base class for all sample point containers.
virtual void locate_zeta(const Vector< double > &zeta, GeomObject *&sub_geom_object_pt, Vector< double > &s)=0
Find sub-GeomObject (finite element) and the local coordinate s within it that contains point with gl...
Helper object for dealing with the parameters used for the CGALSamplePointContainer objects.
A class that represents a collection of data; each Data object may contain many different individual ...
A general Finite Element class.
void position(const Vector< double > &zeta, Vector< double > &r) const
Return the parametrised position of the FiniteElement in its incarnation as a GeomObject,...
double size() const
Calculate the size of the element (length, area, volume,...) in Eulerian computational coordinates....
unsigned dim() const
Return the spatial dimension of the element, i.e. the number of local coordinates required to paramet...
unsigned ngeom_data() const
A standard FiniteElement is fixed, so there are no geometric data when viewed in its GeomObject incar...
A geometric object is an object that provides a parametrised description of its shape via the functio...
void set_nlagrangian_and_ndim(const unsigned &n_lagrangian, const unsigned &n_dim)
Set # of Lagrangian and Eulerian coordinates.
unsigned nlagrangian() const
Access function to # of Lagrangian coordinates.
This class provides a GeomObject representation of a given finite element mesh. The Lagrangian coordi...
MeshAsGeomObject()
Empty Constructor.
unsigned Sample_point_container_version
Which version of the sample point container are we using?
unsigned sample_point_container_version() const
Which sample point container is used in locate zeta? (uses enum Sample_Point_Container_Type)
SamplePointContainer * Sample_point_container_pt
Pointer to the sample point container.
void build_it(SamplePointContainerParameters *sample_point_container_parameters_pt)
Helper function to actually build the thing.
Data * geom_data_pt(const unsigned &j)
Return pointer to the j-th Data item that the object's shape depends on.
unsigned nelement()
Number of elements in the underlying mesh.
SamplePointContainer * sample_point_container_pt() const
Pointer to the sample point container.
void operator=(const MeshAsGeomObject &)=delete
Broken assignment operator.
OomphCommunicator * Communicator_pt
Communicator.
unsigned ngeom_data() const
How many items of Data does the shape of the object depend on?
Vector< FiniteElement * > Sub_geom_object_pt
Internal storage for the elements that constitute the object.
FiniteElement * finite_element_pt(const unsigned &e)
Return pointer to e-th finite element.
MeshAsGeomObject(Mesh *const &mesh_pt)
Constructor.
~MeshAsGeomObject()
Destructor.
void locate_zeta(const Vector< double > &zeta, GeomObject *&sub_geom_object_pt, Vector< double > &s, const bool &use_coordinate_as_initial_guess=false)
Find the sub geometric object and local coordinate therein that corresponds to the intrinsic coordina...
MeshAsGeomObject(const MeshAsGeomObject &)=delete
Broken copy constructor.
MeshAsGeomObject(SamplePointContainerParameters *sample_point_container_parameters_pt)
Constructor.
void position(const unsigned &t, const Vector< double > &zeta, Vector< double > &r) const
Parametrised position on object: r(zeta). Evaluated at previous timestep. t=0: current time; t>0: pre...
Mesh * Mesh_pt
Pointer to mesh.
void position(const Vector< double > &zeta, Vector< double > &r) const
Return the position as a function of the intrinsic coordinate zeta. This provides an (expensive!...
void dposition(const Vector< double > &xi, DenseMatrix< double > &drdxi) const
Return the derivative of the position.
Vector< Data * > Geom_data_pt
Vector of pointers to Data items that affects the object's shape.
bool is_mesh_distributed() const
Boolean to indicate if Mesh has been distributed.
FiniteElement * finite_element_pt(const unsigned &e) const
Upcast (downcast?) to FiniteElement (needed to access FiniteElement member functions).
Node *& node_pt(const unsigned long &n)
Return pointer to global node n.
unsigned long nnode() const
Return number of nodes in the mesh.
GeneralisedElement *& element_pt(const unsigned long &e)
Return pointer to element e.
void output(std::ostream &outfile)
Output for all elements.
OomphCommunicator * communicator_pt() const
Read-only access fct to communicator (Null if mesh is not distributed, i.e. if we don't have mpi).
unsigned long nelement() const
Return number of elements in the mesh.
unsigned ndim() const
Return (Eulerian) spatial dimension of the node.
Helper object for dealing with the parameters used for the NonRefineableBinArray objects.
An oomph-lib wrapper to the MPI_Comm communicator object. Just contains an MPI_Comm object (which is ...
An OomphLibError object which should be thrown when an run-time error is encountered....
An OomphLibWarning object which should be created as a temporary object to issue a warning....
Helper object for dealing with the parameters used for the RefineableBinArray objects.
Helper object for dealing with the parameters used for the SamplePointContainer objects.
TAdvectionDiffusionReactionElement<NREAGENT,DIM,NNODE_1D> elements are isoparametric triangular DIM-d...
unsigned Default_sample_point_container_version
Default sample point container type. Must currently be one of UseCGALSamplePointContainer,...
void create_sample_point_container_parameters(Mesh *mesh_pt, SamplePointContainerParameters *&sample_point_container_parameters_pt)
"Factory" for SamplePointContainerParameters of the right type as selected by Default_sample_point_co...
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
@ UseCGALSamplePointContainer
@ UseNonRefineableBinArray
OomphInfo oomph_info
Single (global) instantiation of the OomphInfo object – this is used throughout the library as a "rep...