MeshKit  1.0
AF2Algorithm Class Reference

#include <AF2Algorithm.hpp>

List of all members.

Public Member Functions

 AF2Algorithm (const std::list< const AF2Rule * > &ruleListArg)
 Constructor.
 ~AF2Algorithm ()
 Destructor.
 AF2Algorithm (const AF2Algorithm &toCopy)
 Copy constructor (throws exception)
AF2Algorithmoperator= (const AF2Algorithm &rhs)
 Assignment operator (throws exception)
AF2AlgorithmResultexecute (const AF2LocalTransformMaker *const &transformMaker, const double *coords, unsigned int numPoints, const unsigned int *edges, unsigned int numEdges, const moab::EntityHandle *vertexHandles=NULL, int debug=0) const
 Execute the advancing front algorithm.

Private Member Functions

void initFront (AF2Front &front, std::list< AF2Point3D * > &pntList, unsigned long &pntId, const double *coords, unsigned int numPoints, const unsigned int *edges, unsigned int numEdges, const moab::EntityHandle *vertexHandles) const
 Initialize the advancing front.
void processNewFace (const AF2Polygon2D *newFace2D, AF2Neighborhood *&ngbhd, std::map< const AF2Point2D *, AF2Point3D * > &newPointsMap, std::list< const AF2Polygon3D * > &allFaces, AF2Front &front) const
 Process a new face that is being added to the advancing front.
void processNewPoint (const AF2Point2D *newPoint2D, unsigned long &pntId, AF2Neighborhood *&ngbhd, std::map< const AF2Point2D *, AF2Point3D * > &newPointsMap, std::list< AF2Point3D * > &allPoints, AF2Front &front) const
 Process a new point that is being added to the advancing front.
void release (std::list< AF2Point3D * > &allPoints, std::list< const AF2Polygon3D * > &allFaces) const
 Release the memory consumed by points and faces in the lists.
void output_intermediate_result (std::list< AF2Point3D * > &allPoints, std::list< const AF2Polygon3D * > &allFaces, int face, int step) const
 Dump a vtk file at each step, for debugging purposes (use with care...)

Private Attributes

const std::list< const AF2Rule * > ruleList

Detailed Description

Definition at line 48 of file AF2Algorithm.hpp.


Constructor & Destructor Documentation

AF2Algorithm ( const std::list< const AF2Rule * > &  ruleListArg)

Constructor.

Construct an AF2Algorithm from a list of AF2Rule.

This object does not take ownership of the AF2Rule rules that are passed to the constructor. It is the responsibility of the context to ensure that the AF2Rule pointers remain valid as long as this AF2Algorithm may be executed and to delete the AF2Rule objects after that.

Parameters:
ruleListArga list of rules to apply when attempting to advance the front

Definition at line 17 of file AF2Algorithm.cpp.

Destructor.

Definition at line 23 of file AF2Algorithm.cpp.

AF2Algorithm ( const AF2Algorithm toCopy)

Copy constructor (throws exception)

This object does not currently support copying, so this method is implemented to throw an exception.

Definition at line 29 of file AF2Algorithm.cpp.


Member Function Documentation

AF2AlgorithmResult * execute ( const AF2LocalTransformMaker *const &  transformMaker,
const double *  coords,
unsigned int  numPoints,
const unsigned int *  edges,
unsigned int  numEdges,
const moab::EntityHandle *  vertexHandles = NULL,
int  debug = 0 
) const

Execute the advancing front algorithm.

See the documentation at the class level for a description of how the algorithm works.

The arguments to this algorithm specify the initial boundary of the advancing front algorithm and how to transform between a three- dimensional coordinate space and a local two-dimensional coordinate space. The AF2LocalTransformMaker handles any surface geometry that is involved in these transformations.

This method may be called multiple times and may be called from multiple threads simultaneously as long as this object is not deleted by any of the threads and the arguments to the method are independent, i.e., the AF2LocalTransformMaker objects passed to the different executions do not have shared state that might be modified during execution.

