MAIA bb96820c
Multiphysics at AIA
Loading...
Searching...
No Matches
geometryiotoml.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 GEOMETRYIOTOML_H_
8#define GEOMETRYIOTOML_H_
9
10#include <memory>
11#include <vector>
12#include "COMM/mpioverride.h"
13#include "geometryiobase.h"
14
15
16// Forward declaration to avoid header include
17namespace maia {
18namespace io {
19namespace toml {
20class Property;
21}
22} // namespace io
23} // namespace maia
24
26 public:
27 GeometryIOToml(const MPI_Comm comm) : GeometryIOBase(comm), m_mpiComm(comm) {}
29 void readPropertyFileOldIOMethod(const std::vector<maia::io::toml::Property>& properties);
30 void readPropertyFileNewIOMethod(const std::vector<maia::io::toml::Property>& properties);
31
33 MPI_Comm mpiComm() const { return m_mpiComm; }
34 MString rawText() const { return m_rawText; }
35
36 private:
40 std::pair<geometryPropertyIterator, geometryPropertyIterator> m_pair;
45
46 const MPI_Comm m_mpiComm = MPI_COMM_NULL;
47 void readBodiesOldIOMethod(const std::vector<maia::io::toml::Property>& properties);
48 void readBodiesNewIOMethod(const std::vector<maia::io::toml::Property>& properties);
49
50 void buildDefaultBody();
54};
55
56#endif // #ifndef GEOMETRYIOTOML_H_
void readPropertyFileOldIOMethod(const std::vector< maia::io::toml::Property > &properties)
reads in the geomertry property file the old way
void readBodiesOldIOMethod(const std::vector< maia::io::toml::Property > &properties)
bodyMap * m_bodyMap
GeometryIOToml(const MPI_Comm comm)
void readBodiesNewIOMethod(const std::vector< maia::io::toml::Property > &properties)
geometryPropertyMap * m_geometryPropertyMap
void readPropertyFileNewIOMethod(const std::vector< maia::io::toml::Property > &properties)
reads in the geomertry property file the old way
std::pair< geometryPropertyIterator, geometryPropertyIterator > m_pair
geometryAssembly * readPropertyFile(MString fileName)
check if the geometry property file is of new or old type and calls the according function
MString rawText() const
MPI_Comm mpiComm() const
const MPI_Comm m_mpiComm
MBool checkGeometryPropertyConsistency()
geometryAssembly * m_geometryAssembly
void makeProperty(GeometryProperty *, const maia::io::toml::Property &prop)
MBool checkBodyConsistency()
Class that represents a single key-value pair for TOML properties.
Definition: tomlutils.h:69
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
Namespace for auxiliary functions/classes.