Programmer's Documentation

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

Detailed Description

Map displacements from structural to aerodynamic surfaces.

This object makes use of radial basis functions (RBF) to interpolate structural displacements of any kind of structural mesh (even simple beam models) to a wetted-surface aerodynamic mesh.

See Also

#include <surfinterpolator.h>

Inheritance diagram for SurfInterpolator:
Collaboration diagram for SurfInterpolator:

Public Member Functions

 SurfInterpolator ()
 empty construction
virtual ~SurfInterpolator ()
 virtual destructor
void jumpCriteria (Real nrmDev, Real absDst=-1)
 set parameters for identification of discontinuous projections
void concavityThreshold (Real t)
 set threshold value for concavity criterion (set negative to disable)
void selectiveSmoothing (int niterations, int neighborhoodRing=1, float neighborhoodRadius=0.0f, float omega=0.5f)
 set parameters for postprocessing by selective Laplacian smoothing
void useGalerkin (bool flag)
 use Galerkin method for smoothing
void globalSmoothing (int niterations)
 set parameters for postprocessing by global Laplacian smoothing
void buildTreeFromSections (const Indices &sections=Indices())
 build mapping tree from given list of sections, or all shell elements
void buildTreeByPid (const Indices &pidwet, const Indices &pidintern)
 Build tree from shell elements with PID. More...
uint map ()
 perform mapping and store displacement fields in aerodynamic mesh
void hmap (MapMatrix &H)
 determine mapping matrix
uint map (const MapMatrix &H, DMatrix< float > &m)
 apply mapping matrix obtained by different means
FFANodePtr mapToFFA (const MapMatrix &H) const
 pack mapping matrix H into FFA format
virtual bool mapFromFFA (const FFANodePtr &root, MapMatrix &H)
 retreive mapping matrix H from FFA format file
void writeProjection (const std::string &fname) const
 useful for debugging : dump projection surface to mesh file for viewing
void addDebugFields ()
 debugging: write field of projection distances
- Public Member Functions inherited from DispInterpolator
 DispInterpolator ()
 empty object
virtual ~DispInterpolator ()
 base class
void setStructural (MxMeshPtr pmstr)
 set structural mesh
void setAerodynamic (MxMeshPtr pmaer)
 set aerodynamic mesh, which will be updated with deformation fields
void collectWallBocos (const Indices &movingBc, const Indices &slidingBc=Indices(), const Indices &rubberBc=Indices())
 define the subset of aerodynamic nodes which are to be deformed
void collectWallSections (const Indices &movingSec, const Indices &slidingSec=Indices(), const Indices &rubberSec=Indices())
 define the subset of aerodynamic nodes which are to be deformed
uint useEigenmodes (uint maxModeCount=NotFound, Real minFreq=-1.0, Real maxFreq=std::numeric_limits< Real >::max())
 define the subset of modes to use in terms of frequencies
void dispScale (Real s)
 change scale factor to used for displacements
Real dispScale () const
 access scale factor
uint nodesToMap () const
 query the number of nodes to process
void maxBenignScale (Vector &maxscale) const
 determine maximum permitted scale to avoid surface triangle inversion
void autoScale ()
 rescale all mapped fields to at least avoid triangle inversion
void appendFields (const DMatrix< float > &m)
 add fields to aerodynamic mesh
virtual void writeBdis (const std::string &prefix) const
 write surface displacement files for EDGE (.bdis)
- Public Member Functions inherited from Logger
 Logger (const Logger &a)
