ControlDeformMaxDistance is a class that check a deformation field associated to a MimmoObject surface geometry,once a maximum limit distance of deformation is fixed, w.r.t. the undeformed state. More...
#include <ControlDeformMaxDistance.hpp>
Protected Member Functions | |
void | plotOptionalResults () |
void | swap (ControlDeformMaxDistance &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) |
virtual void | apply () |
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) |
Additional Inherited Members | |
Public Types inherited from mimmo::BaseManipulation | |
typedef std::unordered_map< BaseManipulation *, int > | bmumap |
typedef pin::ConnectionType | ConnectionType |
typedef std::string | PortID |
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< MimmoObject > | m_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 |
Static Protected Attributes inherited from mimmo::BaseManipulation | |
static int | sm_baseManipulationCounter |
Detailed Description
ControlDeformMaxDistance is a class that check a deformation field associated to a MimmoObject surface geometry,once a maximum limit distance of deformation is fixed, w.r.t. the undeformed state.
ControlDeformMaxDistance is derived from BaseManipulation class. It needs a maximum, isotropic limit distance d w.r.t. the undeformed state of the target geometry (isolevel at distance d). It returns a double value V, namely the maximum signed distance from the constraint iso-level amongst all field points, reporting how much the current deformation field violates the constraint itself. if V>0 a violation occurs. if V=0, a contact occurs, otherwise if V<0 no violation occurs. Deformation field must be linked to target geometry and defined on points/nodes. Class absorbs/flushes its parameters from/to xml dictionaries
Ports available in ControlDeformMaxDistance Class :
Port Input | ||
---|---|---|
PortType | variable/function | DataType |
M_GDISPLS | setDefField | (MC_SCALAR, MD_MPVECARR3FLOAT_) |
M_VALUED | setLimitDistance | (MC_SCALAR, MD_FLOAT) |
M_GEOM | setGeometry | (MC_SCALAR, MD_MIMMO_) |
Port Output | ||
---|---|---|
PortType | variable/function | DataType |
M_SCALARFIELD | getViolationField | (MC_SCALAR, MD_MPVECFLOAT_) |
M_VALUED | getViolation | (MC_SCALAR, MD_FLOAT) |
The xml available parameters, sections and subsections are the following :
Inherited from BaseManipulation:
- ClassName: name of the class as
mimmo.ControlDeformMaxDistance
; - Priority: uint marking priority in multi-chain execution;
- PlotInExecution: boolean 0/1 print optional results of the class;
- OutputPlot: target directory for optional results writing.
Proper of the class:
- LimitDistance: constraint surface distance from target geometry;
Geometry and deformation field have to be mandatorily passed through port.
- Examples
- utils_example_00003.cpp.
Definition at line 84 of file ControlDeformMaxDistance.hpp.
Constructor & Destructor Documentation
◆ ControlDeformMaxDistance() [1/3]
mimmo::ControlDeformMaxDistance::ControlDeformMaxDistance | ( | ) |
Default constructor of ControlDeformMaxDistance
Definition at line 32 of file ControlDeformMaxDistance.cpp.
◆ ControlDeformMaxDistance() [2/3]
mimmo::ControlDeformMaxDistance::ControlDeformMaxDistance | ( | const bitpit::Config::Section & | rootXML | ) |
Custom constructor reading xml data
- Parameters
-
[in] rootXML reference to your xml tree section
Definition at line 42 of file ControlDeformMaxDistance.cpp.
◆ ~ControlDeformMaxDistance()
mimmo::ControlDeformMaxDistance::~ControlDeformMaxDistance | ( | ) |
Default destructor of ControlDeformMaxDistance
Definition at line 59 of file ControlDeformMaxDistance.cpp.
◆ ControlDeformMaxDistance() [3/3]
mimmo::ControlDeformMaxDistance::ControlDeformMaxDistance | ( | const ControlDeformMaxDistance & | other | ) |
Copy constructor of ControlDeformMaxDistance.Deformation field referred to geometry and result violation field are not copied.
Definition at line 64 of file ControlDeformMaxDistance.cpp.
Member Function Documentation
◆ absorbSectionXML()
|
virtual |
It sets infos reading from a XML bitpit::Config::section.
- Parameters
-
[in] slotXML bitpit::Config::Section of XML file [in] name name associated to the slot
Reimplemented from mimmo::BaseManipulation.
Definition at line 260 of file ControlDeformMaxDistance.cpp.
◆ buildPorts()
|
virtual |
It builds the input/output ports of the object
Implements mimmo::BaseManipulation.
Definition at line 92 of file ControlDeformMaxDistance.cpp.
◆ execute()
|
virtual |
Execution command. Calculate violation value and store it in the class member m_violation
Implements mimmo::BaseManipulation.
Definition at line 176 of file ControlDeformMaxDistance.cpp.
◆ flushSectionXML()
|
virtual |
It sets infos from class members in a XML bitpit::Config::section.
- Parameters
-
[in] slotXML bitpit::Config::Section of XML file [in] name name associated to the slot
Reimplemented from mimmo::BaseManipulation.
Definition at line 285 of file ControlDeformMaxDistance.cpp.
◆ getViolation()
double mimmo::ControlDeformMaxDistance::getViolation | ( | ) |
Return the value of violation of deformed geometry, after class execution. If value is positive or at least zero, constraint violation occurs, penetrating or touching at least in one point the constraint sourface. Otherwise, returning negative values means that no violation occurs delimited by the plane (where plane normal pointing), true the exact opposite.
- Returns
- violation value
Definition at line 112 of file ControlDeformMaxDistance.cpp.
◆ getViolationField()
dmpvector1D * mimmo::ControlDeformMaxDistance::getViolationField | ( | ) |
Return the violation distances of each point of deformed geometry, on the geometry itself. The info is available after class execution. If value is positive or at least zero, constraint violation occurs, penetrating or touching at least in one point the constraint sourface. Otherwise, returning negative values means that no violation occurs delimited by the plane (where plane normal pointing), true the exact opposite.
- Returns
- violation field values
Definition at line 133 of file ControlDeformMaxDistance.cpp.
◆ operator=()
ControlDeformMaxDistance & mimmo::ControlDeformMaxDistance::operator= | ( | ControlDeformMaxDistance | other | ) |
Assignment operator of ControlDeformMaxDistance. Deformation field referred to geometry and result violation field are not copied.
Definition at line 72 of file ControlDeformMaxDistance.cpp.
◆ plotOptionalResults()
|
protectedvirtual |
Plot optional results in execution, that is the violation distance field on current deformed geometry. Reimeplemented from BaseManipulation::plotOptionalResults;
Reimplemented from mimmo::BaseManipulation.
Definition at line 300 of file ControlDeformMaxDistance.cpp.
◆ setDefField()
void mimmo::ControlDeformMaxDistance::setDefField | ( | dmpvecarr3E * | field | ) |
Set the deformative field associated to each point of the target geometry. Field resize occurs in execution, if point dimension between field and geoemetry does not match.
- Parameters
-
[in] field of deformation
Definition at line 143 of file ControlDeformMaxDistance.cpp.
◆ setGeometry()
void mimmo::ControlDeformMaxDistance::setGeometry | ( | MimmoSharedPointer< MimmoObject > | geo | ) |
Set the link to MimmoObject target geometry. Geometry must be a 3D surface (MimmoObject of type 1). Reimplemented from BaseManipulation::setGeometry().
- Parameters
-
[in] geo pointer to target geometry
Definition at line 166 of file ControlDeformMaxDistance.cpp.
◆ setLimitDistance()
void mimmo::ControlDeformMaxDistance::setLimitDistance | ( | double | dist | ) |
Set limit distance d of the constraint surface. Must be a positive definite value (>= 0). Given a target geometry surface (open or closed), its constraint surface is intended as the iso-level surface where every points are at distance d from the target surface.
- Parameters
-
[in] dist limit distance value
- Examples
- utils_example_00003.cpp.
Definition at line 156 of file ControlDeformMaxDistance.cpp.
◆ swap()
|
protectednoexcept |
Swap Function.
- Parameters
-
[in] x object ot be swapped
Definition at line 81 of file ControlDeformMaxDistance.cpp.
The documentation for this class was generated from the following files:
- src/utils/ControlDeformMaxDistance.hpp
- src/utils/ControlDeformMaxDistance.cpp