A template Class for BoundaryNodes; that is Nodes that MAY live on the boundary of a Mesh. The class is formed by a simple composition of the template parameter NODE_TYPE, which must be a Node class and the BoundaryNodeBase class. Final overloading of functions is always in favour of the BoundaryNodeBase implementation; i.e. these nodes can live on boundaries. More...
#include <nodes.h>
Public Member Functions | |
void | clear_copied_pointers () |
Clear pointers to the copied data used when we have periodic nodes. The shallow (pointer) copy is turned into a deep copy by allocating new data and copying the actual values across. More... | |
BoundaryNode () | |
Default Constructor. More... | |
BoundaryNode (const unsigned &n_dim, const unsigned &n_position_type, const unsigned &initial_n_value) | |
Steady constructor, for a BoundaryNode of spatial dimension n_dim. Simply passes all arguments through to the underlying Node constructor which allocates storage for initial_n_value values. NPosition_type is the number of coordinate types needed in the mapping between local and global coordinates (e.g. 1 for Lagrange-type elements; 2 for 1D Hermite elements; 4 for 2D Hermite elements, etc). More... | |
BoundaryNode (TimeStepper *const &time_stepper_pt, const unsigned &n_dim, const unsigned &n_position_type, const unsigned &initial_n_value) | |
Unsteady constructor for a BoundaryNode of spatial dimension n_dim. Simply passes all arguments through to the underlygin Node constructor which allocates storage for initial_n_value values with history values as required by the timestepper. n_position_type: # of coordinate types needed in the mapping between local and global coordinates (e.g. 1 for Lagrange-type elements; 2 for 1D Hermite elements; 4 for 2D Hermite elements). More... | |
BoundaryNode (const unsigned &n_lagrangian, const unsigned &n_lagrangian_type, const unsigned &n_dim, const unsigned &n_position_type, const unsigned &initial_n_value) | |
Steady constructor for Solid-type boundary nodes. The node has n_lagrangian Lagrangian coordinates of n_lagrangian_type types (1 for Lagrange elements, 2 for 1D Hermite etc.). The Eulerian dimension of the Node is n_dim and we have n_position_type (generalised) Eulerian coordinates. There are initial_n_value values stored at this node. More... | |
BoundaryNode (TimeStepper *const &time_stepper_pt, const unsigned &n_lagrangian, const unsigned &n_lagrangian_type, const unsigned &n_dim, const unsigned &n_position_type, const unsigned &initial_n_value) | |
Unsteady constructor for Solid-type boundary nodes Allocates storage for initial_n_value nodal values with history values as required by timestepper. The node has n_lagrangian Lagrangian coordinates of n_lagrangian_type types (1 for Lagrange elements, 2 for 1D Hermite etc.)/ The Eulerian dimension of the Node is n_dim and we have n_position_type generalised Eulerian coordinates. More... | |
~BoundaryNode () | |
Destructor resets pointers if. More... | |
BoundaryNode (const BoundaryNode< NODE_TYPE > &node)=delete | |
Broken copy constructor. More... | |
void | operator= (const BoundaryNode< NODE_TYPE > &)=delete |
Broken assignment operator. More... | |
bool | boundary_coordinates_have_been_set_up () |
Have boundary coordinates been set up? More... | |
void | get_boundaries_pt (std::set< unsigned > *&boundaries_pt) |
Access to pointer to set of mesh boundaries that this node occupies; NULL if the node is not on any boundary Final overload. More... | |
bool | is_on_boundary () const |
Test whether the node lies on a boundary Final overload. More... | |
bool | is_on_boundary (const unsigned &b) const |
Test whether the node lies on mesh boundary b Final overload. More... | |
void | add_to_boundary (const unsigned &b) |
Add the node to mesh boundary b, final overload. More... | |
void | remove_from_boundary (const unsigned &b) |
Remover the node from mesh boundary b, final overload. More... | |
unsigned | ncoordinates_on_boundary (const unsigned &b) |
Get the number of boundary coordinates on mesh boundary b. More... | |
void | get_coordinates_on_boundary (const unsigned &b, Vector< double > &boundary_zeta) |
Return the vector of coordinates on mesh boundary b Final overload. More... | |
void | set_coordinates_on_boundary (const unsigned &b, const Vector< double > &boundary_zeta) |
Set the vector of coordinates on mesh boundary b Final overload. More... | |
void | get_coordinates_on_boundary (const unsigned &b, const unsigned &k, Vector< double > &boundary_zeta) |
Return the vector of k-th generalised boundary coordinates on mesh boundary b Final overload. More... | |
void | set_coordinates_on_boundary (const unsigned &b, const unsigned &k, const Vector< double > &boundary_zeta) |
Set the vector of k-th generalised boundary coordinates on mesh boundary b. Final overload. More... | |
unsigned | nvalue_assigned_by_face_element (const unsigned &face_id=0) const |
Return the number of values associated with the i-th face element field. If no argument is specified we return the value associated with the first (and assumed to be only) face element attached to this node. Throws error only in paranoid mode if no values have been set by any FaceElements. If you want to catch such cases gracefully in all circumstances (there are examples with complex unstructured 3D meshes where it's not clear a priori if a node has been resized by FaceElements) use alternative version (with leading bool arguments) that always checks and throws so exceptions can be caught gracefully. Returns UINT_MAX if error. More... | |
void | assign_additional_values_with_face_id (const unsigned &n_additional_value, const unsigned &face_id=0) |
Member function to allocates storage for a given number of additional degrees of freedom, n_additional_value, associated with a particular face_id to the Node node_pt. Needs to be filled in here so that access to the nodal values is available. More... | |
void | make_periodic (Node *const &node_pt) |
Make the node periodic. More... | |
void | make_periodic_nodes (const Vector< Node * > &periodic_nodes_pt) |
Make the nodes passed in periodic_nodes periodic from this node. More... | |
bool | is_a_copy () const |
Return a boolean to indicate whether the data contains any copied values. If the node is periodic all values are copied. More... | |
bool | is_a_copy (const unsigned &i) const |
Return a boolean to indicate whether the i-th value is a copied value. If the node is periodic all values are copies. More... | |
Node * | copied_node_pt () const |
Return pointer to copied node (null if the current node is not a copy) More... | |
void | assign_eqn_numbers (unsigned long &global_ndof, Vector< double * > &dof_pt) |
Overload the equation assignment operation. More... | |
void | resize (const unsigned &n_value) |
Resize the number of equations. More... | |
void | make_periodic (Node *const &node_pt) |
Make the node periodic. More... | |
Public Member Functions inherited from oomph::BoundaryNodeBase | |
std::map< unsigned, unsigned > *& | index_of_first_value_assigned_by_face_element_pt () |
Return pointer to the map giving the index of the first face element value. More... | |
unsigned | index_of_first_value_assigned_by_face_element (const unsigned &face_id=0) const |
Return the index of the first value associated with the i-th face element value. If no argument is specified we return the index associated with the first (and assumed to be only) face element attached to this node. Throws error only in paranoid mode if no values have been set by any FaceElements. If you want to catch such cases gracefully in all circumstances (there are examples with complex unstructured 3D meshes where it's not clear a priori if a node has been resized by FaceElements) use alternative version (with leading bool arguments) that always checks and throws so exceptions can be caught gracefully. Returns UINT_MAX if error. More... | |
unsigned | index_of_first_value_assigned_by_face_element (const bool &throw_if_no_value_assigned_by_face_element, const bool &throw_quietly, const unsigned &face_id=0) const |
Return the index of the first value associated with the i-th face element value. If no argument id is specified we return the index associated with the first (and assumed to be only) face element attached to this node. If no values have been set by any FaceElements and throw_if_no_value_assigned_by_face_element is set to true, this is caught gracefully in all circumstances (there are examples with complex unstructured 3D meshes where it's not clear a priori if a node has been resized by FaceElements) by throwing an OomphLibError that can be caught gracefully. If throw_quietly is set to true we throw an OomphLibQuietException instead. You can catch either by catching the underlying std::runtime_error. In PARANOID mode we check regardless of the setting of throw_if_no_value_assigned_by_face_element (but respect the request for quietness). Returns UINT_MAX if error. More... | |
BoundaryNodeBase () | |
Default constructor, set the pointers to the storage to NULL. More... | |
virtual | ~BoundaryNodeBase () |
Destructor, clean up any allocated storage for the boundaries. More... | |
BoundaryNodeBase (const BoundaryNodeBase &boundary_node_base)=delete | |
Broken copy constructor. More... | |
void | operator= (const BoundaryNodeBase &)=delete |
Broken assignment operator. More... | |
bool | boundary_coordinates_have_been_set_up () |
Have boundary coordinates been set up? More... | |
void | get_boundaries_pt (std::set< unsigned > *&boundaries_pt) |
Access to pointer to set of mesh boundaries that this node occupies; NULL if the node is not on any boundary. More... | |
void | add_to_boundary (const unsigned &b) |
Add the node to the mesh boundary b. More... | |
void | remove_from_boundary (const unsigned &b) |
Remove the node from the mesh boundary b. More... | |
bool | is_on_boundary () const |
Test whether the node lies on a boundary. More... | |
bool | is_on_boundary (const unsigned &b) const |
Test whether the node lies on mesh boundary b. More... | |
unsigned | ncoordinates_on_boundary (const unsigned &b) |
Get the number of boundary coordinates on mesh boundary b. More... | |
void | get_coordinates_on_boundary (const unsigned &b, Vector< double > &boundary_zeta) |
Return the vector of boundary coordinates on mesh boundary b. More... | |
void | set_coordinates_on_boundary (const unsigned &b, const Vector< double > &boundary_zeta) |
Set the vector of boundary coordinates on mesh boundary b. More... | |
void | get_coordinates_on_boundary (const unsigned &b, const unsigned &k, Vector< double > &boundary_zeta) |
Return the vector of the k-th generalised boundary coordinates on mesh boundary b. More... | |
void | set_coordinates_on_boundary (const unsigned &b, const unsigned &k, const Vector< double > &boundary_zeta) |
Set the vector of the k-th generalised boundary coordinates on mesh boundary b. More... | |
Private Member Functions | |
void | reset_copied_pointers () |
Set pointers to the copied data used when we have periodic nodes. More... | |
void | clear_additional_copied_pointers () |
Copy over additional information so that if the node is periodic it can remain active if the node that holds the periodic data is deleted. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from oomph::BoundaryNodeBase | |
void | make_node_periodic (Node *const &node_pt, Node *const &original_node_pt) |
Helper function that is used to turn BoundaryNodes into peridic boundary nodes by setting the data values of copied_node_pt to those of original_node_pt. More... | |
void | make_nodes_periodic (Node *const &node_pt, Vector< Node * > const &periodic_copies_pt) |
Helper function that is used to turn BoundaryNodes into periodic boundary nodes by setting the data values of the nodes in the vector periodic_copies_pt to be the same as those in node_pt. More... | |
Protected Attributes inherited from oomph::BoundaryNodeBase | |
std::map< unsigned, unsigned > * | Index_of_first_value_assigned_by_face_element_pt |
Pointer to a map, indexed by the face element identifier it returns the position of the first face element value. If the Node does not lie on a face element this map should never be queried. More... | |
Node * | Copied_node_pt |
If the BoundaryNode is periodic, this pointer is set to the BoundaryNode whose data it shares. More... | |
A template Class for BoundaryNodes; that is Nodes that MAY live on the boundary of a Mesh. The class is formed by a simple composition of the template parameter NODE_TYPE, which must be a Node class and the BoundaryNodeBase class. Final overloading of functions is always in favour of the BoundaryNodeBase implementation; i.e. these nodes can live on boundaries.
|
inline |
|
inline |
Steady constructor, for a BoundaryNode of spatial dimension n_dim. Simply passes all arguments through to the underlying Node constructor which allocates storage for initial_n_value values. NPosition_type is the number of coordinate types needed in the mapping between local and global coordinates (e.g. 1 for Lagrange-type elements; 2 for 1D Hermite elements; 4 for 2D Hermite elements, etc).
|
inline |
Unsteady constructor for a BoundaryNode of spatial dimension n_dim. Simply passes all arguments through to the underlygin Node constructor which allocates storage for initial_n_value values with history values as required by the timestepper. n_position_type: # of coordinate types needed in the mapping between local and global coordinates (e.g. 1 for Lagrange-type elements; 2 for 1D Hermite elements; 4 for 2D Hermite elements).
|
inline |
Steady constructor for Solid-type boundary nodes. The node has n_lagrangian Lagrangian coordinates of n_lagrangian_type types (1 for Lagrange elements, 2 for 1D Hermite etc.). The Eulerian dimension of the Node is n_dim and we have n_position_type (generalised) Eulerian coordinates. There are initial_n_value values stored at this node.
|
inline |
Unsteady constructor for Solid-type boundary nodes Allocates storage for initial_n_value nodal values with history values as required by timestepper. The node has n_lagrangian Lagrangian coordinates of n_lagrangian_type types (1 for Lagrange elements, 2 for 1D Hermite etc.)/ The Eulerian dimension of the Node is n_dim and we have n_position_type generalised Eulerian coordinates.
|
inline |
Destructor resets pointers if.
Definition at line 2462 of file nodes.h.
References oomph::BoundaryNode< NODE_TYPE >::clear_additional_copied_pointers(), oomph::BoundaryNodeBase::Copied_node_pt, i, oomph::BoundaryNodeBase::Index_of_first_value_assigned_by_face_element_pt, and oomph::Data::remove_copy().
|
delete |
Broken copy constructor.
|
inline |
Add the node to mesh boundary b, final overload.
Definition at line 2545 of file nodes.h.
References oomph::BoundaryNodeBase::add_to_boundary().
|
inlinevirtual |
Member function to allocates storage for a given number of additional degrees of freedom, n_additional_value, associated with a particular face_id to the Node node_pt. Needs to be filled in here so that access to the nodal values is available.
Implements oomph::BoundaryNodeBase.
Definition at line 2677 of file nodes.h.
References oomph::BoundaryNodeBase::Index_of_first_value_assigned_by_face_element_pt, oomph::BoundaryNode< NODE_TYPE >::nvalue_assigned_by_face_element(), and oomph::BoundaryNode< NODE_TYPE >::resize().
|
inline |
Overload the equation assignment operation.
Definition at line 2828 of file nodes.h.
References oomph::Data::assign_eqn_numbers(), oomph::BoundaryNodeBase::Copied_node_pt, and oomph::SolidNode::variable_position_pt().
|
inline |
Have boundary coordinates been set up?
Definition at line 2517 of file nodes.h.
References oomph::BoundaryNodeBase::boundary_coordinates_have_been_set_up().
|
inlineprivate |
Copy over additional information so that if the node is periodic it can remain active if the node that holds the periodic data is deleted.
Definition at line 2288 of file nodes.h.
References oomph::BoundaryNodeBase::Copied_node_pt, and oomph::BoundaryNodeBase::index_of_first_value_assigned_by_face_element_pt().
Referenced by oomph::BoundaryNode< NODE_TYPE >::~BoundaryNode().
|
inline |
Clear pointers to the copied data used when we have periodic nodes. The shallow (pointer) copy is turned into a deep copy by allocating new data and copying the actual values across.
Definition at line 2332 of file nodes.h.
References oomph::BoundaryNodeBase::Copied_node_pt, oomph::Data::eqn_number(), i, t, and oomph::Node::value().
|
inline |
Return pointer to copied node (null if the current node is not a copy)
Definition at line 2822 of file nodes.h.
References oomph::BoundaryNodeBase::Copied_node_pt.
|
inline |
Access to pointer to set of mesh boundaries that this node occupies; NULL if the node is not on any boundary Final overload.
Definition at line 2525 of file nodes.h.
References oomph::BoundaryNodeBase::get_boundaries_pt().
|
inline |
Return the vector of k-th generalised boundary coordinates on mesh boundary b Final overload.
Definition at line 2583 of file nodes.h.
References oomph::BoundaryNodeBase::get_coordinates_on_boundary().
|
inline |
Return the vector of coordinates on mesh boundary b Final overload.
Definition at line 2566 of file nodes.h.
References oomph::BoundaryNodeBase::get_coordinates_on_boundary().
|
inline |
Return a boolean to indicate whether the data contains any copied values. If the node is periodic all values are copied.
Definition at line 2792 of file nodes.h.
References oomph::BoundaryNodeBase::Copied_node_pt.
|
inline |
Return a boolean to indicate whether the i-th value is a copied value. If the node is periodic all values are copies.
Definition at line 2807 of file nodes.h.
References oomph::BoundaryNodeBase::Copied_node_pt.
|
inline |
Test whether the node lies on a boundary Final overload.
Definition at line 2532 of file nodes.h.
References oomph::BoundaryNodeBase::is_on_boundary().
Referenced by oomph::HermiteQuadMesh< ELEMENT >::set_position_of_boundary_node().
|
inline |
Test whether the node lies on mesh boundary b Final overload.
Definition at line 2539 of file nodes.h.
References oomph::BoundaryNodeBase::is_on_boundary().
|
inline |
Make the node periodic.
Definition at line 2778 of file nodes.h.
References oomph::BoundaryNodeBase::make_node_periodic().
|
inline |
Make the node periodic.
Definition at line 2885 of file nodes.h.
References oomph::BoundaryNodeBase::make_node_periodic().
|
inline |
Make the nodes passed in periodic_nodes periodic from this node.
Definition at line 2785 of file nodes.h.
References oomph::BoundaryNodeBase::make_nodes_periodic().
|
inline |
Get the number of boundary coordinates on mesh boundary b.
Definition at line 2558 of file nodes.h.
References oomph::BoundaryNodeBase::ncoordinates_on_boundary().
|
inlinevirtual |
Return the number of values associated with the i-th face element field. If no argument is specified we return the value associated with the first (and assumed to be only) face element attached to this node. Throws error only in paranoid mode if no values have been set by any FaceElements. If you want to catch such cases gracefully in all circumstances (there are examples with complex unstructured 3D meshes where it's not clear a priori if a node has been resized by FaceElements) use alternative version (with leading bool arguments) that always checks and throws so exceptions can be caught gracefully. Returns UINT_MAX if error.
Implements oomph::BoundaryNodeBase.
Definition at line 2610 of file nodes.h.
References oomph::BoundaryNodeBase::Index_of_first_value_assigned_by_face_element_pt.
Referenced by oomph::BoundaryNode< NODE_TYPE >::assign_additional_values_with_face_id().
|
delete |
Broken assignment operator.
|
inline |
Remover the node from mesh boundary b, final overload.
Definition at line 2551 of file nodes.h.
References oomph::BoundaryNodeBase::remove_from_boundary().
|
inlineprivate |
Set pointers to the copied data used when we have periodic nodes.
Definition at line 2245 of file nodes.h.
References oomph::BoundaryNodeBase::Copied_node_pt, oomph::Data::Eqn_number, oomph::BoundaryNodeBase::index_of_first_value_assigned_by_face_element_pt(), oomph::Data::nvalue(), and oomph::Data::Value.
|
inline |
Resize the number of equations.
Definition at line 2854 of file nodes.h.
References oomph::BoundaryNodeBase::Copied_node_pt, and oomph::Data::nvalue().
Referenced by oomph::BoundaryNode< NODE_TYPE >::assign_additional_values_with_face_id().
|
inline |
Set the vector of k-th generalised boundary coordinates on mesh boundary b. Final overload.
Definition at line 2592 of file nodes.h.
References oomph::BoundaryNodeBase::set_coordinates_on_boundary().
|
inline |
Set the vector of coordinates on mesh boundary b Final overload.
Definition at line 2574 of file nodes.h.
References oomph::BoundaryNodeBase::set_coordinates_on_boundary().
Referenced by oomph::HermiteQuadMesh< ELEMENT >::set_position_of_boundary_node().