Radial Basis Function evaluation from clouds of control points. More...

#include <MRBF.hpp>

Inheritance diagram for mimmo::MRBF:
Collaboration diagram for mimmo::MRBF:

Public Member Functions

 MRBF (const bitpit::Config::Section &rootXML)
 
 MRBF (const MRBF &other)
 
 MRBF (MRBFSol mode=MRBFSol::NONE)
 
virtual ~MRBF ()
 
virtual void absorbSectionXML (const bitpit::Config::Section &slotXML, std::string name="")
 
int addNode (darray3E)
 
ivector1D addNode (dvecarr3E)
 
void apply ()
 
bool areResultsInScalarMode ()
 
void buildPorts ()
 
ivector1D checkDuplicatedNodes (double tol=1.0E-12)
 
void clear ()
 
void clearFilter ()
 
void execute ()
 
virtual void flushSectionXML (bitpit::Config::Section &slotXML, std::string name="")
 
double getDiagonalFactor ()
 
dmpvecarr3EgetDisplacements ()
 
dvector1DgetEffectivelyUsedSupportRadii ()
 
dmpvector1DgetFilter ()
 
int getFunctionType ()
 
MRBFSol getMode ()
 
dvecarr3EgetNodes ()
 
dmpvector1DgetScalarDisplacements ()
 
bool isCompact ()
 
bool isSupportRadiusReal ()
 
bool isVariableSupportRadiusSet ()
 
MRBFoperator= (MRBF other)
 
bool removeDuplicatedNodes (ivector1D *list=nullptr)
 
void setCompactSupport (bool isCompact=true)
 
void setDiagonalFactor (double diagonalFactor)
 
void setDisplacements (dmpvecarr3E *displ)
 
void setDisplacements (dvecarr3E displ)
 
void setFilter (dmpvector1D *)
 
void setFunction (const bitpit::RBFBasisFunction &funct, bool isCompact=false)
 
void setFunction (const MRBFBasisFunction &funct, bool isCompact=false)
 
void setNode (darray3E)
 
void setNode (dvecarr3E)
 
void setNode (MimmoSharedPointer< MimmoObject > geometry)
 
void setScalarDisplacements (dmpvector1D *displ)
 
void setScalarDisplacements (dvector1D displ)
 
void setSupportRadiusLocal (double suppR_)
 
void setSupportRadiusReal (double suppR_)
 
void setSupportRadiusValue (double suppR_)
 
void setTol (double tol)
 
void setVariableSupportRadii (dmpvector1D *sradii)
 
void setVariableSupportRadii (dvector1D sradii)
 
- 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 ()
 

Protected Member Functions

void checkFilter ()
 
void computeEffectiveSupportRadiusList ()
 
std::vector< double > evalRBF (const std::array< double, 3 > &val)
 
bool initRBFwGeometry ()
 
void plotCloud (std::string directory, std::string filename, int counterFile, bool binary, bool deformed)
 
virtual void plotOptionalResults ()
 
void setMode (MRBFSol solver)
 
void setWeight (dvector2D value)
 
void swap (MRBF &x) 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 Attributes

bool m_areScalarResults
 
bool m_bfilter
 
double m_diagonalFactor
 
dmpvecarr3E m_displ
 
dvector1D m_effectiveSR
 
dmpvector1D m_filter
 
int m_functype
 
bool m_isCompact
 
dmpvecarr3Em_rbfdispl
 
MimmoSharedPointer< MimmoObjectm_rbfgeometry
 
dmpvector1Dm_rbfScalarDispl
 
dmpvector1Dm_rbfSupportRadii
 
dmpvector1D m_scalarDispl
 
MRBFSol m_solver
 
bool m_srIsReal
 
dvector1D m_supportRadii
 
double m_supportRadiusValue
 
double m_tol
 
- 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
 

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

Radial Basis Function evaluation from clouds of control points.

