Mesh< ambient, topo > Struct Template Reference

#include <Mesh.h>

Inheritance diagram for Mesh< ambient, topo >:

GenericMesh< ambient > List of all members.

Public Types

typedef ::SimplexData< ambient,
topo > 
SimplexData
typedef IncrementalDelaunay<
ambient, topo, RefineVertex<
ambient >, SimplexData
Delaunay
typedef Delaunay::Complex Complex
typedef Delaunay::Cavity Cavity
typedef Delaunay::Star Star
typedef Delaunay::Simplex Simplex
typedef Delaunay::Vertex Vertex
typedef MeshTypes< ambient
>::Ball 
Ball
typedef MeshTypes< ambient
>::BallSet 
BallSet
typedef MeshTypes< ambient
>::GenericMesh 
GenericMesh
typedef Geometry::CenterRadius<
ambient > 
CenterRadius
typedef Geometry::Point< ambient > Point
typedef Geometry::Point< topo > PPoint
typedef ::SplitData< ambient > SplitData

Public Member Functions

 Mesh (Delaunay *del)
virtual unsigned topological () const
const DelaunaygetDelaunay () const
const ComplexgetSimplicialComplex () const
DelaunaygetDelaunayDangerously ()
const SimplexgetHandle () const
template<class DFSData>
void dfs (DFSData &data) const
template<class output_iterator>
output_iterator collectAllBalls (output_iterator out) const
BalltoBall (const Simplex &s) const
void setBall (const Simplex &s, Ball *b)
bool isMember (const Simplex &s) const
CenterRadius circumcenter (const Simplex &s) const
double radiusEdge2 (const Simplex &s) const
double computeSigma (const Simplex &s) const
bool encroachedBy (const Simplex &s, const Vertex *v) const
bool inSphereExact (const Simplex &s, const Vertex *v) const
bool isResolved (const Simplex &s) const
void gatherUppers (const Simplex &s, BallSet &set) const
void gatherLowers (const Simplex &s, BallSet &set) const
bool approximatelyIntersects (const Simplex &s, const Ball *b) const
bool split (const Simplex &s, SplitData &data, Vertex *inserthint=NULL, bool force=false)
bool split (Vertex *v, SplitData &data)
bool checkAddLower (const Simplex &s, Ball *b)
void blindlyAddUpper (const Simplex &s, Ball *up)
void blindlyAddLower (const Simplex &s, Ball *lower)
void removeUpper (const Simplex &s, Ball *up)
void removeLower (const Simplex &s, Ball *lower)
void checkAddLowerToAll (Ball *b)

Static Public Attributes

static const size_t ambient_dimension = ambient
static const size_t topological_dimension = topo

Classes

struct  BallNotifier
struct  ConvertToBalls
struct  InitVertex
struct  WarpClosure

Detailed Description

template<size_t ambient, size_t topo>
struct Mesh< ambient, topo >

This class is a thin interface over a Delaunay triangulation, with functions specialized for our meshing application.


Member Typedef Documentation

template<size_t ambient, size_t topo>
typedef MeshTypes<ambient>::Ball Mesh< ambient, topo >::Ball
 

template<size_t ambient, size_t topo>
typedef MeshTypes<ambient>::BallSet Mesh< ambient, topo >::BallSet
 

template<size_t ambient, size_t topo>
typedef Delaunay::Cavity Mesh< ambient, topo >::Cavity
 

template<size_t ambient, size_t topo>
typedef Geometry::CenterRadius<ambient> Mesh< ambient, topo >::CenterRadius
 

template<size_t ambient, size_t topo>
typedef Delaunay::Complex Mesh< ambient, topo >::Complex
 

template<size_t ambient, size_t topo>
typedef IncrementalDelaunay<ambient, topo, RefineVertex<ambient>, SimplexData> Mesh< ambient, topo >::Delaunay
 

template<size_t ambient, size_t topo>
typedef MeshTypes<ambient>::GenericMesh Mesh< ambient, topo >::GenericMesh
 

