Free Form Deformation of a 3D surface and point clouds, with structured lattice. More...

#include <FFDLattice.hpp>

Inheritance diagram for mimmo::FFDLattice:
Collaboration diagram for mimmo::FFDLattice:

Public Member Functions

 FFDLattice ()
 
 FFDLattice (const bitpit::Config::Section &rootXML)
 
 FFDLattice (const FFDLattice &other)
 
virtual ~FFDLattice ()
 
virtual void absorbSectionXML (const bitpit::Config::Section &slotXML, std::string name="")
 
void apply ()
 
darray3E apply (darray3E &point)
 
dvecarr3E apply (dvecarr3E *point)
 
dvecarr3E apply (livector1D &map)
 
virtual bool build ()
 
void buildPorts ()
 
void clearFilter ()
 
void clearLattice ()
 
void execute ()
 
virtual void flushSectionXML (bitpit::Config::Section &slotXML, std::string name="")
 
dmpvecarr3EgetDeformation ()
 
iarray3E getDegrees ()
 
dvecarr3EgetDisplacements ()
 
dmpvector1DgetFilter ()
 
ivector1D getKnotsDimension ()
 
dvector1D getWeights ()
 
bool isDisplGlobal ()
 
FFDLatticeoperator= (FFDLattice other)
 
void plotCloud (std::string directory, std::string filename, int counter, bool binary, bool deformed)
 
void plotGrid (std::string directory, std::string filename, int counter, bool binary, bool deformed)
 
void returnKnotsStructure (dvector2D &, ivector2D &)
 
void returnKnotsStructure (int, dvector1D &, ivector1D &)
 
void setDegrees (iarray3E curveDegrees)
 
void setDisplacements (dvecarr3E displacements)
 
void setDisplGlobal (bool flag)
 
void setFilter (dmpvector1D *)
 
void setLattice (BasicShape *, dvector1D &spacing, iarray3E &degrees)
 
void setLattice (BasicShape *, iarray3E &dimensions, iarray3E &degrees)
 
void setLattice (darray3E &origin, darray3E &span, ShapeType, dvector1D &spacing, iarray3E &degrees)
 
void setLattice (darray3E &origin, darray3E &span, ShapeType, iarray3E &dimensions, iarray3E &degrees)
 
void setNodalWeight (double, int)
 
void setNodalWeight (double, int, int, int)
 
void setNodalWeight (dvector1D)
 
- Public Member Functions inherited from mimmo::Lattice
 Lattice ()
 
 Lattice (const bitpit::Config::Section &rootXML)
 
 Lattice (const Lattice &other)
 
virtual ~Lattice ()
 
int accessDOFFromGrid (int index)
 
ivector1D accessDOFFromGrid (ivector1D gNindex)
 
int accessGridFromDOF (int index)
 
ivector1D accessGridFromDOF (ivector1D dofIndex)
 
void clearLattice ()
 
dvecarr3E getGlobalCoords ()
 
dvecarr3E getLocalCoords ()
 
int getNNodes ()
 
void plotCloud (std::string directory, std::string filename, int counter, bool binary)
 
void plotGrid (std::string directory, std::string filename, int counter, bool binary)
 
- Public Member Functions inherited from mimmo::BaseManipulation
 BaseManipulation ()
 
 BaseManipulation (const BaseManipulation &other)
 
virtual ~BaseManipulation ()
 
void activate ()
 
bool arePortsBuilt ()
 
void clear ()
 
void disable ()
 
void exec ()
 
BaseManipulationgetChild (int i=0)
 
ConnectionType getConnectionType ()
 
MimmoSharedPointer< MimmoObjectgetGeometry ()
 
MimmoSharedPointer< MimmoObject > & getGeometryReference ()
 
int getId ()
 
bitpit::Logger & getLog ()
 
std::string getName ()
 
int getNChild ()
 
int getNParent ()
 
int getNPortsIn ()
 
int getNPortsOut ()
 
BaseManipulationgetParent (int i=0)
 
std::unordered_map< PortID, PortIn * > getPortsIn ()
 
std::unordered_map< PortID, PortOut * > getPortsOut ()
 
uint getPriority ()
 
virtual std::vector< BaseManipulation * > getSubBlocksEmbedded ()
 
bool isActive ()
 
bool isApply ()
 
bool isChild (BaseManipulation *, int &)
 
bool isParent (BaseManipulation *, int &)
 
bool isPlotInExecution ()
 
BaseManipulationoperator= (const BaseManipulation &other)
 
void removePins ()
 
void removePinsIn ()
 
void removePinsOut ()
 
void setApply (bool flag=true)
 
void setGeometry (MimmoSharedPointer< MimmoObject > geometry)
 
void setId (int)
 
void setLog (bitpit::Logger &log)
 
