Peano
Loading...
Searching...
No Matches
FrictionLaws.h
Go to the documentation of this file.
1// This file is part of the ExaHyPE2 project. For conditions of distribution and
2// use, please see the copyright notice at www.peano-framework.org
3#pragma once
4
6 #if defined(GPUOffloadingOMP)
7 #pragma omp declare target
8 #endif
9
10 const double Zeta = 35.0 * std::numbers::pi / 180.0; // Conversion of degrees to radians
11 const double Zeta1 = 28.95 * std::numbers::pi / 180.0;
12 const double Zeta2 = 44.09 * std::numbers::pi / 180.0;
13 const double Zeta3 = 31.81 * std::numbers::pi / 180.0;
14
15 const double Mu1 = std::tan(Zeta1);
16 const double Mu2 = std::tan(Zeta2);
17 const double Mu3 = std::tan(Zeta3);
18
19 constexpr double Beta = 1.07;
20 constexpr double Gamma = 2.01;
21 constexpr double BetaStar = 0.06;
22 // Kappa in the friction law is assumed to be 1 and is just initialised as a
23 // const double here using Kappa. The user can apply std::pow((Fr/BetaStar),
24 // Kappa) for evaluating T here in case the value of Kappa is different
25 // from 1.
26
27 constexpr double Kappa = 1.0;
28 constexpr double FrictionLengthScale = 0.00035;
29
30 const double Nu = (2.0 / 9.0) * (FrictionLengthScale / Beta) * (GRAV * std::sin(Zeta) / std::sqrt(GRAV * std::cos(Zeta))) * (((Mu2 - Mu1) / (std::tan(Zeta) - Mu1)) - 1.0);
31 const double Hstart = FrictionLengthScale * (((Mu2 - Mu1) / (std::tan(Zeta) - Mu3)) - 1.0);
32 const double Hstop = FrictionLengthScale * (((Mu2 - Mu1) / (std::tan(Zeta) - Mu1)) - 1.0);
33
34 static inline GPUCallableMethod
36 const double* const __restrict__ Q,
39 const double t,
40 const double dt,
41 const int normal
43
44 static inline GPUCallableMethod
46 const double* const __restrict__ Q,
49 const double t,
50 const double dt,
51 const int normal,
52 double* const __restrict__ maxEigenvalue
54
55 static inline GPUCallableMethod
56 void flux(
57 const double* const __restrict__ Q,
60 const double t,
61 const double dt,
62 const int normal,
63 double* const __restrict__ F
65
66 static inline GPUCallableMethod
68 const double* const __restrict__ Q,
69 const double* const __restrict__ deltaQ,
72 const double t,
73 const double dt,
74 const int normal,
75 double* const __restrict__ BTimesDeltaQ
77
78 static inline GPUCallableMethod
80 const double* __restrict__ Q,
83 double t,
84 double dt,
85 double* __restrict__ S
87
88 static inline GPUCallableMethod
90 const double* __restrict__ Q,
93 double t,
94 double dt,
95 double* __restrict__ S
97
98 #if defined(GPUOffloadingOMP)
99 #pragma omp end declare target
100 #endif
101} // namespace applications::exahype2::swe::frictionlaws
102
103#include "FrictionLaws.cpph"
#define GPUCallableMethod
Definition accelerator.h:27
static GPUCallableMethod void nonconservativeProduct(const double *const __restrict__ Q, const double *const __restrict__ deltaQ, const tarch::la::Vector< Dimensions, double > &x, const tarch::la::Vector< Dimensions, double > &h, const double t, const double dt, const int normal, double *const __restrict__ BTimesDeltaQ) InlineMethod
static GPUCallableMethod void materialDependentBasalFriction(const double *__restrict__ Q, const tarch::la::Vector< Dimensions, double > &x, const tarch::la::Vector< Dimensions, double > &h, double t, double dt, double *__restrict__ S) InlineMethod
static GPUCallableMethod double maxEigenvalue(const double *const __restrict__ Q, const tarch::la::Vector< Dimensions, double > &x, const tarch::la::Vector< Dimensions, double > &h, const double t, const double dt, const int normal) InlineMethod
static GPUCallableMethod void coulombFriction(const double *__restrict__ Q, const tarch::la::Vector< Dimensions, double > &x, const tarch::la::Vector< Dimensions, double > &h, double t, double dt, double *__restrict__ S) InlineMethod
Simple vector class.
Definition Vector.h:159
#define InlineMethod
Generic identifier for inlined functions.
Definition tarch.h:97