Programmer's Documentation

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

Detailed Description

Utility class to generate simple quad mesh.

InitGrid is used to generate coarse quadrilateral discretizations from which the triangular mesh generator DnMesh can be initialized.

See Also

#include <initgrid.h>

Collaboration diagram for InitGrid:

Public Member Functions

 InitGrid (const Surface *p)
 construct grid generator
void initPattern (const Vector &u, const Vector &v)
 define an initial pattern to start from
void initPattern (const PointGrid< 2 > &pg)
 use existing pattern as a starting guess
void refine (Real lmax, Real lmin, Real phimax)
 create a grid without any knowledge about the surface
Real uAdapt (Real lmax, Real lmin, Real phimax, uint numax=0)
 Adapt distribution. More...
void uRefineByLength (Real lmax)
 adapt spacing by insertion, so that lmax criterion is fullfilled
void vRefineByLength (Real lmax)
 adapt spacing by insertion, so that lmax criterion is fullfilled
Real vRefineByGap (Real maxgap)
 adapt spacing to avoid excissive approximation error (gap)
Real vRefineByAngle (Real maxphi)
 adapt spacing (once) to avoid large v-direction kinks
Real vRefineByStretch (uint nvmax, Real smax)
 adapt v-spacing so that stretch ratio is reduced
void uRefineByAngle (Real phimax, Real lmin)
 adapt spacing by insertion, so that phimax criterion is fullfilled
void vsmooth (uint niter)
 equilibrate by performing laplacian smoothing between cuts
void usmooth (uint niter)
 equilibrate by performing laplacian smoothing within cuts
void enforceUSymmetry ()
 enforce symmetry about u = 0.5
void enforceVSymmetry ()
 enforce symmetry about v = 0.5
void enforceColumns (const Vector &vpos)
 force kink columns to be present
uint nrows () const
 current size
uint ncols () const
 current size
void collect (PointGrid< 2 > &pts) const
 create grid from parameter arrays

Private Member Functions

void initPattern (uint nu, uint nv)
 create a regular initial pattern (default initial guess)
void kinks (uint j, Vector &cphi) const
 compute cosines of local kink angles at section j
void shift (uint j, Real cminphi, const Vector &cphi)
 shift nodes in one section in order to decrease kink angles
uint insertFrame (Real v, uint nu)
 insert an evenly spaced frame at v, return new frame index
void insertStringer (Real u)
 insert a new u values in all frames
void usmoothColumn (uint j, uint niter)
 smooth u-distribution at vj
Real adaptULine (uint i, uint nu, Real lmax, Real lmin, Real phimax)
 adapte a single u-line
bool smoothSeam (Real v) const
 determine if the surface is smooth at u=0/1

Private Attributes

const Surfacepsf
 pointer to surface
Vector vp
 v-parameter values for the frames
VectorArray up
 u-parameter values of the frames

Member Function Documentation

Real InitGrid::uAdapt ( Real  lmax,
Real  lmin,
Real  phimax,
uint  numax = 0 

Adapt distribution.

While keeping the row point count constant, redistribute points so that angular and length criteria are met. Returns the quality of the worst remaining segment (>1 if criteria violated)

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