Chaste Release::3.1
|
#include <AbstractPerElementWriter.hpp>
Public Member Functions | |
void | WriteData (OutputFileHandler &rHandler, const std::string &rFileName, AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *pMesh) |
virtual | ~AbstractPerElementWriter () |
Protected Member Functions | |
virtual void | Visit (Element< ELEMENT_DIM, SPACE_DIM > *pElement, c_vector< double, DATA_SIZE > &rData)=0 |
virtual void | WriteElementOnMaster (const c_vector< double, DATA_SIZE > &rData) |
virtual void | WriteHeaderOnMaster () |
Protected Attributes | |
out_stream | mpMasterFile |
Private Attributes | |
AbstractTetrahedralMesh < ELEMENT_DIM, SPACE_DIM > * | mpMesh |
An abstract writer class for writing stuff on a "per element" basis. This class will "visit" all the locally owned elements and concentrate data back to the master.
Definition at line 51 of file AbstractPerElementWriter.hpp.
virtual AbstractPerElementWriter< ELEMENT_DIM, SPACE_DIM, DATA_SIZE >::~AbstractPerElementWriter | ( | ) | [inline, virtual] |
Empty virtual destructor for abstract class
Definition at line 160 of file AbstractPerElementWriter.hpp.
virtual void AbstractPerElementWriter< ELEMENT_DIM, SPACE_DIM, DATA_SIZE >::Visit | ( | Element< ELEMENT_DIM, SPACE_DIM > * | pElement, |
c_vector< double, DATA_SIZE > & | rData | ||
) | [protected, pure virtual] |
How to associate an element with some data Must be over-ridden by the derived class.
pElement | a locally-owned element for which to calculate or lookup some data |
rData | the double-precision data to write to file (output from the method) |
Referenced by AbstractPerElementWriter< ELEMENT_DIM, SPACE_DIM, DATA_SIZE >::WriteData().
void AbstractPerElementWriter< ELEMENT_DIM, SPACE_DIM, DATA_SIZE >::WriteData | ( | OutputFileHandler & | rHandler, |
const std::string & | rFileName, | ||
AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > * | pMesh | ||
) | [inline] |
Writes data about each element in parallel Data about each element is retrieved by the Visit() method. Writing is done by the master process using the WriteElement() method. Any element not owned by the master is communicated by the unique designated owner.
rHandler | specify the directory in which to place the output file |
rFileName | the file name |
pMesh | the mesh, the elements of which are to be iterated over |
Definition at line 104 of file AbstractPerElementWriter.hpp.
References PetscTools::AmMaster(), ChasteBuildInfo::GetProvenanceString(), AbstractPerElementWriter< ELEMENT_DIM, SPACE_DIM, DATA_SIZE >::mpMasterFile, AbstractPerElementWriter< ELEMENT_DIM, SPACE_DIM, DATA_SIZE >::mpMesh, OutputFileHandler::OpenOutputFile(), AbstractPerElementWriter< ELEMENT_DIM, SPACE_DIM, DATA_SIZE >::Visit(), AbstractPerElementWriter< ELEMENT_DIM, SPACE_DIM, DATA_SIZE >::WriteElementOnMaster(), and AbstractPerElementWriter< ELEMENT_DIM, SPACE_DIM, DATA_SIZE >::WriteHeaderOnMaster().
virtual void AbstractPerElementWriter< ELEMENT_DIM, SPACE_DIM, DATA_SIZE >::WriteElementOnMaster | ( | const c_vector< double, DATA_SIZE > & | rData | ) | [inline, protected, virtual] |
How to write an element's worth of data to the file. By default writes tab-separated data to a single line, but can be over-ridden. This is only called by the master process.
rData | the double-precision data to write to file |
Definition at line 73 of file AbstractPerElementWriter.hpp.
Referenced by AbstractPerElementWriter< ELEMENT_DIM, SPACE_DIM, DATA_SIZE >::WriteData().
virtual void AbstractPerElementWriter< ELEMENT_DIM, SPACE_DIM, DATA_SIZE >::WriteHeaderOnMaster | ( | ) | [inline, protected, virtual] |
How to write the header information to the file. By default writes nothing. This is only called by the master process.
Definition at line 88 of file AbstractPerElementWriter.hpp.
Referenced by AbstractPerElementWriter< ELEMENT_DIM, SPACE_DIM, DATA_SIZE >::WriteData().
out_stream AbstractPerElementWriter< ELEMENT_DIM, SPACE_DIM, DATA_SIZE >::mpMasterFile [protected] |
The output file (only valid on master process). Set by the public method WriteData and used by WriteElementOnMaster
Definition at line 56 of file AbstractPerElementWriter.hpp.
Referenced by AbstractPerElementWriter< ELEMENT_DIM, SPACE_DIM, DATA_SIZE >::WriteData().
AbstractTetrahedralMesh<ELEMENT_DIM, SPACE_DIM>* AbstractPerElementWriter< ELEMENT_DIM, SPACE_DIM, DATA_SIZE >::mpMesh [private] |
The mesh. Set by the public method WriteData.
Definition at line 54 of file AbstractPerElementWriter.hpp.
Referenced by AbstractPerElementWriter< ELEMENT_DIM, SPACE_DIM, DATA_SIZE >::WriteData().