IBAMR  IBAMR version 0.19.
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
SAMRAI::appu::BoundaryNode< DIM > Class Template Reference

The BoundaryNode struct holds data and methods to define a boundary node (i.e. the first node inside the boundary) on an irregular boundary. An array of boundary nodes is maintained by each "CutCell" object, if the appropriate functions are called to enable boundary node storage. For more information, see the CutCell class documentation. More...

#include <BoundaryNode.h>

Public Member Functions

 BoundaryNode ()
 
 BoundaryNode (const pdat::NodeIndex< DIM > &in)
 
 BoundaryNode (const appu::BoundaryNode< DIM > &bdry_node)
 
BoundaryNodeoperator= (const appu::BoundaryNode< DIM > &bdry_node)
 
 ~BoundaryNode ()
 
pdat::NodeIndex< DIM > getIndex () const
 
bool getNodeOnBoundary () const
 
int getNumberOfNearestNeighborNodes () const
 
int getNumberOfOutsideNeighborNodes () const
 
tbox::Array< pdat::NodeIndex< DIM > > getNearestNeighborNodes () const
 
pdat::NodeIndex< DIM > getNearestNeighborNode (const int i) const
 
const doublegetClosestBoundaryPoint () const
 
double getClosestBoundaryPoint (const int i) const
 
double getDistanceToBoundary () const
 
const doublegetNormalToBoundary () const
 
double getNormalToBoundary (const int i) const
 
void setNodeOnBoundary ()
 
void setNumOutsideNeighborNodes (tbox::Pointer< pdat::NodeData< DIM, int > > &node_flag, hier::Index< DIM > &cut_cell_index)
 
void setNearestNeighborNode (pdat::NodeIndex< DIM > &index)
 
void setNearestNeighborNodes (tbox::Pointer< pdat::NodeData< DIM, int > > &node_flag, hier::Index< DIM > &cut_cell_index)
 
void setClosestBoundaryPoint (const double *location)
 
void setClosestBoundaryPoint (const double location, const int i)
 
void setDistanceToBoundary (tbox::Pointer< hier::Patch< DIM > > &patch)
 
void setDistanceToBoundary (const double dist)
 
void setNormalToBoundary (tbox::Pointer< hier::Patch< DIM > > &patch)
 
void setNormalToBoundary (const double *normal)
 
void setNormalToBoundary (const double normal, const int i)
 

Static Public Member Functions

static void setOnBoundaryThreshold (const double th)
 

Private Member Functions

void initializeBoundaryNodeData ()
 
void copyBoundaryNodeData (const appu::BoundaryNode< DIM > &bdry_node)
 

Private Attributes

pdat::NodeIndex< DIM > d_index
 
int d_num_nearest_neighbors
 
int d_num_outside_neighbors
 
tbox::Array< pdat::NodeIndex< DIM > > d_nearest_neighbors
 
double d_closest_boundary_point [DIM]
 
double d_distance_to_boundary
 
double d_normal_to_boundary [DIM]
 
bool d_on_boundary
 

Static Private Attributes

static double s_on_boundary_threshold
 

Detailed Description

template<int DIM>
class SAMRAI::appu::BoundaryNode< DIM >

Information maintained by the struct includes the following:

- INDEX                 - node index (i,j,k) of the boundary node
- NEAREST_NBR[DIM]      - indices (i,j,k) of the nearest neighbor
                        nodes that are OUTSIDE the boundary.
See also
appu::CutCell

Constructor & Destructor Documentation

◆ BoundaryNode() [1/3]

template<int DIM>
SAMRAI::appu::BoundaryNode< DIM >::BoundaryNode ( )

