5#include "tarch/Assertions.h"
28 static double constexpr DELTA = 0.2;
29 static double constexpr ZETA = 0.03;
31 static inline GPU_CALLABLE_METHOD
double k1(
const double temperature) {
33 const double factor = 300.0 / temperature;
34 return 4.7e-33 * factor * factor;
37 static inline GPU_CALLABLE_METHOD
double k2() {
42 static inline GPU_CALLABLE_METHOD
double k3() {
47 static inline GPU_CALLABLE_METHOD
double k4(
const double temperature) {
49 return 4.0e-12 * tarch::la::pow(tarch::la::E, -865.0 / temperature);
52 static inline GPU_CALLABLE_METHOD
double A1() {
57 static inline GPU_CALLABLE_METHOD
double A2() {
62 static inline GPU_CALLABLE_METHOD
double A5577() {
71 static inline GPU_CALLABLE_METHOD
double branching(
const int vibrationalState) {
74 assertion1(vibrationalState < 10, vibrationalState);
75 assertion1(vibrationalState > -1, vibrationalState);
78 switch (vibrationalState) {
92 static inline GPU_CALLABLE_METHOD
double k5(
const double temperature,
const int vibrationalState) {
94 return 1.4e-10 * tarch::la::pow(tarch::la::E, -470.0 / temperature) *
branching(vibrationalState);
97 static inline GPU_CALLABLE_METHOD
double k6(
const double temperature) {
99 return 6.0e-34 * tarch::la::pow(300.0 / temperature, 2.3);
102 static inline GPU_CALLABLE_METHOD
double k7(
const int vibrationalState) {
106#if !defined(WITH_GPU)
107 assertion1(vibrationalState < 10, vibrationalState);
108 assertion1(vibrationalState > -1, vibrationalState);
110 switch (vibrationalState) {
120 static inline GPU_CALLABLE_METHOD
double k8(
const int vibrationalState,
const int quenchedState) {
124#if !defined(WITH_GPU)
125 assertion1(vibrationalState < 10, vibrationalState);
126 assertion1(vibrationalState > 0, vibrationalState);
127 assertion1(quenchedState < 9, quenchedState);
128 assertion1(quenchedState > -1, quenchedState);
129 assertion2(quenchedState < vibrationalState, vibrationalState, quenchedState);
131 if (vibrationalState == 1) {
135 if (vibrationalState == 2) {
136 if (quenchedState == 0)
141 if (vibrationalState == 3) {
142 if (quenchedState == 0)
144 if (quenchedState == 1)
149 if (vibrationalState == 4) {
150 if (quenchedState == 0)
152 if (quenchedState == 1)
154 if (quenchedState == 2)
159 if (vibrationalState == 5) {
160 if (quenchedState == 0)
162 if (quenchedState == 1)
164 if (quenchedState == 2)
166 if (quenchedState == 3)
171 if (vibrationalState == 6) {
172 switch (quenchedState) {
191 if (vibrationalState == 7) {
192 switch (quenchedState) {
212 if (vibrationalState == 8) {
213 switch (quenchedState) {
235 if (vibrationalState == 9) {
236 switch (quenchedState) {
263 static inline GPU_CALLABLE_METHOD
double k9(
const int vibrationalState) {
267#if !defined(WITH_GPU)
268 assertion1(vibrationalState < 10, vibrationalState);
269 assertion1(vibrationalState > 0, vibrationalState);
272 switch (vibrationalState) {
304 const int vibrationalState,
305 const int quenchedState
307#if !defined(WITH_GPU)
308 assertion1(vibrationalState < 10, vibrationalState);
309 assertion1(vibrationalState > 0, vibrationalState);
310 assertion1(quenchedState < 9, quenchedState);
311 assertion1(quenchedState > -1, quenchedState);
312 assertion2(quenchedState < vibrationalState, vibrationalState, quenchedState);
321 if (vibrationalState == 1) {
325 if (vibrationalState == 2) {
326 if (quenchedState == 0)
331 if (vibrationalState == 3) {
332 if (quenchedState == 0)
334 if (quenchedState == 1)
339 if (vibrationalState == 4) {
340 if (quenchedState == 0)
342 if (quenchedState == 1)
344 if (quenchedState == 2)
349 if (vibrationalState == 5) {
350 if (quenchedState == 0)
352 if (quenchedState == 1)
354 if (quenchedState == 2)
356 if (quenchedState == 3)
361 if (vibrationalState == 6) {
362 if (quenchedState == 1)
364 if (quenchedState == 2)
366 if (quenchedState == 3)
368 if (quenchedState == 4)
373 if (vibrationalState == 7) {
374 if (quenchedState == 2)
376 if (quenchedState == 3)
378 if (quenchedState == 4)
380 if (quenchedState == 5)
385 if (vibrationalState == 8) {
386 if (quenchedState == 3)
388 if (quenchedState == 4)
390 if (quenchedState == 5)
392 if (quenchedState == 6)
397 if (vibrationalState == 9) {
398 if (quenchedState == 4)
400 if (quenchedState == 5)
402 if (quenchedState == 6)
404 if (quenchedState == 7)
415 const int vibrationalState,
416 const int quenchedState
418#if !defined(WITH_GPU)
419 assertion1(vibrationalState < 10, vibrationalState);
420 assertion1(vibrationalState > 0, vibrationalState);
421 assertion1(quenchedState < 9, quenchedState);
422 assertion1(quenchedState > -1, quenchedState);
423 assertion2(quenchedState < vibrationalState, vibrationalState, quenchedState);
432 if (vibrationalState == 1) {
436 if (vibrationalState == 2) {
437 if (quenchedState == 0)
442 if (vibrationalState == 3) {
443 if (quenchedState == 0)
445 if (quenchedState == 1)
450 if (vibrationalState == 4) {
451 if (quenchedState == 0)
453 if (quenchedState == 1)
455 if (quenchedState == 2)
460 if (vibrationalState == 5) {
461 if (quenchedState == 0)
463 if (quenchedState == 1)
465 if (quenchedState == 2)
467 if (quenchedState == 3)
472 if (vibrationalState == 6) {
473 if (quenchedState == 0)
475 if (quenchedState == 1)
477 if (quenchedState == 2)
479 if (quenchedState == 3)
481 if (quenchedState == 4)
486 if (vibrationalState == 7) {
487 if (quenchedState == 1)
489 if (quenchedState == 2)
491 if (quenchedState == 3)
493 if (quenchedState == 4)
495 if (quenchedState == 5)
500 if (vibrationalState == 8) {
501 if (quenchedState == 2)
503 if (quenchedState == 3)
505 if (quenchedState == 4)
507 if (quenchedState == 5)
509 if (quenchedState == 6)
514 if (vibrationalState == 9) {
515 if (quenchedState == 3)
517 if (quenchedState == 4)
519 if (quenchedState == 5)
521 if (quenchedState == 6)
523 if (quenchedState == 7)
534 const int vibrationalState,
535 const int quenchedState
537#if !defined(WITH_GPU)
538 assertion1(vibrationalState < 10, vibrationalState);
539 assertion1(vibrationalState > 0, vibrationalState);
540 assertion1(quenchedState < 9, quenchedState);
541 assertion1(quenchedState > -1, quenchedState);
542 assertion2(quenchedState < vibrationalState, vibrationalState, quenchedState);
546 if (vibrationalState == 1) {
550 if (vibrationalState == 2) {
551 if (quenchedState == 0)
556 if (vibrationalState == 3) {
557 if (quenchedState == 0)
559 if (quenchedState == 1)
564 if (vibrationalState == 4) {
565 if (quenchedState == 0)
567 if (quenchedState == 1)
569 if (quenchedState == 2)
574 if (vibrationalState == 5) {
575 if (quenchedState == 0)
577 if (quenchedState == 1)
579 if (quenchedState == 2)
581 if (quenchedState == 3)
586 if (vibrationalState == 6) {
587 if (quenchedState == 0)
589 if (quenchedState == 1)
591 if (quenchedState == 2)
593 if (quenchedState == 3)
595 if (quenchedState == 4)
600 if (vibrationalState == 7) {
601 if (quenchedState == 1)
603 if (quenchedState == 2)
605 if (quenchedState == 3)
607 if (quenchedState == 4)
609 if (quenchedState == 5)
614 if (vibrationalState == 8) {
615 if (quenchedState == 2)
617 if (quenchedState == 3)
619 if (quenchedState == 4)
621 if (quenchedState == 5)
623 if (quenchedState == 6)
628 if (vibrationalState == 9) {
629 if (quenchedState == 3)
631 if (quenchedState == 4)
633 if (quenchedState == 5)
635 if (quenchedState == 6)
637 if (quenchedState == 7)
static GPU_CALLABLE_METHOD double A2()
static GPU_CALLABLE_METHOD double A5577()
static GPU_CALLABLE_METHOD double branching(const int vibrationalState)
static double constexpr DELTA
static GPU_CALLABLE_METHOD double k5(const double temperature, const int vibrationalState)
static GPU_CALLABLE_METHOD double k9(const int vibrationalState)
static int constexpr TURNBULLLOWEBANDWIDTH
static GPU_CALLABLE_METHOD double langhoffEinsteinCoefficients(const int vibrationalState, const int quenchedState)
static GPU_CALLABLE_METHOD double k2()
static GPU_CALLABLE_METHOD double k8(const int vibrationalState, const int quenchedState)
static int constexpr GOLDMANBANDWIDTH
static GPU_CALLABLE_METHOD double turnbullLoweEinsteinCoefficients(const int vibrationalState, const int quenchedState)
static GPU_CALLABLE_METHOD double k6(const double temperature)
static GPU_CALLABLE_METHOD double A1()
static int constexpr LANGHOFFBANDWIDTH
static double constexpr ZETA
static GPU_CALLABLE_METHOD double k1(const double temperature)
static GPU_CALLABLE_METHOD double goldmanEinsteinCoefficients(const int vibrationalState, const int quenchedState)
static GPU_CALLABLE_METHOD double k7(const int vibrationalState)
static GPU_CALLABLE_METHOD double k3()
static GPU_CALLABLE_METHOD double k4(const double temperature)
This code is taken from the original ExaHyPE project written by colleagues from the University of Tre...