OpenLB 1.7
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
olb::VTIwriter3D< T, BaseType > Class Template Reference

#include <vtiWriter.h>

+ Collaboration diagram for olb::VTIwriter3D< T, BaseType >:

Public Member Functions

 VTIwriter3D ()
 

Static Public Member Functions

static void writeData (std::string const &fName, std::string const &fieldName, BlockData< 3, T, BaseType > const &blockData, Cuboid3D< T > const &cuboid)
 Write Single Block Data.
 
static void writeData (std::string const &fName, std::string const &fieldName, SuperData< 3, T, BaseType > const &superData, CuboidGeometry3D< T > const &cGeometry, LoadBalancer< T > const &loadBalancer)
 Write Super Data.
 
static void writeData (std::string const &fName, std::string const &fieldName, SuperData< 3, T, BaseType > const &superData)
 Write Super Data with its own cGeometry and loadBalancer.
 

Detailed Description

template<typename T, typename BaseType>
class olb::VTIwriter3D< T, BaseType >

Definition at line 47 of file vtiWriter.h.

Constructor & Destructor Documentation

◆ VTIwriter3D()

template<typename T , typename BaseType >
olb::VTIwriter3D< T, BaseType >::VTIwriter3D ( )

Definition at line 54 of file vtiWriter.hh.

54{};

Member Function Documentation

◆ writeData() [1/3]

template<typename T , typename BaseType >
void olb::VTIwriter3D< T, BaseType >::writeData ( std::string const & fName,
std::string const & fieldName,
BlockData< 3, T, BaseType > const & blockData,
Cuboid3D< T > const & cuboid )
static

Write Single Block Data.

Definition at line 57 of file vtiWriter.hh.

60{
61 // Generate full file path
62 std::string fullName = getFullName(fName);
63 writePreamble(fullName, cuboid);
64 writeBlockData(fullName, fieldName, blockData, cuboid);
65 writePostScript(fullName);
66}

◆ writeData() [2/3]

template<typename T , typename BaseType >
void olb::VTIwriter3D< T, BaseType >::writeData ( std::string const & fName,
std::string const & fieldName,
SuperData< 3, T, BaseType > const & superData )
static

Write Super Data with its own cGeometry and loadBalancer.

Definition at line 112 of file vtiWriter.hh.

114{
115 writeData(fName, fieldName, superData, superData.getCuboidGeometry(), superData.getLoadBalancer());
116}
static void writeData(std::string const &fName, std::string const &fieldName, BlockData< 3, T, BaseType > const &blockData, Cuboid3D< T > const &cuboid)
Write Single Block Data.
Definition vtiWriter.hh:57

References olb::SuperStructure< T, D >::getCuboidGeometry(), and olb::SuperStructure< T, D >::getLoadBalancer().

+ Here is the call graph for this function:

◆ writeData() [3/3]

template<typename T , typename BaseType >
void olb::VTIwriter3D< T, BaseType >::writeData ( std::string const & fName,
std::string const & fieldName,
SuperData< 3, T, BaseType > const & superData,
CuboidGeometry3D< T > const & cGeometry,
LoadBalancer< T > const & loadBalancer )
static

Write Super Data.

Definition at line 69 of file vtiWriter.hh.

72{
73 // Generate full file path
74 std::string fullName = getFullName(fName);
75
76 int rank = 0;
77 int size = 1;
78#ifdef PARALLEL_MODE_MPI
79 rank = singleton::mpi().getRank();
80 size = singleton::mpi().getSize();
81#endif
82
83 if ( rank == 0 ) {
84 // Write XML Preamble with geometry of surrounding cuboid
85 writePreamble(fullName, cGeometry.getMotherCuboid());
86 }
87#ifdef PARALLEL_MODE_MPI
89#endif
90
91 // Write VTI File in Order of MPI Rank
92 for (int iRank = 0; iRank < size; ++iRank) {
93 if (rank == iRank) {
94 for (int iC = 0; iC < loadBalancer.size(); ++iC) {
95 // Write data block by block
96 writeBlockData(fullName, fieldName, superData.getBlock(iC), cGeometry.get(loadBalancer.glob(iC)));
97 }
98 }
99#ifdef PARALLEL_MODE_MPI
100 // Wait for current writer process
102#endif
103 }
104 //
105 if (rank == 0) {
106 // Close All XML Tags
107 writePostScript(fullName);
108 }
109}
int getSize() const
Returns the number of processes.
int getRank() const
Returns the process ID.
void barrier(MPI_Comm comm=MPI_COMM_WORLD)
Synchronizes the processes.
MpiManager & mpi()

References olb::singleton::MpiManager::barrier(), olb::CuboidGeometry3D< T >::get(), olb::SuperData< D, T, U >::getBlock(), olb::CuboidGeometry3D< T >::getMotherCuboid(), olb::singleton::MpiManager::getRank(), olb::singleton::MpiManager::getSize(), olb::LoadBalancer< T >::glob(), olb::singleton::mpi(), and olb::LoadBalancer< T >::size().

+ Here is the call graph for this function:

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