This class is derived from BaseManipulation class of mimmo and from RBF class of bitpit library. It evaluates the result of RBF functions built over a set of control point given externally or stored in a MimmoObject container. Displacements (DOFs) for RBF nodes are provided externally. They can be expressed as:

  • a) 3-component vector
  • b) 1-component scalar (as in the case of DOF representing displacements normal to surface). In that case the output geometry "displacement" field will be returned as a 3-component vector field (case a) ) or a scalar field (case b)).

The options are mutually exclusive (picking one exclude the other).

Default solver in execution is MRBFSol::NONE for direct parameterization. Use MRBFSol::GREEDY or MRBFSol::WHOLE to activate interpolation features. See bitpit::RBF docs for further information.

Support radii of RBF Nodes can be set in 3 different ways:

  • setting x as Local support radius : the effective support radius will be calculated as x * bbox_diag, where the last is the diagonal of the RBF set of nodes bounding box. This value will be equal for all RBF nodes.(setSupportRadiusLocal)
  • setting x as Real support radius: the value of x will be used as effective support radius, equal for all RBF nodes (setSupportRadiusReal)
  • setting variable Support Radii: provide a list of support radius values, one for each RBF node in the set. This option is available only in MRBFSol::NONE mode setVariableSupportRadii)

In case all three methods are connected through ports, priority list will be: setVariableSupportRadii, setSupportRadiusReal, setSupportRadiusLocal
Ports available in MRBF Class :


Port Input
PortType variable/function DataType
M_COORDS setNode (MC_VECARR3, MD_FLOAT)
M_DISPLS setDisplacements (MC_VECARR3, MD_FLOAT)
M_DATAFIELD setScalarDisplacements (MC_VECTOR, MD_FLOAT)
M_DATAFIELD2 setVariableSupportRadii (MC_VECTOR, MD_FLOAT)
M_FILTER setFilter (MC_SCALAR, MD_MPVECFLOAT_)
M_GEOM setGeometry (MC_SCALAR, MD_MIMMO_)
M_GEOM2 setNode (MC_SCALAR, MD_MIMMO_)
M_VECTORFIELD setDisplacements (MC_SCALAR, MD_MPVECARR3FLOAT_)
M_SCALARFIELD setScalarDisplacements (MC_SCALAR, MD_MPVECFLOAT_)
M_SCALARFIELD2 setVariableSupportRadii (MC_SCALAR, MD_MPVECFLOAT_)
Port Output
PortType variable/function DataType
M_GDISPLS getDisplacements (MC_SCALAR, MD_MPVECARR3FLOAT_)
M_SCALARFIELD getScalarDisplacements (MC_SCALAR, MD_MPVECFLOAT_)
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.MRBF;
  • Priority: uint marking priority in multi-chain execution;
  • Apply: boolean 0/1 activate apply deformation result on target geometry directly in execution;
  • PlotInExecution : plot optional results in execution;
  • OutputPlot : path to store optional results.

Proper of the class:

  • Mode: 0/1/2 mode of usage of the class see MRBFSol enum;
  • SupportRadiusLocal: local homogeneous radius of RBF function for each nodes, expressed as ratio of local geometry bounding box; see setSupportRadiusLocal method documentation.
  • SupportRadiusReal: homogeneous real radius of RBF function common to each RBF node; see setSupportRadiusReal method documentation.
  • RBFShape: shape of RBF function see MRBFBasisFunction and bitpit::RBFBasisFunction enums;
  • Tolerance: greedy engine tolerance (meaningful for Mode 2 only);
  • DiagonalFactor: factor used to define a threshold to filter geometry vertices (default 1.0);

    if set, SupportRadiusReal parameter bypass SupportRadiusLocal one.

Geometry, filter field, RBF nodes and displacements have to be mandatorily passed through port. Please not if class is in MRBFSol::NONE mode and a port to setVariableSupportRadii is linked, SupportRadiusLocal/Real parameters are bypassed.

Examples
genericinput_example_00004.cpp, genericinput_example_00005.cpp, geohandlers_example_00003.cpp, manipulators_example_00006.cpp, manipulators_example_00007.cpp, manipulators_example_00008.cpp, and utils_example_00003.cpp.

