ECOGEN 6.0
Evolutive, Compressible, Open, Genuine, Easy, N-phase
Loading...
Searching...
No Matches
MUSGmshV2.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 MUSGMSHV2_H
32#define MUSGMSHV2_H
33
34#include "../MUSGmsh.h"
35
36class MUSGmshV2 : public MUSGmsh
37{
38 public:
39 MUSGmshV2(const std::string& meshFile, const std::string& meshExtension, bool switchTags = false);
40 ~MUSGmshV2() override;
41
42 // --- MeshUnStruct virtual member functions ---
45 SimulationOrder schemeOrder = SimulationOrder::first) override;
47 TypeMeshContainer<Cell*>& cellsGhost,
49 SimulationOrder schemeOrder = SimulationOrder::first) override;
50 void preProcessMeshFileForParallel() override;
51 void initCpuMeshSequential(TypeMeshContainer<Cell*>& cells, SimulationOrder& schemeOrder) override;
52 void initCpuMeshParallel(TypeMeshContainer<Cell*>& cells, SimulationOrder& schemeOrder, int cpu) override;
53
54 private:
55 // --- Gmsh v2 related member functions ---
56 void readMeshMonoCPU(std::vector<ElementNS*>** neighborNodes);
57 void readElement(const Coord* nodesTable, std::ifstream& meshFile, ElementNS** element);
58 void readMeshParallel();
59
61};
62
63#endif // MUSGMSHV2_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
void initCpuMeshParallel(TypeMeshContainer< Cell * > &cells, SimulationOrder &schemeOrder, int cpu) override
Initialize mesh of a single partition of a partionned mesh for restart with mesh mapping option.
Definition MUSGmshV2.cpp:408
void readMeshParallel()
Definition MUSGmshV2.cpp:853
void preProcessMeshFileForParallel() override
split original mesh file for computation on several CPUs
Definition MUSGmshV2.cpp:970
bool m_switchTags
Definition MUSGmshV2.h:60
void initCpuMeshSequential(TypeMeshContainer< Cell * > &cells, SimulationOrder &schemeOrder) override
Initialize mesh of a single partition for restart with mesh mapping option.
Definition MUSGmshV2.cpp:296
void initGeometryMonoCPU(TypeMeshContainer< Cell * > &cells, TypeMeshContainer< CellInterface * > &cellInterfaces, SimulationOrder schemeOrder=SimulationOrder::first) override
initialize the geometry for single CPU computation
Definition MUSGmshV2.cpp:52
~MUSGmshV2() override
Definition MUSGmshV2.cpp:41
void readMeshMonoCPU(std::vector< ElementNS * > **neighborNodes)
Definition MUSGmshV2.cpp:197
void initGeometryParallel(TypeMeshContainer< Cell * > &cells, TypeMeshContainer< Cell * > &cellsGhost, TypeMeshContainer< CellInterface * > &cellInterfaces, SimulationOrder schemeOrder=SimulationOrder::first) override
initialize the geometry for multi CPUs computation
Definition MUSGmshV2.cpp:529
MUSGmshV2(const std::string &meshFile, const std::string &meshExtension, bool switchTags=false)
Definition MUSGmshV2.cpp:35
void readElement(const Coord *nodesTable, std::ifstream &meshFile, ElementNS **element)
Definition MUSGmshV2.cpp:1299
MUSGmsh(const std::string &meshFile, const std::string &meshExtension)
Definition MUSGmsh.cpp:35