void setName (std::string name)
 
void setOutputPlot (std::string path)
 
void setPlotInExecution (bool)
 
void setPriority (uint priority)
 
void unsetGeometry ()
 
- Public Member Functions inherited from mimmo::UStructMesh
 UStructMesh ()
 
 UStructMesh (const UStructMesh &other)
 
virtual ~UStructMesh ()
 
int accessCellIndex (int i, int j, int k)
 
void accessCellIndex (int N_, int &i, int &j, int &k)
 
int accessPointIndex (int i, int j, int k)
 
void accessPointIndex (int N_, int &i, int &j, int &k)
 
void clearMesh ()
 
void execute ()
 
ivector1D getCellNeighs (int)
 
ivector1D getCellNeighs (int, int, int)
 
std::array< CoordType, 3 > getCoordType ()
 
CoordType getCoordType (int)
 
CoordType getCoordTypex ()
 
CoordType getCoordTypey ()
 
CoordType getCoordTypez ()
 
iarray3E getDimension ()
 
darray3E getGlobalCCell (int)
 
darray3E getGlobalCCell (int, int, int)
 
dvecarr3E getGlobalCellCentroids ()
 
dvecarr3E getGlobalCoords ()
 
darray3E getGlobalPoint (int)
 
darray3E getGlobalPoint (int, int, int)
 
darray3E getInfLimits ()
 
darray3E getLocalCCell (int)
 
darray3E getLocalCCell (int, int, int)
 
dvecarr3E getLocalCellCentroids ()
 
dvecarr3E getLocalCoords ()
 
darray3E getLocalPoint (int)
 
darray3E getLocalPoint (int, int, int)
 
darray3E getLocalSpan ()
 
darray3E getOrigin ()
 
dmatrix33E getRefSystem ()
 
darray3E getScaling ()
 
BasicShapegetShape ()
 
const BasicShapegetShape () const
 
ShapeType getShapeType ()
 
darray3E getSpacing ()
 
darray3E getSpan ()
 
darray3E interpolateCellData (darray3E &point, dvecarr3E &celldata)
 
double interpolateCellData (darray3E &point, dvector1D &celldata)
 
int interpolateCellData (darray3E &point, ivector1D &celldata)
 
darray3E interpolatePointData (darray3E &point, dvecarr3E &pointdata)
 
double interpolatePointData (darray3E &point, dvector1D &pointdata)
 
int interpolatePointData (darray3E &point, ivector1D &pointdata)
 
bool isBuilt ()
 
void locateCellByPoint (darray3E &point, int &i, int &j, int &k)
 
void locateCellByPoint (dvector1D &point, int &i, int &j, int &k)
 
UStructMeshoperator= (UStructMesh other)
 
void plotCloud (std::string &, std::string, int, bool, const ivector1D &labels, dvecarr3E *extPoints=nullptr)
 
void plotCloudScalar (std::string, std::string, int, bool, dvector1D &data)
 
void plotGrid (std::string &, std::string, int, bool, const ivector1D &labels, dvecarr3E *extPoints=nullptr)
 
void plotGridScalar (std::string, std::string, int, bool, dvector1D &data)
 
void setCoordType (CoordType, int)
 
void setCoordType (std::array< CoordType, 3 >)
 
void setCoordTypex (CoordType)
 
void setCoordTypey (CoordType)
 
void setCoordTypez (CoordType)
 
void setDimension (iarray3E dim)
 
void setDimension (ivector1D dim)
 
void setInfLimits (darray3E val)
 
void setInfLimits (double val, int dir)
 
void setMesh (BasicShape *, dvector1D &spacing)
 
void setMesh (BasicShape *, iarray3E &dimensions)
 
void setMesh (darray3E &origin, darray3E &span, ShapeType, dvector1D &spacing)
 
void setMesh (darray3E &origin, darray3E &span, ShapeType, iarray3E &dimensions)
 
void setOrigin (darray3E origin)
 
void setRefSystem (darray3E, darray3E, darray3E)
 
void setRefSystem (dmatrix33E)
 
void setRefSystem (int, darray3E)
 
void setShape (const BasicShape *)
 
void setShape (int itype=0)
 
void setShape (ShapeType type=ShapeType::CUBE)
 
void setSpan (darray3E span)
 
void setSpan (double, double, double)
 
void swap (UStructMesh &x) noexcept
 
darray3E transfToGlobal (darray3E &point)
 
dvecarr3E transfToGlobal (dvecarr3E &list_points)
 
dvector1D transfToGlobal (dvector1D &point)
 
darray3E transfToLocal (darray3E &point)
 
dvecarr3E transfToLocal (dvecarr3E &list_points)
 
dvector1D transfToLocal (dvector1D &point)
 

Protected Member Functions

void checkFilter ()
 