Definition at line 146 of file MRBF.hpp.

Constructor & Destructor Documentation

◆ MRBF() [1/3]

mimmo::MRBF::MRBF ( MRBFSol  mode = MRBFSol::NONE)

Default Constructor.

Definition at line 32 of file MRBF.cpp.

◆ MRBF() [2/3]

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

Custom constructor reading xml data

Parameters
[in]rootXMLreference to your xml tree section

Definition at line 54 of file MRBF.cpp.

◆ ~MRBF()

mimmo::MRBF::~MRBF ( )
virtual

Default Destructor

Definition at line 90 of file MRBF.cpp.

◆ MRBF() [3/3]

mimmo::MRBF::MRBF ( const MRBF other)

Copy Constructor. Result geometry displacement are not copied.

Parameters
[in]otherMRBF where copy from

Definition at line 95 of file MRBF.cpp.

Member Function Documentation

◆ absorbSectionXML()

void mimmo::MRBF::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::BaseManipulation.

Definition at line 865 of file MRBF.cpp.

◆ addNode() [1/2]

int mimmo::MRBF::addNode ( darray3E  node)

Adds a RBF point to the total control node list and activate it. Reimplemented from RBF::addNode of bitpit;

Parameters
[in]nodecoordinates of control point.
Returns
RBF id.
Examples
genericinput_example_00005.cpp.

Definition at line 311 of file MRBF.cpp.

◆ addNode() [2/2]

std::vector< int > mimmo::MRBF::addNode ( dvecarr3E  nodes)

Adds a list of RBF points to the total control node list and activate them. Reimplemented from RBF::addNode of bitpit;

Parameters
[in]nodescoordinates of control points.
Returns
Vector of RBF ids.

Definition at line 321 of file MRBF.cpp.

◆ apply()

void mimmo::MRBF::apply ( )
virtual

Directly apply deformation field to target geometry.

Reimplemented from mimmo::BaseManipulation.

Definition at line 820 of file MRBF.cpp.

◆ areResultsInScalarMode()

bool mimmo::MRBF::areResultsInScalarMode ( )

Return true if the the class is in Scalar mode, false otherwise. Scalar mode means that a set of Scalar DOFs displacements for RBFs nodes are feeded in input so that the final expected displacement field on the geometry is scalar. Otherwise, dofs are 3component vectors that produce a final 3-comp vector displacement field.

Returns
boolean true/false

Definition at line 291 of file MRBF.cpp.

◆ buildPorts()

void mimmo::MRBF::buildPorts ( )
virtual

It builds the input/output ports of the object

Implements mimmo::BaseManipulation.

Definition at line 154 of file MRBF.cpp.

◆ checkDuplicatedNodes()

ivector1D mimmo::MRBF::checkDuplicatedNodes ( double  tol = 1.0E-12)

Find all possible duplicated nodes within a prescribed distance tolerance. Default tolerance value is 1.0E-12;

Parameters
[in]toldistance tolerance
Returns
list of duplicated nodes.

Definition at line 373 of file MRBF.cpp.

◆ checkFilter()

void mimmo::MRBF::checkFilter ( )
protected

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

Definition at line 1015 of file MRBF.cpp.

◆ clear()

void mimmo::MRBF::clear ( )

Clean all except nodal RBF and its displacements. Use apposite methods RemoveAll***

Definition at line 657 of file MRBF.cpp.

◆ clearFilter()

void mimmo::MRBF::clearFilter ( )

Clean filter field only

Definition at line 668 of file MRBF.cpp.

◆ computeEffectiveSupportRadiusList()

void mimmo::MRBF::computeEffectiveSupportRadiusList ( )
protected

Compute the support radius according on what preferences are collected by class interface methods. The m_effectiveSR vector will be filled (structure used by evalRBF method).

Definition at line 1146 of file MRBF.cpp.

◆ evalRBF()

std::vector< double > mimmo::MRBF::evalRBF ( const std::array< double, 3 > &  point)
protected

