Reconstruct a scalar field from daughter meshes to mother mesh. More...

#include <ReconstructFields.hpp>

Inheritance diagram for mimmo::ReconstructScalar:
Collaboration diagram for mimmo::ReconstructScalar:

Public Member Functions

 ReconstructScalar (const bitpit::Config::Section &rootXML)
 
 ReconstructScalar (const ReconstructScalar &other)
 
 ReconstructScalar (MPVLocation loc=MPVLocation::POINT)
 
virtual ~ReconstructScalar ()
 
virtual void absorbSectionXML (const bitpit::Config::Section &slotXML, std::string name="")
 
void addData (dmpvector1D *)
 
void buildPorts ()
 
void clear ()
 
void execute ()
 
virtual void flushSectionXML (bitpit::Config::Section &slotXML, std::string name="")
 
int getNData ()
 
int getOverlapCriterium ()
 
OverlapMethod getOverlapCriteriumENUM ()
 
dmpvector1DgetResultField ()
 
std::vector< dmpvector1D * > getResultFields ()
 
void plotData ()
 
void plotSubData (int i)
 
void removeAllData ()
 
void removeData (mimmo::MimmoSharedPointer< MimmoObject >)
 
void setOverlapCriterium (int)
 
void setOverlapCriteriumENUM (OverlapMethod)
 
- 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

virtual void plotOptionalResults ()
 
void swap (ReconstructScalar &) 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

Reconstruct a scalar field from daughter meshes to mother mesh.

Class/BaseManipulation Object reconstructing a scalar field on a mimmo::MimmoObject mesh, from several scalar fields defined on sub-patches of the target mesh, where for sub-patches is meant portion of target mesh, preserving their vertex/cell-ids, as in the case of mimmo::Selection Blocks. Field values can be defined on nodes or cells. No interfaces are supported up to now. Reconstructed field on the whole geometry is provided as result as well as the reconstructed fields on the input sub-patches separately.

Ports available in ReconstructScalar Class :


