Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
oomph::BoundaryNodeBase Class Referenceabstract

A class that contains the information required by Nodes that are located on Mesh boundaries. A BoundaryNode of a particular type is obtained by combining a given Node with this class. By differentiating between Nodes and BoundaryNodes we avoid a lot of un-necessary storage in the bulk Nodes. More...

#include <nodes.h>

+ Inheritance diagram for oomph::BoundaryNodeBase:

Public Member Functions

virtual void assign_additional_values_with_face_id (const unsigned &n_additional_value, const unsigned &face_id=0)=0
 Member function that 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. More...
 
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...
 
virtual unsigned nvalue_assigned_by_face_element (const unsigned &face_id=0) const =0
 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...
 
 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...
 

Protected Member Functions

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

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...
 

Private Attributes

std::map< unsigned,
DenseMatrix< double > * > * 
Boundary_coordinates_pt
 Pointer to a map of pointers to intrinsic boundary coordinates of the Node, indexed by the boundary number. If the Node does not lie on a boundary this map should never be queried because unnecessary storage will then be allocated. Hence, it can only be accessed via the appropriate set and get functions. More...
 
std::set< unsigned > * Boundaries_pt
 Pointer to set of mesh boundaries occupied by the Node; NULL if the Node is not on any boundaries. More...
 

Detailed Description

A class that contains the information required by Nodes that are located on Mesh boundaries. A BoundaryNode of a particular type is obtained by combining a given Node with this class. By differentiating between Nodes and BoundaryNodes we avoid a lot of un-necessary storage in the bulk Nodes.

Definition at line 1854 of file nodes.h.

Constructor & Destructor Documentation

oomph::BoundaryNodeBase::BoundaryNodeBase ( )
inline

Default constructor, set the pointers to the storage to NULL.

Definition at line 2017 of file nodes.h.

oomph::BoundaryNodeBase::~BoundaryNodeBase ( )
virtual

Destructor, clean up any allocated storage for the boundaries.

Destructor to clean up any memory that might have been allocated.

Definition at line 2880 of file nodes.cc.

References Boundaries_pt, Boundary_coordinates_pt, and Index_of_first_value_assigned_by_face_element_pt.

oomph::BoundaryNodeBase::BoundaryNodeBase ( const BoundaryNodeBase boundary_node_base)
inline

Broken copy constructor.

Definition at line 2027 of file nodes.h.

References oomph::BrokenCopy::broken_copy().

Member Function Documentation

void oomph::BoundaryNodeBase::add_to_boundary ( const unsigned &  b)

Add the node to the mesh boundary b.

Definition at line 2919 of file nodes.cc.

References Boundaries_pt.

Referenced by oomph::BoundaryNode< NODE_TYPE >::add_to_boundary().

virtual void oomph::BoundaryNodeBase::assign_additional_values_with_face_id ( const unsigned &  n_additional_value,
const unsigned &  face_id = 0 
)
pure virtual

Member function that 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.

Implemented in oomph::BoundaryNode< NODE_TYPE >.

void oomph::BoundaryNodeBase::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.

Definition at line 2036 of file nodes.h.

References Boundaries_pt.

Referenced by oomph::BoundaryNode< NODE_TYPE >::get_boundaries_pt().

void oomph::BoundaryNodeBase::get_coordinates_on_boundary ( const unsigned &  b,
Vector< double > &  boundary_zeta 
)
inline

Return the vector of boundary coordinates on mesh boundary b.

Definition at line 2055 of file nodes.h.

Referenced by oomph::BoundaryNode< NODE_TYPE >::get_coordinates_on_boundary().

void oomph::BoundaryNodeBase::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.

Given the mesh boundary b, return the k-th generalised boundary coordinates of the node in the vector boundary_zeta

Definition at line 3053 of file nodes.cc.

References Boundaries_pt, Boundary_coordinates_pt, i, and is_on_boundary().