dvecarr3E convertDisplToXYZ ()
 
darray3E convertDisplToXYZ (darray3E &, int i)
 
virtual void plotOptionalResults ()
 
void resizeMapDof ()
 
void swap (FFDLattice &) noexcept
 
- Protected Member Functions inherited from mimmo::Lattice
void resizeMapDof ()
 
void swap (Lattice &) noexcept
 
- Protected Member Functions inherited from mimmo::BaseManipulation
void _apply (MimmoPiercedVector< darray3E > &displacements)
 
void addChild (BaseManipulation *child)
 
void addParent (BaseManipulation *parent)
 
void addPinIn (BaseManipulation *objIn, PortID portR)
 
void addPinOut (BaseManipulation *objOut, PortID portS, PortID portR)
 
void cleanBufferIn (PortID port)
 
template<typename T , typename O >
bool createPortIn (O *obj, void(O::*setVar_)(T), PortID portR, bool mandatory=false, int family=0)
 
template<typename T , typename O >
bool createPortIn (T *var_, PortID portR, bool mandatory=false, int family=0)
 
template<typename T , typename O >
bool createPortOut (O *obj, T(O::*getVar_)(), PortID portS)
 
template<typename T , typename O >
bool createPortOut (T *var_, PortID portS)
 
void deletePorts ()
 
PortID findPinIn (PortIn &pin)
 
PortID findPinOut (PortOut &pin)
 
void initializeLogger (bool logexists)
 
void readBufferIn (PortID port)
 
void removePinIn (BaseManipulation *objIn, PortID portR)
 
void removePinIn (PortID portR, int j)
 
void removePinOut (BaseManipulation *objOut, PortID portS)
 
void removePinOut (PortID portS, int j)
 
void setBufferIn (PortID port, mimmo::IBinaryStream &input)
 
void swap (BaseManipulation &x) noexcept
 
void unsetChild (BaseManipulation *child)
 
void unsetParent (BaseManipulation *parent)
 
void write (MimmoSharedPointer< MimmoObject > geometry)
 
template<typename mpv_t >
void write (MimmoSharedPointer< MimmoObject > geometry, MimmoPiercedVector< mpv_t > &data)
 
template<typename mpv_t , typename... Args>
void write (MimmoSharedPointer< MimmoObject > geometry, MimmoPiercedVector< mpv_t > &data, Args ... args)
 
template<typename mpv_t >
void write (MimmoSharedPointer< MimmoObject > geometry, std::vector< MimmoPiercedVector< mpv_t > * > &data)
 
template<typename mpv_t , typename... Args>
void write (MimmoSharedPointer< MimmoObject > geometry, std::vector< MimmoPiercedVector< mpv_t > * > &data, Args ... args)
 
template<typename mpv_t >
void write (MimmoSharedPointer< MimmoObject > geometry, std::vector< MimmoPiercedVector< mpv_t >> &data)
 
template<typename mpv_t , typename... Args>
void write (MimmoSharedPointer< MimmoObject > geometry, std::vector< MimmoPiercedVector< mpv_t >> &data, Args ... args)
 
- Protected Member Functions inherited from mimmo::UStructMesh
void destroyNodalStructure ()
 
void reshapeNodalStructure ()
 
void resizeMesh ()
 

Protected Attributes

iarray3E m_deg
 
dvecarr3E m_displ
 
dmpvecarr3E m_gdispl
 
dvector2D m_knots
 
ivector2D m_mapEff
 
ivector2D m_mapNodes
 
dvector1D m_weights
 
- Protected Attributes inherited from mimmo::Lattice
ivector1D m_intMapDOF
 
int m_np
 
- Protected Attributes inherited from mimmo::BaseManipulation
bool m_active
 
bool m_apply
 
bool m_arePortsBuilt
 
bmumap m_child
 
int m_counter
 
bool m_execPlot
 
MimmoSharedPointer< MimmoObjectm_geometry
 
bitpit::Logger * m_log
 
std::string m_name
 
std::string m_outputPlot
 
bmumap m_parent
 
std::unordered_map< PortID, PortIn * > m_portIn
 
std::unordered_map< PortID, PortOut * > m_portOut
 
ConnectionType m_portsType
 
uint m_priority
 
- Protected Attributes inherited from mimmo::UStructMesh
double m_dx
 
double m_dy
 
double m_dz
 
bool m_isBuild
 
int m_nx
 
int m_ny
 
int m_nz
 
bool m_setInfLimits
 
bool m_setorigin
 
bool m_setRefSys
 
bool m_setspan
 
std::unique_ptr< BasicShapem_shape
 
dvector1D m_xedge
 
dvector1D m_xnode
 
dvector1D m_yedge
 
dvector1D m_ynode
 
dvector1D m_zedge
 
