Selection through list of cells/vertices of the target mesh. More...

#include <MeshSelection.hpp>

Inheritance diagram for mimmo::SelectionByElementList:
Collaboration diagram for mimmo::SelectionByElementList:

Public Member Functions

 SelectionByElementList ()
 
 SelectionByElementList (const bitpit::Config::Section &rootXML)
 
virtual ~SelectionByElementList ()
 
virtual void absorbSectionXML (const bitpit::Config::Section &slotXML, std::string name="")
 
void addAnnotatedCellList (MimmoPiercedVector< long > *celldata)
 
void addAnnotatedVertexList (MimmoPiercedVector< long > *vertexdata)
 
void addRawCellList (std::vector< long > celldata)
 
void addRawVertexList (std::vector< long > vertexdata)
 
void buildPorts ()
 
void clear ()
 
virtual void flushSectionXML (bitpit::Config::Section &slotXML, std::string name="")
 
- Public Member Functions inherited from mimmo::GenericSelection
 GenericSelection ()
 
 GenericSelection (const GenericSelection &other)
 
virtual ~GenericSelection ()
 
livector1D constrainedBoundary ()
 
void execute ()
 
mimmo::MimmoSharedPointer< MimmoObjectgetPatch ()
 
const mimmo::MimmoSharedPointer< MimmoObjectgetPatch () const
 
bool isDual ()
 
GenericSelectionoperator= (const GenericSelection &other)
 
virtual void plotOptionalResults ()
 
void setDual (bool flag=false)
 
virtual void setGeometry (mimmo::MimmoSharedPointer< MimmoObject >)
 
SelectionType whichMethod ()
 
- 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

livector1D extractSelection ()
 
void swap (SelectionByElementList &) noexcept
 
- Protected Member Functions inherited from mimmo::GenericSelection
void swap (GenericSelection &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)
 

Protected Attributes

std::vector< MimmoPiercedVector< long > * > m_annotatedcells
 
std::vector< MimmoPiercedVector< long > * > m_annotatedvertices
 
std::vector< std::vector< long > > m_rawcells
 
std::vector< std::vector< long > > m_rawvertices
 
- Protected Attributes inherited from mimmo::GenericSelection
bool m_dual
 
mimmo::MimmoSharedPointer< MimmoObjectm_subpatch
 
int m_topo
 
SelectionType m_type
 
- 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

Selection through list of cells/vertices of the target mesh.

Select a subpart of the original mesh providing a list of:

  • mesh cell ids
  • mesh vertex ids (in that case all cells described by those vertices will be extracted)

    Ports available in SelectionByElementList Class :


Port Input
PortType variable/function DataType
M_LONGFIELD addAnnotatedVertexList (MC_SCALAR, MD_MPVECLONG_)
M_LONGFIELD2 addAnnotatedCellList (MC_SCALAR, MD_MPVECLONG_)
M_VECTORLI2 addRawVertexList (MC_VECTOR, MD_LONG)
M_VECTORLI3 addRawCellList (MC_VECTOR, MD_LONG)
Port Output
PortType variable/function DataType

Inherited from GenericSelection

Port Input
PortType variable/function DataType
M_VALUEB setDual (MC_SCALAR, MD_BOOL)
M_GEOM setGeometry (MC_SCALAR, MD_MIMMO_)
Port Output
PortType variable/function DataType
M_VECTORLI constrainedBoundary (MC_VECTOR, MD_LONG)
M_GEOM getPatch (MC_SCALAR, MD_MIMMO_)

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

Inherited from BaseManipulation:

  • ClassName: name of the class as mimmo.SelectionByBox;
  • 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:

  • Dual: boolean to get straight what given by selection method or its exact dual;

Geometry has to be mandatorily passed through port.

Definition at line 769 of file MeshSelection.hpp.

Constructor & Destructor Documentation

◆ SelectionByElementList() [1/2]

mimmo::SelectionByElementList::SelectionByElementList ( )

Basic Constructor

Definition at line 32 of file SelectionByElementList.cpp.

