StitchGeometry is an executable block class capable of stitch multiple MimmoObject geometries of the same topology. More...

#include <StitchGeometry.hpp>

Inheritance diagram for mimmo::StitchGeometry:
Collaboration diagram for mimmo::StitchGeometry:

Public Member Functions

 StitchGeometry (const bitpit::Config::Section &rootXML)
 
 StitchGeometry (const StitchGeometry &other)
 
 StitchGeometry (int topo)
 
virtual ~StitchGeometry ()
 
virtual void absorbSectionXML (const bitpit::Config::Section &slotXML, std::string name="")
 
void addGeometry (mimmo::MimmoSharedPointer< MimmoObject > geo)
 
void buildPorts ()
 
void clear ()
 
void execute ()
 
virtual void flushSectionXML (bitpit::Config::Section &slotXML, std::string name="")
 
void forceRePID (bool flag)
 
mimmo::MimmoSharedPointer< MimmoObjectgetGeometry ()
 
int getTopology ()
 
bool isEmpty ()
 
StitchGeometryoperator= (StitchGeometry other)
 
void plotOptionalResults ()
 
- 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 swap (StitchGeometry &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< 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

StitchGeometry is an executable block class capable of stitch multiple MimmoObject geometries of the same topology.

StitchGeometry is the object to append two or multiple MimmoObject of the same topology in a unique MimmoObject container.

Ports available in StitchGeometry Class :


Port Input
PortType variable/function DataType
M_GEOM addGeometry (MC_SCALAR, MD_MIMMO_)
Port Output
PortType variable/function DataType
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.StitchGeometry
  • 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:

  • Topology: info on admissible topology format 1-surface, 2-volume, 3-pointcloud, 4-3DCurve
  • RePID : 0-false 1-true force repidding of stitched parts. Default is 0.

Geometries have to be mandatorily passed through port.

Examples
geohandlers_example_00002.cpp.

Definition at line 72 of file StitchGeometry.hpp.

Constructor & Destructor Documentation

◆ StitchGeometry() [1/3]

mimmo::StitchGeometry::StitchGeometry ( int  topo)

Default constructor of StitchGeometry. Format admissible are linked to your choice of topology. See MimmoObject documentation. In case of unsuitable topology, default format(3D-surface) is forced

Parameters
[in]topoTopology of your geometries (1-surface, 2-volume, 3-points cloud, 4-3DCurve)

Definition at line 35 of file StitchGeometry.cpp.

◆ StitchGeometry() [2/3]

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

Custom constructor reading xml data

Parameters
[in]rootXMLreference to your xml tree section

Definition at line 47 of file StitchGeometry.cpp.

◆ ~StitchGeometry()

mimmo::StitchGeometry::~StitchGeometry ( )
virtual

Default destructor of StitchGeometry.

Definition at line 73 of file StitchGeometry.cpp.

◆ StitchGeometry() [3/3]

mimmo::StitchGeometry::StitchGeometry ( const StitchGeometry other)

Copy constructor of StitchGeometry. Soft Copy of MimmoObject, division maps and resulting patch are not copied; Relaunch the execution to eventually restore it.

Definition at line 82 of file StitchGeometry.cpp.

Member Function Documentation

◆ absorbSectionXML()

void mimmo::StitchGeometry::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 316 of file StitchGeometry.cpp.

◆ addGeometry()

void mimmo::StitchGeometry::addGeometry ( mimmo::MimmoSharedPointer< MimmoObject geo)

Add an external geometry to be stitched.Topology of the geometry must be coeherent with topology of the class;

Parameters
[in]geoPointer to MimmoObject

Definition at line 150 of file StitchGeometry.cpp.

◆ buildPorts()

void mimmo::StitchGeometry::buildPorts ( )
virtual

Building ports of the class

Implements mimmo::BaseManipulation.

Definition at line 117 of file StitchGeometry.cpp.

◆ clear()

void mimmo::StitchGeometry::clear ( )

Clear all stuffs in your class

Definition at line 172 of file StitchGeometry.cpp.

◆ execute()

void mimmo::StitchGeometry::execute ( )
virtual

Execution command. It stitches together multiple geometries in the same object.

Implements mimmo::BaseManipulation.

Definition at line 192 of file StitchGeometry.cpp.

◆ flushSectionXML()

void mimmo::StitchGeometry::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 359 of file StitchGeometry.cpp.

◆ forceRePID()

void mimmo::StitchGeometry::forceRePID ( bool  flag)

Force automatic repidding of all the patch stitched. If a patch has pid already, they will be kept, with different pid number.

Definition at line 184 of file StitchGeometry.cpp.

◆ getGeometry()

mimmo::MimmoSharedPointer< MimmoObject > mimmo::StitchGeometry::getGeometry ( )

Get current stitched geometry pointer. Reimplementation of BaseManipulation::getGeometry,

Returns
Pointer to stitched geometry.

Definition at line 140 of file StitchGeometry.cpp.

◆ getTopology()

int mimmo::StitchGeometry::getTopology ( )

Return kind of topology supported by the object.

Returns
topology supported (1-surface, 2-volume, 3-points cloud)

Definition at line 131 of file StitchGeometry.cpp.

◆ isEmpty()

bool mimmo::StitchGeometry::isEmpty ( )

Check if stitched geometry is present or not.

Returns
true - no geometry present, false otherwise.

Definition at line 164 of file StitchGeometry.cpp.

◆ operator=()

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

Assignement operator of StitchGeometry. Soft copy of MimmoObject

Definition at line 93 of file StitchGeometry.cpp.

◆ plotOptionalResults()

void mimmo::StitchGeometry::plotOptionalResults ( )
virtual

Plot stitched geometry in *.vtu file as optional result;

Reimplemented from mimmo::BaseManipulation.

Definition at line 373 of file StitchGeometry.cpp.

◆ swap()

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

Swap function of StitchGeometry. Division Maps and results are not swapped, ever.

Parameters
[in]xobject to be swapped.

Definition at line 103 of file StitchGeometry.cpp.


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