Peano
Loading...
Searching...
No Matches
DomainInformation.h
Go to the documentation of this file.
1
#ifndef EXASEIS_DOMAIN_INFORMATION_HEADER
2
#define EXASEIS_DOMAIN_INFORMATION_HEADER
3
4
#include <algorithm>
5
// #include "exahype/solvers/Solver.h"
6
// #include "exahype2/aderdg/solvers/Solver.h"
7
8
class
DomainInformation
{
9
public
:
10
DomainInformation
(
11
int
coarsestMeshLevel,
12
double
coarsestMeshSize,
13
double
maxAdaptiveDepth
,
14
tarch::la::Vector<Dimensions,double>
_domainOffset,
15
tarch::la::Vector<Dimensions,double>
_domainSize):
16
17
dx
(coarsestMeshSize),
18
meshLevel
(coarsestMeshLevel),
19
maxAdaptiveDepth
(
maxAdaptiveDepth
){
20
21
domainOffset
[0] = _domainOffset[0];
22
domainOffset
[1] = _domainOffset[1];
23
domainOffset
[2] = _domainOffset[2];
24
25
domainSize
[0] = _domainSize[0];
26
domainSize
[1] = _domainSize[1];
27
domainSize
[2] = _domainSize[2];
28
29
max_dx
=
dx
* std::pow(1 / 3.0,
maxAdaptiveDepth
);
30
31
elements
[0] = std::round(
domainSize
[0] /
dx
);
32
elements
[1] = std::round(
domainSize
[1] /
dx
);
33
elements
[2] = std::round(
domainSize
[2] /
dx
);
34
35
max_elements
[0] = std::round(
domainSize
[0] /
max_dx
);
36
max_elements
[1] = std::round(
domainSize
[1] /
max_dx
);
37
max_elements
[2] = std::round(
domainSize
[2] /
max_dx
);
38
39
assertion1
(std::isfinite(
meshLevel
),
"Coarsest mesh level not finite"
);
40
assertion1
(
41
std::isfinite(
domainOffset
[0]) && std::isfinite(
domainOffset
[1]) && std::isfinite(
domainOffset
[2]),
42
"Domain Offset not finite"
43
);
44
45
assertion1
(
46
std::isfinite(
domainSize
[0]) && std::isfinite(
domainSize
[1]) && std::isfinite(
domainSize
[2]),
47
"Domain Size not finite"
48
);
49
}
50
51
void
getCenter
(
double
* center) {
52
center[0] =
domainOffset
[0] +
domainSize
[0] * 0.5;
53
center[1] =
domainOffset
[1] +
domainSize
[1] * 0.5;
54
center[2] =
domainOffset
[2] +
domainSize
[2] * 0.5;
55
}
56
57
double
getDx
() {
return
dx
; }
58
59
const
int
meshLevel
;
60
const
int
maxAdaptiveDepth
;
61
const
double
dx
;
62
double
domainOffset
[3];
63
double
domainSize
[3];
64
double
elements
[3];
65
66
double
max_dx
;
67
double
max_elements
[3];
68
};
69
#endif
assertion1
#define assertion1(expr, param)
Definition
Assertions.h:1018
DomainInformation
Definition
DomainInformation.h:8
DomainInformation::maxAdaptiveDepth
const int maxAdaptiveDepth
Definition
DomainInformation.h:60
DomainInformation::elements
double elements[3]
Definition
DomainInformation.h:64
DomainInformation::getDx
double getDx()
Definition
DomainInformation.h:57
DomainInformation::dx
const double dx
Definition
DomainInformation.h:61
DomainInformation::max_dx
double max_dx
Definition
DomainInformation.h:66
DomainInformation::DomainInformation
DomainInformation(int coarsestMeshLevel, double coarsestMeshSize, double maxAdaptiveDepth, tarch::la::Vector< Dimensions, double > _domainOffset, tarch::la::Vector< Dimensions, double > _domainSize)
Definition
DomainInformation.h:10
DomainInformation::domainOffset
double domainOffset[3]
Definition
DomainInformation.h:62
DomainInformation::max_elements
double max_elements[3]
Definition
DomainInformation.h:67
DomainInformation::domainSize
double domainSize[3]
Definition
DomainInformation.h:63
DomainInformation::getCenter
void getCenter(double *center)
Definition
DomainInformation.h:51
DomainInformation::meshLevel
const int meshLevel
Definition
DomainInformation.h:59
tarch::la::Vector
Simple vector class.
Definition
Vector.h:159
applications
exahype2
exaseis
ExaSeis_core
Context
DomainInformation.h
Generated on Tue Nov 3 2026 16:05:41 for Peano by
1.9.8