dvector1D m_znode
 

Additional Inherited Members

- Public Types inherited from mimmo::BaseManipulation
typedef std::unordered_map< BaseManipulation *, int > bmumap
 
typedef pin::ConnectionType ConnectionType
 
typedef std::string PortID
 
- Static Protected Attributes inherited from mimmo::BaseManipulation
static int sm_baseManipulationCounter
 

Detailed Description

Free Form Deformation of a 3D surface and point clouds, with structured lattice.

Free Form deformation tool for 3D geometries (surface and point clouds). Basically, it builds an elemental 3D shape (box, wedge, sphere or cylinder ) around the geometry and set a structured cartesian mesh of control points on it (lattice). Displacements of each control point are linked to the geometry inside the shape by means of a NURBS volumetric parameterization. Deformation will be applied only to those portion of geometry encased into the 3D shape.


Ports available in FFDLattice Class :


Port Input
PortType variable/function DataType
M_DISPLS setDisplacements (MC_VECARR3, MD_FLOAT)
M_FILTER setFilter (MC_SCALAR, MD_MPVECFLOAT_)
M_DEG setDegrees (MC_ARRAY3, MD_INT)
M_NURBSWEIGHTS setNodalWeight (MC_VECTOR, MD_FLOAT)
M_NURBSCOORDTYPE setCoordType (MC_ARRAY3, MD_COORDT)
Port Output
PortType variable/function DataType
M_GDISPLS getDeformation (MC_SCALAR, MD_MPVECARR3FLOAT_)
M_DEG getDegrees (MC_ARRAY3, MD_INT)
M_FILTER getFilter (MC_SCALAR, MD_MPVECFLOAT_)
M_NURBSWEIGHTS getWeights (MC_VECTOR, MD_FLOAT)
M_NURBSCOORDTYPE getCoordType (MC_ARRAY3, MD_COORDT)

Inherited from Lattice :

