ECOGEN 6.0
Evolutive, Compressible, Open, Genuine, Easy, N-phase
Loading...
Searching...
No Matches
MUSGmshV4.h
Go to the documentation of this file.
1//
2// ,---. ,--, .---. ,--, ,---. .-. .-.
3// | .-' .' .') / .-. ) .' .' | .-' | \| |
4// | `-. | |(_) | | |(_) | | __ | `-. | | |
5// | .-' \ \ | | | | \ \ ( _) | .-' | |\ |
6// | `--. \ `-. \ `-' / \ `-) ) | `--. | | |)|
7// /( __.' \____\ )---' )\____/ /( __.' /( (_)
8// (__) (_) (__) (__) (__)
9// Official webSite: https://code-mphi.github.io/ECOGEN/
10//
11// This file is part of ECOGEN.
12//
13// ECOGEN is the legal property of its developers, whose names
14// are listed in the copyright file included with this source
15// distribution.
16//
17// ECOGEN is free software: you can redistribute it and/or modify
18// it under the terms of the GNU General Public License as published
19// by the Free Software Foundation, either version 3 of the License,
20// or (at your option) any later version.
21//
22// ECOGEN is distributed in the hope that it will be useful,
23// but WITHOUT ANY WARRANTY; without even the implied warranty of
24// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25// GNU General Public License for more details.
26//
27// You should have received a copy of the GNU General Public License
28// along with ECOGEN (file LICENSE).
29// If not, see <http://www.gnu.org/licenses/>.
30
31#ifndef MUSGMSHV4_H
32#define MUSGMSHV4_H
33
34#include "../MUSGmsh.h"
35#include <map>
36
37class MUSGmshV4 : public MUSGmsh
38{
39 public:
40 MUSGmshV4(const std::string& meshFile, const std::string& meshExtension);
41 ~MUSGmshV4() override;
42
43 // --- MeshUnStruct virtual member functions ---
46 SimulationOrder schemeOrder = SimulationOrder::first) override;
47 //TODO// Reading partitioned mesh file for parallel computation
49 TypeMeshContainer<Cell*>& /*cellsGhost*/,
50 TypeMeshContainer<CellInterface*>& /*cellInterfaces*/,
51 SimulationOrder /*schemeOrder*/ = SimulationOrder::first) override
52 {
53 Errors::errorMessage("reading partitioned Gmsh v4.x mesh file for parallel computation not avalaible in ECOGEN");
54 };
56 {
57 Errors::errorMessage("reading partitioned Gmsh v4.x mesh file for parallel computation not avalaible in ECOGEN");
58 };
59 void initCpuMeshSequential(TypeMeshContainer<Cell*>& /*cells*/, SimulationOrder& /*schemeOrder*/) override
60 {
61 Errors::errorMessage("initCpuMeshSequential not available for requested mesh");
62 }
63 void initCpuMeshParallel(TypeMeshContainer<Cell*>& /*cells*/, SimulationOrder& /*schemeOrder*/, int /*cpu*/) override
64 {
65 Errors::errorMessage("initCpuMeshParallel not available for requested mesh");
66 }
67
68 private:
69 // --- Member functions ---
70 // --- Gmsh v4 related member functions ---
71 void readMeshMonoCPU();
72 void readElement(const Coord* nodesTable,
73 std::ifstream& meshFile,
74 ElementNS** element,
75 std::vector<std::map<int, int>>& entities,
76 int entityDim,
77 int entityTag,
78 int eltType);
79 void readMeshParallel() { Errors::errorMessage("reading partitioned Gmsh v4.x mesh file for parallel computation not avalaible in ECOGEN"); };
80};
81
82#endif // MUSGMSHV4_H
std::vector< Type > TypeMeshContainer
Template for the type of the mesh container (std::list for now, but may change to something else if w...
Definition Tools.h:194
SimulationOrder
Enumeration for the scheme order of the simulation.
Definition Tools.h:148
@ first
Definition Tools.h:149
Class for a coordinate system object such as coordinates of the vertex or a vector.
Definition Coord.h:43
Definition ElementNS.h:40
static void errorMessage(const std::string &message_)
Definition Errors.cpp:56
void readMeshMonoCPU()
Definition MUSGmshV4.cpp:400
~MUSGmshV4() override
Definition MUSGmshV4.cpp:40
void preProcessMeshFileForParallel() override
split original mesh file for computation on several CPUs
Definition MUSGmshV4.h:55
void initGeometryMonoCPU(TypeMeshContainer< Cell * > &cells, TypeMeshContainer< CellInterface * > &cellInterfaces, SimulationOrder schemeOrder=SimulationOrder::first) override
initialize the geometry for single CPU computation
Definition MUSGmshV4.cpp:50
void readElement(const Coord *nodesTable, std::ifstream &meshFile, ElementNS **element, std::vector< std::map< int, int > > &entities, int entityDim, int entityTag, int eltType)
Definition MUSGmshV4.cpp:597
MUSGmshV4(const std::string &meshFile, const std::string &meshExtension)
Definition MUSGmshV4.cpp:36
void initGeometryParallel(TypeMeshContainer< Cell * > &, TypeMeshContainer< Cell * > &, TypeMeshContainer< CellInterface * > &, SimulationOrder=SimulationOrder::first) override
initialize the geometry for multi CPUs computation
Definition MUSGmshV4.h:48
void initCpuMeshSequential(TypeMeshContainer< Cell * > &, SimulationOrder &) override
Initialize mesh of a single partition for restart with mesh mapping option.
Definition MUSGmshV4.h:59
void readMeshParallel()
Definition MUSGmshV4.h:79
void initCpuMeshParallel(TypeMeshContainer< Cell * > &, SimulationOrder &, int) override
Initialize mesh of a single partition of a partionned mesh for restart with mesh mapping option.
Definition MUSGmshV4.h:63
MUSGmsh(const std::string &meshFile, const std::string &meshExtension)
Definition MUSGmsh.cpp:35