MAIA bb96820c
Multiphysics at AIA
Loading...
Searching...
No Matches
lptbndrycell.cpp
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#include "lptbndrycell.h"
8
9#include "MEMORY/collector.h"
10#include "UTIL/debug.h"
11
12template <MInt nDim>
14
15using namespace maia::collector_memory;
16
17template <MInt nDim>
18void LPTBndryCell<nDim>::init(MInt NotUsed(dimensions), MInt NotUsed(noSpecies), MInt NotUsed(noRansEquations),
19 MInt /*maxNoCells*/, MInt maxNoSurfaces) {
20 TRACE();
21
22 m_maxNoSurfaces = maxNoSurfaces;
23}
24
25template <MInt nDim>
26void LPTBndryCell<nDim>::allocateElements(void* cellPtr, void*, const MInt) {
27 m_noSrfcs = 1;
28
29 // Member pointers are set to the cell memory here:
30 moveElements(cellPtr);
31}
32
33template <MInt nDim>
35 unaligned_cell_wise::rowMajor1D(m_coordinates, cellPtr, nDim);
36
37 unaligned_cell_wise::rowMajor2D(m_srfcs, cellPtr, m_maxNoSurfaces, 1);
38 for(MInt i = 0; i < m_maxNoSurfaces; ++i) {
39 unaligned_cell_wise::rowMajor1D(m_srfcs[i]->m_coordinates, cellPtr, nDim);
40 unaligned_cell_wise::rowMajor1D(m_srfcs[i]->m_normal, cellPtr, nDim);
41 unaligned_cell_wise::rowMajor1D(m_srfcs[i]->m_velocity, cellPtr, nDim);
42 unaligned_cell_wise::rowMajor2D(m_srfcs[i]->m_planeCoordinates, cellPtr, nDim, nDim);
43 }
44}
45
46// Explicit instantiations for 2D and 3D
47template class LPTBndryCell<2>;
48template class LPTBndryCell<3>;
void moveElements(void *)
static void init(MInt, MInt, MInt, MInt, MInt)
void allocateElements(void *, void *, const MInt)
MInt noRansEquations(RansMethod ransMethod)
int32_t MInt
Definition: maiatypes.h:62
void rowMajor1D(T *&p, void *&base, const MInt Nrows)
Store 1D variables in row-majow order relative to the start of each cell's memory solver.
Definition: collector.h:307
Helper functions useful for allocating collector memory.
Definition: collector.h:178