Public Member Functions | Private Member Functions | List of all members
oomph::BoundaryNode< NODE_TYPE > Class Template Reference

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>

+ Inheritance diagram for oomph::BoundaryNode< NODE_TYPE >:

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)
 Broken copy constructor. More...
 
void operator= (const BoundaryNode< NODE_TYPE > &)
 Broken assignment operator. 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)
 
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...
 
Nodecopied_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...
 
- 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)
 Broken copy constructor. More...
 
void operator= (const BoundaryNodeBase &)
 Broken assignment operator. 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...
 
NodeCopied_node_pt
 If the BoundaryNode is periodic, this pointer is set to the BoundaryNode whose data it shares. More...
 

Detailed Description

template<class NODE_TYPE>
class oomph::BoundaryNode< NODE_TYPE >

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.

Definition at line 67 of file nodes.h.

Constructor & Destructor Documentation

template<class NODE_TYPE>
oomph::BoundaryNode< NODE_TYPE >::BoundaryNode ( )
inline

Default Constructor.

Definition at line 2234 of file nodes.h.

template<class NODE_TYPE>
oomph::BoundaryNode< NODE_TYPE >::BoundaryNode ( const unsigned &  n_dim,
const unsigned &  n_position_type,
const unsigned &  initial_n_value 
)
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).

Definition at line 2243 of file nodes.h.

template<class NODE_TYPE>
oomph::BoundaryNode< NODE_TYPE >::BoundaryNode ( TimeStepper *const &  time_stepper_pt,
const unsigned &  n_dim,
const unsigned &  n_position_type,
const unsigned &  initial_n_value 
)
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).

Definition at line 2256 of file nodes.h.

template<class NODE_TYPE>
oomph::BoundaryNode< NODE_TYPE >::BoundaryNode ( const unsigned &  n_lagrangian,
const unsigned &  n_lagrangian_type,
const unsigned &  n_dim,
const unsigned &  n_position_type,
const unsigned &  initial_n_value 
)
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.

Definition at line 2270 of file nodes.h.

template<class NODE_TYPE>
oomph::BoundaryNode< NODE_TYPE >::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 
)
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.

Definition at line 2285 of file nodes.h.

template<class NODE_TYPE>
oomph::BoundaryNode< NODE_TYPE >::~BoundaryNode ( )
inline

Destructor resets pointers if.

Definition at line 2296 of file nodes.h.

References oomph::BoundaryNodeBase::Copied_node_pt, and i.

template<class NODE_TYPE>
oomph::BoundaryNode< NODE_TYPE >::BoundaryNode ( const BoundaryNode< NODE_TYPE > &  node)
inline

Broken copy constructor.

Definition at line 2342 of file nodes.h.

References oomph::BrokenCopy::broken_copy().

Member Function Documentation

template<class NODE_TYPE>
void oomph::BoundaryNode< NODE_TYPE >::add_to_boundary ( const unsigned &  b)
inline

Add the node to mesh boundary b, final overload.

Definition at line 2369 of file nodes.h.

References oomph::BoundaryNodeBase::add_to_boundary().

template<class NODE_TYPE>
void oomph::BoundaryNode< NODE_TYPE >::assign_additional_values_with_face_id ( const unsigned &  n_additional_value,
const unsigned &  face_id = 0 
)
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 2487 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().

template<class NODE_TYPE>
void oomph::BoundaryNode< NODE_TYPE >::assign_eqn_numbers ( unsigned long &  global_ndof,
Vector< double * > &  dof_pt 
)
inline

Overload the equation assignment operation.

Definition at line 2602 of file nodes.h.

References oomph::Data::assign_eqn_numbers(), oomph::BoundaryNodeBase::Copied_node_pt, and oomph::SolidNode::variable_position_pt().

template<class NODE_TYPE>
void oomph::BoundaryNode< NODE_TYPE >::clear_additional_copied_pointers ( )
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 2142 of file nodes.h.

References oomph::BoundaryNodeBase::Copied_node_pt, and oomph::BoundaryNodeBase::index_of_first_value_assigned_by_face_element_pt().

template<class NODE_TYPE>
void oomph::BoundaryNode< NODE_TYPE >::clear_copied_pointers ( )
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 2186 of file nodes.h.

References oomph::BoundaryNodeBase::Copied_node_pt, oomph::Data::eqn_number(), i, t, and oomph::Node::value().

template<class NODE_TYPE>
Node* oomph::BoundaryNode< NODE_TYPE >::copied_node_pt ( ) const
inline

Return pointer to copied node (null if the current node is not a copy)

Definition at line 2596 of file nodes.h.

References oomph::BoundaryNodeBase::Copied_node_pt.

