Advanced Multi-Physics (AMP)
On-Line Documentation
Classes | Public Types | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
AMP::DelaunayTessellation::FaceList< NDIM > Class Template Reference

#include <DelaunayFaceList.h>

Classes

struct  face_data_struct
 

Public Types

using Point = std::array< int, NDIM >
 
using Triangle = std::array< int, NDIM+1 >
 

Public Member Functions

void add_node (const int node_id, std::vector< size_t > &unused, size_t &N_tri, std::vector< uint32_t > &new_tri_id, std::vector< Triangle > &new_tri, std::vector< Triangle > &new_tri_nab, std::vector< int > &neighbor, std::vector< int > &face_id)
 Function to add a node to the convex hull.
 
 FaceList (const int N, const Point *x, const int tri_id, const Triangle &tri)
 Standard constructor.
 
int get_N_face ()
 Function to get the number of faces on the convex hull.
 
void update_face (const int N, const int old_tid[], const int old_fid[], const int new_tid[], const int new_fid[], const Triangle *tri)
 Function to update faces on the convex hull.
 

Private Member Functions

void check_data ()
 
void delete_faces (std::vector< int > &ids)
 
 FaceList ()
 
 FaceList (const FaceList &)
 
size_t get_face_index (int face, int tri)
 
FaceListoperator= (const FaceList &)
 
bool outside_triangle (const Point *x, const Point &xi) const
 

Static Private Member Functions

static std::array< int64_t, NDIM > calc_surface_normal (const std::array< int, NDIM > x[])
 

Private Attributes

std::vector< face_data_structdata
 
int hash_table [1024]
 
const int Nx
 
const Pointx0
 
double xc [NDIM]
 

Detailed Description

template<int NDIM>
class AMP::DelaunayTessellation::FaceList< NDIM >

Class for storing the faces on the convex hull Storing the list of faces on the convex hull is necessary, but requires maintaining a list of triangles and their faces. This class simplifies this storage. In addition, this class will and new nodes to the convex hull, returning the triangles that were created. Note: Seperate instantiations of this class are thread safe, but a single instance is not.

Definition at line 25 of file DelaunayFaceList.h.

Member Typedef Documentation

◆ Point

template<int NDIM>
using AMP::DelaunayTessellation::FaceList< NDIM >::Point = std::array<int, NDIM>

Definition at line 28 of file DelaunayFaceList.h.

◆ Triangle

template<int NDIM>
using AMP::DelaunayTessellation::FaceList< NDIM >::Triangle = std::array<int, NDIM + 1>

Definition at line 29 of file DelaunayFaceList.h.

Constructor & Destructor Documentation

◆ FaceList() [1/3]

template<int NDIM>
AMP::DelaunayTessellation::FaceList< NDIM >::FaceList ( const int  N,
const Point x,
const int  tri_id,
const Triangle tri 
)

Standard constructor.

Default constructor to be used

Parameters
NThe number of vertices
xThe coordinates of the nodes (NDIM x N) Note: coordinates must not change or be deleted during lifetime of FaceList.
tri_idThe initial triangle id
triThe triangle list (NDIM+1)

◆ FaceList() [2/3]

template<int NDIM>
AMP::DelaunayTessellation::FaceList< NDIM >::FaceList ( )
private

◆ FaceList() [3/3]

template<int NDIM>
AMP::DelaunayTessellation::FaceList< NDIM >::FaceList ( const FaceList< NDIM > &  )
private

Member Function Documentation

◆ add_node()

template<int NDIM>
void AMP::DelaunayTessellation::FaceList< NDIM >::add_node ( const int  node_id,
std::vector< size_t > &  unused,
size_t &  N_tri,
std::vector< uint32_t > &  new_tri_id,
std::vector< Triangle > &  new_tri,
std::vector< Triangle > &  new_tri_nab,
std::vector< int > &  neighbor,
std::vector< int > &  face_id 
)

Function to add a node to the convex hull.

This function will add a new node to the convex hull. In the process of of adding the node, some faces will be removed, new faces will be added, and new triangles will be generated. This function will return the new triangles which must be added. Note: the new triangles are not necessarilly Delaunay.

