MAIA bb96820c
Multiphysics at AIA
Loading...
Searching...
No Matches
fvstructuredcomm.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 "fvstructuredcomm.h"
8#include "INCLUDE/maiatypes.h"
9#include "enums.h"
10#include "globals.h"
11
12template <MInt nDim>
14 MFloat* const* const variables_,
15 const MInt noCells_,
16 const MInt noPoints_,
17 const StructuredCommType commType_)
18 : noVars(noVars_), variables(variables_), noCells(noCells_), noPoints(noPoints_), commType(commType_) {
21
22 cellBuffer = std::make_unique<MFloat[]>(mMax(cellBufferSize, 0));
23 pointBuffer = std::make_unique<MFloat[]>(mMax(pointBufferSize, 0));
24
25 // mAlloc(cellBuffer, cellBufferSize, "cellBuffer", F0, AT_);
26 // mAlloc(pointBuffer, pointBufferSize, "cellBuffer", F0, AT_);
27
28 mpi_request = MPI_REQUEST_NULL;
29}
30
31// template <MInt nDim>
32// StructuredComm<nDim>::~StructuredComm() {
33// mDeallocate(cellBuffer);
34// mDeallocate(pointBuffer);
35// }
36
37template class StructuredComm<2>;
38template class StructuredComm<3>;
MPI_Request mpi_request
std::unique_ptr< MFloat[]> pointBuffer
std::unique_ptr< MFloat[]> cellBuffer
const MInt noVars
StructuredComm(const MInt, MFloat *const *const, const MInt, const MInt, const StructuredCommType)
const MInt noCells
const MInt noPoints
StructuredCommType
Definition: enums.h:343
constexpr T mMax(const T &x, const T &y)
Definition: functions.h:94
int32_t MInt
Definition: maiatypes.h:62
double MFloat
Definition: maiatypes.h:52