37#ifndef _ABSTRACTTETRAHEDRALMESHWRITER_HPP_
38#define _ABSTRACTTETRAHEDRALMESHWRITER_HPP_
41template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
44template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
47template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
50template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
55#include <boost/scoped_array.hpp>
57#include "AbstractMeshWriter.hpp"
58#include "AbstractMesh.hpp"
61#include "GenericEventHandler.hpp"
87template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
99 void PostElement(
unsigned globalIndex,
unsigned indices[],
unsigned numIndices,
unsigned tag,
double attribute)
102 MPI_Ssend(indices, numIndices, MPI_UNSIGNED, 0,
108 MPI_Ssend(&attribute, 1, MPI_DOUBLE, 0,
122 assert( numIndices == rElementData.
NodeIndices.size());
123 boost::scoped_array<unsigned> raw_indices(
new unsigned[numIndices]);
127 MPI_Recv(raw_indices.get(), numIndices, MPI_UNSIGNED, MPI_ANY_SOURCE,
129 PETSC_COMM_WORLD, &status);
132 for (
unsigned j=0; j< rElementData.
NodeIndices.size(); j++)
140 MPI_Recv(&attribute, 1U, MPI_DOUBLE, MPI_ANY_SOURCE,
142 PETSC_COMM_WORLD, &status);
165 bool invertMeshPermutation=
false);
212 const std::string& rBaseName,
213 const bool clearOutputDir=
true);
230 bool keepOriginalElementIndexing=
true);
std::vector< double > GetNextNode()
unsigned mNodesPerBoundaryElement
virtual void CreateFilesWithHeaders()
unsigned mNodesPerElement
void WriteNclFile(AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > &rMesh, bool invertMeshPermutation=false)
unsigned mCableElementCounterForParallelMesh
virtual void WriteFilesFooter()
virtual ~AbstractTetrahedralMeshWriter()
void PostElement(unsigned globalIndex, unsigned indices[], unsigned numIndices, unsigned tag, double attribute)
unsigned mElementCounterForParallelMesh
ElementData GetNextElement()
ElementData GetNextBoundaryElement()
void UnpackElement(ElementData &rElementData, unsigned globalIndex, unsigned numIndices, unsigned tag)
virtual void AppendLocalDataToFiles()
unsigned mBoundaryElementCounterForParallelMesh
MixedDimensionMesh< ELEMENT_DIM, SPACE_DIM > * mpMixedMesh
ElementData GetNextCableElement()
MeshWriterIterators< ELEMENT_DIM, SPACE_DIM > * mpIters
virtual void WriteFilesUsingMesh(AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > &rMesh, bool keepOriginalElementIndexing=true)
void WriteFilesUsingMeshReaderAndMesh(AbstractMeshReader< ELEMENT_DIM, SPACE_DIM > &rMeshReader, AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > &rMesh)
AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > * mpMesh
virtual void WriteFilesUsingParallelMesh(bool keepOriginalElementIndexing=true)
unsigned mNodeCounterForParallelMesh
DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > * mpDistributedMesh
static void BeginEvent(unsigned event)
static void EndEvent(unsigned event)
static const char * EventName[11]
std::vector< unsigned > NodeIndices