template<size_t ambient, size_t topo>
typedef Geometry::Point<ambient> Mesh< ambient, topo >::Point
 

template<size_t ambient, size_t topo>
typedef Geometry::Point<topo> Mesh< ambient, topo >::PPoint
 

template<size_t ambient, size_t topo>
typedef Delaunay::Simplex Mesh< ambient, topo >::Simplex
 

template<size_t ambient, size_t topo>
typedef ::SimplexData<ambient, topo> Mesh< ambient, topo >::SimplexData
 

template<size_t ambient, size_t topo>
typedef ::SplitData<ambient> Mesh< ambient, topo >::SplitData
 

template<size_t ambient, size_t topo>
typedef Delaunay::Star Mesh< ambient, topo >::Star
 

template<size_t ambient, size_t topo>
typedef Delaunay::Vertex Mesh< ambient, topo >::Vertex
 


Constructor & Destructor Documentation

template<size_t ambient, size_t topo>
Mesh< ambient, topo >::Mesh Delaunay del  )  [inline]
 

Initialize the mesh.

  • The feature must be convex: the code breaks otherwise.
  • There should be O(1) boundary vertices: the code runs very slowly otherwise: O(n * initial triangles). In topo=2, init is n. In topo=3, init is n if we have good initial quality, but up to n^2 if we don't.
  • The Delaunay of the boundary vertices should have good quality. If so, the Delaunay is O(n) size (important for the prior point). If not, even assuming initial triangles is small, the code may run in a factor O(lg L/s) slower if we violate the quality assumption.


Member Function Documentation

template<size_t ambient, size_t topo>
bool Mesh< ambient, topo >::approximatelyIntersects const Simplex s,
const Ball b
const [inline]
 

Return whether the circumsphere of the simplex intersects the ball. Precision is not required here: we actually answer if the closed circumball of s intersects the closed ball b, up to floating-point accuracy.

template<size_t ambient, size_t topo>
void Mesh< ambient, topo >::blindlyAddLower const Simplex s,
Ball lower
[inline]
 

template<size_t ambient, size_t topo>
void Mesh< ambient, topo >::blindlyAddUpper const Simplex s,
Ball up
[inline]
 

template<size_t ambient, size_t topo>
bool Mesh< ambient, topo >::checkAddLower const Simplex s,
Ball b
[inline]
 

template<size_t ambient, size_t topo>
void Mesh< ambient, topo >::checkAddLowerToAll Ball b  )  [inline]
 

Iterate over the mesh, adding the ball as a lower to every simplex it approximatelyIntersects()

template<size_t ambient, size_t topo>
CenterRadius Mesh< ambient, topo >::circumcenter const Simplex s  )  const [inline]
 

Return the center and radius of the simplex.

template<size_t ambient, size_t topo>
template<class output_iterator>
output_iterator Mesh< ambient, topo >::collectAllBalls output_iterator  out  )  const [inline]
 

Convert the mesh into a list of balls. The output is done using an output iterator, so we can output a set, list, vector, count, etc.

template<size_t ambient, size_t topo>
double Mesh< ambient, topo >::computeSigma const Simplex s  )  const [inline]
 

template<size_t ambient, size_t topo>
template<class DFSData>
void Mesh< ambient, topo >::dfs DFSData &  data  )  const [inline]
 

Perform a depth-first-search in the mesh, starting at the global handle. Other DFS functions could easily be provided, but aren't necessary now.

template<size_t ambient, size_t topo>
bool Mesh< ambient, topo >::encroachedBy const Simplex s,
const Vertex v
const [inline]
 

Return whether the simplex would be encroached by the vertex. We use approximate arithmetic here, because precision is not required. Precision is necessary to make sure we don't count a vertex of the simplex as encroaching the simplex. But that can be checked combinatorially.

template<size_t ambient, size_t topo>
void Mesh< ambient, topo >::gatherLowers const Simplex s,
BallSet set
const [inline]
 

