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";
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"
431 External_halo_node_pt.begin();
432 it != External_halo_node_pt.end();
435 int iproc = (*it).first;
436 unsigned n_ext_halo_node = nexternal_halo_node(iproc);
437 for (
unsigned n = 0;
n < n_ext_halo_node;
n++)
441 external_halo_node_pt(iproc,
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;
469 const bool& report_stats,
470 const bool& overrule_keep_as_halo_element_status)
473 Mesh::distribute(comm_pt,
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>
int i
Definition: BiCGSTAB_step_by_step.cpp:9
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
Array< double, 1, 3 > e(1./3., 0.5, 2.)
TimeStepper *& time_stepper_pt()
Return the pointer to the timestepper.
Definition: nodes.h:238
Definition: oomph_utilities.h:499
Definition: element_with_moving_nodes.h:382
FaceGeometry()
Constructor calls the constructor of the underlying ELEMENT.
Definition: macro_element_node_update_element.h:547
Definition: elements.h:4998
Definition: elements.h:1313
virtual void local_coordinate_of_node(const unsigned &j, Vector< double > &s) const
Definition: elements.h:1842
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
Definition: elements.h:2175
unsigned nnode() const
Return the number of nodes.
Definition: elements.h:2210
Definition: geom_objects.h:101
Base class for elements that allow MacroElement-based node update.
Definition: macro_element_node_update_element.h:197
virtual ~MacroElementNodeUpdateElementBase()
Virtual destructor (empty)
Definition: macro_element_node_update_element.h:210
unsigned ngeom_object()
Number of geometric objects involved in node update function.
Definition: macro_element_node_update_element.h:220
Vector< GeomObject * > & geom_object_pt()
Definition: macro_element_node_update_element.h:227
Vector< GeomObject * > Geom_object_pt
Definition: macro_element_node_update_element.h:243
MacroElementNodeUpdateElementBase()
Constructor (empty)
Definition: macro_element_node_update_element.h:200
GeomObject * geom_object_pt(const unsigned &i)
Definition: macro_element_node_update_element.h:234
virtual void set_node_update_info(const Vector< GeomObject * > &geom_object_pt)=0
void operator=(const MacroElementNodeUpdateElementBase &)=delete
Broken assignment operator.
MacroElementNodeUpdateElementBase(const MacroElementNodeUpdateElementBase &)=delete
Broken copy constructor.
Definition: macro_element_node_update_element.h:265
~MacroElementNodeUpdateElement()
Empty destructor to clean up allocated memory.
Definition: macro_element_node_update_element.h:288
void rebuild_from_sons(Mesh *&mesh_pt)
Definition: macro_element_node_update_element.h:330
void set_node_update_info(const Vector< GeomObject * > &geom_object_pt)
Broken assignment operator.
Definition: macro_element_node_update_element.h:297
MacroElementNodeUpdateElement(FiniteElement *const &element_pt, const int &face_index)
Constructor used for face elements.
Definition: macro_element_node_update_element.h:275
MacroElementNodeUpdateElement()
Constructor: Call constructor of underlying element.
Definition: macro_element_node_update_element.h:268
MacroElementNodeUpdateElement(const MacroElementNodeUpdateElement &)=delete
Broken copy constructor.
Definition: macro_element_node_update_element.h:360
Vector< GeomObject * > Geom_object_vector_pt
Definition: macro_element_node_update_element.h:524
Domain * Macro_domain_pt
Domain associated with MacroElementNodeUpdateNodeMesh.
Definition: macro_element_node_update_element.h:527
void set_geom_object_vector_pt(Vector< GeomObject * > geom_object_vector_pt)
Definition: macro_element_node_update_element.h:510
MacroElementNodeUpdateMesh(const MacroElementNodeUpdateMesh &)=delete
Broken copy constructor.
MacroElementNodeUpdateMesh()
Constructor (empty)
Definition: macro_element_node_update_element.h:363
void node_update(const bool &update_all_solid_nodes=false)
Definition: macro_element_node_update_element.h:387
virtual ~MacroElementNodeUpdateMesh()
Virtual destructor (empty)
Definition: macro_element_node_update_element.h:366
Vector< GeomObject * > geom_object_vector_pt()
Access function to the vector of GeomObject.
Definition: macro_element_node_update_element.h:516
Domain *& macro_domain_pt()
Broken assignment operator.
Definition: macro_element_node_update_element.h:376
Definition: macro_element_node_update_element.h:49
void node_update(const bool &update_all_time_levels_for_new_node=false)
Definition: macro_element_node_update_element.cc:48
virtual ~MacroElementNodeUpdateNode()
Broken assignment operator.
Definition: macro_element_node_update_element.h:88
MacroElementNodeUpdateNode(const MacroElementNodeUpdateNode &)=delete
Broken copy constructor.
Vector< double > & s_in_node_update_element()
Definition: macro_element_node_update_element.h:109
Vector< GeomObject * > & geom_object_pt()
Definition: macro_element_node_update_element.h:122
MacroElementNodeUpdateNode(const unsigned &n_dim, const unsigned &n_position_type, const unsigned &initial_nvalue)
Definition: macro_element_node_update_element.h:54
MacroElementNodeUpdateNode(TimeStepper *time_stepper_pt, const unsigned &n_dim, const unsigned &n_position_type, const unsigned &initial_nvalue)
Definition: macro_element_node_update_element.h:66
FiniteElement *& node_update_element_pt()
Definition: macro_element_node_update_element.h:101
Vector< double > S_in_node_update_element
Definition: macro_element_node_update_element.h:178
GeomObject * geom_object_pt(const unsigned &i)
Definition: macro_element_node_update_element.h:130
GeomObject ** all_geom_object_pt()
Return all geometric objects that affect the node update.
Definition: macro_element_node_update_element.h:144
Vector< GeomObject * > Geom_object_pt
Definition: macro_element_node_update_element.h:182
unsigned ngeom_object() const
Number of geometric objects involved in node update function.
Definition: macro_element_node_update_element.h:115
FiniteElement * Node_update_element_pt
Definition: macro_element_node_update_element.h:174
void set_node_update_info(FiniteElement *node_update_element_pt, const Vector< double > &s_in_node_update_element, const Vector< GeomObject * > &geom_object_pt)
Definition: macro_element_node_update_element.h:161
Vector< GeomObject * > & vector_geom_object_pt()
Definition: macro_element_node_update_element.h:138
unsigned long nnode() const
Return number of nodes in the mesh.
Definition: mesh.h:596
Node *& node_pt(const unsigned long &n)
Return pointer to global node n.
Definition: mesh.h:436
Definition: communicator.h:54
int nproc() const
number of processors
Definition: communicator.h:157
Definition: oomph_definitions.h:222
Definition: timesteppers.h:231
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10
string name
Definition: plotDoE.py:33
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2