ECOGEN 4.0
Evolutive, Compressible, Open, Genuine, Easy, N-phase
Loading...
Searching...
No Matches
Source.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 SOURCE_H
32#define SOURCE_H
33
34#include "../libTierces/tinyxml2.h"
35#include "../Errors.h"
36#include "../Tools.h"
37#include "../Order1/Cell.h"
38#include "../Models/Flux.h"
39
42class Source
43{
44 public:
47 Source(int physicalEntity = 0);
48 virtual ~Source();
49
52 virtual void prepSourceTerms(Cell* /*cell*/, const int& /*i*/ = 0) { Errors::errorMessage("prepSourceTerms not available for required source"); };
53
57 virtual void integrateSourceTerms(Cell* /*cell*/, const double& /*dt*/) { Errors::errorMessage("integrateSourceTerms not available for required source"); };
58
61 virtual void sourceEvolution(const double& /*time*/) {};
62
66 virtual Coord computeAbsVelocity(const Coord& /*relVelocity*/, const Coord& /*position*/) { Errors::errorMessage("computeAbsVelocity not available for required source"); return 0.; };
67
68 virtual Coord getOmega() { Errors::errorMessage("getOmega not available for required source"); return Coord::defaultCoord; }
69 virtual bool getRiemannCoupling() { Errors::errorMessage("getRiemannCoupling not available for required source"); return false;}
70
71 virtual int getPhysicalEntity() { return m_physicalEntity; }
72
73 protected:
75};
76
77#endif // SOURCE_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
static const Coord defaultCoord
Default Coord object (const version)
Definition Coord.h:55
static void errorMessage(const std::string &message)
Definition Errors.cpp:56
Abstract class for source terms.
Definition Source.h:43
virtual Coord getOmega()
Definition Source.h:68
virtual bool getRiemannCoupling()
Definition Source.h:69
virtual void integrateSourceTerms(Cell *, const double &)
Source terms integration on conservative quantities.
Definition Source.h:57
virtual Coord computeAbsVelocity(const Coord &, const Coord &)
Compute the absolute velocity in the fixed coordinate system.
Definition Source.h:66
virtual void sourceEvolution(const double &)
Allows to modifiy the source term along time.
Definition Source.h:61
virtual int getPhysicalEntity()
Definition Source.h:71
virtual ~Source()
Definition Source.cpp:40
int m_physicalEntity
Definition Source.h:74
virtual void prepSourceTerms(Cell *, const int &=0)
Source terms preparation for integration.
Definition Source.h:52