Nektar++
|
Converter from fld to vtk. More...
#include <OutputVtk.h>
Public Member Functions | |
OutputVtk (FieldSharedPtr f) | |
~OutputVtk () final=default | |
vtkUnstructuredGrid * | GetVtkGrid () |
Public Member Functions inherited from Nektar::FieldUtils::OutputVtkBase | |
OutputVtkBase (FieldSharedPtr f) | |
~OutputVtkBase () override | |
Public Member Functions inherited from Nektar::FieldUtils::OutputFileBase | |
OutputFileBase (FieldSharedPtr f) | |
~OutputFileBase () override | |
Public Member Functions inherited from Nektar::FieldUtils::OutputModule | |
OutputModule (FieldSharedPtr p_f) | |
FIELD_UTILS_EXPORT void | OpenStream () |
Open a file for output. More... | |
Public Member Functions inherited from Nektar::FieldUtils::Module | |
FIELD_UTILS_EXPORT | Module (FieldSharedPtr p_f) |
virtual | ~Module ()=default |
void | Process (po::variables_map &vm) |
std::string | GetModuleName () |
std::string | GetModuleDescription () |
const ConfigOption & | GetConfigOption (const std::string &key) const |
ModulePriority | GetModulePriority () |
std::vector< ModuleKey > | GetModulePrerequisites () |
FIELD_UTILS_EXPORT void | RegisterConfig (std::string key, std::string value="") |
Register a configuration option with a module. More... | |
FIELD_UTILS_EXPORT void | PrintConfig () |
Print out all configuration options for a module. More... | |
FIELD_UTILS_EXPORT void | SetDefaults () |
Sets default configuration options for those which have not been set. More... | |
FIELD_UTILS_EXPORT void | AddFile (std::string fileType, std::string fileName) |
FIELD_UTILS_EXPORT void | EvaluateTriFieldAtEquiSpacedPts (LocalRegions::ExpansionSharedPtr &exp, const Array< OneD, const NekDouble > &infield, Array< OneD, NekDouble > &outfield) |
Static Public Member Functions | |
static std::shared_ptr< Module > | create (const FieldSharedPtr &f) |
Creates an instance of this class. More... | |
Static Public Member Functions inherited from Nektar::FieldUtils::OutputVtkBase | |
static std::shared_ptr< Module > | create (FieldSharedPtr f) |
Creates an instance of this class. More... | |
Static Public Attributes | |
static ModuleKey | m_className |
Static Public Attributes inherited from Nektar::FieldUtils::OutputVtkBase | |
static ModuleKey | m_className |
Protected Member Functions | |
std::string | v_GetModuleName () final |
void | v_OutputFromPts (po::variables_map &vm) final |
Write from pts to output file. More... | |
void | v_OutputFromExp (po::variables_map &vm) final |
Write from m_exp to output file. More... | |
void | v_OutputFromData (po::variables_map &vm) final |
Write from data to output file. More... | |
Protected Member Functions inherited from Nektar::FieldUtils::OutputVtkBase | |
std::string | v_GetModuleName () override |
void | v_OutputFromPts (po::variables_map &vm) override |
Write from pts to output file. More... | |
void | v_OutputFromExp (po::variables_map &vm) override |
Write from m_exp to output file. More... | |
void | v_OutputFromData (po::variables_map &vm) override |
Write from data to output file. More... | |
fs::path | v_GetPath (std::string &filename, po::variables_map &vm) override |
fs::path | v_GetFullOutName (std::string &filename, po::variables_map &vm) override |
std::string | PrepareOutput (po::variables_map &vm) |
Protected Member Functions inherited from Nektar::FieldUtils::OutputFileBase | |
void | v_Process (po::variables_map &vm) override |
Write fld to output file. More... | |
std::string | v_GetModuleName () override |
std::string | v_GetModuleDescription () override |
ModulePriority | v_GetModulePriority () override |
virtual void | v_OutputFromPts (po::variables_map &vm)=0 |
Write from pts to output file. More... | |
virtual void | v_OutputFromExp (po::variables_map &vm)=0 |
Write from m_exp to output file. More... | |
virtual void | v_OutputFromData (po::variables_map &vm)=0 |
Write from data to output file. More... | |
virtual fs::path | v_GetPath (std::string &filename, po::variables_map &vm) |
fs::path | GetPath (std::string &filename, po::variables_map &vm) |
virtual fs::path | v_GetFullOutName (std::string &filename, po::variables_map &vm) |
fs::path | GetFullOutName (std::string &filename, po::variables_map &vm) |
Protected Member Functions inherited from Nektar::FieldUtils::Module | |
Module () | |
virtual void | v_Process (po::variables_map &vm) |
virtual std::string | v_GetModuleName () |
virtual std::string | v_GetModuleDescription () |
virtual ModulePriority | v_GetModulePriority () |
virtual std::vector< ModuleKey > | v_GetModulePrerequisites () |
Protected Attributes | |
vtkSmartPointer< vtkUnstructuredGrid > | m_vtkMesh |
Cache file for unstructured grid VTK mesh data. More... | |
int | m_numPlanes = 1 |
Number of planes if homogeneous. More... | |
bool | m_extraPlane = false |
Flag if extra plane in case of fourier expansion in homogeneous dir. More... | |
bool | m_cachedMesh = false |
Flag if mesh has been cached. More... | |
Protected Attributes inherited from Nektar::FieldUtils::OutputFileBase | |
bool | m_requireEquiSpaced |
bool | m_prohibitWrite = false |
bool | m_equispacedSetup = false |
Protected Attributes inherited from Nektar::FieldUtils::OutputModule | |
std::ofstream | m_fldFile |
Output stream. More... | |
Protected Attributes inherited from Nektar::FieldUtils::Module | |
std::map< std::string, ConfigOption > | m_config |
List of configuration values. More... | |
std::set< std::string > | m_allowedFiles |
List of allowed file formats. More... | |
Private Member Functions | |
vtkSmartPointer< vtkUnstructuredGrid > | OutputFromExpHighOrder (po::variables_map &vm) |
Prepare high order Lagrange VTK output. More... | |
void | AddFieldDataToVTKHighOrder (po::variables_map &vm, std::string &filename, vtkSmartPointer< vtkUnstructuredGrid > &vtkMesh) |
Add field data to high order Lagrange VTK output. More... | |
vtkSmartPointer< vtkUnstructuredGrid > | OutputFromExpLowOrder () |
Prepare low order VTK output. More... | |
void | AddFieldDataToVTKLowOrder (po::variables_map &vm, std::string &filename, vtkSmartPointer< vtkUnstructuredGrid > &vtkMesh) |
Add field data to low order VTK output. More... | |
void | OutputFromExpLowOrderMultiBlock (po::variables_map &vm, std::string &filename) |
Prepare low order multi-block VTK output & add field data. More... | |
void | WriteVTK (vtkDataObject *vtkMesh, std::string &filename, po::variables_map &vm) |
Write VTK file using. More... | |
void | WritePVtu (po::variables_map &vm) |
Write the parallel .pvtu file. More... | |
Additional Inherited Members | |
Public Attributes inherited from Nektar::FieldUtils::Module | |
FieldSharedPtr | m_f |
Field object. More... | |
Converter from fld to vtk.
Definition at line 49 of file OutputVtk.h.
|
explicit |
Definition at line 56 of file OutputVtk.cpp.
References Nektar::FieldUtils::Module::m_config, and Nektar::FieldUtils::OutputFileBase::m_requireEquiSpaced.
|
finaldefault |
|
private |
Add field data to high order Lagrange VTK output.
Definition at line 1433 of file OutputVtk.cpp.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), m_cachedMesh, Nektar::FieldUtils::Module::m_f, Nektar::FieldUtils::OutputFileBase::m_prohibitWrite, and WriteVTK().
Referenced by v_OutputFromExp().
|
private |
Add field data to low order VTK output.
Definition at line 975 of file OutputVtk.cpp.
References m_extraPlane, Nektar::FieldUtils::Module::m_f, m_numPlanes, Nektar::FieldUtils::OutputFileBase::m_prohibitWrite, and WriteVTK().
Referenced by v_OutputFromExp().
|
inlinestatic |
Creates an instance of this class.
Definition at line 53 of file OutputVtk.h.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr().
|
inline |
Definition at line 64 of file OutputVtk.h.
References m_vtkMesh.
|
private |
Prepare high order Lagrange VTK output.
Definition at line 1304 of file OutputVtk.cpp.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), ASSERTL0, Nektar::ErrorUtil::efatal, Nektar::LibUtilities::eHexahedron, Nektar::LibUtilities::ePrism, Nektar::LibUtilities::eQuadrilateral, Nektar::LibUtilities::eTetrahedron, Nektar::LibUtilities::eTriangle, Nektar::FieldUtils::Module::m_f, NEKERROR, CellMLToNektar.cellml_metadata::p, and Nektar::LibUtilities::ShapeTypeMap.
Referenced by v_OutputFromExp().
|
private |
Prepare low order VTK output.
Definition at line 852 of file OutputVtk.cpp.
References ASSERTL0, Nektar::UnitTests::d(), Nektar::MultiRegions::e3DH1D, Nektar::LibUtilities::eFourier, Nektar::LibUtilities::eFourierEvenlySpaced, Vmath::Fill(), m_extraPlane, Nektar::FieldUtils::Module::m_f, m_numPlanes, CellMLToNektar.cellml_metadata::p, Vmath::Vcopy(), and Nektar::UnitTests::z().
Referenced by v_OutputFromExp().
|
private |
Prepare low order multi-block VTK output & add field data.
Definition at line 1022 of file OutputVtk.cpp.
References ASSERTL0, Nektar::UnitTests::d(), Nektar::SpatialDomains::BoundaryConditions::GetBoundaryLabels(), Nektar::SpatialDomains::BoundaryConditions::GetBoundaryRegions(), Nektar::FieldUtils::Module::m_f, Nektar::FieldUtils::OutputFileBase::m_prohibitWrite, CellMLToNektar.pycml::name, CellMLToNektar.cellml_metadata::p, WriteVTK(), and Nektar::UnitTests::z().
Referenced by v_OutputFromExp().
|
inlinefinalprotectedvirtual |
Reimplemented from Nektar::FieldUtils::OutputFileBase.
Definition at line 70 of file OutputVtk.h.
|
finalprotectedvirtual |
Write from data to output file.
Implements Nektar::FieldUtils::OutputFileBase.
Definition at line 1601 of file OutputVtk.cpp.
References Nektar::ErrorUtil::efatal, and NEKERROR.
|
finalprotectedvirtual |
Write from m_exp to output file.
Implements Nektar::FieldUtils::OutputFileBase.
Definition at line 1613 of file OutputVtk.cpp.
References AddFieldDataToVTKHighOrder(), AddFieldDataToVTKLowOrder(), ASSERTL0, m_cachedMesh, Nektar::FieldUtils::Module::m_config, Nektar::FieldUtils::Module::m_f, Nektar::FieldUtils::OutputFileBase::m_prohibitWrite, m_vtkMesh, OutputFromExpHighOrder(), OutputFromExpLowOrder(), OutputFromExpLowOrderMultiBlock(), Nektar::FieldUtils::OutputVtkBase::PrepareOutput(), and Nektar::FieldUtils::OutputVtkBase::v_OutputFromExp().
|
finalprotectedvirtual |
Write from pts to output file.
Implements Nektar::FieldUtils::OutputFileBase.
Definition at line 1608 of file OutputVtk.cpp.
References Nektar::FieldUtils::OutputVtkBase::v_OutputFromPts().
|
private |
Write the parallel .pvtu file.
Definition at line 1529 of file OutputVtk.cpp.
References CellMLToNektar.pycml::format, Nektar::FieldUtils::Module::m_config, Nektar::FieldUtils::Module::m_f, Nektar::LibUtilities::PortablePath(), and Nektar::FieldUtils::OutputVtkBase::v_GetPath().
Referenced by WriteVTK().
|
private |
Write VTK file using.
vtkMesh |
Definition at line 1467 of file OutputVtk.cpp.
References Nektar::FieldUtils::Module::m_config, Nektar::FieldUtils::Module::m_f, and WritePVtu().
Referenced by AddFieldDataToVTKHighOrder(), AddFieldDataToVTKLowOrder(), and OutputFromExpLowOrderMultiBlock().
|
protected |
Flag if mesh has been cached.
Definition at line 94 of file OutputVtk.h.
Referenced by AddFieldDataToVTKHighOrder(), and v_OutputFromExp().
|
static |
Definition at line 58 of file OutputVtk.h.
|
protected |
Flag if extra plane in case of fourier expansion in homogeneous dir.
Definition at line 91 of file OutputVtk.h.
Referenced by AddFieldDataToVTKLowOrder(), and OutputFromExpLowOrder().
|
protected |
Number of planes if homogeneous.
Definition at line 88 of file OutputVtk.h.
Referenced by AddFieldDataToVTKLowOrder(), and OutputFromExpLowOrder().
|
protected |
Cache file for unstructured grid VTK mesh data.
Definition at line 85 of file OutputVtk.h.
Referenced by GetVtkGrid(), and v_OutputFromExp().