Peano
Loading...
Searching...
No Matches
Apatite.h
Go to the documentation of this file.
1#ifndef EXASEIS_SCENARIO_APATITE_HEADER
2#define EXASEIS_SCENARIO_APATITE_HEADER
3
4#include "Scenario.h"
5#include "../Context/DomainInformation.h"
6
7/*From Elastic Surface waves in crystals Komatitsch Part 2*/
8
9template <class VariableShortcuts,int basisSize>
10class Apatite : public Scenario<VariableShortcuts,basisSize>{
11 private:
13
14 public:
16 //place point source in center of topography right below the surface
20 };
21
22 void initUnknownsPointwise(const double* const x,
24 const double t,
25 const double dt,
26 double* Q
27 ) override{
29
30#ifdef ISOTROPIC
31 assertion1(false,"Apatite not implemented in the Isotropic case" );
32#elif defined ANISOTROPIC
33
34 Q[s.rho] = 3.19;
35
36 Q[s.c + 0] = 167.0; //c11
37 Q[s.c + 1] = 167.0; //c22
38 Q[s.c + 2] = 140.0; //c33
39
40 Q[s.c + 3] = 66.0; //c44
41 Q[s.c + 4] = 66.0; //c55
42 Q[s.c + 5] = (167-13.1)/2.0; //c66
43
44 Q[s.c + 6] = 13.1; //c12
45 Q[s.c + 7] = 66.0; //c13
46 Q[s.c + 8] = 66.0; //c23
47
48#else
49#error Whole space problem only defined for Isotropic and Anisotropic Scenario
50#endif
51 }
52
53 void initPointSourceLocation(double pointSourceLocation[][3]) override{
54 pointSourceLocation[0][0]=m_pointSourceLocation[0];
55 pointSourceLocation[0][1]=m_pointSourceLocation[1];
56 pointSourceLocation[0][2]=m_pointSourceLocation[2];
57 }
58
59 void setPointSourceVector(const double* const Q,
60 const double* const x,const double t,const double dt,
61 double* forceVector, int n) override{
62
63 assertion2(n == 0, "Only a single pointSource for WholeSpaceProblem_Anisotropic",n);
64
65 constexpr double f0 = 250.0*1000.0;
66 constexpr double t0 = 3.0/(2*f0)+5*10-6;
67
68 double f = std::cos(2.0*M_PI*(t-t0)*f0)*std::exp(-2.0*(t-t0)*(t-t0)*f0*f0);
69
71 forceVector[s.v + 1] = f;
72 }
73};
74#endif
75
#define assertion2(expr, param0, param1)
#define assertion1(expr, param)
{{NAMESPACE|join("::")}}::VariableShortcuts VariableShortcuts
void setPointSourceVector(const double *const Q, const double *const x, const double t, const double dt, double *forceVector, int n) override
Definition Apatite.h:59
void initUnknownsPointwise(const double *const x, const tarch::la::Vector< Dimensions, double > &center, const double t, const double dt, double *Q) override
Definition Apatite.h:22
double m_pointSourceLocation[3]
Definition Apatite.h:12
Apatite(DomainInformation *info)
Definition Apatite.h:15
void initPointSourceLocation(double pointSourceLocation[][3]) override
Definition Apatite.h:53
Simple vector class.
Definition Vector.h:159