unsigned oomph::BoundaryNodeBase::index_of_first_value_assigned_by_face_element ( const unsigned &  face_id = 0) const
inline

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.

Definition at line 1924 of file nodes.h.

References Index_of_first_value_assigned_by_face_element_pt.

Referenced by oomph::ImposeDisplacementByLagrangeMultiplierElement< ELEMENT >::fill_in_generic_contribution_to_residuals_displ_lagr_multiplier(), oomph::FSIImposeDisplacementByLagrangeMultiplierElement< ELEMENT >::fill_in_generic_contribution_to_residuals_fsi_displ_lagr_multiplier(), oomph::ImposeImpenetrabilityElement< ELEMENT >::fill_in_generic_contribution_to_residuals_parall_lagr_multiplier(), oomph::ImposeParallelOutflowElement< ELEMENT >::fill_in_generic_contribution_to_residuals_parall_lagr_multiplier(), oomph::LinearisedAxisymPoroelasticBJS_FSIElement< FLUID_BULK_ELEMENT, POROELASTICITY_BULK_ELEMENT >::fill_in_generic_residual_contribution_axisym_poroelastic_fsi(), oomph::LinearisedFSIAxisymmetricNStNoSlipBCElementElement< FLUID_BULK_ELEMENT, SOLID_BULK_ELEMENT >::fill_in_generic_residual_contribution_fsi_no_slip_axisym(), oomph::ImposeImpenetrabilityElement< ELEMENT >::get_dof_numbers_for_unknowns(), oomph::ImposeParallelOutflowElement< ELEMENT >::get_dof_numbers_for_unknowns(), oomph::ImposeDisplacementByLagrangeMultiplierElement< ELEMENT >::get_dof_numbers_for_unknowns(), oomph::FSIImposeDisplacementByLagrangeMultiplierElement< ELEMENT >::get_dof_numbers_for_unknowns(), oomph::ImposeDisplacementByLagrangeMultiplierElement< ELEMENT >::output(), oomph::FSIImposeDisplacementByLagrangeMultiplierElement< ELEMENT >::output(), oomph::RefineableImposeDisplacementByLagrangeMultiplierElement< ELEMENT >::refineable_fill_in_generic_contribution_to_residuals_displ_lagr_multiplier(), oomph::RefineableFSIImposeDisplacementByLagrangeMultiplierElement< ELEMENT >::refineable_fill_in_generic_contribution_to_residuals_fsi_displ_lagr_multiplier(), and oomph::ImposeDisplacementByLagrangeMultiplierElement< ELEMENT >::square_of_l2_norm_of_error().

unsigned oomph::BoundaryNodeBase::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
inline

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.

Definition at line 1962 of file nodes.h.

References Index_of_first_value_assigned_by_face_element_pt.

std::map<unsigned, unsigned>* & oomph::BoundaryNodeBase::index_of_first_value_assigned_by_face_element_pt ( )
inline
bool oomph::BoundaryNodeBase::is_on_boundary ( ) const
inline
bool oomph::BoundaryNodeBase::is_on_boundary ( const unsigned &  b) const

Test whether the node lies on mesh boundary b.

Test whether the node lies on the mesh boundary b.

Definition at line 2986 of file nodes.cc.

References Boundaries_pt.

void oomph::BoundaryNodeBase::make_node_periodic ( Node *const &  node_pt,
Node *const &  copied_node_pt 
)
protected

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.

Helper function that is used to turn BoundaryNodes into peridic boundary nodes by setting the data values of copy_of_node_pt to those of copied_node_pt.

Definition at line 2837 of file nodes.cc.

References oomph::Node::copied_node_pt(), Copied_node_pt, and oomph::Data::is_a_copy().

Referenced by oomph::BoundaryNode< NODE_TYPE >::make_periodic().

void oomph::BoundaryNodeBase::make_nodes_periodic ( Node *const &  node_pt,
Vector< Node * > const &  periodic_copies_pt 
)
protected

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.

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 copied_node_pt. This function should be used when making doubly periodic sets of nodes.

