ECOGEN 4.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{
39public:
40 MUSGmshV4(const std::string& meshFile, const std::string& meshExtension);
41 virtual ~MUSGmshV4();
42
43 // --- MeshUnStruct virtual member functions ---
44 virtual void initGeometryMonoCPU(TypeMeshContainer<Cell*>& cells, TypeMeshContainer<CellInterface*>& cellInterfaces, std::string computeOrder = "FIRSTORDER");
45 //TODO// Reading partitioned mesh file for parallel computation
47 TypeMeshContainer<Cell*>& /*cellsGhost*/, TypeMeshContainer<CellInterface*>& /*cellInterfaces*/,
48 std::string /*computeOrder*/ = "FIRSTORDER") {
49 Errors::errorMessage("reading partitioned Gmsh v4.x mesh file for parallel computation not avalaible in ECOGEN");
50 };
51 virtual void preProcessMeshFileForParallel() { Errors::errorMessage("reading partitioned Gmsh v4.x mesh file for parallel computation not avalaible in ECOGEN"); };
52 virtual void initCpuMeshSequential(TypeMeshContainer<Cell*>& /*cells*/, std::string& /*computeOrder*/) {
53 Errors::errorMessage("initCpuMeshSequential not available for requested mesh");
54 }
55 virtual void initCpuMeshParallel(TypeMeshContainer<Cell*>& /*cells*/, std::string& /*computeOrder*/, int /*cpu*/) {
56 Errors::errorMessage("initCpuMeshParallel not available for requested mesh");
57 }
58
59private:
60 // --- Member functions ---
61 // --- Gmsh v4 related member functions ---
62 void readMeshMonoCPU();
63 void readElement(const Coord* nodesTable, std::ifstream& meshFile, ElementNS** element, std::vector< std::map<int, int> >& entities, int entityDim, int entityTag, int eltType);
64 void readMeshParallel() { Errors::errorMessage("reading partitioned Gmsh v4.x mesh file for parallel computation not avalaible in ECOGEN"); };
65};
66
67#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:83
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
Definition MUSGmshV4.h:38
void readMeshMonoCPU()
Definition MUSGmshV4.cpp:443
virtual void initCpuMeshParallel(TypeMeshContainer< Cell * > &, std::string &, int)
Initialize mesh of a single partition of a partionned mesh for restart with mesh mapping option.
Definition MUSGmshV4.h:55
virtual void initGeometryMonoCPU(TypeMeshContainer< Cell * > &cells, TypeMeshContainer< CellInterface * > &cellInterfaces, std::string computeOrder="FIRSTORDER")
initialize the geometry for single CPU computation
Definition MUSGmshV4.cpp:46
virtual void initGeometryParallel(TypeMeshContainer< Cell * > &, TypeMeshContainer< Cell * > &, TypeMeshContainer< CellInterface * > &, std::string="FIRSTORDER")
initialize the geometry for multi CPUs computation
Definition MUSGmshV4.h:46
virtual void preProcessMeshFileForParallel()
split original mesh file for computation on several CPUs
Definition MUSGmshV4.h:51
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:608
void readMeshParallel()
Definition MUSGmshV4.h:64
virtual ~MUSGmshV4()
Definition MUSGmshV4.cpp:41
virtual void initCpuMeshSequential(TypeMeshContainer< Cell * > &, std::string &)
Initialize mesh of a single partition for restart with mesh mapping option.
Definition MUSGmshV4.h:52
Definition MUSGmsh.h:39