36 #include "ParallelColumnDataWriter.hpp"
38 #include "DistributedVectorFactory.hpp"
41 const std::string& rBaseName,
44 mConcentrated(nullptr)
47 MPI_Comm_size(PETSC_COMM_WORLD, &num_procs);
61 VecGetSize(petscVector,&size);
65 EXCEPTION(
"Size of vector does not match FixedDimensionSize.");
79 #if ((PETSC_VERSION_MAJOR == 3) || (PETSC_VERSION_MAJOR == 2 && PETSC_VERSION_MINOR == 3 && PETSC_VERSION_SUBMINOR == 3)) //2.3.3 or 3.x.x
91 double *concentrated_vector;
93 for (
int i=0; i<size; i++)
108 index!= unstriped.
End();
111 unstriped[index] = rStripe[index];
DistributedVectorFactory * GetFactory()
virtual void PutVariable(int variableID, double variableValue, long dimensionPosition=-1)
DistributedVector CreateDistributedVector(Vec vec, bool readOnly=false)
#define EXCEPTION(message)
void DoAdvanceAlongUnlimitedDimension()
virtual void EndDefineMode()
void AdvanceAlongUnlimitedDimension()
ParallelColumnDataWriter(const std::string &rDirectory, const std::string &rBaseName, bool cleanDirectory=true)
void PutVectorStripe(int variableId, DistributedVector::Stripe &rStripe)
void PutVariable(int variableID, double variableValue, long dimensionPosition=-1)
void PutVector(int variableID, Vec petscVector)
virtual ~ParallelColumnDataWriter()