libsurf
Programmer's Documentation

Public Member Functions | Private Member Functions | Private Attributes | List of all members
CascadeMesh Class Reference

Detailed Description

Specialized semi-structured triangle mesh generator.

CascadeMesh starts with a grid of points which typically contains a set of finely discretized lines following the chord (u-coordinate) of a wing, and repeatedly inserts points between these lines in order to achieve a prescribed triangle stretch ratio.

See Also
Surface

#include <cascademesh.h>

Collaboration diagram for CascadeMesh:
[legend]

Public Member Functions

 CascadeMesh ()
 empty cascade
 
 CascadeMesh (const Surface *srf, const PointGrid< 2 > &g)
 start with grid g
 
void generate (Real stretchlimit=20., uint kmax=5, bool generateTriangles=true)
 generate mesh with stretch below limit
 
const PointList< 2 > uvpoints () const
 access uv-plane points after mesh generation
 
void exportMesh (PointList< 2 > &qts, Indices &tri) const
 export mesh after processing
 
void exportMesh (PointList< 2 > &qts, PointList< 3 > &pts, Indices &tri) const
 export mesh after processing
 

Private Member Functions

void init (const PointGrid< 2 > &g)
 initialize from grid
 
const Vct2 & qgrid (uint i, uint j) const
 access point of the original grid
 
const Vct3 & pgrid (uint i, uint j) const
 access point of the original grid
 
uint injectPoint (const Vct2 &q)
 insert point and return index
 
void injectPoints (uint irow, uint jcol, uint k, Indices &a)
 insert 2^k - 1 points in row irow
 
void injectPoints (uint irow, uint jcol, uint k)
 insert 2^k - 1 points in row irow, do not create triangles
 
void addTriangle (uint a, uint b, uint c)
 generate a single triangles, flip direction if necessary
 
void addBlock23 (const uint a[2], const uint b[3])
 generate triangles for a block
 
void addBlock22 (const uint a[2], const uint b[2])
 generate triangles for a block
 
Real stretchp (uint irow, uint jcol) const
 determine actual stretch ratio of a single patch
 
Real stretch (uint irow, uint jcol) const
 determine worst stretch at vertex row
 
Real wrap (uint jcol) const
 wrap distance for column jcol
 
void processColumn (uint jcol, Real mxst)
 refine a single column
 

Private Attributes

PointList< 2 > m_ppt
 list of points in parameter plane
 
PointList< 3 > m_vtx
 points in 3D space
 
const Surfacem_psf
 surface to use
 
uint m_nrows
 dimensions of the grid used for initialization
 
uint m_ncols
 
Indices m_itri
 triangles
 
uint m_maxkinsert
 maximum allowed insertion level
 
bool m_gentris
 whether to generate triangles or just points
 

The documentation for this class was generated from the following files:
Generated on Wed Jan 19 2022 03:03:16 for libsurf by   doxygen 1.8.5