Create a new `‘empty’' BoundaryNode.

◆ BoundaryNode() [2/3]

template<int DIM>
SAMRAI::appu::BoundaryNode< DIM >::BoundaryNode ( const pdat::NodeIndex< DIM > &  in)

Create a new cut cell with specified node index.

◆ BoundaryNode() [3/3]

template<int DIM>
SAMRAI::appu::BoundaryNode< DIM >::BoundaryNode ( const appu::BoundaryNode< DIM > &  bdry_node)

The copy constructor copies the data of the argument cell.

◆ ~BoundaryNode()

template<int DIM>
SAMRAI::appu::BoundaryNode< DIM >::~BoundaryNode ( )

The destructor for BoundaryNode.

Member Function Documentation

◆ setOnBoundaryThreshold()

template<int DIM>
static void SAMRAI::appu::BoundaryNode< DIM >::setOnBoundaryThreshold ( const double  th)
static

Set threshold for determining whether a node is on the boundary (if not set, the default is 1.e-6).

◆ operator=()

template<int DIM>
BoundaryNode& SAMRAI::appu::BoundaryNode< DIM >::operator= ( const appu::BoundaryNode< DIM > &  bdry_node)

The assignment operator copies the data of the argument cell.

◆ getIndex()

template<int DIM>
pdat::NodeIndex<DIM> SAMRAI::appu::BoundaryNode< DIM >::getIndex ( ) const

Returns the index (i,j,k) of the node.

◆ getNodeOnBoundary()

template<int DIM>
bool SAMRAI::appu::BoundaryNode< DIM >::getNodeOnBoundary ( ) const

Returns whether the boundary node is on the embedded boundary.

◆ getNumberOfNearestNeighborNodes()

template<int DIM>
int SAMRAI::appu::BoundaryNode< DIM >::getNumberOfNearestNeighborNodes ( ) const

Return the number of nearest neighbor nodes.

◆ getNumberOfOutsideNeighborNodes()

template<int DIM>
int SAMRAI::appu::BoundaryNode< DIM >::getNumberOfOutsideNeighborNodes ( ) const

Return the number of outside neighbor nodes.

◆ getNearestNeighborNodes()

template<int DIM>
tbox::Array<pdat::NodeIndex<DIM> > SAMRAI::appu::BoundaryNode< DIM >::getNearestNeighborNodes ( ) const

Returns the array of nearest neighbor nodes.

◆ getNearestNeighborNode()

template<int DIM>
pdat::NodeIndex<DIM> SAMRAI::appu::BoundaryNode< DIM >::getNearestNeighborNode ( const int  i) const

Returns the designated neighbor node.

◆ getClosestBoundaryPoint() [1/2]

template<int DIM>
const double* SAMRAI::appu::BoundaryNode< DIM >::getClosestBoundaryPoint ( ) const

Returns the location of the closest point on the boundary to the node.

◆ getClosestBoundaryPoint() [2/2]

template<int DIM>
double SAMRAI::appu::BoundaryNode< DIM >::getClosestBoundaryPoint ( const int  i) const

Returns the ith element of the location of the closest point on the boundary to the node.

◆ getDistanceToBoundary()

template<int DIM>
double SAMRAI::appu::BoundaryNode< DIM >::getDistanceToBoundary ( ) const

Returns the distance to the embedded boundary.

◆ getNormalToBoundary() [1/2]

template<int DIM>
const double* SAMRAI::appu::BoundaryNode< DIM >::getNormalToBoundary ( ) const

Returns the normal vector to the boundary.

◆ getNormalToBoundary() [2/2]

template<int DIM>
double SAMRAI::appu::BoundaryNode< DIM >::getNormalToBoundary ( const int  i) const

Returns the ith component of the normal vector to the boundary.

◆ setNodeOnBoundary()

template<int DIM>
void SAMRAI::appu::BoundaryNode< DIM >::setNodeOnBoundary ( )

Returns whether the boundary node is on the embedded boundary.

◆ setNumOutsideNeighborNodes()

template<int DIM>
void SAMRAI::appu::BoundaryNode< DIM >::setNumOutsideNeighborNodes ( tbox::Pointer< pdat::NodeData< DIM, int > > &  node_flag,
hier::Index< DIM > &  cut_cell_index 
)

Set the number of outside neighbor nodes for the boundary node.

◆ setNearestNeighborNode()

template<int DIM>
void SAMRAI::appu::BoundaryNode< DIM >::setNearestNeighborNode ( pdat::NodeIndex< DIM > &  index)

Sets the nearest neighbor node.

◆ setNearestNeighborNodes()

template<int DIM>
void SAMRAI::appu::BoundaryNode< DIM >::setNearestNeighborNodes ( tbox::Pointer< pdat::NodeData< DIM, int > > &  node_flag,
hier::Index< DIM > &  cut_cell_index 
)

Set the nearest neighbor nodes for the boundary node.

◆ setClosestBoundaryPoint() [1/2]

template<int DIM>
void SAMRAI::appu::BoundaryNode< DIM >::setClosestBoundaryPoint ( const double location)

Sets the location of the closest point on the b oundary to the node.

◆ setClosestBoundaryPoint() [2/2]

template<int DIM>
void SAMRAI::appu::BoundaryNode< DIM >::setClosestBoundaryPoint ( const double  location,
const int  i 
)

Sets the ith element of the location of the closest point on the boundary to the node.

◆ setDistanceToBoundary() [1/2]

template<int DIM>
void SAMRAI::appu::BoundaryNode< DIM >::setDistanceToBoundary ( tbox::Pointer< hier::Patch< DIM > > &  patch)

Sets the distance to the embedded boundary. If the patch is provided as an argument, and the distance will be computed. Otherwise, it will be set to the supplied value.

◆ setDistanceToBoundary() [2/2]

template<int DIM>
void SAMRAI::appu::BoundaryNode< DIM >::setDistanceToBoundary ( const double  dist)

◆ setNormalToBoundary() [1/3]

template<int DIM>
void SAMRAI::appu::BoundaryNode< DIM >::setNormalToBoundary ( tbox::Pointer< hier::Patch< DIM > > &  patch)

Sets the normal vector to the embedded boundary. If the patch is provided as an argument, and the normal will be computed. Otherwise, it will be set to the supplied value.

◆ setNormalToBoundary() [2/3]

template<int DIM>
void SAMRAI::appu::BoundaryNode< DIM >::setNormalToBoundary ( const double normal)

◆ setNormalToBoundary() [3/3]

template<int DIM>
void SAMRAI::appu::BoundaryNode< DIM >::setNormalToBoundary ( const double  normal,
const int  i 
)

◆ initializeBoundaryNodeData()

template<int DIM>
void SAMRAI::appu::BoundaryNode< DIM >::initializeBoundaryNodeData ( )
private

◆ copyBoundaryNodeData()

template<int DIM>
void SAMRAI::appu::BoundaryNode< DIM >::copyBoundaryNodeData ( const appu::BoundaryNode< DIM > &  bdry_node)
private

Member Data Documentation

◆ s_on_boundary_threshold

template<int DIM>
double SAMRAI::appu::BoundaryNode< DIM >::s_on_boundary_threshold
staticprivate

◆ d_index

template<int DIM>
pdat::NodeIndex<DIM> SAMRAI::appu::BoundaryNode< DIM >::d_index
private

◆ d_num_nearest_neighbors

template<int DIM>
int SAMRAI::appu::BoundaryNode< DIM >::d_num_nearest_neighbors
private

◆ d_num_outside_neighbors

template<int DIM>
int SAMRAI::appu::BoundaryNode< DIM >::d_num_outside_neighbors
private

◆ d_nearest_neighbors

template<int DIM>
tbox::Array<pdat::NodeIndex<DIM> > SAMRAI::appu::BoundaryNode< DIM >::d_nearest_neighbors
private

◆ d_closest_boundary_point

template<int DIM>
double SAMRAI::appu::BoundaryNode< DIM >::d_closest_boundary_point[DIM]
private

◆ d_distance_to_boundary

template<int DIM>
double SAMRAI::appu::BoundaryNode< DIM >::d_distance_to_boundary
private

◆ d_normal_to_boundary

template<int DIM>
double SAMRAI::appu::BoundaryNode< DIM >::d_normal_to_boundary[DIM]
private

◆ d_on_boundary

template<int DIM>
bool SAMRAI::appu::BoundaryNode< DIM >::d_on_boundary
private

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