ECOGEN 6.0
Evolutive, Compressible, Open, Genuine, Easy, N-phase
Loading...
Searching...
No Matches
SourceNumMRF.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 SOURCENUMMRF_H
32#define SOURCENUMMRF_H
33
34#include "SourceNum.h"
35
38class SourceNumMRF : public SourceNum
39{
40 public:
46 SourceNumMRF(tinyxml2::XMLElement* element, int order, int physicalEntity, std::string fileName = "Unknown file");
47 ~SourceNumMRF() override;
48
49 void prepSourceTerms(Cell* cell, const int& i = 0) override;
50 void sourceEvolution(const double& time) override;
51
52 Coord computeAbsVelocity(const Coord& relVelocity, const Coord& position) override;
53
54 Coord getOmega() override { return m_omega; }
55 bool getRiemannCoupling() override { return m_riemannCoupling; }
56
57 private:
59 double m_tf;
60 double m_incr;
62};
63
64#endif //SOURCENUMMRF_H
Base class for a mesh cell.
Definition Cell.h:59
Class for a coordinate system object such as coordinates of the vertex or a vector.
Definition Coord.h:43
double m_incr
Optional final time to increase linearly omega.
Definition SourceNumMRF.h:60
Coord m_omega
Definition SourceNumMRF.h:58
void sourceEvolution(const double &time) override
Allows to modifiy the source term along time.
Definition SourceNumMRF.cpp:82
~SourceNumMRF() override
Definition SourceNumMRF.cpp:74
double m_tf
Angular velocity.
Definition SourceNumMRF.h:59
SourceNumMRF(tinyxml2::XMLElement *element, int order, int physicalEntity, std::string fileName="Unknown file")
SourceNumMRF constructor from a XML format reading.
Definition SourceNumMRF.cpp:37
bool getRiemannCoupling() override
Definition SourceNumMRF.h:55
Coord computeAbsVelocity(const Coord &relVelocity, const Coord &position) override
Compute the absolute velocity in the fixed coordinate system.
Definition SourceNumMRF.cpp:91
Coord getOmega() override
Definition SourceNumMRF.h:54
void prepSourceTerms(Cell *cell, const int &i=0) override
Source terms preparation for integration.
Definition SourceNumMRF.cpp:78
bool m_riemannCoupling
To increment angular velocity from zero to omega.
Definition SourceNumMRF.h:61
SourceNum(int order, int physicalEntity=0)
SourceNum constructor depending on integration order and physical entity to apply source.
Definition SourceNum.cpp:43
Definition tinyxml2.h:1148