C++ main module for stochmagnet Package
1.0
|
This class is a beam output interface for VTK / Paraview software. More...
#include <SM_VTK.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... | |
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... | |
virtual tBoolean | open ()=0 |
open the vtkfile More... | |
virtual tBoolean | open (const tIndex &t)=0 |
open the vtk field for writing or appending at the time step More... | |
virtual tBoolean | writeGeometryHeader (const tIndex &t, const SM_Network &network)=0 |
write the geometry header corresponding to the network More... | |
virtual tBoolean | writeGeometryData (const tIndex &t, const SM_Network &network)=0 |
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)=0 |
write a content header More... | |
virtual tBoolean | writeContentData (const tIndex &t, const SM_Network &network, const tFlag &support, const tString &name, const tReal *f)=0 |
write a content data More... | |
virtual tBoolean | writeContentFooter (const tIndex &t, const tFlag &support)=0 |
write a content footer More... | |
virtual tBoolean | writeGeometryFooter (const tIndex &t)=0 |
write the geometry footer More... | |
virtual tBoolean | close (const tIndex &t)=0 |
close the file for the time step t More... | |
virtual tBoolean | close ()=0 |
close the file 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 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_VTK (void) | |
create More... | |
virtual | ~SM_VTK (void) |
destroy 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 | mFileName |
std::weak_ptr< CORE_Object > | mThis |
This class is a beam output interface for VTK / Paraview software.
|
protected |
create
|
protectedvirtual |
destroy
|
pure virtual |
close the file for the time step t
[in] | t | the time step number |
Implemented in SM_XDMF.
|
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 CORE_Object.
Reimplemented in SM_XDMF.
References CORE_Object::getContentsMemorySize(), mFileName, and tMemSize.
Referenced by SM_XDMF::getContentsMemorySize(), and getMemorySize().
|
inline |
get the file name without extension
References mFileName.
Referenced by SM_XDMF::open().
|
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_Object.
Reimplemented in SM_XDMF.
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.
|
inline |
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().
|
pure virtual |
open the vtk field for writing or appending at the time step
[in] | t | the time step |
Implemented in SM_XDMF.
save the s-th trajectory of the beam
[in] | beam | : the beam to save in VTK file |
[in] | s | index of the trajectory |
References CELL, close(), SM_Network::getDimension(), SM_Beam::getMagneticMoment(), SM_TimeStepper::getMaximumTimeStepsNumber(), SM_System::getNetwork(), SM_Network::getParticlesNumber(), SM_Beam::getSystem(), SM_System::getTimeStepper(), open(), POINT, tBoolean, tIndex, tReal, writeContentData(), writeContentFooter(), writeContentHeader(), writeGeometryData(), writeGeometryFooter(), and writeGeometryHeader().
|
inline |
set the file name without extension
fn | : the absolute file name without extension |
References mFileName.
|
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().
|
pure virtual |
write a content data
[in] | t | the time step for the content data |
[in] | network | the mesh of the field at t |
[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 |
Implemented in SM_XDMF.
Referenced by save().
|
pure virtual |
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 |
Implemented in SM_XDMF.
Referenced by save().
|
pure virtual |
|
pure virtual |
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 |
Implemented in SM_XDMF.
Referenced by save().
|
static |
Referenced by save(), and SM_XDMF::writeField().
|
private |
Referenced by getContentsMemorySize(), getFileName(), and setFileName().
|
privateinherited |
Referenced by CORE_Object::getConstSharedPointer(), CORE_Object::getSharedPointer(), and CORE_Object::setThis().