36#ifndef IMMERSEDBOUNDARYMESHWRITER_HPP_
37#define IMMERSEDBOUNDARYMESHWRITER_HPP_
40template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
45#define _BACKWARD_BACKWARD_WARNING_H 1
46#include <vtkDoubleArray.h>
47#include <vtkCellData.h>
48#include <vtkPointData.h>
49#include <vtkConvexPointSet.h>
50#include <vtkPolygon.h>
51#include <vtkUnstructuredGrid.h>
52#include <vtkUnstructuredGridWriter.h>
53#include <vtkXMLUnstructuredGridWriter.h>
54#include <vtkDataCompressor.h>
57#include "AbstractMeshWriter.hpp"
58#include "ImmersedBoundaryMesh.hpp"
60#include <boost/geometry.hpp>
61#include <boost/geometry/geometries/segment.hpp>
62#include <boost/geometry/geometries/point.hpp>
66template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
69template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
75template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
96 using geom_point = boost::geometry::model::point<double, 2, boost::geometry::cs::cartesian>;
115 const c_vector<double, SPACE_DIM>& rEnd);
123 c_vector<double, SPACE_DIM>
GetNearestCorner(
const c_vector<double, SPACE_DIM>& rA,
124 const c_vector<double, SPACE_DIM>& rB)
const;
142 const std::string& rBaseName,
143 bool clearOutputDir=
true);
179 void AddCellData(std::string dataName, std::vector<double> dataPayload);
187 void AddPointData(std::string dataName, std::vector<double> dataPayload);
vtkUnstructuredGrid * mpVtkUnstructedMesh
boost::geometry::model::point< double, 2, boost::geometry::cs::cartesian > geom_point
void FindElementOverlaps(ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM > &rMesh)
ImmersedBoundaryElementData GetNextImmersedBoundaryElement()
c_vector< double, SPACE_DIM > GetNearestCorner(const c_vector< double, SPACE_DIM > &rA, const c_vector< double, SPACE_DIM > &rB) const
ImmersedBoundaryElementData GetNextImmersedBoundaryLamina()
const std::vector< std::vector< unsigned > > & rGetElementParts() const
void WriteVtkUsingMesh(ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM > &rMesh, std::string stamp="")
void AddPointData(std::string dataName, std::vector< double > dataPayload)
void MakeVtkMesh(ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM > &rMesh)
std::array< geom_segment, 4 > mBoundaryEdges
std::vector< std::vector< unsigned > > mElementParts
void WriteFilesUsingMesh(ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM > &rMesh)
boost::geometry::model::segment< geom_point > geom_segment
std::vector< double > GetNextNode()
c_vector< double, SPACE_DIM > GetIntersectionOfEdgeWithBoundary(const c_vector< double, SPACE_DIM > &rStart, const c_vector< double, SPACE_DIM > &rEnd)
void AddCellData(std::string dataName, std::vector< double > dataPayload)
ImmersedBoundaryMesh< ELEMENT_DIM, SPACE_DIM > * mpMesh
~ImmersedBoundaryMeshWriter()
MeshWriterIterators< ELEMENT_DIM, SPACE_DIM > * mpIters