Parameters:
transformMakerAn AF2LocalTransforMaker that encapsulates surface geometry information and is responsible for making local transformations between the three-dimensionsal surface geometry and two-dimensional coordinate spaces that locally approximate the surface
coordsA pointer to an array of double values that contains the coordinates of mesh points that must be included in the mesh. The coordinates array should be ordered such that the x, y, and z coordinates of each point are listed together in that order. Coordinates of points that are endpoints of edges along the boundary must be included. Points in the interior of the surface that must be in the mesh may also be included.
numPointsThe number of points that are defined in the array of coordinates. The coordinate array must have 3*numPoints double values (or more).
edgesA pointer to an array of int values that define half- edges that must be included in the mesh. Each edge is defined by two unsigned integer values. The integer values are indices into the list of points defined in the coordinates array. The index is 0-based, so the first three values of coords define point 0, the next three values of coords define point 1, etc. The starting point of the edge is listed before the ending point of the edge. When the edge is traversed from the starting point to the ending point, the surface that is to be meshed must be to the left. Isolated edges in the interior of the surface, i.e., edges that have the surface both to the left and the right may be defined. To require such an edge to exist in the mesh, both half-edges of the edge must be included in the array of edges.
numEdgesThe number of half-edges that are defined in the array of edges. The array of edges must have 2*numEdges unsigned integer values (or more).
vertexHandlesIf provided (i.e., if not null), this must be an array of numPoints (or more) MOAB vertex handles. The first numPoint of the handles are supposed to be in the same order as the coordinate array. If the result is successful, each point that was part of the input will have its vertex handle set to the handle specified in this input
debug;controls the debug level 0 no debug 1 some info for each surface meshed; dump edge mesh before AF2 2 info about initial front too 3 dump a vtk file for each step, for each surface

Definition at line 49 of file AF2Algorithm.cpp.

void initFront ( AF2Front front,
std::list< AF2Point3D * > &  pntList,
unsigned long &  pntId,
const double *  coords,
unsigned int  numPoints,
const unsigned int *  edges,
unsigned int  numEdges,
const moab::EntityHandle *  vertexHandles 
) const [private]

Initialize the advancing front.

Definition at line 139 of file AF2Algorithm.cpp.

AF2Algorithm & operator= ( const AF2Algorithm rhs)

Assignment operator (throws exception)

This object does not currently support assignment, so this method is implemented to throw an exception.

Definition at line 39 of file AF2Algorithm.cpp.

void output_intermediate_result ( std::list< AF2Point3D * > &  allPoints,
std::list< const AF2Polygon3D * > &  allFaces,
int  face,
int  step 
) const [private]

Dump a vtk file at each step, for debugging purposes (use with care...)

Definition at line 271 of file AF2Algorithm.cpp.

void processNewFace ( const AF2Polygon2D newFace2D,
AF2Neighborhood *&  ngbhd,
std::map< const AF2Point2D *, AF2Point3D * > &  newPointsMap,
std::list< const AF2Polygon3D * > &  allFaces,
AF2Front front 
) const [private]

Process a new face that is being added to the advancing front.

Definition at line 187 of file AF2Algorithm.cpp.

void processNewPoint ( const AF2Point2D newPoint2D,
unsigned long &  pntId,
AF2Neighborhood *&  ngbhd,
std::map< const AF2Point2D *, AF2Point3D * > &  newPointsMap,
std::list< AF2Point3D * > &  allPoints,
AF2Front front 
) const [private]

Process a new point that is being added to the advancing front.

Definition at line 239 of file AF2Algorithm.cpp.

void release ( std::list< AF2Point3D * > &  allPoints,
std::list< const AF2Polygon3D * > &  allFaces 
) const [private]

Release the memory consumed by points and faces in the lists.

Definition at line 252 of file AF2Algorithm.cpp.


Member Data Documentation

const std::list<const AF2Rule*> ruleList [private]

Definition at line 52 of file AF2Algorithm.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines