Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pugs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
code
pugs
Commits
456dcc70
Commit
456dcc70
authored
2 years ago
by
Stéphane Del Pino
Browse files
Options
Downloads
Plain Diff
Merge branch 'develop' into feature/user-doc
parents
a5f17ba9
4cb39db7
No related branches found
No related tags found
1 merge request
!149
Feature/user doc
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
doc/userdoc.org
+3
-2
3 additions, 2 deletions
doc/userdoc.org
src/mesh/SubItemValuePerItemVariant.hpp
+47
-8
47 additions, 8 deletions
src/mesh/SubItemValuePerItemVariant.hpp
tests/test_SubItemValuePerItemVariant.cpp
+55
-16
55 additions, 16 deletions
tests/test_SubItemValuePerItemVariant.cpp
with
105 additions
and
26 deletions
doc/userdoc.org
+
3
−
2
View file @
456dcc70
...
@@ -2688,8 +2688,9 @@ edge or face values cannot be post processed since neither ~VTK~ nor
...
@@ -2688,8 +2688,9 @@ edge or face values cannot be post processed since neither ~VTK~ nor
This abstract type handles values defined on the sub items of the
This abstract type handles values defined on the sub items of the
items of a ~mesh~. Similarly these values are attached to a *connectivity*
items of a ~mesh~. Similarly these values are attached to a *connectivity*
and not to a mesh. The values associated to the sub items can be of
and not to a mesh. The values associated to the sub items can be of
type ~B~, ~N~, ~Z~, ~R~, ~R^1~, ~R^2~ or ~R^3~. An example of ~sub_item_value~ is the
type ~B~, ~N~, ~Z~, ~R~, ~R^1~, ~R^2~, ~R^3~, ~R^1x1~, ~R^2x2~ or ~R^3x3~. An example of
$\mathbf{C}_{jr}$ vectors which are defined at each node of each cell.
~sub_item_value~ is the $\mathbf{C}_{jr}$ vectors which are defined at each
node of each cell.
These variables are used to pass data from one function to
These variables are used to pass data from one function to
another. They cannot be post processed.
another. They cannot be post processed.
...
...
This diff is collapsed.
Click to expand it.
src/mesh/SubItemValuePerItemVariant.hpp
+
47
−
8
View file @
456dcc70
...
@@ -16,6 +16,9 @@ class SubItemValuePerItemVariant
...
@@ -16,6 +16,9 @@ class SubItemValuePerItemVariant
NodeValuePerEdge
<
const
TinyVector
<
1
,
double
>>
,
NodeValuePerEdge
<
const
TinyVector
<
1
,
double
>>
,
NodeValuePerEdge
<
const
TinyVector
<
2
,
double
>>
,
NodeValuePerEdge
<
const
TinyVector
<
2
,
double
>>
,
NodeValuePerEdge
<
const
TinyVector
<
3
,
double
>>
,
NodeValuePerEdge
<
const
TinyVector
<
3
,
double
>>
,
NodeValuePerEdge
<
const
TinyMatrix
<
1
,
1
,
double
>>
,
NodeValuePerEdge
<
const
TinyMatrix
<
2
,
2
,
double
>>
,
NodeValuePerEdge
<
const
TinyMatrix
<
3
,
3
,
double
>>
,
NodeValuePerFace
<
const
bool
>
,
NodeValuePerFace
<
const
bool
>
,
NodeValuePerFace
<
const
long
int
>
,
NodeValuePerFace
<
const
long
int
>
,
...
@@ -24,6 +27,9 @@ class SubItemValuePerItemVariant
...
@@ -24,6 +27,9 @@ class SubItemValuePerItemVariant
NodeValuePerFace
<
const
TinyVector
<
1
,
double
>>
,
NodeValuePerFace
<
const
TinyVector
<
1
,
double
>>
,
NodeValuePerFace
<
const
TinyVector
<
2
,
double
>>
,
NodeValuePerFace
<
const
TinyVector
<
2
,
double
>>
,
NodeValuePerFace
<
const
TinyVector
<
3
,
double
>>
,
NodeValuePerFace
<
const
TinyVector
<
3
,
double
>>
,
NodeValuePerFace
<
const
TinyMatrix
<
1
,
1
,
double
>>
,
NodeValuePerFace
<
const
TinyMatrix
<
2
,
2
,
double
>>
,
NodeValuePerFace
<
const
TinyMatrix
<
3
,
3
,
double
>>
,
NodeValuePerCell
<
const
bool
>
,
NodeValuePerCell
<
const
bool
>
,
NodeValuePerCell
<
const
long
int
>
,
NodeValuePerCell
<
const
long
int
>
,
...
@@ -32,6 +38,9 @@ class SubItemValuePerItemVariant
...
@@ -32,6 +38,9 @@ class SubItemValuePerItemVariant
NodeValuePerCell
<
const
TinyVector
<
1
,
double
>>
,
NodeValuePerCell
<
const
TinyVector
<
1
,
double
>>
,
NodeValuePerCell
<
const
TinyVector
<
2
,
double
>>
,
NodeValuePerCell
<
const
TinyVector
<
2
,
double
>>
,
NodeValuePerCell
<
const
TinyVector
<
3
,
double
>>
,
NodeValuePerCell
<
const
TinyVector
<
3
,
double
>>
,
NodeValuePerCell
<
const
TinyMatrix
<
1
,
1
,
double
>>
,
NodeValuePerCell
<
const
TinyMatrix
<
2
,
2
,
double
>>
,
NodeValuePerCell
<
const
TinyMatrix
<
3
,
3
,
double
>>
,
EdgeValuePerNode
<
const
bool
>
,
EdgeValuePerNode
<
const
bool
>
,
EdgeValuePerNode
<
const
long
int
>
,
EdgeValuePerNode
<
const
long
int
>
,
...
@@ -40,6 +49,9 @@ class SubItemValuePerItemVariant
...
@@ -40,6 +49,9 @@ class SubItemValuePerItemVariant
EdgeValuePerNode
<
const
TinyVector
<
1
,
double
>>
,
EdgeValuePerNode
<
const
TinyVector
<
1
,
double
>>
,
EdgeValuePerNode
<
const
TinyVector
<
2
,
double
>>
,
EdgeValuePerNode
<
const
TinyVector
<
2
,
double
>>
,
EdgeValuePerNode
<
const
TinyVector
<
3
,
double
>>
,
EdgeValuePerNode
<
const
TinyVector
<
3
,
double
>>
,
EdgeValuePerNode
<
const
TinyMatrix
<
1
,
1
,
double
>>
,
EdgeValuePerNode
<
const
TinyMatrix
<
2
,
2
,
double
>>
,
EdgeValuePerNode
<
const
TinyMatrix
<
3
,
3
,
double
>>
,
EdgeValuePerFace
<
const
bool
>
,
EdgeValuePerFace
<
const
bool
>
,
EdgeValuePerFace
<
const
long
int
>
,
EdgeValuePerFace
<
const
long
int
>
,
...
@@ -48,6 +60,9 @@ class SubItemValuePerItemVariant
...
@@ -48,6 +60,9 @@ class SubItemValuePerItemVariant
EdgeValuePerFace
<
const
TinyVector
<
1
,
double
>>
,
EdgeValuePerFace
<
const
TinyVector
<
1
,
double
>>
,
EdgeValuePerFace
<
const
TinyVector
<
2
,
double
>>
,
EdgeValuePerFace
<
const
TinyVector
<
2
,
double
>>
,
EdgeValuePerFace
<
const
TinyVector
<
3
,
double
>>
,
EdgeValuePerFace
<
const
TinyVector
<
3
,
double
>>
,
EdgeValuePerFace
<
const
TinyMatrix
<
1
,
1
,
double
>>
,
EdgeValuePerFace
<
const
TinyMatrix
<
2
,
2
,
double
>>
,
EdgeValuePerFace
<
const
TinyMatrix
<
3
,
3
,
double
>>
,
EdgeValuePerCell
<
const
bool
>
,
EdgeValuePerCell
<
const
bool
>
,
EdgeValuePerCell
<
const
long
int
>
,
EdgeValuePerCell
<
const
long
int
>
,
...
@@ -56,6 +71,9 @@ class SubItemValuePerItemVariant
...
@@ -56,6 +71,9 @@ class SubItemValuePerItemVariant
EdgeValuePerCell
<
const
TinyVector
<
1
,
double
>>
,
EdgeValuePerCell
<
const
TinyVector
<
1
,
double
>>
,
EdgeValuePerCell
<
const
TinyVector
<
2
,
double
>>
,
EdgeValuePerCell
<
const
TinyVector
<
2
,
double
>>
,
EdgeValuePerCell
<
const
TinyVector
<
3
,
double
>>
,
EdgeValuePerCell
<
const
TinyVector
<
3
,
double
>>
,
EdgeValuePerCell
<
const
TinyMatrix
<
1
,
1
,
double
>>
,
EdgeValuePerCell
<
const
TinyMatrix
<
2
,
2
,
double
>>
,
EdgeValuePerCell
<
const
TinyMatrix
<
3
,
3
,
double
>>
,
FaceValuePerNode
<
const
bool
>
,
FaceValuePerNode
<
const
bool
>
,
FaceValuePerNode
<
const
long
int
>
,
FaceValuePerNode
<
const
long
int
>
,
...
@@ -64,6 +82,9 @@ class SubItemValuePerItemVariant
...
@@ -64,6 +82,9 @@ class SubItemValuePerItemVariant
FaceValuePerNode
<
const
TinyVector
<
1
,
double
>>
,
FaceValuePerNode
<
const
TinyVector
<
1
,
double
>>
,
FaceValuePerNode
<
const
TinyVector
<
2
,
double
>>
,
FaceValuePerNode
<
const
TinyVector
<
2
,
double
>>
,
FaceValuePerNode
<
const
TinyVector
<
3
,
double
>>
,
FaceValuePerNode
<
const
TinyVector
<
3
,
double
>>
,
FaceValuePerNode
<
const
TinyMatrix
<
1
,
1
,
double
>>
,
FaceValuePerNode
<
const
TinyMatrix
<
2
,
2
,
double
>>
,
FaceValuePerNode
<
const
TinyMatrix
<
3
,
3
,
double
>>
,
FaceValuePerEdge
<
const
bool
>
,
FaceValuePerEdge
<
const
bool
>
,
FaceValuePerEdge
<
const
long
int
>
,
FaceValuePerEdge
<
const
long
int
>
,
...
@@ -72,6 +93,9 @@ class SubItemValuePerItemVariant
...
@@ -72,6 +93,9 @@ class SubItemValuePerItemVariant
FaceValuePerEdge
<
const
TinyVector
<
1
,
double
>>
,
FaceValuePerEdge
<
const
TinyVector
<
1
,
double
>>
,
FaceValuePerEdge
<
const
TinyVector
<
2
,
double
>>
,
FaceValuePerEdge
<
const
TinyVector
<
2
,
double
>>
,
FaceValuePerEdge
<
const
TinyVector
<
3
,
double
>>
,
FaceValuePerEdge
<
const
TinyVector
<
3
,
double
>>
,
FaceValuePerEdge
<
const
TinyMatrix
<
1
,
1
,
double
>>
,
FaceValuePerEdge
<
const
TinyMatrix
<
2
,
2
,
double
>>
,
FaceValuePerEdge
<
const
TinyMatrix
<
3
,
3
,
double
>>
,
FaceValuePerCell
<
const
bool
>
,
FaceValuePerCell
<
const
bool
>
,
FaceValuePerCell
<
const
long
int
>
,
FaceValuePerCell
<
const
long
int
>
,
...
@@ -80,6 +104,9 @@ class SubItemValuePerItemVariant
...
@@ -80,6 +104,9 @@ class SubItemValuePerItemVariant
FaceValuePerCell
<
const
TinyVector
<
1
,
double
>>
,
FaceValuePerCell
<
const
TinyVector
<
1
,
double
>>
,
FaceValuePerCell
<
const
TinyVector
<
2
,
double
>>
,
FaceValuePerCell
<
const
TinyVector
<
2
,
double
>>
,
FaceValuePerCell
<
const
TinyVector
<
3
,
double
>>
,
FaceValuePerCell
<
const
TinyVector
<
3
,
double
>>
,
FaceValuePerCell
<
const
TinyMatrix
<
1
,
1
,
double
>>
,
FaceValuePerCell
<
const
TinyMatrix
<
2
,
2
,
double
>>
,
FaceValuePerCell
<
const
TinyMatrix
<
3
,
3
,
double
>>
,
CellValuePerNode
<
const
bool
>
,
CellValuePerNode
<
const
bool
>
,
CellValuePerNode
<
const
long
int
>
,
CellValuePerNode
<
const
long
int
>
,
...
@@ -88,6 +115,9 @@ class SubItemValuePerItemVariant
...
@@ -88,6 +115,9 @@ class SubItemValuePerItemVariant
CellValuePerNode
<
const
TinyVector
<
1
,
double
>>
,
CellValuePerNode
<
const
TinyVector
<
1
,
double
>>
,
CellValuePerNode
<
const
TinyVector
<
2
,
double
>>
,
CellValuePerNode
<
const
TinyVector
<
2
,
double
>>
,
CellValuePerNode
<
const
TinyVector
<
3
,
double
>>
,
CellValuePerNode
<
const
TinyVector
<
3
,
double
>>
,
CellValuePerNode
<
const
TinyMatrix
<
1
,
1
,
double
>>
,
CellValuePerNode
<
const
TinyMatrix
<
2
,
2
,
double
>>
,
CellValuePerNode
<
const
TinyMatrix
<
3
,
3
,
double
>>
,
CellValuePerEdge
<
const
bool
>
,
CellValuePerEdge
<
const
bool
>
,
CellValuePerEdge
<
const
long
int
>
,
CellValuePerEdge
<
const
long
int
>
,
...
@@ -96,6 +126,9 @@ class SubItemValuePerItemVariant
...
@@ -96,6 +126,9 @@ class SubItemValuePerItemVariant
CellValuePerEdge
<
const
TinyVector
<
1
,
double
>>
,
CellValuePerEdge
<
const
TinyVector
<
1
,
double
>>
,
CellValuePerEdge
<
const
TinyVector
<
2
,
double
>>
,
CellValuePerEdge
<
const
TinyVector
<
2
,
double
>>
,
CellValuePerEdge
<
const
TinyVector
<
3
,
double
>>
,
CellValuePerEdge
<
const
TinyVector
<
3
,
double
>>
,
CellValuePerEdge
<
const
TinyMatrix
<
1
,
1
,
double
>>
,
CellValuePerEdge
<
const
TinyMatrix
<
2
,
2
,
double
>>
,
CellValuePerEdge
<
const
TinyMatrix
<
3
,
3
,
double
>>
,
CellValuePerFace
<
const
bool
>
,
CellValuePerFace
<
const
bool
>
,
CellValuePerFace
<
const
long
int
>
,
CellValuePerFace
<
const
long
int
>
,
...
@@ -103,7 +136,10 @@ class SubItemValuePerItemVariant
...
@@ -103,7 +136,10 @@ class SubItemValuePerItemVariant
CellValuePerFace
<
const
double
>
,
CellValuePerFace
<
const
double
>
,
CellValuePerFace
<
const
TinyVector
<
1
,
double
>>
,
CellValuePerFace
<
const
TinyVector
<
1
,
double
>>
,
CellValuePerFace
<
const
TinyVector
<
2
,
double
>>
,
CellValuePerFace
<
const
TinyVector
<
2
,
double
>>
,
CellValuePerFace
<
const
TinyVector
<
3
,
double
>>>
;
CellValuePerFace
<
const
TinyVector
<
3
,
double
>>
,
CellValuePerFace
<
const
TinyMatrix
<
1
,
1
,
double
>>
,
CellValuePerFace
<
const
TinyMatrix
<
2
,
2
,
double
>>
,
CellValuePerFace
<
const
TinyMatrix
<
3
,
3
,
double
>>>
;
Variant
m_sub_item_value_per_item
;
Variant
m_sub_item_value_per_item
;
...
@@ -146,7 +182,10 @@ class SubItemValuePerItemVariant
...
@@ -146,7 +182,10 @@ class SubItemValuePerItemVariant
std
::
is_same_v
<
std
::
remove_const_t
<
DataType
>
,
double
>
or
//
std
::
is_same_v
<
std
::
remove_const_t
<
DataType
>
,
double
>
or
//
std
::
is_same_v
<
std
::
remove_const_t
<
DataType
>
,
TinyVector
<
1
,
double
>>
or
//
std
::
is_same_v
<
std
::
remove_const_t
<
DataType
>
,
TinyVector
<
1
,
double
>>
or
//
std
::
is_same_v
<
std
::
remove_const_t
<
DataType
>
,
TinyVector
<
2
,
double
>>
or
//
std
::
is_same_v
<
std
::
remove_const_t
<
DataType
>
,
TinyVector
<
2
,
double
>>
or
//
std
::
is_same_v
<
std
::
remove_const_t
<
DataType
>
,
TinyVector
<
3
,
double
>>
,
std
::
is_same_v
<
std
::
remove_const_t
<
DataType
>
,
TinyVector
<
3
,
double
>>
or
//
std
::
is_same_v
<
std
::
remove_const_t
<
DataType
>
,
TinyMatrix
<
1
,
1
,
double
>>
or
//
std
::
is_same_v
<
std
::
remove_const_t
<
DataType
>
,
TinyMatrix
<
2
,
2
,
double
>>
or
//
std
::
is_same_v
<
std
::
remove_const_t
<
DataType
>
,
TinyMatrix
<
3
,
3
,
double
>>
,
"SubItemValuePerItem with this DataType is not allowed in variant"
);
"SubItemValuePerItem with this DataType is not allowed in variant"
);
}
}
...
...
This diff is collapsed.
Click to expand it.
tests/test_SubItemValuePerItemVariant.cpp
+
55
−
16
View file @
456dcc70
...
@@ -18,6 +18,9 @@ TEST_CASE("SubItemValuePerItemVariant", "[mesh]")
...
@@ -18,6 +18,9 @@ TEST_CASE("SubItemValuePerItemVariant", "[mesh]")
using
R1
=
TinyVector
<
1
>
;
using
R1
=
TinyVector
<
1
>
;
using
R2
=
TinyVector
<
2
>
;
using
R2
=
TinyVector
<
2
>
;
using
R3
=
TinyVector
<
3
>
;
using
R3
=
TinyVector
<
3
>
;
using
R1x1
=
TinyMatrix
<
1
>
;
using
R2x2
=
TinyMatrix
<
2
>
;
using
R3x3
=
TinyMatrix
<
3
>
;
SECTION
(
"NodeValuePerCell<double>"
)
SECTION
(
"NodeValuePerCell<double>"
)
{
{
...
@@ -29,6 +32,9 @@ TEST_CASE("SubItemValuePerItemVariant", "[mesh]")
...
@@ -29,6 +32,9 @@ TEST_CASE("SubItemValuePerItemVariant", "[mesh]")
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerCell
<
R1
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerCell
<
R1
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerCell
<
R2
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerCell
<
R2
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerCell
<
R3
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerCell
<
R3
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerCell
<
R1x1
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerCell
<
R2x2
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerCell
<
R3x3
>>
(),
"error: invalid SubItemValuePerItem type"
);
}
}
SECTION
(
"NodeValuePerFace<R1>"
)
SECTION
(
"NodeValuePerFace<R1>"
)
...
@@ -41,6 +47,9 @@ TEST_CASE("SubItemValuePerItemVariant", "[mesh]")
...
@@ -41,6 +47,9 @@ TEST_CASE("SubItemValuePerItemVariant", "[mesh]")
REQUIRE_NOTHROW
(
v
.
get
<
NodeValuePerFace
<
const
R1
>>
());
REQUIRE_NOTHROW
(
v
.
get
<
NodeValuePerFace
<
const
R1
>>
());
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerFace
<
const
R2
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerFace
<
const
R2
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerFace
<
const
R3
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerFace
<
const
R3
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerFace
<
const
R1x1
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerFace
<
const
R2x2
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerFace
<
const
R3x3
>>
(),
"error: invalid SubItemValuePerItem type"
);
}
}
SECTION
(
"NodeValuePerEdge<int64_t>"
)
SECTION
(
"NodeValuePerEdge<int64_t>"
)
...
@@ -53,6 +62,9 @@ TEST_CASE("SubItemValuePerItemVariant", "[mesh]")
...
@@ -53,6 +62,9 @@ TEST_CASE("SubItemValuePerItemVariant", "[mesh]")
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerEdge
<
R1
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerEdge
<
R1
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerEdge
<
R2
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerEdge
<
R2
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerEdge
<
R3
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerEdge
<
R3
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerEdge
<
R1x1
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerEdge
<
R2x2
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerEdge
<
R3x3
>>
(),
"error: invalid SubItemValuePerItem type"
);
}
}
SECTION
(
"EdgeValuePerCell<R2>"
)
SECTION
(
"EdgeValuePerCell<R2>"
)
...
@@ -65,6 +77,9 @@ TEST_CASE("SubItemValuePerItemVariant", "[mesh]")
...
@@ -65,6 +77,9 @@ TEST_CASE("SubItemValuePerItemVariant", "[mesh]")
REQUIRE_THROWS_WITH
(
v
.
get
<
EdgeValuePerCell
<
R1
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
EdgeValuePerCell
<
R1
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_NOTHROW
(
v
.
get
<
EdgeValuePerCell
<
R2
>>
());
REQUIRE_NOTHROW
(
v
.
get
<
EdgeValuePerCell
<
R2
>>
());
REQUIRE_THROWS_WITH
(
v
.
get
<
EdgeValuePerCell
<
R3
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
EdgeValuePerCell
<
R3
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
EdgeValuePerCell
<
R1x1
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
EdgeValuePerCell
<
R2x2
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
EdgeValuePerCell
<
R3x3
>>
(),
"error: invalid SubItemValuePerItem type"
);
}
}
SECTION
(
"EdgeValuePerFace<R1>"
)
SECTION
(
"EdgeValuePerFace<R1>"
)
...
@@ -77,6 +92,9 @@ TEST_CASE("SubItemValuePerItemVariant", "[mesh]")
...
@@ -77,6 +92,9 @@ TEST_CASE("SubItemValuePerItemVariant", "[mesh]")
REQUIRE_NOTHROW
(
v
.
get
<
EdgeValuePerFace
<
R1
>>
());
REQUIRE_NOTHROW
(
v
.
get
<
EdgeValuePerFace
<
R1
>>
());
REQUIRE_THROWS_WITH
(
v
.
get
<
EdgeValuePerFace
<
R2
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
EdgeValuePerFace
<
R2
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
EdgeValuePerFace
<
R3
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
EdgeValuePerFace
<
R3
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
EdgeValuePerFace
<
R1x1
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
EdgeValuePerFace
<
R2x2
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
EdgeValuePerFace
<
R3x3
>>
(),
"error: invalid SubItemValuePerItem type"
);
}
}
SECTION
(
"EdgeValuePerNode<double>"
)
SECTION
(
"EdgeValuePerNode<double>"
)
...
@@ -89,54 +107,69 @@ TEST_CASE("SubItemValuePerItemVariant", "[mesh]")
...
@@ -89,54 +107,69 @@ TEST_CASE("SubItemValuePerItemVariant", "[mesh]")
REQUIRE_THROWS_WITH
(
v
.
get
<
EdgeValuePerNode
<
R1
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
EdgeValuePerNode
<
R1
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
EdgeValuePerNode
<
R2
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
EdgeValuePerNode
<
R2
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
EdgeValuePerNode
<
R3
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
EdgeValuePerNode
<
R3
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
EdgeValuePerNode
<
R1x1
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
EdgeValuePerNode
<
R2x2
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
EdgeValuePerNode
<
R3x3
>>
(),
"error: invalid SubItemValuePerItem type"
);
}
}
SECTION
(
"FaceValuePerCell<
uint64_t
>"
)
SECTION
(
"FaceValuePerCell<
R3x3
>"
)
{
{
FaceValuePerCell
<
uint64_t
>
node_value
{
connectivity
};
FaceValuePerCell
<
R3x3
>
node_value
{
connectivity
};
SubItemValuePerItemVariant
v
(
node_value
);
SubItemValuePerItemVariant
v
(
node_value
);
REQUIRE_THROWS_WITH
(
v
.
get
<
FaceValuePerCell
<
double
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
FaceValuePerCell
<
double
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
FaceValuePerCell
<
int64_t
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
FaceValuePerCell
<
int64_t
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_
NO
THROW
(
v
.
get
<
FaceValuePerCell
<
uint64_t
>>
());
REQUIRE_THROW
S_WITH
(
v
.
get
<
FaceValuePerCell
<
uint64_t
>>
()
,
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
FaceValuePerCell
<
R1
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
FaceValuePerCell
<
R1
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
FaceValuePerCell
<
R2
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
FaceValuePerCell
<
R2
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
FaceValuePerCell
<
R3
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
FaceValuePerCell
<
R3
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
FaceValuePerCell
<
R1x1
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
FaceValuePerCell
<
R2x2
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_NOTHROW
(
v
.
get
<
FaceValuePerCell
<
R3x3
>>
());
}
}
SECTION
(
"FaceValuePerEdge<
double
>"
)
SECTION
(
"FaceValuePerEdge<
R2x2
>"
)
{
{
FaceValuePerEdge
<
double
>
node_value
{
connectivity
};
FaceValuePerEdge
<
R2x2
>
node_value
{
connectivity
};
SubItemValuePerItemVariant
v
(
node_value
);
SubItemValuePerItemVariant
v
(
node_value
);
REQUIRE_
NO
THROW
(
v
.
get
<
FaceValuePerEdge
<
double
>>
());
REQUIRE_THROW
S_WITH
(
v
.
get
<
FaceValuePerEdge
<
double
>>
()
,
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
FaceValuePerEdge
<
int64_t
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
FaceValuePerEdge
<
int64_t
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
FaceValuePerEdge
<
uint64_t
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
FaceValuePerEdge
<
uint64_t
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
FaceValuePerEdge
<
R1
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
FaceValuePerEdge
<
R1
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
FaceValuePerEdge
<
R2
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
FaceValuePerEdge
<
R2
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
FaceValuePerEdge
<
R3
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
FaceValuePerEdge
<
R3
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
FaceValuePerEdge
<
R1x1
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_NOTHROW
(
v
.
get
<
FaceValuePerEdge
<
R2x2
>>
());
REQUIRE_THROWS_WITH
(
v
.
get
<
FaceValuePerEdge
<
R3x3
>>
(),
"error: invalid SubItemValuePerItem type"
);
}
}
SECTION
(
"FaceValuePerNode<
double
>"
)
SECTION
(
"FaceValuePerNode<
uint64_t
>"
)
{
{
FaceValuePerNode
<
double
>
node_value
{
connectivity
};
FaceValuePerNode
<
uint64_t
>
node_value
{
connectivity
};
SubItemValuePerItemVariant
v
(
node_value
);
SubItemValuePerItemVariant
v
(
node_value
);
REQUIRE_
NO
THROW
(
v
.
get
<
FaceValuePerNode
<
double
>>
());
REQUIRE_THROW
S_WITH
(
v
.
get
<
FaceValuePerNode
<
double
>>
()
,
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
FaceValuePerNode
<
int64_t
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
FaceValuePerNode
<
int64_t
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROW
S_WITH
(
v
.
get
<
FaceValuePerNode
<
uint64_t
>>
()
,
"error: invalid SubItemValuePerItem type"
);
REQUIRE_
NO
THROW
(
v
.
get
<
FaceValuePerNode
<
uint64_t
>>
());
REQUIRE_THROWS_WITH
(
v
.
get
<
FaceValuePerNode
<
R1
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
FaceValuePerNode
<
R1
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
FaceValuePerNode
<
R2
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
FaceValuePerNode
<
R2
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
FaceValuePerNode
<
R3
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
FaceValuePerNode
<
R3
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
FaceValuePerNode
<
R1x1
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
FaceValuePerNode
<
R2x2
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
FaceValuePerNode
<
R3x3
>>
(),
"error: invalid SubItemValuePerItem type"
);
}
}
SECTION
(
"NodeValuePerCell<
double
>"
)
SECTION
(
"NodeValuePerCell<
R1x1
>"
)
{
{
NodeValuePerCell
<
double
>
node_value
{
connectivity
};
NodeValuePerCell
<
R1x1
>
node_value
{
connectivity
};
SubItemValuePerItemVariant
v
(
node_value
);
SubItemValuePerItemVariant
v
(
node_value
);
REQUIRE_
NO
THROW
(
v
.
get
<
NodeValuePerCell
<
double
>>
());
REQUIRE_THROW
S_WITH
(
v
.
get
<
NodeValuePerCell
<
double
>>
()
,
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerCell
<
int64_t
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerCell
<
int64_t
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerCell
<
uint64_t
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerCell
<
uint64_t
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerCell
<
R1
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerCell
<
R1
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerCell
<
R2
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerCell
<
R2
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerCell
<
R3
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerCell
<
R3
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_NOTHROW
(
v
.
get
<
NodeValuePerCell
<
R1x1
>>
());
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerCell
<
R2x2
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerCell
<
R3x3
>>
(),
"error: invalid SubItemValuePerItem type"
);
}
}
SECTION
(
"NodeValuePerFace<R3>"
)
SECTION
(
"NodeValuePerFace<R3>"
)
...
@@ -149,6 +182,9 @@ TEST_CASE("SubItemValuePerItemVariant", "[mesh]")
...
@@ -149,6 +182,9 @@ TEST_CASE("SubItemValuePerItemVariant", "[mesh]")
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerFace
<
R1
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerFace
<
R1
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerFace
<
R2
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerFace
<
R2
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_NOTHROW
(
v
.
get
<
NodeValuePerFace
<
R3
>>
());
REQUIRE_NOTHROW
(
v
.
get
<
NodeValuePerFace
<
R3
>>
());
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerFace
<
R1x1
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerFace
<
R2x2
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerFace
<
R3x3
>>
(),
"error: invalid SubItemValuePerItem type"
);
}
}
SECTION
(
"NodeValuePerEdge<double>"
)
SECTION
(
"NodeValuePerEdge<double>"
)
...
@@ -161,5 +197,8 @@ TEST_CASE("SubItemValuePerItemVariant", "[mesh]")
...
@@ -161,5 +197,8 @@ TEST_CASE("SubItemValuePerItemVariant", "[mesh]")
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerEdge
<
R1
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerEdge
<
R1
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerEdge
<
R2
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerEdge
<
R2
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerEdge
<
R3
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerEdge
<
R3
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerEdge
<
R1x1
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerEdge
<
R2x2
>>
(),
"error: invalid SubItemValuePerItem type"
);
REQUIRE_THROWS_WITH
(
v
.
get
<
NodeValuePerEdge
<
R3x3
>>
(),
"error: invalid SubItemValuePerItem type"
);
}
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment