#include <ParallelColumnDataWriter.hpp>


Public Member Functions | |
| ParallelColumnDataWriter (const std::string &rDirectory, const std::string &rBaseName, bool cleanDirectory=true) | |
| virtual | ~ParallelColumnDataWriter () |
| void | PutVector (int variableID, Vec petscVector) |
| void | PutVectorStripe (int variableId, DistributedVector::Stripe &rStripe) |
| void | PutVariable (int variableID, double variableValue, long dimensionPosition=-1) |
| void | EndDefineMode () |
| void | AdvanceAlongUnlimitedDimension () |
| void | Close () |
Private Attributes | |
| bool | mIsParallel |
| Vec | mConcentrated |
| VecScatter | mToMaster |
Definition at line 41 of file ParallelColumnDataWriter.hpp.
| ParallelColumnDataWriter::ParallelColumnDataWriter | ( | const std::string & | rDirectory, | |
| const std::string & | rBaseName, | |||
| bool | cleanDirectory = true | |||
| ) |
Constructor.
| rDirectory | the directory in which to write the data to file | |
| rBaseName | the name of the file in which to write the data | |
| cleanDirectory | whether to clean the directory (defaults to true) |
Definition at line 33 of file ParallelColumnDataWriter.cpp.
References mIsParallel.
| ParallelColumnDataWriter::~ParallelColumnDataWriter | ( | ) | [virtual] |
Destructor.
Definition at line 142 of file ParallelColumnDataWriter.cpp.
References Close(), mConcentrated, and mToMaster.
| void ParallelColumnDataWriter::PutVector | ( | int | variableID, | |
| Vec | petscVector | |||
| ) |
Write data for a given variable from a Petsc vector to the dataset.
| variableID | the variable | |
| petscVector | the data |
Definition at line 51 of file ParallelColumnDataWriter.cpp.
References PetscTools::AmMaster(), EXCEPTION, mConcentrated, ColumnDataWriter::mFixedDimensionSize, mToMaster, and ColumnDataWriter::PutVariable().
Referenced by PutVectorStripe().
| void ParallelColumnDataWriter::PutVectorStripe | ( | int | variableId, | |
| DistributedVector::Stripe & | rStripe | |||
| ) |
Write data for a given variable from a stripe to the dataset.
| variableId | the variable | |
| rStripe | the data |
Definition at line 95 of file ParallelColumnDataWriter.cpp.
References DistributedVector::Begin(), DistributedVectorFactory::CreateDistributedVector(), DistributedVectorFactory::CreateVec(), DistributedVector::End(), DistributedVector::Stripe::GetFactory(), and PutVector().
| void ParallelColumnDataWriter::PutVariable | ( | int | variableID, | |
| double | variableValue, | |||
| long | dimensionPosition = -1 | |||
| ) | [virtual] |
Input the variable value to the output file or ancillary file
| variableID | ||
| variableValue | ||
| dimensionPosition | The position in column (defaults to -1). This is required if there is a fixed dimension, and will be the position along that dimension |
Reimplemented from ColumnDataWriter.
Definition at line 133 of file ParallelColumnDataWriter.cpp.
References PetscTools::AmMaster(), and ColumnDataWriter::PutVariable().
| void ParallelColumnDataWriter::EndDefineMode | ( | ) | [virtual] |
End the define mode of the DataWriter.
Reimplemented from ColumnDataWriter.
Definition at line 113 of file ParallelColumnDataWriter.cpp.
References PetscTools::AmMaster(), ColumnDataWriter::EndDefineMode(), and ColumnDataWriter::mIsInDefineMode.
| void ParallelColumnDataWriter::AdvanceAlongUnlimitedDimension | ( | ) | [virtual] |
Advance along the unlimited dimension. Normally this will be called when all variables in a row have been input.
Reimplemented from ColumnDataWriter.
Definition at line 152 of file ParallelColumnDataWriter.cpp.
References PetscTools::AmMaster(), PetscTools::Barrier(), and ColumnDataWriter::DoAdvanceAlongUnlimitedDimension().
| void ParallelColumnDataWriter::Close | ( | ) | [virtual] |
Close any open files.
Reimplemented from ColumnDataWriter.
Definition at line 163 of file ParallelColumnDataWriter.cpp.
References PetscTools::AmMaster(), PetscTools::Barrier(), and ColumnDataWriter::Close().
Referenced by ~ParallelColumnDataWriter().
bool ParallelColumnDataWriter::mIsParallel [private] |
Set to true in constructor if running in parallel
Definition at line 45 of file ParallelColumnDataWriter.hpp.
Referenced by ParallelColumnDataWriter().
Vec ParallelColumnDataWriter::mConcentrated [private] |
Vector to hold concentrated copy of distributed vector on the master process
Definition at line 46 of file ParallelColumnDataWriter.hpp.
Referenced by PutVector(), and ~ParallelColumnDataWriter().
VecScatter ParallelColumnDataWriter::mToMaster [private] |
variable holding information for concentrating a vector
Definition at line 47 of file ParallelColumnDataWriter.hpp.
Referenced by PutVector(), and ~ParallelColumnDataWriter().
1.5.5