Gather the set of lower-dimensional balls that s knows.

template<size_t ambient, size_t topo>
void Mesh< ambient, topo >::gatherUppers const Simplex s,
BallSet set
const [inline]
 

Gather the set of balls that have down-pointers to this simplex.

template<size_t ambient, size_t topo>
const Delaunay* Mesh< ambient, topo >::getDelaunay  )  const [inline]
 

Return the underlying mesh structure, with geometric information.

template<size_t ambient, size_t topo>
Delaunay* Mesh< ambient, topo >::getDelaunayDangerously  )  [inline]
 

Return the underlying Delaunay, non-const. This is dangerous: changes to the underlying Delaunay can cause the Mesh structure to become invalid. Use this only in very prescribed locations, such at MeshConstructor.

template<size_t ambient, size_t topo>
const Simplex& Mesh< ambient, topo >::getHandle  )  const [inline]
 

Return a handle into the mesh. Mostly just used internally, but there's not much reason not to provide it.

template<size_t ambient, size_t topo>
const Complex& Mesh< ambient, topo >::getSimplicialComplex  )  const [inline]
 

Return the underlying mesh structure -- just the topology.

template<size_t ambient, size_t topo>
bool Mesh< ambient, topo >::inSphereExact const Simplex s,
const Vertex v
const [inline]
 

Exact test for encroachment by vertices in the plane of the mesh. We test the open ball; vertices of s do not encroach on s.

template<size_t ambient, size_t topo>
bool Mesh< ambient, topo >::isMember const Simplex s  )  const [inline]
 

Return whether s is still in the mesh.

template<size_t ambient, size_t topo>
bool Mesh< ambient, topo >::isResolved const Simplex s  )  const [inline]
 

Is this ball resolved in the top-dimensional mesh?

template<size_t ambient, size_t topo>
double Mesh< ambient, topo >::radiusEdge2 const Simplex s  )  const [inline]
 

Return the radius/edge ratio (squared) of the simplex.

template<size_t ambient, size_t topo>
void Mesh< ambient, topo >::removeLower const Simplex s,
Ball lower
[inline]
 

template<size_t ambient, size_t topo>
void Mesh< ambient, topo >::removeUpper const Simplex s,
Ball up
[inline]
 

template<size_t ambient, size_t topo>
void Mesh< ambient, topo >::setBall const Simplex s,
Ball b
[inline]
 

TODO: restrict access here.

template<size_t ambient, size_t topo>
bool Mesh< ambient, topo >::split Vertex v,
SplitData data
[inline]
 

Split based on a vertex rather than on a simplex. The difference is simply that to split a vertex, we first need to find a simplex to split.

template<size_t ambient, size_t topo>
bool Mesh< ambient, topo >::split const Simplex s,
SplitData data,
Vertex inserthint = NULL,
bool  force = false
[inline]
 

Try to split s, by inserting a point in its circumball. The insertion will either:

  1. insert the circumcenter,
  2. insert a lower-dimensional point,
  3. fail due to encroachment.

Returns whether s was actually split (if not, it encroached).

If the insertion actually occurs, the upper/lower pointers are fixed.

template<size_t ambient, size_t topo>
Ball* Mesh< ambient, topo >::toBall const Simplex s  )  const [inline]
 

template<size_t ambient, size_t topo>
virtual unsigned Mesh< ambient, topo >::topological  )  const [inline, virtual]
 

Get the topological dimension (required by GenericMesh).

Implements GenericMesh< ambient >.


Member Data Documentation

template<size_t ambient, size_t topo>
const size_t Mesh< ambient, topo >::ambient_dimension = ambient [static]
 

template<size_t ambient, size_t topo>
const size_t Mesh< ambient, topo >::topological_dimension = topo [static]
 


The documentation for this struct was generated from the following file:
Generated on Thu Mar 27 19:04:15 2008 by  doxygen 1.4.6