MAIA bb96820c
Multiphysics at AIA
Loading...
Searching...
No Matches
cartesiangridgencell.h
Go to the documentation of this file.
1// Copyright (C) 2024 The m-AIA AUTHORS
2//
3// This file is part of m-AIA (https://git.rwth-aachen.de/aia/m-AIA/m-AIA)
4//
5// SPDX-License-Identifier: LGPL-3.0-only
6
7#ifndef GRIDGENCELL_H
8#define GRIDGENCELL_H
9
10#include <array>
11#include <cmath>
12#include <cstdint>
13#include <iostream>
14#include <string.h>
15
17#include "INCLUDE/maiamacro.h"
18#include "INCLUDE/maiatypes.h"
19
20template <MInt nDim>
21class GridgenPar;
22
23template <MInt nDim>
25 template <MInt nDim_>
26 friend class GridgenPar;
27
28 public:
29 void allocateElements(void*, void* basePtr, const MInt cellId);
30 void moveElements(void*, void* basePtr, const MInt cellId);
31 void memCopyElements(void* basePtr, void*, void*, MLong);
32
37
38 private:
39 static const MUint s_maxNoSolvers = 8;
40
50
51 // bit user property
52 // -----------------------
53 // 0 grd is inside cell
54 // 1 grd is boundary cell
55 // 2 grd is periodic cell
56 // 3 grd is window cell
57 // 4 grd is halo cell
58 // 5 grd is a refine cell
59 // 6 grd is a visited cell
60 // 7 grd is a moved cell, future deletion
61 std::array<char, s_maxNoSolvers> b_properties_;
62
63 std::array<char, s_maxNoSolvers> b_solverAffiliation_;
64 std::array<char, s_maxNoSolvers> b_solverBoundary_;
65 std::array<char, s_maxNoSolvers> b_solverToRefine_;
66
67 public:
68 static void init(MInt dimensions, const MInt, MInt maxNoCells) {
69 s_dimensions = dimensions;
72 s_maxNoCells = maxNoCells;
73 }
74
76 return (sizeof(MLong)
77 * (2 + // m_globalId, m_parentId
78 2 * s_dimensions + // m_nghbrIds
79 s_noChilds) // m_childIds
80 + sizeof(MInt) * (2) // m_level, m_noChildIds
81 + sizeof(MFloat) * (s_dimensions) // m_coordinates_
82 + sizeof(MInt) * (s_maxNoSolvers) // m_noSolidLayer_ for max of 8 solvers!
83 );
84 }
85};
86
87#endif
static MInt staticElementSize()
std::array< char, s_maxNoSolvers > b_solverAffiliation_
std::array< char, s_maxNoSolvers > b_properties_
MFloat * m_coordinates_
static MInt s_noNghbrs
void moveElements(void *, void *basePtr, const MInt cellId)
static void init(MInt dimensions, const MInt, MInt maxNoCells)
static MInt s_maxNoCells
static MInt s_dimensions
void memCopyElements(void *basePtr, void *, void *, MLong)
static MInt s_noChilds
std::array< char, s_maxNoSolvers > b_solverToRefine_
void allocateElements(void *, void *basePtr, const MInt cellId)
static const MUint s_maxNoSolvers
std::array< char, s_maxNoSolvers > b_solverBoundary_
constexpr MLong IPOW2(MInt x)
int32_t MInt
Definition: maiatypes.h:62
uint32_t MUint
Definition: maiatypes.h:63
double MFloat
Definition: maiatypes.h:52
int64_t MLong
Definition: maiatypes.h:64