Theseus
Compressible flow solver
Loading...
Searching...
No Matches
bc_cache_utilities.hpp
Go to the documentation of this file.
1// Copyright (c) 2025-2026 Board of Trustees of the University of Illinois
2//
3// This file is part of Theseus.
4//
5// SPDX-License-Identifier: BSD-3-Clause
6#pragma once
7
8namespace Theseus
9{
10
11 enum class BCType : int
12 {
13 Invalid = -1,
14 SlipWall = 0,
18 Symmetry = 4,
19 Axis = 5,
20 NoSlipAdiab = 6,
21 NoSlipIso = 7,
22 NumBCTypes = 8
23 };
24
25 enum class BCDataKind : int
26 {
27 None = 0,
32 };
33
35 {
36 int type; // BCType
37 int data_kind; // BCDataKind
38 int data_index; // offset/index into packed scalar/vector tables
39 int flags; // reserved for options
40 int bdr_attr; // optional/debug/support
41 int rsrv; // alignment/expansion
42 };
43
44 inline int AppendBCVectorPayload(mfem::Vector &dst,
45 const mfem::Vector &src)
46 {
47 const int offset = dst.Size();
48 const int n = src.Size();
49 mfem::Vector old(dst);
50 dst.SetSize(offset + n);
51
52 for (int i = 0; i < offset; ++i)
53 {
54 dst[i] = old[i];
55 }
56 for(int i = 0;i < n;i++)
57 {
58 dst[i+offset] = src[i];
59 }
60
61 return offset;
62 }
63
64} // namespace Theseus
Definition AxisymmetricGeometry.hpp:15
BCType
Definition bc_cache_utilities.hpp:12
BCDataKind
Definition bc_cache_utilities.hpp:26
int AppendBCVectorPayload(mfem::Vector &dst, const mfem::Vector &src)
Definition bc_cache_utilities.hpp:44
Definition bc_cache_utilities.hpp:35
int type
Definition bc_cache_utilities.hpp:36
int flags
Definition bc_cache_utilities.hpp:39
int data_index
Definition bc_cache_utilities.hpp:38
int bdr_attr
Definition bc_cache_utilities.hpp:40
int data_kind
Definition bc_cache_utilities.hpp:37
int rsrv
Definition bc_cache_utilities.hpp:41