Evaluates the displacements value with RBF . Supported in all modes. Use weights, RBF node positions and m_effectiveSR (support radius structure) of each RBF node to retrive the deformation field.

Parameters
[in]pointpoint where to evaluate the basis
Returns
array containing interpolated/parameterized values of displacements.

Definition at line 1209 of file MRBF.cpp.

◆ execute()

void mimmo::MRBF::execute ( )
virtual

Execution of RBF object. It evaluates the displacements (values) over the point of the linked geometry, given as result of RBF technique implemented in bitpit::RBF base class. The result is stored in the m_displ member.

Implements mimmo::BaseManipulation.

Definition at line 681 of file MRBF.cpp.

◆ flushSectionXML()

void mimmo::MRBF::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::BaseManipulation.

Definition at line 970 of file MRBF.cpp.

◆ getDiagonalFactor()

double mimmo::MRBF::getDiagonalFactor ( )

Return the factor, applied to the diagonal length of the bounding box of the geometry, used to define the threshold, compared to the support radii, to impose the kdtree filtering.

Returns
diagonal factor

Definition at line 236 of file MRBF.cpp.

◆ getDisplacements()

dmpvecarr3E * mimmo::MRBF::getDisplacements ( )

Return actual computed vector displacements field (if any) for the geometry linked. BEWARE if class is working with scalar DOFs a scalar displacement field is expected. For vector DOFs a vector field is expected. If the class is in "scalar mode" (areResultsInScalarMode() is true) this method will return nullptr.Use getScalarDisplacements instead.

Returns
The computed deformation field on the vertices of the linked geometry

Definition at line 262 of file MRBF.cpp.

◆ getEffectivelyUsedSupportRadii()

dvector1D & mimmo::MRBF::getEffectivelyUsedSupportRadii ( )

Return the list of support radii effectively used for the current RBF set (one for each RBF node) BEWARE : returned results are meaningful only after class execution.

Returns
list of effective support radii used

Definition at line 226 of file MRBF.cpp.

◆ getFilter()

dmpvector1D * mimmo::MRBF::getFilter ( )

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

Returns
filter field.

Definition at line 195 of file MRBF.cpp.

◆ getFunctionType()

int mimmo::MRBF::getFunctionType ( )
Returns
the type of shape function hold by the class.

Definition at line 244 of file MRBF.cpp.

◆ getMode()

MRBFSol mimmo::MRBF::getMode ( )

Return actual solver set for RBF data fields interpolation in MRBF::execute Reimplemented from RBF::getMode() of bitpit;

Returns
solver mode

Definition at line 187 of file MRBF.cpp.

◆ getNodes()

dvecarr3E * mimmo::MRBF::getNodes ( )

It returns a pointer to the RBF node stored in the object.

Returns
pointer to nodes list

Definition at line 177 of file MRBF.cpp.

◆ getScalarDisplacements()

dmpvector1D * mimmo::MRBF::getScalarDisplacements ( )

Return actual computed scalar displacements field (if any) for the geometry linked. BEWARE if class is working with scalar DOFs a scalar displacement field is expected. For vector DOFs a vector field is expected. If the class is NOT in "scalar mode" (areResultsInScalarMode() is false) this method will return nullptr. Use getDisplacements instead.

Returns
The computed deformation field on the vertices of the linked geometry

Definition at line 276 of file MRBF.cpp.

◆ initRBFwGeometry()

bool mimmo::MRBF::initRBFwGeometry ( )
protected

Initialize RBF nodes and displacements with the related MimmoObject geometry.

Returns
Valid intialization flag; false if displacements fields and geometry are not coherent

Definition at line 1248 of file MRBF.cpp.

◆ isCompact()

bool mimmo::MRBF::isCompact ( )

Return true if the rbf has to be evaluated on a compact support defined by the support radius.

Returns
boolean true/false

Definition at line 301 of file MRBF.cpp.

◆ isSupportRadiusReal()

bool mimmo::MRBF::isSupportRadiusReal ( )

