Loading [MathJax]/extensions/tex2jax.js
MAIA bb96820c
Multiphysics at AIA
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
geometryionetcdf.h
Go to the documentation of this file.
1// Copyright (C) 2024 The m-AIA AUTHORS
2//
3// This file is part of m-AIA (https://git.rwth-aachen.de/aia/m-AIA/m-AIA)
4//
5// SPDX-License-Identifier: LGPL-3.0-only
6
7#ifndef GEOMETRYIONETCDF_H
8#define GEOMETRYIONETCDF_H
9
10#include "COMM/mpioverride.h"
11#include "geometryiobase.h"
12#if defined(MAIA_WINDOWS)
13#define NC_MAX_NAME 256
14#else
15#include "IO/maiapnetcdf.h"
16#endif
17
18#ifndef MAIA_MS_COMPILER
19class PARALLELIO_DEFAULT_BACKEND;
20#else
21class ParallelIoHdf5;
22#endif
23
25#ifdef MAIA_MS_COMPILER
27#else
28 using ParallelIo = PARALLELIO_DEFAULT_BACKEND;
29#endif
30 public:
31 GeometryIONetcdf(const MPI_Comm comm) : GeometryIOBase(comm), m_mpiComm(comm) {}
35
37 MPI_Comm mpiComm() const { return m_mpiComm; }
38
39 private:
43 std::pair<geometryPropertyIterator, geometryPropertyIterator> m_pair;
47
48 const MPI_Comm m_mpiComm = MPI_COMM_NULL;
51
52 void buildDefaultBody();
54 void writeProperties(const MChar* fileName, geometryPropertyMap* pMap);
57
62};
63
64#endif
void distributeBodyProperties()
distributes the body information under all processes
std::pair< geometryPropertyIterator, geometryPropertyIterator > m_pair
GeometryIONetcdf(const MPI_Comm comm)
MPI_Comm mpiComm() const
void receiveBodyProperties()
receives the body information from rank 0
void readBodiesNewIOMethod(ParallelIo *)
geometryAssembly * m_geometryAssembly
void readPropertyFileNewIOMethod(ParallelIo *parallelIo)
reads in the geomertry property file the old way
MBool checkGeometryPropertyConsistency()
void receiveGeometryProperties()
receives the geometry properties from rank 0
geometryPropertyMap * m_geometryPropertyMap
void writeProperties(const MChar *fileName, geometryPropertyMap *pMap)
Write the properties into a netcdf file.
void readBodiesOldIOMethod(ParallelIo *)
geometryAssembly * readPropertyFile(MString fileName)
check if the geometry property file is of new or old type and calls the according function
const MPI_Comm m_mpiComm
void readPropertyFileOldIOMethod(ParallelIo *parallelIo)
reads in the geomertry property file the old way
void distributeGeometryProperties()
distributes the read geometry properties under all processes
void makeProperty(GeometryProperty *, MString, ParallelIo *)
std::multimap< MString, GeometryProperty * > geometryPropertyMap
std::map< MString, Body * > bodyMap
int32_t MInt
Definition: maiatypes.h:62
std::basic_string< char > MString
Definition: maiatypes.h:55
bool MBool
Definition: maiatypes.h:58
char MChar
Definition: maiatypes.h:56
PARALLELIO_DEFAULT_BACKEND ParallelIo
Definition: parallelio.h:292