C++ main module for stochmagnet Package
1.0
|
This class is a beam interface output for XMF format for paraview visualization software. More...
#include <SM_XDMF.h>
Public Member Functions | |
virtual tMemSize | getMemorySize () const |
return the memory size of the class and the memory size of all its attributes/associations More... | |
virtual tMemSize | getContentsMemorySize () const |
return the memory size of the included associations More... | |
virtual tBoolean | open () override |
open the vtkfile More... | |
virtual tBoolean | open (const tIndex &t) override |
open the vtk field for writing or appending at the time step More... | |
virtual tBoolean | writeGeometryHeader (const tIndex &t, const SM_Network &network) override |
write the geometry header corresponding to the network More... | |
virtual tBoolean | writeGeometryData (const tIndex &t, const SM_Network &network) override |
write the geometry data of the network More... | |
virtual tBoolean | writeContentHeader (const tIndex &t, const tFlag &support, const std::vector< tString > &scalarNames, const std::vector< tString > &vectorNames) override |
write a content header More... | |
virtual tBoolean | writeContentData (const tIndex &t, const SM_Network &network, const tFlag &support, const tString &name, const tReal *f) override |
write a content data More... | |
virtual tBoolean | writeContentFooter (const tIndex &t, const tFlag &support) override |
write a content footer More... | |
virtual tBoolean | writeGeometryFooter (const tIndex &t) override |
write the geometry footer More... | |
virtual tBoolean | close (const tIndex &t) override |
close the file for the time step t More... | |
virtual tBoolean | close () override |
close the file More... | |
void | setExternalFileName (const tString &f) |
set the external file to find the vector data More... | |
void | setFormat (const tString &f) |
set the format of the data More... | |
template<class T > | |
tString | getVTKType () const |
return the VTK type of the template Type More... | |
tString | getVTKType (const tString &typeName) const |
return the VTK type of tthe type name More... | |
void | setFileName (const tString &fn) |
set the file name without extension More... | |
const tString & | getFileName () const |
get the file name without extension More... | |
virtual tBoolean | save (const SM_Beam &beam, const tIndex &s) |
save the s-th trajectory of the beam More... | |
template<class T > | |
std::shared_ptr< T > | getSharedPointer () |
return the shared pointer for this More... | |
template<class T > | |
std::shared_ptr< const T > | getConstSharedPointer () const |
return a const shared pointer for this More... | |
template<class T > | |
tBoolean | isInstanceOf () const |
test if the clas T is an instance of this class More... | |
tString | getClassName () const |
return the name of the class More... | |
tString | getPointerString () const |
retrun the pointer of the class as a string More... | |
tString | getIdentityString () const |
retrun the string identification of the class More... | |
virtual tString | toString () const |
return the string representation of the object node More... | |
Static Public Member Functions | |
static CORE_UniquePointer< SM_XDMF > | New () |
create an XDMF class More... | |
static CORE_UniquePointer< SM_XDMF > | New (const tString &format) |
create an XDMF class More... | |
static tBoolean | EnableMemoryStack (const tBoolean &isMemoryChecked) |
enable the memory stack More... | |
static void | EnableMemoryStack () |
enable the memory stack More... | |
static void | DisableMemoryStack () |
disable the memory stack More... | |
static tBoolean | IsMemoryStackEnabled () |
return trur if the memory stack is enabled More... | |
static tString | MemoryStackToString () |
get the memory stack in string More... | |
static tIndex | GetRegisteredClassesNumber () |
get the memory stack in string More... | |
Static Public Attributes | |
static const tFlag | CELL =0 |
static const tFlag | POINT =1 |
Protected Member Functions | |
SM_XDMF (void) | |
create More... | |
virtual | ~SM_XDMF (void) |
destroy More... | |
const tString & | getFormat () const |
get the format of the data More... | |
const tString & | getExternalFileName () const |
get the external file name to find data More... | |
virtual tBoolean | writeVertices (CORE_OutputFile &file, const SM_Network &mesh, const tString &tag) const |
write the vertices coordinates More... | |
virtual tBoolean | writeVertices (CORE_OutputFile &file, const SM_Network &mesh) |
write the vertices coordinates More... | |
virtual tBoolean | writeConnectivity (CORE_OutputFile &file, const tIndex &nVertexCells, const tIndex &nEdgeCells, const std::valarray< tUInt > &neighborsNumber, const std::valarray< tIndex > &neighborIndices, const tString &tagN) const |
write the connectivity between vertices More... | |
virtual tBoolean | writeConnectivity (CORE_OutputFile &file, const tIndex &nVertexCells, const tIndex &nEdgeCells, const std::valarray< tUInt > &neighbors, const std::valarray< tIndex > &neighborIndices) const |
write the connectivity between vertices More... | |
virtual tBoolean | writeField (CORE_OutputFile &file, const tIndex &t, const tFlag &contentType, const tString &name, const tString &tagName, const tIndex &n, const tDimension &dim, const tReal *f) const |
write a field with name More... | |
virtual tBoolean | writeField (CORE_OutputFile &file, const tIndex &t, const tFlag &contentType, const tString &name, const tIndex &n, const tDimension &dim, const tReal *f) const |
write a field with name More... | |
Private Member Functions | |
template<class T > | |
std::shared_ptr< T > | setThis (std::unique_ptr< T, CORE_Object::Delete > &up) |
set the shared pointer from an unique pointer More... | |
Private Attributes | |
tString | mFormat |
tString | mName |
tString | mExternalFileName |
CORE_UniquePointer< CORE_OutputFile > | mFile |
tString | mFileName |
std::weak_ptr< CORE_Object > | mThis |
This class is a beam interface output for XMF format for paraview visualization software.
|
protected |
create
References mExternalFileName, mFile, mFormat, mName, and CORE_OutputFile::New().
Referenced by New().
|
protectedvirtual |
destroy
|
overridevirtual |
close the file
Implements SM_VTK.
References CORE_OutputFile::close(), and mFile.
close the file for the time step t
[in] | t | the time step |
Implements SM_VTK.
|
inlinestaticinherited |
disable the memory stack
Referenced by CORE_Object::EnableMemoryStack().
|
inlinestaticinherited |
enable the memory stack
Referenced by CORE_Object::EnableMemoryStack(), and CORE_Run::SetDebugOptions().
|
inlinestaticinherited |
enable the memory stack
[in] | isMemoryChecked | : true to verify memory allocation of CORE_Object classes |
References CORE_Object::DisableMemoryStack(), CORE_Object::EnableMemoryStack(), and CORE_Object::IsMemoryStackEnabled().
|
inlineinherited |
return the name of the class
Referenced by CORE_Object::getIdentityString(), and CORE_Test::testTypes().
|
inlineinherited |
return a const shared pointer for this
References CORE_Object::mThis.
|
inlinevirtual |
return the memory size of the included associations
Reimplemented from SM_VTK.
References SM_VTK::getContentsMemorySize(), mExternalFileName, mFile, mFormat, mName, and tMemSize.
Referenced by getMemorySize().
|
inlineprotected |
get the external file name to find data
References mExternalFileName.
Referenced by writeConnectivity(), writeField(), and writeVertices().
|
inlineinherited |
get the file name without extension
References SM_VTK::mFileName.
Referenced by open().
|
inlineprotected |
get the format of the data
References mFormat.
Referenced by writeConnectivity(), writeField(), and writeVertices().
|
inlineinherited |
retrun the string identification of the class
References CORE_Object::getClassName(), and core_functions::pointerToString().
Referenced by CORE_Test::testArray(), CORE_Test::testField(), CORE_Test::testTypes(), CORE_Object::toString(), CORE_ClassFactory::toString(), and CORE_Field< T, K, D, S, I >::toString().
|
inlinevirtual |
return the memory size of the class and the memory size of all its attributes/associations
Reimplemented from SM_VTK.
References getContentsMemorySize().
|
inlineinherited |
retrun the pointer of the class as a string
References core_functions::pointerToString().
|
inlinestaticinherited |
get the memory stack in string
|
inlineinherited |
return the shared pointer for this
References CORE_Object::mThis.
|
inlineinherited |
return the VTK type of the template Type
return the VTK type of tthe type name
return the VTK type of the template Type
[in] | typeName | the name of the type:
|
References CORE_Run::Is64Architecture(), and tString.
|
inlineinherited |
test if the clas T is an instance of this class
Referenced by SM_Beam::templatedSimulate().
|
inlinestaticinherited |
return trur if the memory stack is enabled
Referenced by CORE_Object::EnableMemoryStack(), and main().
|
inlinestaticinherited |
get the memory stack in string
Referenced by main().
|
inlinestatic |
create an XDMF class
References SM_XDMF().
Referenced by SM_Output::generateOutput(), and New().
|
inlinestatic |
create an XDMF class
[in] | format | the format of the data in the XML file in {"XML","HDF"} |
References New().
|
overridevirtual |
open the vtkfile
Implements SM_VTK.
References SM_VTK::getFileName(), mFile, and tString.
open the vtk field for writing or appending at the time step
[in] | t | the time step |
Implements SM_VTK.
save the s-th trajectory of the beam
[in] | beam | : the beam to save in VTK file |
[in] | s | index of the trajectory |
References SM_VTK::CELL, SM_VTK::close(), SM_Network::getDimension(), SM_Beam::getMagneticMoment(), SM_TimeStepper::getMaximumTimeStepsNumber(), SM_System::getNetwork(), SM_Network::getParticlesNumber(), SM_Beam::getSystem(), SM_System::getTimeStepper(), SM_VTK::open(), SM_VTK::POINT, tBoolean, tIndex, tReal, SM_VTK::writeContentData(), SM_VTK::writeContentFooter(), SM_VTK::writeContentHeader(), SM_VTK::writeGeometryData(), SM_VTK::writeGeometryFooter(), and SM_VTK::writeGeometryHeader().
|
inline |
set the external file to find the vector data
[in] | f | the aboslute file name with extension |
References mExternalFileName.
|
inlineinherited |
set the file name without extension
fn | : the absolute file name without extension |
References SM_VTK::mFileName.
|
inline |
set the format of the data
[in] | f | the format of the data in "XML","HDF" |
References mFormat.
|
inlineprivateinherited |
set the shared pointer from an unique pointer
[in,out] | up | unique pointer of the class at input, points to null pointer at output |
Method only calledby the friend class CORE_ClassFactory::NewSharedInstance()
References CORE_Object::mThis.
|
inlinevirtualinherited |
return the string representation of the object node
Reimplemented in SM_TimeStepper, SM_System, SM_StochasticFunction, SM_Network, SM_LandauLifschitzFunction, SM_Beam, CORE_Field< T, K, D, S, I >, CORE_Field< T, K, D, CORE_StdPtrArray< T >, CORE_StdPtrField< T, K, D > >, CORE_Field< T, K, D, CORE_StdValArray< T >, CORE_StdValField< T, K, D > >, CORE_Collection< T, I >, CORE_ClassFactory, and SM_NoiseRateFunction.
References CORE_Object::getIdentityString().
Referenced by SM_Run::run(), CORE_Collection< T, I >::toString(), SM_Beam::toString(), SM_Network::toString(), SM_StochasticFunction::toString(), SM_System::toString(), and SM_TimeStepper::toString().
|
inlineprotectedvirtual |
write the connectivity between vertices
[in] | file | the output stream |
[in] | nVertexCells | number of points without any connection |
[in] | nEdgeCells | : number of points with at least one connection |
[in] | neighbors | the index of all neighbors of all points |
[in] | neighborIndices | : the index of the first neighbor of point i in [0,neighborIndices.getSize()-1[ |
References writeConnectivity().
|
protectedvirtual |
write the connectivity between vertices
[in] | file | the output stream |
[in] | nVertexCells | number of points without any connection |
[in] | nEdgeCells | : number of points with at least one connection |
[in] | neighborsNumber | the number of neighbors by particle |
[in] | neighborIndices | : the index of the first neighbor of point i in [0,neighborIndices.getSize()-1[ |
[in] | tagN | the tag for finding the vector neighbors in external file if any |
References getExternalFileName(), getFormat(), mFormat, tBoolean, tIndex, tString, and tUInt.
Referenced by writeConnectivity(), and writeGeometryHeader().
|
overridevirtual |
write a content data
[in] | t | the time step for the content data |
[in] | network | the mesh of the field |
[in] | support | type of support of the field in {SM_VTP::CELL,SM_VTP::POINT} |
[in] | name | name of the field |
[in] | f | the field to write |
Implements SM_VTK.
References SM_Network::getDimension(), SM_Network::getParticlesNumber(), mFile, tBoolean, tString, and writeField().
write a content footer
[in] | t | the time step for the content header |
[in] | support | type of support in {SM_VTP::CELL,SM_VTP::POINT} |
Implements SM_VTK.
|
overridevirtual |
write a content header
[in] | t | the time step for the content header |
[in] | support | type of support in {SM_VTP::CELL,SM_VTP::POINT} |
[in] | scalarNames | the names of the scalar field to save on support |
[in] | vectorNames | the names of the vector field to save on support |
Implements SM_VTK.
|
inlineprotectedvirtual |
write a field with name
[in] | file | the output stream |
[in] | t | the time step index |
[in] | contentType; | the type of content in {CELL,POINT} |
[in] | name | the name of the field |
[in] | n | size of the field |
[in] | dim | dimension of the field |
[in] | f | the field to save |
References writeField().
|
protectedvirtual |
write a field with name
[in] | file | the output stream |
[in] | t | the time step index |
[in] | contentType; | the type of content in {CELL,POINT} |
[in] | name | the name of the field |
[in] | tagName | the tag to get the field |
[in] | n | size of the field |
[in] | dim | dimension of the field |
[in] | f | the field to save |
References SM_VTK::CELL, getExternalFileName(), getFormat(), mFormat, tBoolean, tIndex, tReal, tString, and tUSInt.
Referenced by writeContentData(), and writeField().
|
overridevirtual |
write the geometry data of the network
[in] | t | the time step for the geometry data |
[in] | network | the geometry data |
Implements SM_VTK.
References mFile, tBoolean, tString, and writeVertices().
write the geometry footer
[in] | t | the time step for the geometry footer |
Implements SM_VTK.
|
overridevirtual |
write the geometry header corresponding to the network
[in] | t | the time step for the geometry header |
[in] | network | the network to take information for building the header |
Implements SM_VTK.
References SM_Network::computeAloneParticlesNumber(), SM_Network::getConnectionsNumber(), SM_Network::getNeighborsIndices(), SM_Network::getNeighborsNumber(), mFile, tBoolean, tIndex, tString, and writeConnectivity().
|
inlineprotectedvirtual |
write the vertices coordinates
[in] | file | the output stream |
[in] | mesh | the mesh |
References writeVertices().
|
protectedvirtual |
write the vertices coordinates
[in] | file | the output stream |
[in] | mesh | the mesh |
[in] | tag | the tag for finding the vector in external file if any |
References CORE_Collection< T, I >::getDataTypeName(), CORE_Field< T, K, D, S, I >::getDimension(), CORE_Field< T, K, D, S, I >::getElementsNumber(), getExternalFileName(), getFormat(), SM_Network::getParticlesCoordinates(), CORE_Field< T, K, D, S, I >::getValues(), mFormat, tBoolean, tIndex, tReal, tString, and tUSInt.
Referenced by writeGeometryData(), and writeVertices().
|
staticinherited |
Referenced by SM_VTK::save(), and writeField().
|
private |
Referenced by getContentsMemorySize(), getExternalFileName(), setExternalFileName(), and SM_XDMF().
|
private |
Referenced by close(), getContentsMemorySize(), open(), SM_XDMF(), writeContentData(), writeGeometryData(), and writeGeometryHeader().
|
privateinherited |
Referenced by SM_VTK::getContentsMemorySize(), SM_VTK::getFileName(), and SM_VTK::setFileName().
|
private |
Referenced by getContentsMemorySize(), getFormat(), setFormat(), SM_XDMF(), writeConnectivity(), writeField(), and writeVertices().
|
private |
Referenced by getContentsMemorySize(), and SM_XDMF().
|
privateinherited |
Referenced by CORE_Object::getConstSharedPointer(), CORE_Object::getSharedPointer(), and CORE_Object::setThis().
|
staticinherited |
Referenced by SM_VTK::save().