IBAMR  IBAMR version 0.19.
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
IBAMR::FESurfaceDistanceEvaluator Class Reference

class FESurfaceDistanceEvaluator is a utility class which is used to identify which line (triangle) in 2D (3D) elements are intersecting which grid cells.

#include <ibamr/FESurfaceDistanceEvaluator.h>

Public Member Functions

 FESurfaceDistanceEvaluator (std::string object_name, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > patch_hierarchy, const libMesh::Mesh &mesh, const libMesh::BoundaryMesh &bdry_mesh, const int gcw=1, bool use_extracted_bdry_mesh=true)
 The only constructor of this class. More...
 
 ~FESurfaceDistanceEvaluator ()=default
 Default dstructor. More...
 
void mapIntersections ()
 Map the triangles intersecting a particular grid cell. More...
 
void calculateSurfaceNormals ()
 Compute the face normal of the surface elements. More...
 
const std::map< SAMRAI::pdat::CellIndex< NDIM >, std::set< const libMesh::Elem * >, IBTK::CellIndexFortranOrder > & getNeighborIntersectionsMap ()
 Get the map maintaining triangle-cell intersection and neighbors. More...
 
void computeSignedDistance (int n_idx, int d_idx)
 Compute the signed distance in the viscinity of the finite element mesh. More...
 
void updateSignAwayFromInterface (int d_idx, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > patch_hierarchy, double large_distance=s_large_distance)
 Update the sign of the distance function away from the finite element mesh. More...
 

Static Public Member Functions

static bool checkIntersection2D (const IBTK::Vector3d &box_bl, const IBTK::Vector3d &box_tr, const IBTK::Vector3d &box_br, const IBTK::Vector3d &box_tl, const libMesh::Point &n0, const libMesh::Point &n1)
 Check whether the grown box and line element intersect in 2D. More...
 
static bool checkIntersection3D (const IBTK::Vector3d &box_center, const IBTK::Vector3d &box_half_dx, const IBTK::Vector3d &vert0, const IBTK::Vector3d &vert1, const IBTK::Vector3d &vert2)
 Check whether the grown box and triangle element intersect in 3D. More...
 

Static Public Attributes

static const double s_large_distance
 

Private Member Functions

 FESurfaceDistanceEvaluator ()=delete
 Default constructor is not implemented and should not be used. More...
 
FESurfaceDistanceEvaluatoroperator= (const FESurfaceDistanceEvaluator &that)=delete
 Default assignment operator is not implemented and should not be used. More...
 
 FESurfaceDistanceEvaluator (const FESurfaceDistanceEvaluator &from)=delete
 Default copy constructor is not implemented and should not be used. More...
 
void collectNeighboringPatchElements (int level_number)
 Collect all of the neighboring elements which are located within a local Cartesian grid patch grown by the specified ghost cell width. More...
 
std::pair< IBTK::Vector3d, IBTK::Vector3dgetClosestPointandAngleWeightedNormal3D (const IBTK::Vector3d &P, const libMesh::Elem *elem)
 Compute the closest point on a triangle for a given Eulerian point P and obtain its corresponding angle-weighted pseudo-normal from the surface mesh elements. More...
 

Private Attributes

std::string d_object_name
 
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > d_patch_hierarchy
 
const libMesh::Mesh & d_mesh
 
const libMesh::BoundaryMesh & d_bdry_mesh
 
int d_gcw
 
bool d_use_vol_extracted_bdry_mesh
 
libMesh::ElemType d_supported_elem_type
 
std::vector< std::vector< const libMesh::Elem * > > d_active_neighbor_patch_bdry_elem_map
 
std::map< SAMRAI::pdat::CellIndex< NDIM >, std::set< const libMesh::Elem * >, IBTK::CellIndexFortranOrderd_cell_elem_neighbor_map
 
std::map< const libMesh::Node *, std::set< const libMesh::Elem * > > d_node_to_elem
 
std::map< std::pair< const libMesh::Node *, const libMesh::Node * >, std::set< const libMesh::Elem * > > d_edge_to_elem
 
std::map< const libMesh::Elem *, IBTK::VectorNdd_elem_face_normal
 
SAMRAI::hier::Box< NDIM > d_large_struct_box
 

Constructor & Destructor Documentation

◆ FESurfaceDistanceEvaluator() [1/3]

IBAMR::FESurfaceDistanceEvaluator::FESurfaceDistanceEvaluator ( std::string  object_name,
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > >  patch_hierarchy,
const libMesh::Mesh &  mesh,
const libMesh::BoundaryMesh &  bdry_mesh,
const int  gcw = 1,
bool  use_extracted_bdry_mesh = true 
)

◆ ~FESurfaceDistanceEvaluator()

IBAMR::FESurfaceDistanceEvaluator::~FESurfaceDistanceEvaluator ( )
default

◆ FESurfaceDistanceEvaluator() [2/3]

IBAMR::FESurfaceDistanceEvaluator::FESurfaceDistanceEvaluator ( )
privatedelete

◆ FESurfaceDistanceEvaluator() [3/3]

IBAMR::FESurfaceDistanceEvaluator::FESurfaceDistanceEvaluator ( const FESurfaceDistanceEvaluator from)
privatedelete

Member Function Documentation

◆ mapIntersections()

void IBAMR::FESurfaceDistanceEvaluator::mapIntersections ( )

◆ calculateSurfaceNormals()

void IBAMR::FESurfaceDistanceEvaluator::calculateSurfaceNormals ( )

◆ getNeighborIntersectionsMap()

