Peano
Loading...
Searching...
No Matches
CellData.template.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
5{% for item in NAMESPACE -%}
6namespace {{ item }} {
7{%- endfor %}
8
9 // Array sizes
10 constexpr int getlQiSize() {return {{lQiSize}};}
11 constexpr int getlFiSize() {return {{lFiSize}};}
12 constexpr int getlSiSize() {return {{lSiSize}};}
13 constexpr int getGradQSize() {return {{gradQSize}};}
14 constexpr int getlQhiSize() {return {{lQhiSize}};}
15 constexpr int getlFhiSize() {return {{lFhiSize}};}
16 constexpr int getlShiSize() {return {{lShiSize}};}
17 constexpr int getPSiSize() {return {{PSiSize}};}
18 constexpr int getlPiSize() {return {{lPiSize}};}
19 constexpr int getlQiNextSize() {return {{lQiNextSize}};}
20
21 constexpr int getBndFaceSize() {return {{BndFaceSize}};} // == QR/QL size
22 constexpr int getBndFaceTotalSize() {return {{BndFaceTotalSize}};} // == lQhbnd size
23 constexpr int getBndGradQSize() {return {{BndFluxSize * DIMENSIONS}};} // == gradQ size
24 constexpr int getBndGradQTotalSize(){return {{BndFluxTotalSize * DIMENSIONS}};} // == gradQhbnd size
25 constexpr int getBndFluxSize() {return {{BndFluxSize}};} // == FR/FL size
26 constexpr int getBndFluxTotalSize() {return {{BndFluxTotalSize}};} // == lFhbnd size
27
28 constexpr int getUpdateSize() {return {{(NUMBER_OF_DOF**DIMENSIONS)*NUMBER_OF_UNKNOWNS_PADDED}};} // == lduh size
29
30 // Shifts for fusedSTPVI local memory
31{% set shift = 0 %}
32 constexpr int getlQiShift() {return {{shift}};}
33{% set shift = shift+lQiSize %}
34
35{% if lPiSize > 0 %}
36 constexpr int getlPiShift() {return {{shift}};}
37{% set shift = shift+lPiSize %}
38{% endif %}
39
40{% if lQiNextSize > 0 %}
41 constexpr int getlQiNextShift() {return {{shift}};}
42{% set shift = shift+lQiNextSize %}
43{% endif %}
44
45 constexpr int getlQhiShift() {return {{shift}};}
46{% set shift = shift+lQhiSize %}
47
48{% if not IS_LINEAR %}
49 constexpr int getRhsShift() {return {{shift}};} // Same size as lQi
50{% set shift = shift+lQiSize %}
51{% endif %}
52
53{% if gradQSize > 0 %}
54 constexpr int getGradQShift() {return {{shift}};}
55{% set shift = shift+gradQSize %}
56{% endif %}
57
58{% if lFiSize > 0 %}
59 constexpr int getlFiShift() {return {{shift}};}
60{% set shift = shift+lFiSize %}
61{% endif %}
62
63{% if lFhiSize > 0 %}
64 constexpr int getlFhiShift() {return {{shift}};}
65{% set shift = shift+lFhiSize %}
66{% endif %}
67
68{% if lSiSize > 0 %}
69 constexpr int getlSiShift() {return {{shift}};}
70{% set shift = shift+lSiSize %}
71{% endif %}
72
73{% if lShiSize > 0 %}
74 constexpr int getlShiShift() {return {{shift}};}
75{% set shift = shift+lShiSize %}
76{% endif %}
77
78{% if PSiSize > 0 %}
79 constexpr int getPSiShift() {return {{shift}};}
80{% set shift = shift+PSiSize %}
81{% endif %}
82
83 constexpr int getFusedSTPVISize() {return {{shift}};}
84
85 // Shifts for boundary conditions
86{% set shift2 = 0 %}
87 constexpr int getBndFaceShift() {return {{shift2}};}
88{% set shift2 = shift2+BndFaceSize %}
89 constexpr int getBndFluxShift() {return {{shift2}};}
90{% set shift2 = shift2+BndFluxSize %}
91
92 constexpr int getBoundaryConditionsSize() {return {{shift2}};}
93
94{% for item in NAMESPACE -%}
95}
96{%- endfor %}