ECOGEN 6.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
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*/, Prim /*type*/ = vecPhases)
58 {
59 Errors::errorMessage("integrateSourceTerms not available for required source");
60 };
61
64 virtual void sourceEvolution(const double& /*time*/) {};
65
69 virtual Coord computeAbsVelocity(const Coord& /*relVelocity*/, const Coord& /*position*/)
70 {
71 Errors::errorMessage("computeAbsVelocity not available for required source");
72 return 0.;
73 };
74
75 virtual Coord getOmega()
76 {
77 Errors::errorMessage("getOmega not available for required source");
79 }
80 virtual bool getRiemannCoupling()
81 {
82 Errors::errorMessage("getRiemannCoupling not available for required source");
83 return false;
84 }
85
86 virtual int getPhysicalEntity() { return m_physicalEntity; }
87
88 protected:
90};
91
92#endif // SOURCE_H
Prim
Enumeration for the primitive-variable type (usefull for second order, slopes, etc....
Definition Tools.h:40
@ vecPhases
Definition Tools.h:41
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
virtual Coord getOmega()
Definition Source.h:75
virtual bool getRiemannCoupling()
Definition Source.h:80
Source(int physicalEntity=0)
Source constructor depending on integration order and physical entity to apply source.
Definition Source.cpp:35
virtual Coord computeAbsVelocity(const Coord &, const Coord &)
Compute the absolute velocity in the fixed coordinate system.
Definition Source.h:69
virtual void sourceEvolution(const double &)
Allows to modifiy the source term along time.
Definition Source.h:64
virtual int getPhysicalEntity()
Definition Source.h:86
virtual ~Source()
Definition Source.cpp:39
int m_physicalEntity
Definition Source.h:89
virtual void prepSourceTerms(Cell *, const int &=0)
Source terms preparation for integration.
Definition Source.h:52
virtual void integrateSourceTerms(Cell *, const double &, Prim=vecPhases)
Source terms integration on conservative quantities.
Definition Source.h:57