Loggeroperator= (const Logger &a)
void storeLogMessages (bool flag)
const std::vector< std::string > & logMessages () const
virtual void log (const std::string &s) const
void log (const FirstType &a1, const
void reset ()
bool increment (int step=1)
virtual bool nextStage (int steps)
int progress () const
int nsteps () const
float percentage () const
int stage () const
void interrupt (bool flag)
bool interrupted () const

Private Member Functions

Vct3f footPoint (const uint v[], const float wuv[]) const
 evaluate position of foot point
float sqDistance (uint iwn, const uint v[], const float wuv[]) const
 compute distance from projection foot
Vct3f evalDisplacement (uint anode, uint ifield, const uint v[], const float wuv[]) const
 evaluate displacement of aerodynamic node mapped to specified triangle
Vct3f evalDisplacement (uint ifield, const uint v[], const Mtx33f h[]) const
 evaluate displacement when local H matrices are available
void evalDisplacements (uint anode, const uint v[], const float wuv[], float *column) const
 evaluate displacements for all modes in one pass
Vct3f evalMap (uint anode, const uint v[], const float wuv[], Mtx33f h[]) const
 compute local mapping matrices for one node, return foot point
void footPoints (const Indices &nodeSet, PointList< 3 > &feet) const
 determine projection foot points
void collectConcaveNodes (const ConnectMap &v2v, const PointList< 3 > &feet, Indices &cnodes) const
 gather mapped nodes with concavity ratio exceeding threshold
void jumpNodes (Indices &rnodes) const
 identify aerodynamic elements which likely straddle a discontinuity
void riskyNodes (const ConnectMap &v2v, Indices &rn, Real maxphi=rad(20.0)) const
 identify aerodynamic nodes where displacement jumps are expected
void topoNeighbors (const ConnectMap &v2v, Indices &rn) const
 collect direct neighbors of a node set
void smoothDisplacements (const Indices &rn, const ConnectMap &v2v, DMatrix< float > &m, int niter=1, float omega=0.5f) const
 plain Laplacian smoothing displacements for a node subset
void diffuseDisplacements (const ConnectMap &v2v, const Indices &rnodes, DMatrix< float > &m)
 solve diffusion problem for nodes in the internal discontinuity regions
void diffusionStencil (const ConnectMap &v2v, const Indices &rnodes, ConnectMap &spty) const
 stencils for jump node set
void smoothingOperator (const Indices &rnodes, const Indices &rim, CsrMatrixD &Dff, CsrMatrixD &Dfc) const
 generate diffusion matrix for internal smoothed region
void averagingOperator (const Indices &rnodes, const Indices &rim, CsrMatrixD &Dff, CsrMatrixD &Dfc) const
 another smoothing operator
void linearSmoothingRow (size_t row, const Indices &fnodes, const Indices &cnodes, CsrMatrixD &Dff, CsrMatrixD &Dfc) const
 construct a single row for linear-approximation smoothing operator
void drawFootLines ()
 debugging: generate lines connecting a-nodes to footpoints

Static Private Member Functions

static void diffusionMatrix (const Vct3 tri[], Mtx33 &De)
 generate surface diffusion operator for single triangle
static void massMatrix (const Vct3 tri[], Mtx33 &De)
 generate mass matrix for single triangle

Private Attributes

MxTriTree m_tree
 element search tree
float m_catchRadius
 accepted distance between surfaces
Real m_maxNrmDev
 parameter for identification of discontinuities
Real m_maxDistance
 parameter for identification of discontinuities
Real m_concavityLimit
 threshold value for the classification as concave
Real m_smoothedRadius
 radius around discontinuities which is included in smoothing
float m_smOmega
 relaxation parameter for smoothing iterations
int m_smoothSelective
 optional selective smoothing iterations
int m_smoothGlobal
 optional global smoothing iterations
int m_smoothedRing
 extend of region to smooth
bool m_useGalerkin = false
 surface diffusion or Galerkin averaging?
bool m_buildSymmetric = false
 assemble symmetric operator matrix?

Additional Inherited Members

- Public Types inherited from DispInterpolator
typedef CsrMatrix< float, 9 > MapMatrix
- Protected Types inherited from DispInterpolator
typedef std::vector
< SlidingNodeSet
- Protected Member Functions inherited from DispInterpolator
void collectWallNodes ()
 collect wall nodes when mapped nodes not explicitely given
void collectDispFields ()
 collect all fields marked as displacements or eigenmodes
void boundingBox (Vct3 &plo, Vct3 &phi) const
 compute bounding box of mapped node set
void mergeSlidingNodes (const Indices &slidingNodes)
 mark sliding nodes
Vct3 slidingNormal (uint eix) const
 determine the sliding plane normal from element
void pinSlidingNodes (DMatrix< float > &dsp) const
 restrict displacements of sliding nodes
void pinSlidingNodes (MapMatrix &H) const
 restrict displacements of sliding nodes
void findMappedElements (Indices &elix) const
 determine which aerodynamic elements are involved in mapping
void mapAerTopology (const Indices &nodeSet, ConnectMap &v2v) const
 assemble node-to-node connectivity of mapped aerodynamic nodes
void nearbyNodes (Real threshold, const Indices &src, Indices &nbnodes) const
 determine all mapped aerodynamic nodes which are closer than threshold
void rubberTriangles (Indices &tri) const
 identify aerodynamic surface triangles for rubber sections
void smoothMap (int niter, float omega, const Indices &rnodes, const ConnectMap &v2v, MapMatrix &H) const
 apply smoothing to mapping matrix
uint appendNodeSet (const Indices &rnodes)
 used for debugging : create index sets
void smoothedRegionRim (const ConnectMap &v2v, const Indices &rnodes, Indices &rim) const
 flag fixed aerodynamic nodes which touch smoothed nodes
void bfsWalk (uint k, Real sqlmax, const ConnectMap &v2v, const Indices &subset, Indices &vnb) const
 walk from k and find all in subset reachable within distance
bool isMappedElement (uint k) const
 check whether aerodynamic element k is moving entirely (all nodes mapped)
- Protected Attributes inherited from DispInterpolator
MxMeshPtr m_pstr
 structural mesh
MxMeshPtr m_paer
 aerodynamic mesh
Indices m_mappedNodes
 aerodynamic nodes to map
Indices m_rubberNodes
 aerodynamic nodes for which deformations will be extrapolated
SlidingSet m_snset
 information used to enforce sliding conditions
Indices m_movingBocos
 indices of the aerodynamic mesh bocos (element sets) marked as moving
Indices m_movingSections
Indices m_slidingBocos
 indices of the aerodynamic mesh bocos (element sets) marked as moving
Indices m_slidingSections
Indices m_fixedBocos
 indices of mesh sections marked as fixed
Indices m_fixedSections
Indices m_rubberBocos
 indices of mesh sections/bocos marked as rubber sections
Indices m_rubberSections
Indices m_aerFields
 indices of the resulting displacement fields in aerodynamic mesh
Indices m_strFields
 indices of fields in structural mesh to use for mapping
Vector m_modalMass
 modal mass and stiffness values
Vector m_modalStiffness
Vector m_autoScales
 modal scaling factors computed by autoScale
Real m_scale
 scale displacements by this global factor

Member Function Documentation

void SurfInterpolator::buildTreeByPid ( const Indices &  pidwet,
const Indices &  pidintern 

Build tree from shell elements with PID.

Assemble search tree from structural shell elements which conform to a certain pattern. If pidwet is not empty, then all shell elements which have a PID in that set are used. If, on the other hand, pidintern is not empty, then all shell elements which have one of the listed PIDs are not used, but all other shell elements are.

This procedure will fail if the structural mesh does not have a PID field.

The documentation for this class was generated from the following files:
Generated on Tue May 24 2022 03:03:18 for libsurf by   doxygen 1.8.5