37 #ifndef _ABSTRACTTETRAHEDRALMESHWRITER_HPP_ 38 #define _ABSTRACTTETRAHEDRALMESHWRITER_HPP_ 41 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
44 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
47 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
50 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
55 #include <boost/scoped_array.hpp> 57 #include "AbstractMeshWriter.hpp" 58 #include "AbstractMesh.hpp" 59 #include "NodeMap.hpp" 61 #include "GenericEventHandler.hpp" 87 template<
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);
155 virtual void WriteFilesUsingParallelMesh(
bool keepOriginalElementIndexing=
true);
165 bool invertMeshPermutation=
false);
170 virtual void CreateFilesWithHeaders();
175 virtual void AppendLocalDataToFiles();
180 virtual void WriteFilesFooter();
212 const std::string& rBaseName,
213 const bool clearOutputDir=
true);
230 bool keepOriginalElementIndexing=
true);
247 std::vector<double> GetNextNode();
266 #endif //_ABSTRACTTETRAHEDRALMESHWRITER_HPP_
void UnpackElement(ElementData &rElementData, unsigned globalIndex, unsigned numIndices, unsigned tag)
AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > * mpMesh
static void BeginEvent(unsigned event)
unsigned mNodesPerBoundaryElement
MeshWriterIterators< ELEMENT_DIM, SPACE_DIM > * mpIters
std::vector< unsigned > NodeIndices
static const char * EventName[11]
DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > * mpDistributedMesh
void PostElement(unsigned globalIndex, unsigned indices[], unsigned numIndices, unsigned tag, double attribute)
unsigned mElementCounterForParallelMesh
MixedDimensionMesh< ELEMENT_DIM, SPACE_DIM > * mpMixedMesh
unsigned mNodesPerElement
unsigned mNodeCounterForParallelMesh
static void EndEvent(unsigned event)
unsigned mBoundaryElementCounterForParallelMesh
unsigned mCableElementCounterForParallelMesh