template<class NODE_TYPE>
void oomph::BoundaryNode< NODE_TYPE >::get_boundaries_pt ( std::set< unsigned > *&  boundaries_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 2356 of file nodes.h.

References oomph::BoundaryNodeBase::get_boundaries_pt().

template<class NODE_TYPE>
void oomph::BoundaryNode< NODE_TYPE >::get_coordinates_on_boundary ( const unsigned &  b,
Vector< double > &  boundary_zeta 
)
inline

Return the vector of coordinates on mesh boundary b Final overload.

Definition at line 2386 of file nodes.h.

References oomph::BoundaryNodeBase::get_coordinates_on_boundary().

template<class NODE_TYPE>
void oomph::BoundaryNode< NODE_TYPE >::get_coordinates_on_boundary ( const unsigned &  b,
const unsigned &  k,
Vector< double > &  boundary_zeta 
)
inline

Return the vector of k-th generalised boundary coordinates on mesh boundary b Final overload.

Definition at line 2399 of file nodes.h.

References oomph::BoundaryNodeBase::get_coordinates_on_boundary().

template<class NODE_TYPE>
bool oomph::BoundaryNode< NODE_TYPE >::is_a_copy ( ) const
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 2584 of file nodes.h.

References oomph::BoundaryNodeBase::Copied_node_pt.

template<class NODE_TYPE>
bool oomph::BoundaryNode< NODE_TYPE >::is_a_copy ( const unsigned &  i) const
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 2590 of file nodes.h.

References oomph::BoundaryNodeBase::Copied_node_pt.

template<class NODE_TYPE>
bool oomph::BoundaryNode< NODE_TYPE >::is_on_boundary ( ) const
inline

Test whether the node lies on a boundary Final overload.

Definition at line 2361 of file nodes.h.

References oomph::BoundaryNodeBase::is_on_boundary().

Referenced by oomph::HermiteQuadMesh< ELEMENT >::set_position_of_boundary_node().

template<class NODE_TYPE>
bool oomph::BoundaryNode< NODE_TYPE >::is_on_boundary ( const unsigned &  b) const
inline

Test whether the node lies on mesh boundary b Final overload.

Definition at line 2365 of file nodes.h.

References oomph::BoundaryNodeBase::is_on_boundary().

template<class NODE_TYPE>
void oomph::BoundaryNode< NODE_TYPE >::make_periodic ( Node *const &  node_pt)
inline

Make the node periodic.

Definition at line 2574 of file nodes.h.

References oomph::BoundaryNodeBase::make_node_periodic().

template<class NODE_TYPE>
void oomph::BoundaryNode< NODE_TYPE >::make_periodic_nodes ( const Vector< Node * > &  periodic_nodes_pt)
inline

Make the nodes passed in periodic_nodes periodic from this node.

Definition at line 2579 of file nodes.h.

References oomph::BoundaryNodeBase::make_nodes_periodic().

template<class NODE_TYPE>
unsigned oomph::BoundaryNode< NODE_TYPE >::ncoordinates_on_boundary ( const unsigned &  b)
inline

Get the number of boundary coordinates on mesh boundary b.

Definition at line 2378 of file nodes.h.

References oomph::BoundaryNodeBase::ncoordinates_on_boundary().

template<class NODE_TYPE>
unsigned oomph::BoundaryNode< NODE_TYPE >::nvalue_assigned_by_face_element ( const unsigned &  face_id = 0) const
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 2421 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().

template<class NODE_TYPE>
void oomph::BoundaryNode< NODE_TYPE >::operator= ( const BoundaryNode< NODE_TYPE > &  )
inline

Broken assignment operator.

Definition at line 2348 of file nodes.h.

References oomph::BrokenCopy::broken_assign().

template<class NODE_TYPE>
void oomph::BoundaryNode< NODE_TYPE >::remove_from_boundary ( const unsigned &  b)
inline

Remover the node from mesh boundary b, final overload.

Definition at line 2373 of file nodes.h.

References oomph::BoundaryNodeBase::remove_from_boundary().

template<class NODE_TYPE>
void oomph::BoundaryNode< NODE_TYPE >::reset_copied_pointers ( )
inlineprivate

Set pointers to the copied data used when we have periodic nodes.

Definition at line 2099 of file nodes.h.

References oomph::BoundaryNodeBase::Copied_node_pt, oomph::BoundaryNodeBase::index_of_first_value_assigned_by_face_element_pt(), and oomph::Data::nvalue().

template<class NODE_TYPE>
void oomph::BoundaryNode< NODE_TYPE >::resize ( const unsigned &  n_value)
inline

Resize the number of equations.

Definition at line 2627 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().

template<class NODE_TYPE>
void oomph::BoundaryNode< NODE_TYPE >::set_coordinates_on_boundary ( const unsigned &  b,
const Vector< double > &  boundary_zeta 
)
inline

Set the vector of coordinates on mesh boundary b Final overload.

Definition at line 2392 of file nodes.h.

References oomph::BoundaryNodeBase::set_coordinates_on_boundary().

Referenced by oomph::HermiteQuadMesh< ELEMENT >::set_position_of_boundary_node().

template<class NODE_TYPE>
void oomph::BoundaryNode< NODE_TYPE >::set_coordinates_on_boundary ( const unsigned &  b,
const unsigned &  k,
const Vector< double > &  boundary_zeta 
)
inline

Set the vector of k-th generalised boundary coordinates on mesh boundary b. Final overload.

Definition at line 2405 of file nodes.h.

References oomph::BoundaryNodeBase::set_coordinates_on_boundary().


The documentation for this class was generated from the following file: