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