Peano
Loading...
Searching...
No Matches
Zugspitze_noTopo.h
Go to the documentation of this file.
1#ifndef EXASEIS_SCENARIOZUGSPITZE_NO_TOPO_HEADER
2#define EXASEIS_SCENARIOZUGSPITZE_NO_TOPO_HEADER
3
4#include "Scenario.h"
5
6template <class Shortcuts,int basisSize>
7class Zugspitze_noTopo : public Scenario<Shortcuts,basisSize>{
8 private:
10
11 public:
13 //place point source in center of domain
14 double center[3];
15 info->getCenter(center);
16 m_pointSourceLocation[0] = 4424.756;
17 m_pointSourceLocation[1] = 10.000;
18 m_pointSourceLocation[2] = 2675.783;
19 };
20
21 void initUnknownsPointwise(const double* const x,
23 const double t,
24 const double dt,
25 double* Q
26 ) override{
27 Shortcuts s;
28 double rho = 2.7;
29 double cp = 6.0;
30 double cs = 3.464;
31
32
33#ifdef ISOTROPIC
34 Q[s.rho] = rho;
35 Q[s.cp ] = cp;
36 Q[s.cs ] = cs;
37
38#elif defined ANISOTROPIC
39 double mue = Q[s.rho] *cs*cs;
40 double lambda = Q[s.rho]*(cp*cp -2*cs*cs);
41
42 Q[s.c + 0] = 2*mue+lambda; //c11
43 Q[s.c + 1] = 2*mue+lambda; //c22
44 Q[s.c + 2] = 2*mue+lambda; //c33
45
46 Q[s.c + 3] = lambda; //c44
47 Q[s.c + 4] = lambda; //c55
48 Q[s.c + 5] = lambda; //c66
49
50 Q[s.c + 6] = mue; //c12
51 Q[s.c + 7] = mue; //c13
52 Q[s.c + 8] = mue; //c23
53#else
54#error Whole space problem only defined for Isotropic and Anisotropic Scenario
55#endif
56
57 }
58
59 void initPointSourceLocation(double pointSourceLocation[][3]) override{
60 pointSourceLocation[0][0]=m_pointSourceLocation[0];
61 pointSourceLocation[0][1]=m_pointSourceLocation[1];
62 pointSourceLocation[0][2]=m_pointSourceLocation[2];
63 }
64
65 void setPointSourceVector(const double* const Q,
66 const double* const x,const double t,const double dt,
67 double* forceVector, int n) override{
68
69 assertion2(n == 0, "Only a single pointSource for Zugspitze_noTopo",n);
70
71 constexpr double pi = 3.14159265359;
72 constexpr double sigma = 0.1149;
73 constexpr double t0 = 0.1;
74 constexpr double M0 = 1000.0;
75
76 double f = M0*t/(t0*t0)*std::exp(-t/t0);
77
78 Shortcuts s;
79 forceVector[s.sigma + 4] = f;
80 }
81
82 void refinementCriteria(std::vector<Refinement::RefinementCriterion<Shortcuts>*>& criteria) override{
83
84 criteria.push_back(new Refinement::StaticAMR<Shortcuts>);
85 double position_lower[3] = {4305.0 ,-5.0 , 2650.0};
86 double position_upper[3] = {4445.0 , 0.0 , 2750.0};
87
88 criteria.push_back(
90 position_lower,
91 position_upper)
92 );
93
94 }
95};
96#endif
97
#define assertion2(expr, param0, param1)
void getCenter(double *center)
DomainInformation * info
Definition Scenario.h:35
void initUnknownsPointwise(const double *const x, const tarch::la::Vector< Dimensions, double > &center, const double t, const double dt, double *Q) override
void setPointSourceVector(const double *const Q, const double *const x, const double t, const double dt, double *forceVector, int n) override
void refinementCriteria(std::vector< Refinement::RefinementCriterion< Shortcuts > * > &criteria) override
Zugspitze_noTopo(DomainInformation *info)
void initPointSourceLocation(double pointSourceLocation[][3]) override
double m_pointSourceLocation[3]
Simple vector class.
Definition Vector.h:159