VM2D 1.14
Vortex methods for 2D flows simulation
Loading...
Searching...
No Matches
WorldGen.h
Go to the documentation of this file.
1/*--------------------------------*- VM2D -*-----------------*---------------*\
2| ## ## ## ## #### ##### | | Version 1.14 |
3| ## ## ### ### ## ## ## ## | VM2D: Vortex Method | 2026/03/06 |
4| ## ## ## # ## ## ## ## | for 2D Flow Simulation *----------------*
5| #### ## ## ## ## ## | Open Source Code |
6| ## ## ## ###### ##### | https://www.github.com/vortexmethods/VM2D |
7| |
8| Copyright (C) 2017-2026 I. Marchevsky, K. Sokol, E. Ryatina, A. Kolganova |
9*-----------------------------------------------------------------------------*
10| File name: WorldGen.h |
11| Info: Source code of VM2D |
12| |
13| This file is part of VM2D. |
14| VM2D is free software: you can redistribute it and/or modify it |
15| under the terms of the GNU General Public License as published by |
16| the Free Software Foundation, either version 3 of the License, or |
17| (at your option) any later version. |
18| |
19| VM2D is distributed in the hope that it will be useful, but WITHOUT |
20| ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
21| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
22| for more details. |
23| |
24| You should have received a copy of the GNU General Public License |
25| along with VM2D. If not, see <http://www.gnu.org/licenses/>. |
26\*---------------------------------------------------------------------------*/
27
28
40#ifndef WORLDGEN_H
41#define WORLDGEN_H
42
43#include "TimesGen.h"
44
45namespace VMlib
46{
47 class PassportGen;
48 class TimesGen;
49
57 {
58 protected:
60 mutable LogStream info;
61
64
66 std::unique_ptr<TimersGen> timers;
67
70
73
74 public:
75
77
82 VMlib::LogStream& getInfo() const { return info; };
83
89 std::ostream& getInfo(char x) const { return info(x); };
90
95
99 size_t getCurrentStep() const { return currentStep; };
100 double getCurrentTime() const { return currentTime; };
101
102 const PassportGen& getPassportGen() const { return passportGen; };
103
107 bool isFinished() const;
108
112 WorldGen(const VMlib::PassportGen& passport_);
113
115 virtual ~WorldGen() {};
116
118 //virtual void ZeroStep() = 0;
119
121 virtual void Step() = 0;
122 };
123
124}//namespace VMlib
125
126#endif
127
Заголовочный файл с описанием класса TimesGen.
Класс, определяющий работу с потоком логов
Definition LogStream.h:57
Абстрактный класс, опеделяющий паспорт задачи
Definition PassportGen.h:96
Класс, опеделяющий текущую решаемую задачу
Definition WorldGen.h:57
bool isFinished() const
Функция, возвращающая признак завершения счета в решаемой задаче
Definition WorldGen.cpp:52
std::ostream & getInfo(char x) const
Возврат ссылки на поток вывода информации Необходимо для вывода телеметрической информации,...
Definition WorldGen.h:89
virtual ~WorldGen()
Деструктор
Definition WorldGen.h:115
const PassportGen & getPassportGen() const
Definition WorldGen.h:102
std::unique_ptr< TimersGen > timers
Сведения о временах выполнения основных операций
Definition WorldGen.h:66
double currentTime
Текущее время в решаемой задаче
Definition WorldGen.h:72
VMlib::LogStream & getInfo() const
Возврат ссылки на объект LogStream Используется в техничеcких целях для организации вывода
Definition WorldGen.h:82
double getCurrentTime() const
Definition WorldGen.h:100
virtual void Step()=0
Функция выполнения предварительного шага
size_t nVtxBeforeMerging
Definition WorldGen.h:76
size_t currentStep
Текущий номер шага в решаемой задаче
Definition WorldGen.h:69
size_t getCurrentStep() const
Возврат константной ссылки на параметры распараллеливания по MPI.
Definition WorldGen.h:99
const PassportGen & passportGen
Константная ссылка на паспорт конкретного расчета
Definition WorldGen.h:63
LogStream info
Поток для вывода логов и сообщений об ошибках
Definition WorldGen.h:60