Port Input
PortType variable/function DataType
M_GEOM m_geometry (MC_SCALAR, MD_MIMMO_)
M_DIMENSION setDimension (MC_ARRAY3, MD_INT)
M_INFLIMITS setInfLimits (MC_ARRAY3, MD_FLOAT)
M_AXES setRefSystem (MC_ARR3ARR3, MD_FLOAT)
M_SPAN setSpan (MC_ARRAY3, MD_FLOAT)
M_POINT setOrigin (MC_ARRAY3, MD_FLOAT)
M_SHAPE setShape(mimmo::ShapeType) (MC_SCALAR, MD_SHAPET)
M_COPYSHAPE setShape(const BasicShape ) (MC_SCALAR, MD_SHAPE_
M_SHAPEI setShape(int) (MC_SCALAR, MD_INT)
Port Output
PortType variable/function DataType
M_GLOBAL getGlobalCoords (MC_VECARR3, MD_FLOAT)
M_LOCAL getLocalCoords (MC_VECARR3, MD_FLOAT)
M_POINT getOrigin (MC_ARRAY3, MD_FLOAT)
M_AXES getRefSystem (MC_ARR3ARR3, MD_FLOAT)
M_INFLIMITS getInfLimits (MC_ARRAY3, MD_FLOAT)
M_SPAN getSpan (MC_ARRAY3, MD_FLOAT)
M_DIMENSION getDimension (MC_ARRAY3, MD_INT)
M_COPYSHAPE getShape (MC_SCALAR, MD_SHAPE_)
M_GEOM getGeometry (MC_SCALAR, MD_MIMMO_)


The xml available parameters, sections and subsections are the following :

Inherited from BaseManipulation:

  • ClassName: name of the class as "mimmo.Lattice"
  • Priority: uint marking priority in multi-chain execution;
  • Apply: boolean 0/1 activate apply deformation result on target geometry directly in execution;
  • PlotInExecution: boolean 0/1 print optional results of the class.
  • OutputPlot: target directory for optional results writing.

    Inherited from Lattice:

  • Shape: type of basic shape for your lattice. Available choice are CUBE, CYLINDER,SPHERE,WEDGE
  • Origin: 3D point marking the shape barycenter
  • Span: span dimensions of your shape (width-height-depth for CUBE, baseRadius-azimuthalspan-height for CYLINDER, radius-azimuthalspan-polarspan for SPHERE, triangle width-triangle height-depth for WEDGE)
  • RefSystem: axes of current shape reference system. written in XML as:

    <RefSystem>
       <axis0> 1.0 0.0 0.0 </axis0>
       <axis1> 0.0 1.0 0.0 </axis1>
       <axis2> 0.0 0.0 1.0 </axis2>
    </RefSystem>


  • InfLimits: inferior limits for shape coordinates (meaningful only for CYLINDER AND SPHERE curvilinear coordinates)
  • Dimension: number of nodes in each coordinate direction to get the structured lattice mesh

Proper of the class:

  • CoordType: Set Boundary conditions for each NURBS interpolant on their extrema. Available choice are CLAMPED,SYMMETRIC,UNCLAMPED, PERIODIC;
  • Degrees: degrees for NURBS interpolant in each spatial direction;
  • DisplGlobal:0/1 use shape-local/global x,y,z reference system to define displacements of lattice node;

Geometry, displacements field and filter field have to be mandatorily passed through port.

Examples
genericinput_example_00003.cpp, ioofoam_example_00001.cpp, manipulators_example_00002.cpp, manipulators_example_00003.cpp, manipulators_example_00004.cpp, manipulators_example_00005.cpp, and utils_example_00004.cpp.

Definition at line 133 of file FFDLattice.hpp.

Constructor & Destructor Documentation

◆ FFDLattice() [1/3]

mimmo::FFDLattice::FFDLattice ( )

Basic Constructor.

Definition at line 30 of file FFDLattice.cpp.

◆ FFDLattice() [2/3]

mimmo::FFDLattice::FFDLattice ( const bitpit::Config::Section &  rootXML)

Custom constructor reading xml data

Parameters
[in]rootXMLreference to your xml tree section

Definition at line 44 of file FFDLattice.cpp.

◆ ~FFDLattice()

mimmo::FFDLattice::~FFDLattice ( )
virtual

Destructor

Definition at line 65 of file FFDLattice.cpp.

◆ FFDLattice() [3/3]

mimmo::FFDLattice::FFDLattice ( const FFDLattice other)

Copy Constructor. Result displacements are never copied.

Parameters
[in]otherFFDLattice where copy from

Definition at line 70 of file FFDLattice.cpp.

Member Function Documentation

◆ absorbSectionXML()

void mimmo::FFDLattice::absorbSectionXML ( const bitpit::Config::Section &  slotXML,
std::string  name = "" 
)
virtual

It sets infos reading from a XML bitpit::Config::section.

Parameters
[in]slotXMLbitpit::Config::Section of XML file
[in]namename associated to the slot

Reimplemented from mimmo::Lattice.

Definition at line 1596 of file FFDLattice.cpp.

◆ apply() [1/4]

void mimmo::FFDLattice::apply ( )
virtual

Directly apply deformation field to target geometry.

Reimplemented from mimmo::BaseManipulation.

Definition at line 705 of file FFDLattice.cpp.

◆ apply() [2/4]

darray3E mimmo::FFDLattice::apply ( darray3E point)

Apply current deformation setup to a single 3D point. If point is not included in lattice return zero. The method does not apply filter field modulation if any.

Parameters
[in]pointcoordinate of the points
Returns
point displacement

Definition at line 634 of file FFDLattice.cpp.

◆ apply() [3/4]

dvecarr3E mimmo::FFDLattice::apply ( dvecarr3E point)

Apply current deformation setup to a custom list of 3D points. Only points contained into the lattice will be deformed,displacement of the others will be set to zero. If point list is nullptr,return void results. The method does not apply filter field modulation if any.

Parameters
[in]pointpointer to a list of 3D points.
Returns
displacements of points

Definition at line 685 of file FFDLattice.cpp.

◆ apply() [4/4]

dvecarr3E mimmo::FFDLattice::apply ( livector1D list)

Apply current deformation setup to geometry linked as a MimmoObject container, member of the class (see method getGeometry).If MimmoObject member m_geometry is nullptr,return void results.The method applies filter field modulation if any.

Parameters
[out]listlist of non-zero displacement of m_geometry vertices
Returns
list of ids of non-zero displaced vertex belonging to geometry

Definition at line 650 of file FFDLattice.cpp.

◆ build()

bool mimmo::FFDLattice::build ( )
virtual

Build your lattice and all your knot structures. Execute this method every time a parameter modification is applied, in order to enable it

Returns
id lattice is successfully built.

Reimplemented from mimmo::Lattice.

Examples
genericinput_example_00003.cpp, manipulators_example_00003.cpp, and manipulators_example_00004.cpp.

Definition at line 1565 of file FFDLattice.cpp.

◆ buildPorts()

void mimmo::FFDLattice::buildPorts ( )
virtual

It builds the input/output ports of the object

Reimplemented from mimmo::Lattice.

Definition at line 117 of file FFDLattice.cpp.

◆ checkFilter()

void mimmo::FFDLattice::checkFilter ( )
protected

Check if the filter is related to the target geometry. If not create a unitary filter field.

Definition at line 714 of file FFDLattice.cpp.

◆ clearFilter()

void mimmo::FFDLattice::clearFilter ( )

Clean filter field

Definition at line 151 of file FFDLattice.cpp.

◆ clearLattice()

void mimmo::FFDLattice::clearLattice ( )

Clean all stuffs in your lattice

Definition at line 141 of file FFDLattice.cpp.

◆ convertDisplToXYZ() [1/2]

dvecarr3E mimmo::FFDLattice::convertDisplToXYZ ( )
protected

Convert and return all target displacements (expressed in local shape ref frame) in XYZ frame

Returns
displacement in xyz ref frame

Definition at line 756 of file FFDLattice.cpp.

◆ convertDisplToXYZ() [2/2]

darray3E mimmo::FFDLattice::convertDisplToXYZ ( darray3E target,
int  i 
)
protected

Convert a target displacement (expressed in local shape ref frame) in XYZ frame

Parameters
[in]targettarget displacement
[in]ireference displacement index
Returns
displacement in xyz ref frame

Definition at line 740 of file FFDLattice.cpp.

◆ execute()

void mimmo::FFDLattice::execute ( )
virtual

Given pointer to a reference geometry and, execute deformation w/ the current setup. Result is stored in BaseManipulation member m_gdispl. Execution build your mesh, if not done already.

Reimplemented from mimmo::Lattice.

Definition at line 580 of file FFDLattice.cpp.

◆ flushSectionXML()

void mimmo::FFDLattice::flushSectionXML ( bitpit::Config::Section &  slotXML,
std::string  name = "" 
)
virtual

It sets infos from class members in a XML bitpit::Config::section.

Parameters
[in]slotXMLbitpit::Config::Section of XML file
[in]namename associated to the slot

Reimplemented from mimmo::Lattice.

Definition at line 1651 of file FFDLattice.cpp.

◆ getDeformation()

dmpvecarr3E * mimmo::FFDLattice::getDeformation ( )

Return actual computed deformation field (if any) for the geometry linked.

Returns
deformation field

Definition at line 254 of file FFDLattice.cpp.

◆ getDegrees()

iarray3E mimmo::FFDLattice::getDegrees ( )

Get the degree of nurbs curve in each direction.

Returns
array of degree of nurbs curve in each direction

Definition at line 224 of file FFDLattice.cpp.

◆ getDisplacements()

dvecarr3E * mimmo::FFDLattice::getDisplacements ( )

It gets current DOF displacements of lattice.

Returns
displacements of control points.

Definition at line 236 of file FFDLattice.cpp.

◆ getFilter()

dmpvector1D * mimmo::FFDLattice::getFilter ( )

It gets current set filter field. See FFDLattice::setFilter

Returns
filter field.

Definition at line 245 of file FFDLattice.cpp.

◆ getKnotsDimension()

ivector1D mimmo::FFDLattice::getKnotsDimension ( )

Return a vector of six elements reporting the real number of knots effectively stored in the current class (first 3 elements) and the theoretical number of knots (last 3 elements) for Nurbs representation (see Nurbs Books of Peigl)

Returns
six elements vector

Definition at line 164 of file FFDLattice.cpp.

◆ getWeights()

dvector1D mimmo::FFDLattice::getWeights ( )

Return weight actually set for each control node

Returns
list of weights

Definition at line 184 of file FFDLattice.cpp.

◆ isDisplGlobal()

bool mimmo::FFDLattice::isDisplGlobal ( )

Check if displacements are meant as global-true or local-false. See setDisplGlobal method

Returns
global displacements flag

Definition at line 264 of file FFDLattice.cpp.

◆ operator=()

FFDLattice & mimmo::FFDLattice::operator= ( FFDLattice  other)

Assignement operator. Result displacements are never copied.

Definition at line 88 of file FFDLattice.cpp.

◆ plotCloud()

void mimmo::FFDLattice::plotCloud ( std::string  directory,
std::string  filename,
int  counter,
bool  binary,
bool  deformed 
)

Plot your current lattice as a point cloud to *vtu file. Wrapped method of plotCloud of father class UStructMesh.

Parameters
[in]directoryoutput directory
[in]filenameoutput filename w/out tag
[in]counterinteger identifier of the file
[in]binaryboolean flag for 0-"ascii" or 1-"appended" writing
[in]deformedboolean flag for plotting 0-"original lattice", 1-"deformed lattice"

Definition at line 546 of file FFDLattice.cpp.

◆ plotGrid()

void mimmo::FFDLattice::plotGrid ( std::string  directory,
std::string  filename,
int  counter,
bool  binary,
bool  deformed 
)

Plot your current lattice as a structured grid to *vtu file. Wrapped method of plotGrid of mother class UStrucMesh.

Parameters
[in]directoryoutput directory
[in]filenameoutput filename w/out tag
[in]counterinteger identifier of the file
[in]binaryboolean flag for 0-"ascii" or 1-"appended" writing
[in]deformedboolean flag for plotting 0-"original lattice", 1-"deformed lattice"

Definition at line 506 of file FFDLattice.cpp.

◆ plotOptionalResults()

void mimmo::FFDLattice::plotOptionalResults ( )
protectedvirtual

Plot Optional results of the class, that is the lattice grid as a hexahedron mesh and as a point cloud in *.vtu format, for both undeformed/ deformed lattice mesh.

Reimplemented from mimmo::Lattice.

Definition at line 1428 of file FFDLattice.cpp.

◆ resizeMapDof()

void mimmo::FFDLattice::resizeMapDof ( )
protected

Resize map of effective nodes of the lattice grid to fit a total number od degree of freedom nx*ny*nz. Old structure is deleted and reset to zero.

Definition at line 1417 of file FFDLattice.cpp.

◆ returnKnotsStructure() [1/2]

void mimmo::FFDLattice::returnKnotsStructure ( dvector2D knots,
ivector2D mapTheo 
)

Return knots structure and theoretical map of knots distributions for the current Lattice

Parameters
[out]knotslist
[out]mapTheomap of knots theoretical distribution

Definition at line 194 of file FFDLattice.cpp.

◆ returnKnotsStructure() [2/2]

void mimmo::FFDLattice::returnKnotsStructure ( int  dir,
dvector1D knots,
ivector1D mapT 
)

Return knots structure and knot multiplicity vector for a specified Nurbs curve "dir"

Parameters
[in]dirinteger (0,1,2) identifies nurbs curve in x,y,and z direction respectively
[out]knotslist
[out]mapTtheoretical knot map distribution

Definition at line 210 of file FFDLattice.cpp.

◆ setDegrees()

void mimmo::FFDLattice::setDegrees ( iarray3E  degrees)

Set the degree of nurbs curve in each direction. If the number of control nodes are not initialized, they are set to the minimum number admissible. Weights are reset to unitary value

Parameters
[in]degreesvector of degree of nurbs curve in each direction
Examples
genericinput_example_00003.cpp, ioofoam_example_00001.cpp, and utils_example_00004.cpp.

Definition at line 273 of file FFDLattice.cpp.

◆ setDisplacements()

void mimmo::FFDLattice::setDisplacements ( dvecarr3E  displacements)

Set current DOF displacements of your lattice. If Input list does not fit current DOF size of lattice, return doing nothing.

Parameters
[in]displacementsof control nodes
Examples
ioofoam_example_00001.cpp, and utils_example_00004.cpp.

Definition at line 284 of file FFDLattice.cpp.

◆ setDisplGlobal()

void mimmo::FFDLattice::setDisplGlobal ( bool  flag)

Set if displacements are meant as global-true or local-false. Global means that displacements are defined in world xyz coordinate. Local means that displacements are defined in local reference frame of the lattice, accounting of:

  • lattice rigid roto-translation due to changing in Origin/RefSystem.
  • lattice system coordinates transformation.
    Parameters
    [in]flagglobal displacements flag
Examples
manipulators_example_00003.cpp.

Definition at line 298 of file FFDLattice.cpp.

◆ setFilter()

void mimmo::FFDLattice::setFilter ( dmpvector1D filter)

Sets filter field. Note: filter field is defined on nodes of the current linked geometry. coherent size between field size and number of geometry vertices is expected.

Parameters
[in]filterfields.

Definition at line 489 of file FFDLattice.cpp.

◆ setLattice() [1/4]

void mimmo::FFDLattice::setLattice ( BasicShape shape,
dvector1D spacing,
iarray3E degrees 
)

Set lattice mesh, dimensions and curve degree for Nurbs trivariate parameterization. If curve degrees matches current cell Dimensions (n_nodes -1) in each coordinate, a Bezier trivariate parameterization is recovered. The lattice can be build also with inherited method setMesh. In this case, curve degrees are set to 1 by default. Use FFDLattice::setDegrees to customize later your curve degrees, and FFDLattice::build() method to apply your modifications.

Parameters
[in]shapepointer to an external BasicShape object
[in]spacingdefine spacing step for each lattice dimension
[in]degreescurve degrees for each direction;

Definition at line 412 of file FFDLattice.cpp.

◆ setLattice() [2/4]

void mimmo::FFDLattice::setLattice ( BasicShape shape,
iarray3E dimensions,
iarray3E degrees 
)

Set lattice mesh, dimensions and curve degree for Nurbs trivariate parameterization. If curve degrees matches current cell Dimensions (n_nodes -1) in each coordinate, a Bezier trivariate parameterization is recovered. The lattice can be build also with inherited method setMesh. In this case, curve degrees are set to 1 by default. Use FFDLattice::setDegrees to customize later your curve degrees, and FFDLattice::build() method to apply your modifications.

Parameters
[in]shapepointer to an external BasicShape object
[in]dimensionsnumber of control nodes for each direction
[in]degreescurve degrees for each direction;

Definition at line 391 of file FFDLattice.cpp.

◆ setLattice() [3/4]

void mimmo::FFDLattice::setLattice ( darray3E origin,
darray3E span,
ShapeType  type,
dvector1D spacing,
iarray3E degrees 
)

Set lattice mesh, dimensions and curve degree for Nurbs trivariate parameterization. If curve degrees matches current cell Dimensions (n_nodes -1) in each coordinate, a Bezier trivariate parameterization is recovered.The lattice can be build also with inherited method setMesh. In this case, curve degrees are set to 1 by default. Use FFDLattice::setDegrees to customize later your curve degrees, and FFDLattice::build() method to apply your modifications.

Parameters
[in]originpoint origin in global reference system
[in]spanspan for each shape coordinate in space (local r.s.)
[in]typeShapeType enum identifies the shape
[in]spacingdefine spacing step for each lattice dimension
[in]degreescurve degrees for each direction;

Definition at line 342 of file FFDLattice.cpp.

◆ setLattice() [4/4]

void mimmo::FFDLattice::setLattice ( darray3E origin,
darray3E span,
ShapeType  type,
iarray3E dimensions,
iarray3E degrees 
)

Set lattice mesh, dimensions and curve degree for Nurbs trivariate parameterization. If curve degrees matches current cell Dimensions (n_nodes -1) in each coordinate, a Bezier trivariate parameterization is recovered. The lattice can be build also with inherited method setMesh. In this case, curve degrees are set to 1 by default. Use FFDLattice::setDegrees to customize later your curve degrees, and FFDLattice::build() method to apply your modifications.

Parameters
[in]originpoint origin in global reference system
[in]spanspan for each shape coordinate in space (local r.s.)
[in]typeShapeType enum identifies the shape
[in]dimensionsnumber of control nodes for each direction
[in]degreescurve degrees for each direction;
Examples
manipulators_example_00002.cpp, manipulators_example_00003.cpp, manipulators_example_00004.cpp, and manipulators_example_00005.cpp.

Definition at line 316 of file FFDLattice.cpp.

◆ setNodalWeight() [1/3]

void mimmo::FFDLattice::setNodalWeight ( double  val,
int  index 
)

Modify a weight of a control node. Access to a node in global GRID indexing

Parameters
[in]valweight value
[in]indexindex of the control node -> gloab indexing

Definition at line 453 of file FFDLattice.cpp.

◆ setNodalWeight() [2/3]

void mimmo::FFDLattice::setNodalWeight ( double  val,
int  i,
int  j,
int  k 
)

Modify a weight of a control node. Access to a node in GRID cartesian indexing

Parameters
[in]valweight value
[in]iindex of x coordinate
[in]jindex of y coordinates
[in]kindex of z coordinate

Definition at line 466 of file FFDLattice.cpp.

◆ setNodalWeight() [3/3]

void mimmo::FFDLattice::setNodalWeight ( dvector1D  wg)

Modify weights of each control node.

Parameters
[in]wgweights vector of each nx*ny*nz control nodes

Definition at line 475 of file FFDLattice.cpp.

◆ swap()

void mimmo::FFDLattice::swap ( FFDLattice x)
protectednoexcept

Swap function.

Parameters
[in]xobject to be swapped

Definition at line 97 of file FFDLattice.cpp.

Member Data Documentation

◆ m_deg

iarray3E mimmo::FFDLattice::m_deg
protected

Nurbs curve degree for each of the possible 3 direction in space

Definition at line 136 of file FFDLattice.hpp.

◆ m_displ

dvecarr3E mimmo::FFDLattice::m_displ
protected

Displacements of control nodes.

Definition at line 140 of file FFDLattice.hpp.

◆ m_gdispl

dmpvecarr3E mimmo::FFDLattice::m_gdispl
protected

Displacements of geometry vertex.

Definition at line 142 of file FFDLattice.hpp.

◆ m_knots

dvector2D mimmo::FFDLattice::m_knots
protected

Nurbs curve knots for each of the possible 3 direction in space

Definition at line 137 of file FFDLattice.hpp.

◆ m_mapEff

ivector2D mimmo::FFDLattice::m_mapEff
protected

Nurbs map of theoretical node distribution

Definition at line 138 of file FFDLattice.hpp.

◆ m_mapNodes

ivector2D mimmo::FFDLattice::m_mapNodes
protected

Internal map to access node index w/ knots structure theoretical indexing

Definition at line 141 of file FFDLattice.hpp.

◆ m_weights

dvector1D mimmo::FFDLattice::m_weights
protected

Weights of each control node

Definition at line 139 of file FFDLattice.hpp.


The documentation for this class was generated from the following files: