28#include <unordered_map>
29#include <unordered_set>
35#include "bitpit_private_lapacke.hpp"
36#include "bitpit_voloctree.hpp"
38#include "pod_kernel.hpp"
66 m_communicator = MPI_COMM_NULL;
73 initializeCommunicator(comm);
74 MPI_Comm_size(m_communicator, &m_nProcs);
75 MPI_Comm_rank(m_communicator, &m_rank);
100# if BITPIT_ENABLE_MPI
133 std::string filename = std::string(snap.
directory) +
"/" + std::string(snap.
name) +
".mesh";
136 std::unique_ptr<VolumeKernel> mesh = createMesh();
140 binaryReader.close();
164 long id = cell.getId();
197 throw std::runtime_error (
"PODKernel: no pod mesh set in compute Mapper");
200 throw std::runtime_error (
"PODKernel: no valid input mesh in compute Mapper");
204 m_meshmap = _computeMapper(mesh, fillInv);
228 m_meshmap->adaptionAlter(info,
false, fillInv);
289 throw std::runtime_error (
"PODKernel communicator can be set just once");
292 if (communicator == MPI_COMM_NULL)
293 throw std::runtime_error (
"PODKernel communicator is not valid");
333 MPI_Finalized(&finalizedCalled);
The Cell class defines the cells.
std::istream & getStream()
std::unique_ptr< VolumeKernel > readMesh(const pod::SnapshotFile &snap)
std::unique_ptr< VolumeMapper > m_meshmap
void computeMapper(const VolumeKernel *mesh, bool fillInv=true)
VolumeMapper * getMapper()
PODKernel(MPI_Comm comm=MPI_COMM_WORLD)
void adaptionPrepare(const std::vector< adaption::Info > &info)
void adaptionAlter(const std::vector< adaption::Info > &info, bool fillInv=true)
void adaptionCleanUp(const std::vector< adaption::Info > &info)
void setMesh(std::unique_ptr< VolumeKernel > &&mesh)
double getCellVolume(long id)
void restoreMesh(const pod::SnapshotFile &snap)
bool isCommunicatorSet() const
double getRawCellVolume(long rawIndex)
std::unique_ptr< VolumeKernel > m_meshPOD
PiercedStorage< double > m_cellsVolume
void setMapperDirty(bool dirty=true)
MPI_Comm getCommunicator() const
void initializeCommunicator(MPI_Comm communicator)
void setStaticKernel(const PiercedKernel< id_t > *kernel)
void unsetKernel(bool release=true)
__PS_REFERENCE__ rawAt(std::size_t pos, std::size_t offset=0)
The VolumeKernel class provides an interface for defining volume patches.
The VolumeMapper is the class to map two meshes.
#define BITPIT_UNUSED(variable)
The SnapFile structure is used to store the file names inside POD classes.