libMesh
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
libMesh::Patch Class Reference

This class implements useful utility functions for a patch of elements. More...

#include <patch.h>

Inheritance diagram for libMesh::Patch:
[legend]

Public Types

typedef void(Patch::* PMF) ()
 Pointer to Member Function typedef. More...
 

Public Member Functions

 Patch (const processor_id_type my_procid=static_cast< processor_id_type >(-1))
 Constructor. More...
 
 ~Patch ()
 Destructor. More...
 
void add_face_neighbors ()
 This function finds all elements which touch the current patch at a face, and adds them to the patch. More...
 
void add_local_face_neighbors ()
 This function finds all elements on the current processor which touch the current patch at a face, and adds them to the patch. More...
 
void add_semilocal_face_neighbors ()
 This function finds all elements which touch the current patch at a face and which touch one of our processor's elements at any point, and it adds them to the patch. More...
 
void add_point_neighbors ()
 This function finds all elements which touch the current patch at any point, and adds them to the patch. More...
 
void add_local_point_neighbors ()
 This function finds all elements on the current processor which touch the current patch at any point, and adds them to the patch. More...
 
void add_semilocal_point_neighbors ()
 This function finds all elements which touch the current patch at any point and which touch one of our processor's elements at any point, and it adds them to the patch. More...
 
void build_around_element (const Elem *elem, const unsigned int target_patch_size=10, PMF patchtype=&Patch::add_local_face_neighbors)
 Erases any elements in the current patch, then builds a new patch containing element elem by repeated addition of neighbors on the current processor. More...
 

Protected Member Functions

void find_face_neighbors (std::set< const Elem *> &neighbor_set)
 This function finds all elements which touch the current patch at a face. More...
 
void find_point_neighbors (std::set< const Elem *> &neighbor_set)
 This function finds all elements which touch the current patch at any point. More...
 

Protected Attributes

const processor_id_type _my_procid
 

Detailed Description

This class implements useful utility functions for a patch of elements.

Author
Varis Carey
Benjamin S. Kirk
Date
2004
Author
Roy H. Stogner
Date
2007

Definition at line 47 of file patch.h.

Member Typedef Documentation

◆ PMF

typedef void(Patch::* libMesh::Patch::PMF) ()

Pointer to Member Function typedef.

Definition at line 104 of file patch.h.

Constructor & Destructor Documentation

◆ Patch()

libMesh::Patch::Patch ( const processor_id_type  my_procid = static_cast<processor_id_type>(-1))

Constructor.

Requires the processor ID to be interpreted as "local".

Definition at line 54 of file patch.h.

54  :
55  _my_procid(my_procid)
56  {}
const processor_id_type _my_procid
Definition: patch.h:131

◆ ~Patch()

libMesh::Patch::~Patch ( )

Destructor.

Definition at line 61 of file patch.h.

61 {}

Member Function Documentation

◆ add_face_neighbors()

void libMesh::Patch::add_face_neighbors ( )

This function finds all elements which touch the current patch at a face, and adds them to the patch.

◆ add_local_face_neighbors()

void libMesh::Patch::add_local_face_neighbors ( )

This function finds all elements on the current processor which touch the current patch at a face, and adds them to the patch.

◆ add_local_point_neighbors()

void libMesh::Patch::add_local_point_neighbors ( )

This function finds all elements on the current processor which touch the current patch at any point, and adds them to the patch.

◆ add_point_neighbors()

void libMesh::Patch::add_point_neighbors ( )

This function finds all elements which touch the current patch at any point, and adds them to the patch.

◆ add_semilocal_face_neighbors()

void libMesh::Patch::add_semilocal_face_neighbors ( )

This function finds all elements which touch the current patch at a face and which touch one of our processor's elements at any point, and it adds them to the patch.

◆ add_semilocal_point_neighbors()

void libMesh::Patch::add_semilocal_point_neighbors ( )

This function finds all elements which touch the current patch at any point and which touch one of our processor's elements at any point, and it adds them to the patch.

◆ build_around_element()

void libMesh::Patch::build_around_element ( const Elem elem,
const unsigned int  target_patch_size = 10,
PMF  patchtype = &Patch::add_local_face_neighbors 
)

Erases any elements in the current patch, then builds a new patch containing element elem by repeated addition of neighbors on the current processor.

This procedure is repeated until the number of elements meets or exceeds target_patch_size, or until the patch has no more local neighbors.

◆ find_face_neighbors()

void libMesh::Patch::find_face_neighbors ( std::set< const Elem *> &  neighbor_set)
protected

This function finds all elements which touch the current patch at a face.

◆ find_point_neighbors()

void libMesh::Patch::find_point_neighbors ( std::set< const Elem *> &  neighbor_set)
protected

This function finds all elements which touch the current patch at any point.

Member Data Documentation

◆ _my_procid

const processor_id_type libMesh::Patch::_my_procid
protected

Definition at line 131 of file patch.h.


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