Port Input
PortType variable/function DataType
M_SCALARFIELD addData (MC_SCALAR, MD_MPVECFLOAT_)
M_GEOM m_geometry (MC_SCALAR, MD_MIMMO_)
Port Output
PortType variable/function DataType
M_SCALARFIELD getResultField (MC_SCALAR, MD_MPVECFLOAT_)
M_VECSFIELDS getResultFields (MC_VECTOR, 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.ReconstructScalar;
  • 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:

  • DataLocation: data location of fields 1-POINT, 2-CELL, 3-INTERFACE;
  • OverlapCriterium: set how to treat fields in the overlapped region 1-MaxVal, 2-MinVal, 3-AverageVal, 4-Summing;

Fields and Geometry have to be mandatorily passed through port.

Definition at line 91 of file ReconstructFields.hpp.

Constructor & Destructor Documentation

◆ ReconstructScalar() [1/3]

mimmo::ReconstructScalar::ReconstructScalar ( MPVLocation  loc = MPVLocation::POINT)

Constructor

Parameters
[in]locMPVLocation of fields data: POINT or CELL.

Definition at line 33 of file ReconstructScalar.cpp.

◆ ReconstructScalar() [2/3]

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

Custom constructor reading xml data

Parameters
[in]rootXMLreference to your xml tree section

Definition at line 44 of file ReconstructScalar.cpp.

◆ ~ReconstructScalar()

mimmo::ReconstructScalar::~ReconstructScalar ( )
virtual

Destructor

Definition at line 74 of file ReconstructScalar.cpp.

◆ ReconstructScalar() [3/3]

mimmo::ReconstructScalar::ReconstructScalar ( const ReconstructScalar other)

Copy Constructor.

Definition at line 79 of file ReconstructScalar.cpp.

Member Function Documentation

◆ absorbSectionXML()

void mimmo::ReconstructScalar::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 415 of file ReconstructScalar.cpp.

◆ addData()

void mimmo::ReconstructScalar::addData ( dmpvector1D field)

Insert in the list data field referred to a sub-patch.

Parameters
[in]fieldfield to be inserted

Definition at line 180 of file ReconstructScalar.cpp.

◆ buildPorts()

void mimmo::ReconstructScalar::buildPorts ( )
virtual

It builds the input/output ports of the object

Implements mimmo::BaseManipulation.

Definition at line 394 of file ReconstructScalar.cpp.

◆ clear()

void mimmo::ReconstructScalar::clear ( )

Clear your class data and restore defaults settings

Definition at line 234 of file ReconstructScalar.cpp.

◆ execute()

void mimmo::ReconstructScalar::execute ( )
virtual

Execution command. Reconstruct fields and save result in m_results member.

Implements mimmo::BaseManipulation.

Definition at line 271 of file ReconstructScalar.cpp.

◆ flushSectionXML()

void mimmo::ReconstructScalar::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 456 of file ReconstructScalar.cpp.

◆ getNData()

int mimmo::ReconstructScalar::getNData ( )

Return number of fields data actually set in your class

Returns
number of fields

Definition at line 125 of file ReconstructScalar.cpp.

◆ getOverlapCriterium()

int mimmo::ReconstructScalar::getOverlapCriterium ( )

Get actually used criterium for overlap regions of given fields

Returns
criterium for overlap regions

Definition at line 116 of file ReconstructScalar.cpp.

◆ getOverlapCriteriumENUM()

OverlapMethod mimmo::ReconstructScalar::getOverlapCriteriumENUM ( )

Get actually used criterium for overlap regions of given fields

Returns
criterium for overlap regions

Definition at line 108 of file ReconstructScalar.cpp.

◆ getResultField()

dmpvector1D * mimmo::ReconstructScalar::getResultField ( )

Return your result field

Returns
result field

Definition at line 134 of file ReconstructScalar.cpp.

◆ getResultFields()

std::vector< dmpvector1D * > mimmo::ReconstructScalar::getResultFields ( )

Return your result fields

Returns
result fields

Definition at line 143 of file ReconstructScalar.cpp.

◆ plotData()

void mimmo::ReconstructScalar::plotData ( )

Plot data (resulting field data) on vtu unstructured grid file

Definition at line 244 of file ReconstructScalar.cpp.

◆ plotOptionalResults()

void mimmo::ReconstructScalar::plotOptionalResults ( )
protectedvirtual

Plot Optional results in execution, that is the reconstructed scalar field .

Reimplemented from mimmo::BaseManipulation.

Definition at line 341 of file ReconstructScalar.cpp.

◆ plotSubData()

void mimmo::ReconstructScalar::plotSubData ( int  i)

Plot sub data (resulting field data) on vtu unstructured grid file

Parameters
[in]iindex of the sub-patch

Definition at line 256 of file ReconstructScalar.cpp.

◆ removeAllData()

void mimmo::ReconstructScalar::removeAllData ( )

Remove all data present in the list

Definition at line 224 of file ReconstructScalar.cpp.

◆ removeData()

void mimmo::ReconstructScalar::removeData ( mimmo::MimmoSharedPointer< MimmoObject patch)

Remove a data field on the list by passing as key its pointer to geometry mesh

Parameters
[in]patchPointer to sub-patch to be removed.

Definition at line 196 of file ReconstructScalar.cpp.

◆ setOverlapCriterium()

void mimmo::ReconstructScalar::setOverlapCriterium ( int  funct)

Set overlap criterium for multi-fields overlapping. See OverlapMethod enum Class default is OverlapMethod::MAX. Enum overloading

Parameters
[in]functType of overlap method

Definition at line 169 of file ReconstructScalar.cpp.

◆ setOverlapCriteriumENUM()

void mimmo::ReconstructScalar::setOverlapCriteriumENUM ( OverlapMethod  funct)

Set overlap criterium for multi-fields overlapping. See OverlapMethod enum Class default is OverlapMethod::MAX. Enum overloading

Parameters
[in]functType of overlap method

Definition at line 159 of file ReconstructScalar.cpp.

◆ swap()

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

Swap function of ReconstructScalar

Parameters
[in]xobject to be swapped.

Definition at line 91 of file ReconstructScalar.cpp.


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