Return true if support radius is set using setSupportRadiusReal method. Return false if support radius is set with setSupportRadiusLocal method, or provided as variable with setVariableSupportRadii method.

Returns
boolean true/false

Definition at line 206 of file MRBF.cpp.

◆ isVariableSupportRadiusSet()

bool mimmo::MRBF::isVariableSupportRadiusSet ( )

Return true if support radius is provided as variable with setVariableSupportRadii method. Return false if support radius is set homogeneous with setSupportRadiusLocal/Real method.

Returns
boolean true/false

Definition at line 216 of file MRBF.cpp.

◆ operator=()

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

Assignment operator. Result geometry displacement are not copied.

Parameters
[in]otherMRBF where copy from

Definition at line 116 of file MRBF.cpp.

◆ plotCloud()

void mimmo::MRBF::plotCloud ( std::string  directory,
std::string  filename,
int  counterFile,
bool  binary,
bool  deformed 
)
protected

Plot your current rbf nodes as a point cloud to *vtu file.

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

Definition at line 1069 of file MRBF.cpp.

◆ plotOptionalResults()

void mimmo::MRBF::plotOptionalResults ( )
protectedvirtual

Plot Optional results of the class. It plots the RBF control nodes as a point cloud in *.vtu format, for both original/moved control nodes.

Reimplemented from mimmo::BaseManipulation.

Definition at line 1131 of file MRBF.cpp.

◆ removeDuplicatedNodes()

bool mimmo::MRBF::removeDuplicatedNodes ( ivector1D list = nullptr)

Erase all nodes passed by their RBF id list. If no list is provided, the method find all possible duplicated nodes within a default tolerance of 1.0E-12 and erase them, if any.

Parameters
[in]listpointer to a list of id's of RBF candidate nodes
Returns
boolean, true if all duplicated nodes are erased, false if one or more of them are not.

Definition at line 398 of file MRBF.cpp.

◆ setCompactSupport()

void mimmo::MRBF::setCompactSupport ( bool  isCompact = true)

Sets if the rbf function has to be used on a compact support.

Parameters
[in]isCompactis the basis function to be used on a compact support? (default = true)

Definition at line 650 of file MRBF.cpp.

◆ setDiagonalFactor()

void mimmo::MRBF::setDiagonalFactor ( double  diagonalFactor)

Set the factor, applied to the diagonal length of the bounding box of the geometry, used to define the threshold, compared to the support radii, to impose the kdtree filtering.

Parameters
[in]diagonalFactordiagonal factor (value in [0.,1.])

Definition at line 489 of file MRBF.cpp.

◆ setDisplacements() [1/2]

void mimmo::MRBF::setDisplacements ( dmpvecarr3E displ)

Set a field of 3D displacements on your RBF Nodes. According to MRBFSol mode active in the class set: displacements as direct RBF weights coefficients in MRBFSol::NONE mode, or interpolate displacements to get the best fit weights in other modes MRBFSol::GREEDY/WHOLE Displacements size may not match the actual number of RBF nodes stored in the class. To ensure consistency call fitDataToNodes() method inherited from RBF class. BEWARE: calling this method implicitly set the class to work with 3Comp vector DOFs and to retrieve a 3 comp vector geometry displacement field.(Scalar mode off).

Parameters
[in]displpointer to mimmo pierced vector of nodal displacements

Definition at line 543 of file MRBF.cpp.

◆ setDisplacements() [2/2]

void mimmo::MRBF::setDisplacements ( dvecarr3E  displ)

Set a field of 3D displacements on your RBF Nodes. According to MRBFSol mode active in the class set: displacements as direct RBF weights coefficients in MRBFSol::NONE mode, or interpolate displacements to get the best fit weights in other modes MRBFSol::GREEDY/WHOLE Displacements size may not match the actual number of RBF nodes stored in the class. To ensure consistency call fitDataToNodes() method inherited from RBF class. BEWARE: calling this method implicitly set the class to work with 3Comp vector DOFs and to retrieve a 3 comp vector geometry displacement field.(Scalar mode off).

