Overture  Version 25
Macros | Functions | Variables
compositeTopology.C File Reference
#include "UnstructuredMapping.h"
#include "MappingProjectionParameters.h"
#include "display.h"
#include "CompositeSurface.h"
#include "TrimmedMapping.h"
#include "ReductionMapping.h"
#include "NurbsMapping.h"
#include "GenericGraphicsInterface.h"
#include "MappingInformation.h"
#include "TriangleWrapper.h"
#include "CompositeTopology.h"
#include "SplineMapping.h"
#include "GL_GraphicsInterface.h"
#include "FaceInfo.h"
#include "GeometricADT.h"
Include dependency graph for compositeTopology.C:

Macros

#define SC   (char *)(const char *)
 
#define SCALE_TWO_SIDES(r, ra)   ( 1. - SQR((r)-.5) *4.*(1.-(ra)) )
 

Functions

void constructOuterBoundaryCurve (NurbsMapping *newNurb)
 Build an outer curve for a surface without one.
 
real refineTriangulation (UnstructuredMapping &umap, Mapping &cmap, real absoluteTol)
 
bool refineCurve (NurbsMapping &curve, Mapping *surf1, Mapping *surf2, real distTol, real curveTol, realArray &g)
 
bool duplicateNodeFound (int &elementNodeNumber, int &node, int e, const intArray &elements, const intArray &duplicateNodes, int numberOfDuplicateNodes)
 This function is called to check for the presence of a duplicate node.
 
bool swapFace (int f, FILE *infoFile, CompositeSurface &cs, int &numberOfNodes, realArray &nodes, int &numberOfElements, intArray &elements, int &numberOfFaces, intArray &faces, intArray &faceElements, intArray &elementFaces, intArray &elementSurface, intArray &elementCoordinates, int &numberOfCoordinateNodes, realArray &rNodes)
 
int splitFace2 (int f, FILE *infoFile, realArray &r, realArray &x, CompositeSurface &cs, int &numberOfNodes, realArray &nodes, int &numberOfElements, intArray &elements, int &numberOfFaces, intArray &faces, intArray &faceElements, intArray &elementFaces, intArray &elementSurface, intArray &elementCoordinates, int &numberOfCoordinateNodes, realArray &rNodes)
 
int splitFace (int e, int side, CompositeSurface &cs, int &numberOfNodes, realArray &nodes, int &numberOfElements, intArray &elements, int &numberOfFaces, intArray &faces, intArray &faceElements, intArray &elementFaces, intArray &elementSurface, intArray &elementCoordinates, int &numberOfCoordinateNodes, realArray &rNodes)
 Refine an element by splitting it at a face. The adjacent element is also split.
 
int splitElement (int e, CompositeSurface &cs, int &numberOfNodes, realArray &nodes, int &numberOfElements, intArray &elements, int &numberOfFaces, intArray &faces, intArray &faceElements, intArray &elementFaces, intArray &elementSurface, intArray &elementCoordinates, int &numberOfCoordinateNodes, realArray &rNodes)
 Refine an element by splitting it at the centroid.
 
int improveTriangulation (CompositeSurface &cs, real maxDist, real maxArea, int &numberOfNodes, realArray &nodes, int &numberOfElements, intArray &elements, int &numberOfFaces, intArray &faces, intArray &faceElements, intArray &elementFaces, intArray &elementSurface, intArray &elementCoordinates, int &numberOfCoordinateNodes, realArray &rNodes)
 Improve the quality of a triangulation by inserting new nodes.
 
int addInteriorNodes (int &numberOfNodes, Mapping &surface, real &aspectRatio, int numberOfGridPoints[2], realArray &rc, const int &debug)
 Add interior nodes to the points given to the triangulation.
 

Variables

int triangleErrorDetected
 

Macro Definition Documentation

#define SC   (char *)(const char *)
#define SCALE_TWO_SIDES (   r,
  ra 
)    ( 1. - SQR((r)-.5) *4.*(1.-(ra)) )

Function Documentation

int addInteriorNodes ( int &  numberOfNodes,
Mapping surface,
real aspectRatio,
int  numberOfGridPoints[2],
realArray rc,
const int &  debug 
)

Add interior nodes to the points given to the triangulation.

References assert, delta, dr, fabs(), Mapping::getGridDimensions(), i2, mask, max(), and ra.

Referenced by CompositeTopology::buildSubSurfaceTriangulation().

void constructOuterBoundaryCurve ( NurbsMapping newNurb)
bool duplicateNodeFound ( int &  elementNodeNumber,
int &  node,
int  e,
const intArray &  elements,
const intArray &  duplicateNodes,
int  numberOfDuplicateNodes 
)

This function is called to check for the presence of a duplicate node.

We are trying to look for node 'node' in the triangle element(e,.). This function is called if 'node' is not found. We look for 'node' in the list of duplicateNodes to see if a duplicate node is in the element.

Parameters
elementNodeNumber(output) : if successful (return value==true) this will be a value 0,1,2 of the node value { node} found in the triangle element(e,.)
node(input/output) : a duplicate node number found (if return value==true)
e(input): find a node in this element.

Referenced by UnstructuredMapping::isDuplicateNode(), and CompositeTopology::triangulateCompositeSurface().

int improveTriangulation ( CompositeSurface cs,
real  maxDist,
real  maxArea,
int &  numberOfNodes,
realArray nodes,
int &  numberOfElements,
intArray &  elements,
int &  numberOfFaces,
intArray &  faces,
intArray &  faceElements,
intArray &  elementFaces,
intArray &  elementSurface,
intArray &  elementCoordinates,
int &  numberOfCoordinateNodes,
realArray rNodes 
)
bool refineCurve ( NurbsMapping curve,
Mapping surf1,
Mapping surf2,
real  distTol,
real  curveTol,
realArray g 
)
real refineTriangulation ( UnstructuredMapping umap,
Mapping cmap,
real  absoluteTol 
)

References Mapping::cartesianSpace, computeDeviation(), Mapping::determineResolution(), dx, GenericGraphicsInterface::erase(), evaluate(), fabs(), findRBound(), TriangleWrapper::generate(), TriangleWrapper::generateElementList(), UnstructuredMapping::getBoundaryFace(), TrimmedMapping::getClassName(), Mapping::getClassName(), Mapping::getDomainDimension(), UnstructuredMapping::getEdges(), UnstructuredMapping::getElements(), UnstructuredMapping::getFaceElements(), UnstructuredMapping::getFaces(), TriangleWrapperParameters::getFreezeSegments(), Overture::getGraphicsInterface(), UnstructuredMapping::getNodes(), UnstructuredMapping::getNumberOfBoundaryFaces(), UnstructuredMapping::getNumberOfEdges(), UnstructuredMapping::getNumberOfElements(), UnstructuredMapping::getNumberOfNodes(), TriangleWrapper::getParameters(), TriangleWrapper::getPoints(), Mapping::getRangeDimension(), TriangleWrapperParameters::getVoronoi(), TriangleWrapper::initialize(), Mapping::inverseMap(), TrimmedMapping::map(), Mapping::map(), max(), min(), Mapping::parameterSpace, PlotIt::plot(), GenericGraphicsInterface::plotPoints(), R, REAL_EPSILON, REAL_MAX, REAL_MIN, TriangleWrapperParameters::saveNeighbourList(), scaleNodes(), UnstructuredMapping::setNodesAndConnectivity(), TriangleWrapperParameters::setQuietMode(), TriangleWrapperParameters::setVerboseMode(), TriangleWrapperParameters::toggleFreezeSegments(), TriangleWrapperParameters::toggleVoronoi(), unScaleNodes(), and x.

Referenced by CompositeTopology::buildSubSurfaceTriangulation(), and refineVisibleSurfaces().

int splitElement ( int  e,
CompositeSurface cs,
int &  numberOfNodes,
realArray nodes,
int &  numberOfElements,
intArray &  elements,
int &  numberOfFaces,
intArray &  faces,
intArray &  faceElements,
intArray &  elementFaces,
intArray &  elementSurface,
intArray &  elementCoordinates,
int &  numberOfCoordinateNodes,
realArray rNodes 
)

Refine an element by splitting it at the centroid.

References assert, CompositeSurface::map(), CompositeSurface::numberOfSubSurfaces(), r, and x.

int splitFace ( int  e,
int  side,
CompositeSurface cs,
int &  numberOfNodes,
realArray nodes,
int &  numberOfElements,
intArray &  elements,
int &  numberOfFaces,
intArray &  faces,
intArray &  faceElements,
intArray &  elementFaces,
intArray &  elementSurface,
intArray &  elementCoordinates,
int &  numberOfCoordinateNodes,
realArray rNodes 
)

Refine an element by splitting it at a face. The adjacent element is also split.

References assert, CompositeSurface::map(), CompositeSurface::numberOfSubSurfaces(), r, and x.

int splitFace2 ( int  f,
FILE *  infoFile,
realArray r,
realArray x,
CompositeSurface cs,
int &  numberOfNodes,
realArray nodes,
int &  numberOfElements,
intArray &  elements,
int &  numberOfFaces,
intArray &  faces,
intArray &  faceElements,
intArray &  elementFaces,
intArray &  elementSurface,
intArray &  elementCoordinates,
int &  numberOfCoordinateNodes,
realArray rNodes 
)
bool swapFace ( int  f,
FILE *  infoFile,
CompositeSurface cs,
int &  numberOfNodes,
realArray nodes,
int &  numberOfElements,
intArray &  elements,
int &  numberOfFaces,
intArray &  faces,
intArray &  faceElements,
intArray &  elementFaces,
intArray &  elementSurface,
intArray &  elementCoordinates,
int &  numberOfCoordinateNodes,
realArray rNodes 
)

References fabs(), and REAL_MIN.

Referenced by improveTriangulation().

Variable Documentation

int triangleErrorDetected