mimmo::ControlDeformExtSurface Class Reference

ControlDeformExtSurface is a class that check a deformation field, associated to a MimmoObject geometry, for eventual collisions/penetrations w.r.t. one or more external constraint surface meshes. More...

#include <ControlDeformExtSurface.hpp>

Inheritance diagram for mimmo::ControlDeformExtSurface:
Collaboration diagram for mimmo::ControlDeformExtSurface:
typedef std::unordered_map< std::string, int > fileListWithType
 
 ControlDeformExtSurface ()
 
 ControlDeformExtSurface (const bitpit::Config::Section &rootXML)
 
virtual ~ControlDeformExtSurface ()
 
 ControlDeformExtSurface (const ControlDeformExtSurface &other)
 
ControlDeformExtSurfaceoperator= (ControlDeformExtSurface other)
 
void buildPorts ()
 
double getViolation ()
 
dmpvector1DgetViolationField ()
 
double getTolerance ()
 
const fileListWithTypegetConstraintFiles () const
 
void setDefField (dmpvecarr3E *field)
 
void setGeometry (MimmoSharedPointer< MimmoObject > target)
 
void setTolerance (double tol)
 
void addConstraint (MimmoSharedPointer< MimmoObject > constraint)
 
void setConstraintFiles (fileListWithType list)
 
void addConstraintFile (std::string file, int format)
 
void addConstraintFile (std::string file, FileType format)
 
void removeConstraintFile (std::string)
 
void removeConstraintFiles ()
 
void clear ()
 
void execute ()
 
virtual void absorbSectionXML (const bitpit::Config::Section &slotXML, std::string name="")
 
virtual void flushSectionXML (bitpit::Config::Section &slotXML, std::string name="")
 
void plotOptionalResults ()
 
void swap (ControlDeformExtSurface &x) noexcept
 

Additional Inherited Members

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

Detailed Description

ControlDeformExtSurface is a class that check a deformation field, associated to a MimmoObject geometry, for eventual collisions/penetrations w.r.t. one or more external constraint surface meshes.

ControlDeformExtSurface is derived from BaseManipulation class. It needs one or more external surface meshes, representing the constraint of your deformed object. External surfaces can be provided through ports or be read from filesystem directly, with the current block. First option is recommended, for MPI versions. It returns a double value V, namely the maximum signed distance from constraint surfaces amongst all deformed geometry nodes, reporting how much the current deformation violates the constraint itself. if V > 0 a violation occurs. If V=0, a contact occurs, otherwise if V<0 no violation occurs. Need to link the deformation field in exam, as MimmoPiercedVector referred to target geometry and defined to POINT as location. Class absorbs/flushes its parameters from/to xml dictionaries


Ports available in ControlDeformExtSurface Class :


Port Input
PortType variable/function DataType
M_GDISPLS setDefField (MC_SCALAR, MD_MPVECARR3FLOAT_)
M_GEOM setGeometry (MC_SCALAR, MD_MIMMO_)
M_GEOM2 addConstraint (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.ControlDeformExtSurface;
  • 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:

  • Files: external constraint surfaces list provided from file instead of ports:

    <Files>
       <file0>
          <fullpath> full path to file </fullpath>
          <tag> tag extension of your file (see MimmoGeometry general doxy) </tag>
       </file0>
       <file1>
          <fullpath> full path to file </fullpath>
          <tag> tag extension of your file (see MimmoGeometry general doxy) </tag>
       </file1>
       ...
       ...
    </Files>


    • Tolerance: double(>0 or <0) proximity tolerance from external constraint surfaces. It defines an offset threshold from constraint surfaces. A violation is detected if a deformed point of the target surface exceeds this threshold, no matter if the target has already collided the constraint or not. This parameter allow to control when the violation occurs, since the distance calculation is sometimes prone to approximations.

Geometry and deformation field have to be mandatorily passed through port.

Examples
utils_example_00002.cpp.

Definition at line 105 of file ControlDeformExtSurface.hpp.


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