26 #ifndef OOMPH_MACRO_ELEMENT_NODE_UPDATE_ELEMENTS_HEADER
27 #define OOMPH_MACRO_ELEMENT_NODE_UPDATE_ELEMENTS_HEADER
55 const unsigned& n_position_type,
56 const unsigned& initial_nvalue)
57 :
Node(n_dim, n_position_type, initial_nvalue)
67 const unsigned& n_dim,
68 const unsigned& n_position_type,
69 const unsigned& initial_nvalue)
97 void node_update(
const bool& update_all_time_levels_for_new_node =
false);
260 template<
class ELEMENT>
263 MacroElementNodeUpdateNode>,
276 const int& face_index)
278 element_pt, face_index),
309 unsigned n_node = this->
nnode();
310 for (
unsigned j = 0; j < n_node; j++)
333 ELEMENT::rebuild_from_sons(mesh_pt);
336 unsigned n_node = this->
nnode();
337 for (
unsigned j = 0; j < n_node; j++)
390 if (update_all_solid_nodes)
393 "Doesn't make sense to use an MacroElementNodeUpdateMesh with\n";
395 "SolidElements so specifying update_all_solid_nodes=true\n";
396 error_message +=
"doesn't make sense either\n";
399 error_message, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
406 unsigned n_node =
nnode();
407 for (
unsigned n = 0; n < n_node; n++)
414 std::ostringstream error_message;
415 error_message <<
"Failed to cast to MacroElementNodeUpdateNode.\n"
416 <<
"Node is of type: " <<
typeid(
node_pt(n)).name()
420 OOMPH_CURRENT_FUNCTION,
421 OOMPH_EXCEPTION_LOCATION);
435 int iproc = (*it).first;
437 for (
unsigned n = 0; n < n_ext_halo_node; n++)
445 std::ostringstream error_message;
447 <<
"Failed to cast (ext. halo) to MacroElementNodeUpdateNode.\n"
448 <<
"Node is of type: " <<
typeid(
node_pt(n)).name() << std::endl;
451 OOMPH_CURRENT_FUNCTION,
452 OOMPH_EXCEPTION_LOCATION);
469 const bool& report_stats,
470 const bool& overrule_keep_as_halo_element_status)
478 overrule_keep_as_halo_element_status);
481 int n_proc = comm_pt->nproc();
488 for (
int iproc = 0; iproc < n_proc; iproc++)
491 unsigned n_halo_el = halo_el_pt.size();
492 for (
unsigned e = 0;
e < n_halo_el;
e++)
541 template<
class ELEMENT>
TimeStepper *& time_stepper_pt()
Return the pointer to the timestepper.
Information for documentation of results: Directory and file number to enable output in the form RESL...
Base class for Domains with curvilinear and/or time-dependent boundaries. Domain boundaries are typic...
Specific implementation of the class for specified element and node type.
FaceGeometry()
Constructor calls the constructor of the underlying ELEMENT.
//////////////////////////////////////////////////////////////////// ////////////////////////////////...
A general Finite Element class.
virtual void local_coordinate_of_node(const unsigned &j, Vector< double > &s) const
Get local coordinates of node j in the element; vector sets its own size (broken virtual)
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
unsigned nnode() const
Return the number of nodes.
/////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
virtual ~MacroElementNodeUpdateElementBase()
Virtual destructor (empty)
unsigned ngeom_object()
Number of geometric objects involved in node update function.
Vector< GeomObject * > & geom_object_pt()
Vector of (pointers to) geometric objects involved in node update function.
Vector< GeomObject * > Geom_object_pt
Vector of geometric objects that are involved in the node update operation.
MacroElementNodeUpdateElementBase()
Constructor (empty)
GeomObject * geom_object_pt(const unsigned &i)
Pointer to i-th geometric object involved in node update function.
virtual void set_node_update_info(const Vector< GeomObject * > &geom_object_pt)=0
Set node update information: Pass the vector of (pointers to) the geometric objects that affect the n...
void operator=(const MacroElementNodeUpdateElementBase &)=delete
Broken assignment operator.
MacroElementNodeUpdateElementBase(const MacroElementNodeUpdateElementBase &)=delete
Broken copy constructor.
MacroElementNodeUpdate elements are elements that can not only be updated via their MacroElement repr...
~MacroElementNodeUpdateElement()
Empty destructor to clean up allocated memory.
void rebuild_from_sons(Mesh *&mesh_pt)
Rebuild after unrefinement: Reset the node update information for all nodes so that the nodes get upd...
void set_node_update_info(const Vector< GeomObject * > &geom_object_pt)
Broken assignment operator.
MacroElementNodeUpdateElement(FiniteElement *const &element_pt, const int &face_index)
Constructor used for face elements.
MacroElementNodeUpdateElement()
Constructor: Call constructor of underlying element.
MacroElementNodeUpdateElement(const MacroElementNodeUpdateElement &)=delete
Broken copy constructor.
MacroElementNodeUpdateMeshes contain MacroElementNodeUpdateNodes which have their own node update fun...
Vector< GeomObject * > Geom_object_vector_pt
Vector of GeomObject associated with MacroElementNodeUpdateNodeMesh.
Domain * Macro_domain_pt
Domain associated with MacroElementNodeUpdateNodeMesh.
void set_geom_object_vector_pt(Vector< GeomObject * > geom_object_vector_pt)
Set geometric objects associated with MacroElementNodeUpdateMesh; this must also be called from the c...
MacroElementNodeUpdateMesh(const MacroElementNodeUpdateMesh &)=delete
Broken copy constructor.
MacroElementNodeUpdateMesh()
Constructor (empty)
void distribute(OomphCommunicator *comm_pt, const Vector< unsigned > &element_domain, Vector< GeneralisedElement * > &deleted_element_pt, DocInfo &doc_info, const bool &report_stats, const bool &overrule_keep_as_halo_element_status)
Overload the base class distribute function to deal with halo nodes on halo elements that may have po...
void node_update(const bool &update_all_solid_nodes=false)
Update all nodal positions via sparse MacroElement-based update functions. If a Node is hanging its p...
virtual ~MacroElementNodeUpdateMesh()
Virtual destructor (empty)
Vector< GeomObject * > geom_object_vector_pt()
Access function to the vector of GeomObject.
Domain *& macro_domain_pt()
Broken assignment operator.
////////////////////////////////////////////////////////////////////
void node_update(const bool &update_all_time_levels_for_new_node=false)
Update the current nodal position. If required, perform the auxiliary update of nodal values....
virtual ~MacroElementNodeUpdateNode()
Broken assignment operator.
MacroElementNodeUpdateNode(const MacroElementNodeUpdateNode &)=delete
Broken copy constructor.
Vector< double > & s_in_node_update_element()
Vector of local coordinates of node with the finite element that performs the MacroElement-based node...
Vector< GeomObject * > & geom_object_pt()
Vector of (pointers to) geometric objects involved in node update function.
MacroElementNodeUpdateNode(const unsigned &n_dim, const unsigned &n_position_type, const unsigned &initial_nvalue)
Constructor for steady node of spatial dimension n_dim, with n_position_type generalised coordinates ...
MacroElementNodeUpdateNode(TimeStepper *time_stepper_pt, const unsigned &n_dim, const unsigned &n_position_type, const unsigned &initial_nvalue)
Constructor for bog-standard node of spatial dimension n_dim, with n_position_type generalised coordi...
FiniteElement *& node_update_element_pt()
Pointer to finite element that performs the update by referring to its macro-element representation (...
Vector< double > S_in_node_update_element
Vector containing the node's local coordinates in node update element.
GeomObject * geom_object_pt(const unsigned &i)
Pointer to i-th geometric object involved in node update function.
GeomObject ** all_geom_object_pt()
Return all geometric objects that affect the node update.
Vector< GeomObject * > Geom_object_pt
Vector of geometric objects that are involved in the node update operation.
unsigned ngeom_object() const
Number of geometric objects involved in node update function.
FiniteElement * Node_update_element_pt
Pointer to finite element that performs the node update by referring to its macro-element representat...
void set_node_update_info(FiniteElement *node_update_element_pt, const Vector< double > &s_in_node_update_element, const Vector< GeomObject * > &geom_object_pt)
Set node update information for node: Pass the pointer to the element that performs the update operat...
Vector< GeomObject * > & vector_geom_object_pt()
Return vector of geometric objects involved in node update function.
unsigned nexternal_halo_node()
Total number of external halo nodes in this Mesh.
Node *& external_halo_node_pt(const unsigned &p, const unsigned &j)
Access fct to the j-th external halo node in this Mesh whose non-halo external counterpart is held on...
unsigned long nnode() const
Return number of nodes in the mesh.
Node *& node_pt(const unsigned long &n)
Return pointer to global node n.
std::map< unsigned, Vector< Node * > > External_halo_node_pt
Map of vectors holding the pointers to the external halo nodes.
virtual void distribute(OomphCommunicator *comm_pt, const Vector< unsigned > &element_domain, Vector< GeneralisedElement * > &deleted_element_pt, DocInfo &doc_info, const bool &report_stats, const bool &overrule_keep_as_halo_element_status)
Distribute the problem and doc; make this virtual to allow overloading for particular meshes where fu...
Vector< GeneralisedElement * > halo_element_pt(const unsigned &p)
Return vector of halo elements in this Mesh whose non-halo counterpart is held on processor p.
Nodes are derived from Data, but, in addition, have a definite (Eulerian) position in a space of a gi...
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....
////////////////////////////////////////////////////////////////////// //////////////////////////////...
std::string string(const unsigned &i)
Return the i-th string or "" if the relevant string hasn't been defined.
//////////////////////////////////////////////////////////////////// ////////////////////////////////...