30 #ifndef OOMPH_MACRO_ELEMENT_NODE_UPDATE_ELEMENTS_HEADER 31 #define OOMPH_MACRO_ELEMENT_NODE_UPDATE_ELEMENTS_HEADER 64 const unsigned &n_position_type,
65 const unsigned &initial_nvalue) :
66 Node(n_dim,n_position_type,initial_nvalue)
76 const unsigned &n_dim,
77 const unsigned &n_position_type,
78 const unsigned &initial_nvalue) :
79 Node(time_stepper_pt,n_dim,n_position_type,initial_nvalue)
112 void node_update(
const bool& update_all_time_levels_for_new_node=
false);
274 template<
class ELEMENT>
290 const int &face_index) :
292 element_pt,face_index),
327 unsigned n_node = this->nnode();
328 for (
unsigned j=0;j<n_node;j++)
332 this->local_coordinate_of_node(j,s_in_node_update_element);
350 ELEMENT::rebuild_from_sons(mesh_pt);
353 unsigned n_node =this->nnode();
354 for (
unsigned j=0;j<n_node;j++)
358 this->local_coordinate_of_node(j,s_in_node_update_element);
405 return Macro_domain_pt;
417 if (update_all_solid_nodes)
420 "Doesn't make sense to use an MacroElementNodeUpdateMesh with\n";
422 "SolidElements so specifying update_all_solid_nodes=true\n";
423 error_message +=
"doesn't make sense either\n";
426 OOMPH_CURRENT_FUNCTION,
427 OOMPH_EXCEPTION_LOCATION);
434 unsigned n_node = nnode();
435 for (
unsigned n=0;n<n_node;n++)
442 std::ostringstream error_message;
444 <<
"Failed to cast to MacroElementNodeUpdateNode.\n" 445 <<
"Node is of type: " <<
typeid(node_pt(n)).name() << std::endl;
448 OOMPH_CURRENT_FUNCTION,
449 OOMPH_EXCEPTION_LOCATION);
459 External_halo_node_pt.begin();it!=External_halo_node_pt.end();it++)
461 int iproc=(*it).first;
462 unsigned n_ext_halo_node=nexternal_halo_node(iproc);
463 for (
unsigned n=0;n<n_ext_halo_node;n++)
470 std::ostringstream error_message;
472 <<
"Failed to cast (ext. halo) to MacroElementNodeUpdateNode.\n" 473 <<
"Node is of type: " <<
typeid(node_pt(n)).name() << std::endl;
476 OOMPH_CURRENT_FUNCTION,
477 OOMPH_EXCEPTION_LOCATION);
483 #endif // (ifdef OOMPH_HAS_MPI) 494 const bool& report_stats,
495 const bool& overrule_keep_as_halo_element_status)
499 doc_info,report_stats,
500 overrule_keep_as_halo_element_status);
503 int n_proc=comm_pt->nproc();
510 for (
int iproc=0;iproc<n_proc;iproc++)
513 unsigned n_halo_el=halo_el_pt.size();
514 for (
unsigned e=0;
e<n_halo_el;
e++)
535 Geom_object_vector_pt=geom_object_vector_pt;
541 return Geom_object_vector_pt;
565 template<
class ELEMENT>
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...
void broken_copy(const std::string &class_name)
Issue error message and terminate execution.
Vector< double > S_in_node_update_element
Vector containing the node's local coordinates in node update element.
MacroElementNodeUpdateMesh(const MacroElementNodeUpdateMesh &)
Broken copy constructor.
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 ~MacroElementNodeUpdateNode()
Broken assignment operator.
unsigned ngeom_object()
Number of geometric objects involved in node update function.
Vector< double > & s_in_node_update_element()
Vector of local coordinates of node with the finite element that performs the MacroElement-based node...
Information for documentation of results: Directory and file number to enable output in the form RESL...
virtual ~MacroElementNodeUpdateMesh()
Virtual destructor (empty)
Vector< GeomObject * > Geom_object_pt
Vector of geometric objects that are involved in the node update operation.
MacroElementNodeUpdateElementBase(const MacroElementNodeUpdateElementBase &)
Broken copy constructor.
Domain * Macro_domain_pt
Domain associated with MacroElementNodeUpdateNodeMesh.
void set_node_update_info(const Vector< GeomObject *> &geom_object_pt)
Broken assignment operator.
FaceGeometry()
Constructor calls the constructor of the underlying ELEMENT.
A general Finite Element class.
GeomObject * geom_object_pt(const unsigned &i)
Pointer to i-th geometric object involved in node update function.
Nodes are derived from Data, but, in addition, have a definite (Eulerian) position in a space of a gi...
Vector< GeomObject * > & vector_geom_object_pt()
Return vector of geometric objects involved in node update function.
MacroElementNodeUpdateMesh()
Constructor (empty)
~MacroElementNodeUpdateElement()
Empty destructor to clean up allocated memory.
MacroElementNodeUpdateElementBase()
Constructor (empty)
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.
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 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...
FiniteElement * Node_update_element_pt
Pointer to finite element that performs the node update by referring to its macro-element representat...
void operator=(const MacroElementNodeUpdateElementBase &)
Broken assignment operator.
Domain *& macro_domain_pt()
Broken assignment operator.
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.
FiniteElement *& node_update_element_pt()
Pointer to finite element that performs the update by referring to its macro-element representation (...
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 ...
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 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...
Base class for elements that allow MacroElement-based node update.
void broken_assign(const std::string &class_name)
Issue error message and terminate execution.
MacroElementNodeUpdateElement(const MacroElementNodeUpdateElement &)
Broken copy constructor.
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...
TimeStepper *& time_stepper_pt()
Return the pointer to the timestepper.
std::string string(const unsigned &i)
Return the i-th string or "" if the relevant string hasn't been defined.
MacroElementNodeUpdateElement(FiniteElement *const &element_pt, const int &face_index)
Constructor used for face elements.
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...
Vector< GeomObject * > Geom_object_vector_pt
Vector of GeomObject associated with MacroElementNodeUpdateNodeMesh.
Vector< GeomObject * > & geom_object_pt()
Vector of (pointers to) geometric objects involved in node update function.
Base class for Domains with curvilinear and/or time-dependent boundaries. Domain boundaries are typic...
Base class for time-stepping schemes. Timestepper provides an approximation of the temporal derivativ...
virtual ~MacroElementNodeUpdateElementBase()
Virtual destructor (empty)
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...
Vector< GeomObject * > geom_object_vector_pt()
Access function to the vector of GeomObject.
MacroElementNodeUpdateNode(const MacroElementNodeUpdateNode &)
Broken copy constructor.
An oomph-lib wrapper to the MPI_Comm communicator object. Just contains an MPI_Comm object (which is ...
MacroElementNodeUpdateElement()
Constructor: Call constructor of underlying element.