const std::map<SAMRAI::pdat::CellIndex<NDIM>, std::set<const libMesh::Elem*>, IBTK::CellIndexFortranOrder>& IBAMR::FESurfaceDistanceEvaluator::getNeighborIntersectionsMap ( )

◆ computeSignedDistance()

void IBAMR::FESurfaceDistanceEvaluator::computeSignedDistance ( int  n_idx,
int  d_idx 
)

◆ updateSignAwayFromInterface()

void IBAMR::FESurfaceDistanceEvaluator::updateSignAwayFromInterface ( int  d_idx,
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > >  patch_hierarchy,
double  large_distance = s_large_distance 
)

◆ checkIntersection2D()

static bool IBAMR::FESurfaceDistanceEvaluator::checkIntersection2D ( const IBTK::Vector3d box_bl,
const IBTK::Vector3d box_tr,
const IBTK::Vector3d box_br,
const IBTK::Vector3d box_tl,
const libMesh::Point &  n0,
const libMesh::Point &  n1 
)
static
(box_tl)   *--------------*  (box_tr)
           |              |
           |              |
           |              |
           |              |
           |              |
(box_bl)   *--------------*  (box_br)

◆ checkIntersection3D()

static bool IBAMR::FESurfaceDistanceEvaluator::checkIntersection3D ( const IBTK::Vector3d box_center,
const IBTK::Vector3d box_half_dx,
const IBTK::Vector3d vert0,
const IBTK::Vector3d vert1,
const IBTK::Vector3d vert2 
)
static
             ^   --------------
             |  |              |                  vert0

box_half_dx[1] | | | * | | | / \ ^ | * | / \ | box_center | / \ | | / \ | | / \ -----------— --------— <----—> box_half_dx[0] vert1 vert2

◆ operator=()

FESurfaceDistanceEvaluator& IBAMR::FESurfaceDistanceEvaluator::operator= ( const FESurfaceDistanceEvaluator that)
privatedelete

◆ collectNeighboringPatchElements()

void IBAMR::FESurfaceDistanceEvaluator::collectNeighboringPatchElements ( int  level_number)
private

In this method, the determination as to whether an element is local or not is based on the physical location of its nodes and centroid.

◆ getClosestPointandAngleWeightedNormal3D()

std::pair<IBTK::Vector3d, IBTK::Vector3d> IBAMR::FESurfaceDistanceEvaluator::getClosestPointandAngleWeightedNormal3D ( const IBTK::Vector3d P,
const libMesh::Elem *  elem 
)
private

Member Data Documentation

◆ s_large_distance

const double IBAMR::FESurfaceDistanceEvaluator::s_large_distance
static

◆ d_object_name

std::string IBAMR::FESurfaceDistanceEvaluator::d_object_name
private

Name of this object.

◆ d_patch_hierarchy

SAMRAI::tbox::Pointer<SAMRAI::hier::PatchHierarchy<NDIM> > IBAMR::FESurfaceDistanceEvaluator::d_patch_hierarchy
private

Pointer to Patch Hierarchy.

◆ d_mesh

const libMesh::Mesh& IBAMR::FESurfaceDistanceEvaluator::d_mesh
private

Volume mesh object

◆ d_bdry_mesh

const libMesh::BoundaryMesh& IBAMR::FESurfaceDistanceEvaluator::d_bdry_mesh
private

Boundary mesh object.

◆ d_gcw

int IBAMR::FESurfaceDistanceEvaluator::d_gcw
private

The desired ghost cell width.

◆ d_use_vol_extracted_bdry_mesh

bool IBAMR::FESurfaceDistanceEvaluator::d_use_vol_extracted_bdry_mesh
private

Check if we are using volume extracted boundary mesh.

◆ d_supported_elem_type

libMesh::ElemType IBAMR::FESurfaceDistanceEvaluator::d_supported_elem_type
private

The supported element type for this class.

◆ d_active_neighbor_patch_bdry_elem_map

std::vector<std::vector<const libMesh::Elem*> > IBAMR::FESurfaceDistanceEvaluator::d_active_neighbor_patch_bdry_elem_map
private

Data to manage mapping between boundary mesh elements and grid patches.

◆ d_cell_elem_neighbor_map

std::map<SAMRAI::pdat::CellIndex<NDIM>, std::set<const libMesh::Elem*>, IBTK::CellIndexFortranOrder> IBAMR::FESurfaceDistanceEvaluator::d_cell_elem_neighbor_map
private

Map object keeping track of element-cell intersections as well as elements intersecting that cell and its neighboring cells within the ghost cell width. Note that the elements contained in thie map belong to the original solid mesh.

◆ d_node_to_elem

std::map<const libMesh::Node*, std::set<const libMesh::Elem*> > IBAMR::FESurfaceDistanceEvaluator::d_node_to_elem
private

Map the node and the set of elements sharing this node.

◆ d_edge_to_elem

std::map<std::pair<const libMesh::Node*, const libMesh::Node*>, std::set<const libMesh::Elem*> > IBAMR::FESurfaceDistanceEvaluator::d_edge_to_elem
private

Map the edge and the set of elements sharing this edge.

◆ d_elem_face_normal

std::map<const libMesh::Elem*, IBTK::VectorNd> IBAMR::FESurfaceDistanceEvaluator::d_elem_face_normal
private

Map the element and its face normal.

◆ d_large_struct_box

SAMRAI::hier::Box<NDIM> IBAMR::FESurfaceDistanceEvaluator::d_large_struct_box
private

Object to create a bounding box for sign update sweeping algorithm.


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