netxsimdg
Loading...
Searching...
No Matches
ModelArrayDetails.cpp
Go to the documentation of this file.
1
8#include "include/ModelArray.hpp"
9
10namespace Nextsim {
11std::map<ModelArray::Dimension, ModelArray::DimensionSpec> ModelArray::definedDimensions = {
12 { ModelArray::Dimension::X, { "x", 1 } },
13 { ModelArray::Dimension::Y, { "y", 1 } },
14 { ModelArray::Dimension::Z, { "z", 1 } },
15 { ModelArray::Dimension::U, { "u", 1 } },
16};
17
18ModelArray::TypeDimensions ModelArray::typeDimensions = {
19 { ModelArray::Type::ONED,
20 {
21 ModelArray::Dimension::X,
22 } },
23 { ModelArray::Type::TWOD,
24 {
25 ModelArray::Dimension::X,
26 ModelArray::Dimension::Y,
27 } },
28 { ModelArray::Type::ZUFIELD,
29 {
30 ModelArray::Dimension::Z,
31 ModelArray::Dimension::U,
32 } },
33 { ModelArray::Type::THREED,
34 {
35 ModelArray::Dimension::X,
36 ModelArray::Dimension::Y,
37 ModelArray::Dimension::Z,
38 } },
39 { ModelArray::Type::FOURD,
40 {
41 ModelArray::Dimension::X,
42 ModelArray::Dimension::Y,
43 ModelArray::Dimension::Z,
44 ModelArray::Dimension::U,
45 } },
46};
47
48const std::map<ModelArray::Type, std::string> ModelArray::typeNames = {
49 { ModelArray::Type::ONED, "OneDField" },
50 { ModelArray::Type::TWOD, "TwoDField" },
51 { ModelArray::Type::ZUFIELD, "TwoDField" },
52 { ModelArray::Type::THREED, "ThreeDField" },
53 { ModelArray::Type::FOURD, "FourDField" },
54};
55
57 : ModelArray(Type::ONED)
58{
59}
60
61bool ModelArray::hasDoF(const Type type) { return false; }
62
63ModelArray::SizeMap::SizeMap()
64 : m_sizes({
65 { Type::ONED, 1 },
66 { Type::TWOD, 1 },
67 { Type::ZUFIELD, 1 },
68 { Type::THREED, 1 },
69 { Type::FOURD, 1 },
70 })
71{
72}
73
74ModelArray::DimensionMap::DimensionMap()
75 : m_dimensions({
76 { Type::ONED, { 1 } },
77 { Type::TWOD, { 1, 1 } },
78 { Type::ZUFIELD, { 1, 1 } },
79 { Type::THREED, { 1, 1, 1 } },
80 { Type::FOURD, { 1, 1, 1, 1 } },
81 })
82{
83}
84
85const std::map<ModelArray::Type, ModelArray::Dimension> ModelArray::componentMap = {};
86
87}
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.