Parameters
[in]displlist of nodal displacements
Examples
genericinput_example_00005.cpp, and geohandlers_example_00003.cpp.

Definition at line 514 of file MRBF.cpp.

◆ setFilter()

void mimmo::MRBF::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 360 of file MRBF.cpp.

◆ setFunction() [1/2]

void mimmo::MRBF::setFunction ( const bitpit::RBFBasisFunction &  bfunc,
bool  isCompact = false 
)

Sets the rbf function to be used. Supported in both modes. (Base method)

Parameters
[in]bfuncbasis function to be used
[in]isCompactis the basis function to be used on a compact support? (default = false)

Definition at line 638 of file MRBF.cpp.

◆ setFunction() [2/2]

void mimmo::MRBF::setFunction ( const MRBFBasisFunction bfunc,
bool  isCompact = false 
)

Sets the rbf function to be used. Supported in both modes. (Overloading for mimmo rbf functions)

Parameters
[in]bfuncbasis function to be used
[in]isCompactis the basis function to be used on a compact support? (default = false)
Examples
genericinput_example_00004.cpp, genericinput_example_00005.cpp, manipulators_example_00006.cpp, manipulators_example_00007.cpp, and manipulators_example_00008.cpp.

Definition at line 594 of file MRBF.cpp.

◆ setMode()

void mimmo::MRBF::setMode ( MRBFSol  solver)
protected

Set type of solver set for RBF data fields interpolation/parameterization in MRBF::execute. Reimplemented from RBF::setMode() of bitpit;

Parameters
[in]solvertype of MRBFSol enum;

Definition at line 1237 of file MRBF.cpp.

◆ setNode() [1/3]

void mimmo::MRBF::setNode ( darray3E  node)

Set a RBF point as unique control node and activate it.

Parameters
[in]nodecoordinates of control point.
Examples
geohandlers_example_00003.cpp.

Definition at line 329 of file MRBF.cpp.

◆ setNode() [2/3]

void mimmo::MRBF::setNode ( dvecarr3E  nodes)

Set a list of RBF points as control nodes and activate it.

Parameters
[in]nodescoordinates of control points.

Definition at line 339 of file MRBF.cpp.

◆ setNode() [3/3]

void mimmo::MRBF::setNode ( MimmoSharedPointer< MimmoObject geometry)

Set the RBF points as control nodes extracting the vertices stored in a MimmoObject container.

Parameters
[in]geometryPointer to MimmoObject that contains the geometry.

Definition at line 350 of file MRBF.cpp.

◆ setScalarDisplacements() [1/2]

void mimmo::MRBF::setScalarDisplacements ( dmpvector1D displ)

Set a field of "Scalar" displacements on your RBF Nodes. According to MRBFSol mode active in the class set: displacements as direct RBF weights coefficients in MRBFSol::NONE mode, or interpolate displacements to get the best fit weights in other modes MRBFSol::GREEDY/WHOLE Displacements size may not match the actual number of RBF nodes stored in the class. To ensure consistency call fitDataToNodes() method inherited from RBF class. BEWARE: calling this method implicitly set the class to work with scalar DOFs and to retrieve a scalar geometry displacement field.(Scalar mode on).

Parameters
[in]displpointer to mimmo pierced vector of nodal displacements

Definition at line 583 of file MRBF.cpp.

◆ setScalarDisplacements() [2/2]

void mimmo::MRBF::setScalarDisplacements ( dvector1D  displ)

Set a field of "Scalar" displacements (1 component) on your RBF Nodes. According to MRBFSol mode active in the class set: displacements as direct RBF weights coefficients in MRBFSol::NONE mode, or interpolate displacements to get the best fit weights in other modes MRBFSol::GREEDY/WHOLE Displacements size may not match the actual number of RBF nodes stored in the class. To ensure consistency call fitDataToNodes() method inherited from RBF class. BEWARE: calling this method implicitly set the class to work with scalar DOFs and to retrieve a scalar geometry displacement field.(Scalar mode on).

