DNDSR 0.1.0.dev1+gcd065ad
Distributed Numeric Data Structure for CFV
Loading...
Searching...
No Matches
ArrayDOFPack.hpp
Go to the documentation of this file.
1#pragma once
2/// @file ArrayDOFPack.hpp
3/// @brief Helper for constructing a single ArrayDof with father, son, and transformer.
4
5#include "ArrayDOF.hpp"
6#include "DNDS/Defines.hpp"
7#include "DNDS/MPI.hpp"
8#include <vector>
9
10namespace DNDS
11{
12 /// @brief Helper for constructing a single ArrayDof with father, son, and transformer.
14 {
15 std::vector<ArrayDof<1, 1>> arrs;
16
17 public:
18 // template <class TTrans>
19 // void TransBorrowGGIndexing(TTrans &&r_trans)
20 // {
21 // for (auto &arr : arrs)
22 // {
23 // arr.trans.BorrowGGIndexing(r_trans);
24 // }
25 // }
26 template <class TTrans>
27 void BuildResizeFatherSon(index s_father, index s_son, const MPIInfo &mpi, TTrans &&r_trans)
28 {
29 for (auto &arr : arrs)
30 {
31 if (&arr == arrs.data())
32 {
33 arr.InitPair("ArrayDOFPack::BuildResizeFatherSon::arr", mpi);
34 arr.father->Resize(s_father, 1, 1);
35 arr.son->Resize(s_son, 1, 1);
36 arr.TransAttach();
37 arr.trans.BorrowGGIndexing(r_trans);
38 arr.trans.createMPITypes();
39 }
40 }
41 }
42
43
44 };
45}
Degree-of-freedom array with vector-space operations (MPI-collective).
Core type aliases, constants, and metaprogramming utilities for the DNDS framework.
MPI wrappers: MPIInfo, collective operations, type mapping, CommStrategy.
Helper for constructing a single ArrayDof with father, son, and transformer.
void BuildResizeFatherSon(index s_father, index s_son, const MPIInfo &mpi, TTrans &&r_trans)
the host side operators are provided as implemented
int64_t index
Global row / DOF index type (signed 64-bit; handles multi-billion-cell meshes).
Definition Defines.hpp:107
Lightweight bundle of an MPI communicator and the calling rank's coordinates.
Definition MPI.hpp:215