◆ SelectionByElementList() [2/2]

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

Custom constructor reading xml data

Parameters
[in]rootXMLreference to your xml tree section

Definition at line 40 of file SelectionByElementList.cpp.

◆ ~SelectionByElementList()

mimmo::SelectionByElementList::~SelectionByElementList ( )
virtual

Destructor

Definition at line 57 of file SelectionByElementList.cpp.

Member Function Documentation

◆ absorbSectionXML()

void mimmo::SelectionByElementList::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 229 of file SelectionByElementList.cpp.

◆ addAnnotatedCellList()

void mimmo::SelectionByElementList::addAnnotatedCellList ( MimmoPiercedVector< long > *  celldata)

Add a list of mesh cells as candidates for selection. Multiple list can be added.

Parameters
[in]celldatalist of mesh cell ids.

Definition at line 97 of file SelectionByElementList.cpp.

◆ addAnnotatedVertexList()

void mimmo::SelectionByElementList::addAnnotatedVertexList ( MimmoPiercedVector< long > *  vertexdata)

Add a list of mesh vertices. Mesh cells strictly sharing those vertices will be marked as candidates for selection. Multiple list can be added.

Parameters
[in]vertexdatalist of mesh vertex ids.

Definition at line 110 of file SelectionByElementList.cpp.

◆ addRawCellList()

void mimmo::SelectionByElementList::addRawCellList ( std::vector< long >  celldata)

Add a list of mesh cells as candidates for selection. Multiple list can be added.

Parameters
[in]celldatalist of mesh cell ids.

Definition at line 122 of file SelectionByElementList.cpp.

◆ addRawVertexList()

void mimmo::SelectionByElementList::addRawVertexList ( std::vector< long >  vertexdata)

Add a list of mesh vertices. Mesh cells strictly sharing those vertices will be marked as candidates for selection. Multiple list can be added.

Parameters
[in]vertexdatalist of mesh vertex ids.

Definition at line 134 of file SelectionByElementList.cpp.

◆ buildPorts()

void mimmo::SelectionByElementList::buildPorts ( )
virtual

It builds the input/output ports of the object.

Reimplemented from mimmo::GenericSelection.

Definition at line 78 of file SelectionByElementList.cpp.

◆ clear()

void mimmo::SelectionByElementList::clear ( )

Clear content of the class

Definition at line 144 of file SelectionByElementList.cpp.

◆ extractSelection()

livector1D mimmo::SelectionByElementList::extractSelection ( )
protectedvirtual

Extract portion of target geometry which are enough near to the external geometry provided

Returns
ids of cell of target tessellation extracted

Implements mimmo::GenericSelection.

Definition at line 161 of file SelectionByElementList.cpp.

◆ flushSectionXML()

void mimmo::SelectionByElementList::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 253 of file SelectionByElementList.cpp.

◆ swap()

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

Swap function. Assign data of this class to another of the same type and vice-versa. Resulting patch of selection is not swapped, ever.

Parameters
[in]xSelectionByElementList object

Definition at line 65 of file SelectionByElementList.cpp.

Member Data Documentation

◆ m_annotatedcells

std::vector<MimmoPiercedVector<long> *> mimmo::SelectionByElementList::m_annotatedcells
protected

vector of cell-ids lists through MimmoPiercedVector container pointers

Definition at line 789 of file MeshSelection.hpp.

◆ m_annotatedvertices

std::vector<MimmoPiercedVector<long> *> mimmo::SelectionByElementList::m_annotatedvertices
protected

vector of vertex-ids lists through MimmoPiercedVector container pointers

Definition at line 790 of file MeshSelection.hpp.

◆ m_rawcells

std::vector<std::vector<long> > mimmo::SelectionByElementList::m_rawcells
protected

vector of cell-ids lists through simple vectors

Definition at line 791 of file MeshSelection.hpp.

◆ m_rawvertices

std::vector<std::vector<long> > mimmo::SelectionByElementList::m_rawvertices
protected

vector of vertex-ids lists through simple vectors

Definition at line 792 of file MeshSelection.hpp.


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