Parameters
[in]displlist of nodal displacements

Definition at line 562 of file MRBF.cpp.

◆ setSupportRadiusLocal()

void mimmo::MRBF::setSupportRadiusLocal ( double  suppR_)

Set ratio a of support radius R of RBF kernel functions (HOMOGENEOUS FOR ALL OF THEM), according to the formula R = a*D, where D is the diagonal of the Axis Aligned Bounding Box referred to the targetgeometry. During the execution the correct value of R is applied. The ratio a can have value between ]0,+inf), which corresponding to minimum locally narrowed function, and almost flat functions (as sphere of infinite radius), respectively. Negative or zero values, bind the evaluation of R to the maximum displacement applied to RBF node, that is R is set proportional to the maximum displacement value.

Parameters
[in]suppR_new value of suppR
Examples
geohandlers_example_00003.cpp.

Definition at line 419 of file MRBF.cpp.

◆ setSupportRadiusReal()

void mimmo::MRBF::setSupportRadiusReal ( double  suppR_)

Set the real physical value of the support radius R of RBF kernel functions (HOMOGENEOUS FOR ALL OF THEM). During the execution the correct value of R is applied. The support radius a can have value between ]0,+inf), which corresponds to minimum locally narrowed function and almost flat functions (as sphere of infinite radius), respectively. Negative or zero values, bind the evaluation of R to the maximum displacement applied to RBF node, that is R is set proportional to the maximum displacement value.

Parameters
[in]suppR_new value of support radius.
Examples
genericinput_example_00004.cpp, genericinput_example_00005.cpp, manipulators_example_00006.cpp, manipulators_example_00008.cpp, and utils_example_00003.cpp.

Definition at line 436 of file MRBF.cpp.

◆ setSupportRadiusValue()

void mimmo::MRBF::setSupportRadiusValue ( double  suppR_)

Legacy method, it does exactly as setSupportRadiusReal method.

Parameters
[in]suppR_new value of support radius.

Definition at line 447 of file MRBF.cpp.

◆ setTol()

void mimmo::MRBF::setTol ( double  tol)

It sets the tolerance for GREEDY mode - interpolation algorithm. Tolerance infos are not used in MRBFSol::NONE/WHOLE mode.

Parameters
[in]tolTarget tolerance.

Definition at line 498 of file MRBF.cpp.

◆ setVariableSupportRadii() [1/2]

void mimmo::MRBF::setVariableSupportRadii ( dmpvector1D sradii)

Set a list of real physical values of the support radius R, one for each RBF kernel functions. See MRBF::setVariableSupportRadii(dvector1D sradii) for details. This method is an overload with a different input container.

Parameters
[in]sradiipointer to a MimmoPiercedVector with variable support radii Note. The MRBFSol::NONE method has to be set before to call this method.

Definition at line 476 of file MRBF.cpp.

◆ setVariableSupportRadii() [2/2]

void mimmo::MRBF::setVariableSupportRadii ( dvector1D  sradii)

Set a list of real physical values of the support radius R, one for each RBF kernel functions. Method is available only in MRBFSol::NONE mode of the class. Support radii a can have value between ]0,+inf), which corresponds to minimum locally narrowed function and almost flat functions (as sphere of infinite radius), respectively. Negative values are set to minimum allowed support radius value. List size may not fit the number of RBF nodes: in that case automatic resize will be performed during execution.

Parameters
[in]sradiinon empty list of variable support radii (otherwise method does nothing) Note. The MRBFSol::NONE method has to be set before to call this method.

Definition at line 462 of file MRBF.cpp.

◆ setWeight()

void mimmo::MRBF::setWeight ( dvector2D  value)
protected

Set a field of n-Dim weights on your RBF Nodes. Supported only in MRBFSol::NONE mode. Weights total number may not match the actual number of RBF nodes stored in the class. To ensure consistency call fitDataToNodes() method inherited from RBF class.

Parameters
[in]valuelist of nodal weights

Definition at line 1043 of file MRBF.cpp.

◆ swap()

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