Parameters
[in]node_idThe vertex index to add
[in,out]unusedA list of unused triangle ids
[in,out]N_triThe number of triangles
[out]new_tri_idA list of valid ids to use for new triangles
[out]new_triThe list of new triangles that were created
[out]new_tri_nabThe list of triangle neighbors for the new triangles
[out]neighborThe list of existing triangles that are neighbors to the new triangles
[out]face_idThe list of existing triangle faces that are neighbors to the new triangles

◆ calc_surface_normal()

template<int NDIM>
static std::array< int64_t, NDIM > AMP::DelaunayTessellation::FaceList< NDIM >::calc_surface_normal ( const std::array< int, NDIM >  x[])
staticprivate

◆ check_data()

template<int NDIM>
void AMP::DelaunayTessellation::FaceList< NDIM >::check_data ( )
private

◆ delete_faces()

template<int NDIM>
void AMP::DelaunayTessellation::FaceList< NDIM >::delete_faces ( std::vector< int > &  ids)
private

◆ get_face_index()

template<int NDIM>
size_t AMP::DelaunayTessellation::FaceList< NDIM >::get_face_index ( int  face,
int  tri 
)
inlineprivate

Definition at line 125 of file DelaunayFaceList.h.

◆ get_N_face()

template<int NDIM>
int AMP::DelaunayTessellation::FaceList< NDIM >::get_N_face ( )
inline

Function to get the number of faces on the convex hull.

Definition at line 43 of file DelaunayFaceList.h.

References AMP::DelaunayTessellation::FaceList< NDIM >::data.

◆ operator=()

template<int NDIM>
FaceList & AMP::DelaunayTessellation::FaceList< NDIM >::operator= ( const FaceList< NDIM > &  )
private

◆ outside_triangle()

template<int NDIM>
bool AMP::DelaunayTessellation::FaceList< NDIM >::outside_triangle ( const Point x,
const Point xi 
) const
private

◆ update_face()

template<int NDIM>
void AMP::DelaunayTessellation::FaceList< NDIM >::update_face ( const int  N,
const int  old_tid[],
const int  old_fid[],
const int  new_tid[],
const int  new_fid[],
const Triangle tri 
)

Function to update faces on the convex hull.

This function will update faces on the convex hull. This is necessary if the flips changed the faces that lie on the convex hull. There are two possibilites, the triangles could have been changed but the faces are the same, in which case we need to update the triangle numbers, face ids, and internal strucutures. The second possiblity is the entire face configuration could change (eg a 2-2 flip in 3d). This requires updating the faces on the convex hull. Note: the number of faces on the convex hull should never change due to flips.

Parameters
NThe number of faces that have changed
old_tidThe old triangle numbers (N)
old_fidThe old face ids (N)
new_tidThe new triangle numbers (N)
new_fidThe new face ids (N)
triThe complete triangle list ( N_tri x NDIM+1 )

Member Data Documentation

◆ data

template<int NDIM>
std::vector<face_data_struct> AMP::DelaunayTessellation::FaceList< NDIM >::data
private

◆ hash_table

template<int NDIM>
int AMP::DelaunayTessellation::FaceList< NDIM >::hash_table[1024]
private

Definition at line 116 of file DelaunayFaceList.h.

◆ Nx

template<int NDIM>
const int AMP::DelaunayTessellation::FaceList< NDIM >::Nx
private

Definition at line 115 of file DelaunayFaceList.h.

◆ x0

template<int NDIM>
const Point* AMP::DelaunayTessellation::FaceList< NDIM >::x0
private

Definition at line 117 of file DelaunayFaceList.h.

◆ xc

template<int NDIM>
double AMP::DelaunayTessellation::FaceList< NDIM >::xc[NDIM]
private

Definition at line 118 of file DelaunayFaceList.h.


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



Advanced Multi-Physics (AMP)
Oak Ridge National Laboratory
Idaho National Laboratory
Los Alamos National Laboratory
This page automatically produced from the
source code by doxygen
Last updated: Tue Mar 10 2026 13:06:42.
Comments on this page