netxsimdg
Loading...
Searching...
No Matches
ModelArrayDetails.cpp
Go to the documentation of this file.
1
8#include "include/ModelArray.hpp"
9
10// A source file to detail the ModelArray dimensions and types for
11// finite volume models, as well as the relationships between them.
12
13// Should be grouped with a consistent ModelArrayDetails.cpp and
14// ModelArrayTypedefs.hpp
15
16namespace Nextsim {
17std::map<ModelArray::Dimension, ModelArray::DimensionSpec> ModelArray::definedDimensions = {
18 { ModelArray::Dimension::X, { "x", 0 } },
19 { ModelArray::Dimension::Y, { "y", 0 } },
20 { ModelArray::Dimension::Z, { "z", 1 } },
21};
22
23ModelArray::TypeDimensions ModelArray::typeDimensions = {
24 { ModelArray::Type::H,
25 {
26 ModelArray::Dimension::X,
27 ModelArray::Dimension::Y,
28 } },
29 { ModelArray::Type::U,
30 {
31 ModelArray::Dimension::X,
32 ModelArray::Dimension::Y,
33 } },
34 { ModelArray::Type::V,
35 {
36 ModelArray::Dimension::X,
37 ModelArray::Dimension::Y,
38 } },
39 { ModelArray::Type::Z,
40 {
41 ModelArray::Dimension::X,
42 ModelArray::Dimension::Y,
43 ModelArray::Dimension::Z,
44 } },
45};
46
47const std::map<ModelArray::Type, std::string> ModelArray::typeNames = {
48 { ModelArray::Type::H, "HField" },
49 { ModelArray::Type::U, "UField" },
50 { ModelArray::Type::V, "VField" },
51 { ModelArray::Type::Z, "ZField" },
52};
53
55 : ModelArray(Type::H)
56{
57}
58
59bool ModelArray::hasDoF(const Type type) { return false; }
60
61ModelArray::SizeMap::SizeMap()
62 : m_sizes({ { Type::H, 0 }, { Type::U, 0 }, { Type::V, 0 }, { Type::Z, 0 } })
63{
64}
65
66ModelArray::DimensionMap::DimensionMap()
67 : m_dimensions({
68 { Type::H, { 0 } },
69 { Type::U, { 0 } },
70 { Type::V, { 0 } },
71 { Type::Z, { 0, 1 } },
72 })
73{
74}
75
76const std::map<ModelArray::Type, ModelArray::Dimension> ModelArray::componentMap = {};
77
78}
static TypeDimensions typeDimensions
The dimensions that make up each defined type. Defined in ModelArrayDetails.cpp.
static std::map< Dimension, DimensionSpec > definedDimensions
The name and length of each dimension that is defined.
static const std::map< Type, std::string > typeNames
The name of each type of ModelArray.