Swap function.

Parameters
[in]xobject to be swapped

Definition at line 125 of file MRBF.cpp.

Member Data Documentation

◆ m_areScalarResults

bool mimmo::MRBF::m_areScalarResults
protected

true the class working with scalar "displacements", otherwise is working with 3comp vector fields.

Definition at line 170 of file MRBF.hpp.

◆ m_bfilter

bool mimmo::MRBF::m_bfilter
protected

boolean to recognize if a filter field is applied

Definition at line 152 of file MRBF.hpp.

◆ m_diagonalFactor

double mimmo::MRBF::m_diagonalFactor
protected

Factor used to define a threshold to filter geometry vertices to be deformed or not. The condition to use the whole geometry instead of filtering by a kdtree binary search is : maximum value of -support radii values- GREATER THAN m_diagonalFactor times diagonal of geometry AABB

Definition at line 156 of file MRBF.hpp.

◆ m_displ

dmpvecarr3E mimmo::MRBF::m_displ
protected

Resulting vector displacements of geometry vertex.

Definition at line 160 of file MRBF.hpp.

◆ m_effectiveSR

dvector1D mimmo::MRBF::m_effectiveSR
protected

INTERNAL USE list of support radii effectively used for each RBF

Definition at line 163 of file MRBF.hpp.

◆ m_filter

dmpvector1D mimmo::MRBF::m_filter
protected

Filter field for displacements modulation

Definition at line 151 of file MRBF.hpp.

◆ m_functype

int mimmo::MRBF::m_functype
protected

Function type handler. If -1 refer to RBF getFunctionType method

Definition at line 159 of file MRBF.hpp.

◆ m_isCompact

bool mimmo::MRBF::m_isCompact
protected

If true the basis function is used with compact support, i.e. it is supposed different from 0 and evaluated only inside the support radius.

Definition at line 164 of file MRBF.hpp.

◆ m_rbfdispl

dmpvecarr3E* mimmo::MRBF::m_rbfdispl
protected

RBF nodes displacements as vectors, when a RBF point cloud MimmoObject is linked.

Definition at line 167 of file MRBF.hpp.

◆ m_rbfgeometry

MimmoSharedPointer<MimmoObject> mimmo::MRBF::m_rbfgeometry
protected

RBF geometry. The vertices of this object are used as RBF nodes.

Definition at line 166 of file MRBF.hpp.

◆ m_rbfScalarDispl

dmpvector1D* mimmo::MRBF::m_rbfScalarDispl
protected

RBF nodes displacements as scalars, when a RBF point cloud MimmoObject is linked.

Definition at line 168 of file MRBF.hpp.

◆ m_rbfSupportRadii

dmpvector1D* mimmo::MRBF::m_rbfSupportRadii
protected

list of variable supportRadii for each RBF node as pointer to MImmoPiercedVector.

Definition at line 169 of file MRBF.hpp.

◆ m_scalarDispl

dmpvector1D mimmo::MRBF::m_scalarDispl
protected

Resulting "scalar" displacements of geometry vertex.

Definition at line 161 of file MRBF.hpp.

◆ m_solver

MRBFSol mimmo::MRBF::m_solver
protected

Type of solver specified for the class as default in execution

Definition at line 150 of file MRBF.hpp.

◆ m_srIsReal

bool mimmo::MRBF::m_srIsReal
protected

True if homogeneous support radius is defined as absolute value, false if is ratio of bounding box diagonal.

Definition at line 154 of file MRBF.hpp.

◆ m_supportRadii

dvector1D mimmo::MRBF::m_supportRadii
protected

list of variable supportRadii for each RBF node.

Definition at line 155 of file MRBF.hpp.

◆ m_supportRadiusValue

double mimmo::MRBF::m_supportRadiusValue
protected

local bounding box binded homogeneous support radius

Definition at line 153 of file MRBF.hpp.

◆ m_tol

double mimmo::MRBF::m_tol
protected

Tolerance for greedy algorithm.

Definition at line 149 of file MRBF.hpp.


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