Definition at line 2778 of file nodes.cc.

References Copied_node_pt, and oomph::Data::is_a_copy().

Referenced by oomph::BoundaryNode< NODE_TYPE >::make_periodic_nodes().

unsigned oomph::BoundaryNodeBase::ncoordinates_on_boundary ( const unsigned &  b)

Get the number of boundary coordinates on mesh boundary b.

Definition at line 3003 of file nodes.cc.

References Boundaries_pt, Boundary_coordinates_pt, and is_on_boundary().

Referenced by oomph::BoundaryNode< NODE_TYPE >::ncoordinates_on_boundary().

virtual unsigned oomph::BoundaryNodeBase::nvalue_assigned_by_face_element ( const unsigned &  face_id = 0) const
pure virtual

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.

Implemented in oomph::BoundaryNode< NODE_TYPE >.

void oomph::BoundaryNodeBase::operator= ( const BoundaryNodeBase )
inline

Broken assignment operator.

Definition at line 2031 of file nodes.h.

References oomph::BrokenCopy::broken_assign().

void oomph::BoundaryNodeBase::remove_from_boundary ( const unsigned &  b)

Remove the node from the mesh boundary b.

Definition at line 2948 of file nodes.cc.

References Boundaries_pt, Boundary_coordinates_pt, and is_on_boundary().

Referenced by oomph::BoundaryNode< NODE_TYPE >::remove_from_boundary().

void oomph::BoundaryNodeBase::set_coordinates_on_boundary ( const unsigned &  b,
const Vector< double > &  boundary_zeta 
)
inline

Set the vector of boundary coordinates on mesh boundary b.

Definition at line 2064 of file nodes.h.

Referenced by oomph::BoundaryNode< NODE_TYPE >::set_coordinates_on_boundary().

void oomph::BoundaryNodeBase::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.

Given the mesh boundary b, set the k-th generalised boundary coordinates of the node from the vector boundary_zeta

Definition at line 3125 of file nodes.cc.

References Boundaries_pt, Boundary_coordinates_pt, i, is_on_boundary(), and oomph::DenseMatrix< T >::ncol().

Member Data Documentation

std::set<unsigned>* oomph::BoundaryNodeBase::Boundaries_pt
private

Pointer to set of mesh boundaries occupied by the Node; NULL if the Node is not on any boundaries.

Definition at line 1868 of file nodes.h.

Referenced by add_to_boundary(), get_boundaries_pt(), get_coordinates_on_boundary(), is_on_boundary(), ncoordinates_on_boundary(), remove_from_boundary(), set_coordinates_on_boundary(), and ~BoundaryNodeBase().

std::map<unsigned, DenseMatrix<double>*>* oomph::BoundaryNodeBase::Boundary_coordinates_pt
private

Pointer to a map of pointers to intrinsic boundary coordinates of the Node, indexed by the boundary number. If the Node does not lie on a boundary this map should never be queried because unnecessary storage will then be allocated. Hence, it can only be accessed via the appropriate set and get functions.

Definition at line 1864 of file nodes.h.

Referenced by get_coordinates_on_boundary(), ncoordinates_on_boundary(), remove_from_boundary(), set_coordinates_on_boundary(), and ~BoundaryNodeBase().

Node* oomph::BoundaryNodeBase::Copied_node_pt
protected
std::map<unsigned, unsigned>* oomph::BoundaryNodeBase::Index_of_first_value_assigned_by_face_element_pt
protected

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.

Definition at line 1878 of file nodes.h.

Referenced by oomph::BoundaryNode< NODE_TYPE >::assign_additional_values_with_face_id(), index_of_first_value_assigned_by_face_element(), index_of_first_value_assigned_by_face_element_pt(), oomph::BoundaryNode< NODE_TYPE >::nvalue_assigned_by_face_element(), and ~BoundaryNodeBase().


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