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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
code
pugs
Commits
d1514df1
Commit
d1514df1
authored
3 years ago
by
Stéphane Del Pino
Browse files
Options
Downloads
Patches
Plain Diff
Rename same_cell_value -> same_item_value
parent
7064b40e
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!128
Feature/unit tests
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_InterpolateItemValue.cpp
+39
-39
39 additions, 39 deletions
tests/test_InterpolateItemValue.cpp
with
39 additions
and
39 deletions
tests/test_InterpolateItemValue.cpp
+
39
−
39
View file @
d1514df1
...
@@ -28,7 +28,7 @@ TEST_CASE("InterpolateItemValue", "[language]")
...
@@ -28,7 +28,7 @@ TEST_CASE("InterpolateItemValue", "[language]")
{
{
SECTION
(
"interpolate on all items"
)
SECTION
(
"interpolate on all items"
)
{
{
auto
same_
cell
_value
=
[](
auto
f
,
auto
g
)
->
bool
{
auto
same_
item
_value
=
[](
auto
f
,
auto
g
)
->
bool
{
using
ItemIdType
=
typename
decltype
(
f
)
::
index_type
;
using
ItemIdType
=
typename
decltype
(
f
)
::
index_type
;
for
(
ItemIdType
item_id
=
0
;
item_id
<
f
.
numberOfItems
();
++
item_id
)
{
for
(
ItemIdType
item_id
=
0
;
item_id
<
f
.
numberOfItems
();
++
item_id
)
{
if
(
f
[
item_id
]
!=
g
[
item_id
])
{
if
(
f
[
item_id
]
!=
g
[
item_id
])
{
...
@@ -98,7 +98,7 @@ let R2x2_non_linear_1d: R^1 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[0]) + 3, sin(x
...
@@ -98,7 +98,7 @@ let R2x2_non_linear_1d: R^1 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[0]) + 3, sin(x
CellValue
<
const
double
>
interpolate_value
=
CellValue
<
const
double
>
interpolate_value
=
InterpolateItemValue
<
double
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
);
InterpolateItemValue
<
double
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
);
REQUIRE
(
same_
cell
_value
(
cell_value
,
interpolate_value
));
REQUIRE
(
same_
item
_value
(
cell_value
,
interpolate_value
));
}
}
SECTION
(
"scalar_non_linear_1d"
)
SECTION
(
"scalar_non_linear_1d"
)
...
@@ -119,7 +119,7 @@ let R2x2_non_linear_1d: R^1 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[0]) + 3, sin(x
...
@@ -119,7 +119,7 @@ let R2x2_non_linear_1d: R^1 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[0]) + 3, sin(x
CellValue
<
const
double
>
interpolate_value
=
CellValue
<
const
double
>
interpolate_value
=
InterpolateItemValue
<
double
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
);
InterpolateItemValue
<
double
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
);
REQUIRE
(
same_
cell
_value
(
cell_value
,
interpolate_value
));
REQUIRE
(
same_
item
_value
(
cell_value
,
interpolate_value
));
}
}
SECTION
(
"R3_affine_1d"
)
SECTION
(
"R3_affine_1d"
)
...
@@ -140,7 +140,7 @@ let R2x2_non_linear_1d: R^1 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[0]) + 3, sin(x
...
@@ -140,7 +140,7 @@ let R2x2_non_linear_1d: R^1 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[0]) + 3, sin(x
CellValue
<
const
TinyVector
<
3
>>
interpolate_value
=
CellValue
<
const
TinyVector
<
3
>>
interpolate_value
=
InterpolateItemValue
<
TinyVector
<
3
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
);
InterpolateItemValue
<
TinyVector
<
3
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
);
REQUIRE
(
same_
cell
_value
(
cell_value
,
interpolate_value
));
REQUIRE
(
same_
item
_value
(
cell_value
,
interpolate_value
));
}
}
SECTION
(
"R3_non_linear_1d"
)
SECTION
(
"R3_non_linear_1d"
)
...
@@ -161,7 +161,7 @@ let R2x2_non_linear_1d: R^1 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[0]) + 3, sin(x
...
@@ -161,7 +161,7 @@ let R2x2_non_linear_1d: R^1 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[0]) + 3, sin(x
CellValue
<
const
TinyVector
<
3
>>
interpolate_value
=
CellValue
<
const
TinyVector
<
3
>>
interpolate_value
=
InterpolateItemValue
<
TinyVector
<
3
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
);
InterpolateItemValue
<
TinyVector
<
3
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
);
REQUIRE
(
same_
cell
_value
(
cell_value
,
interpolate_value
));
REQUIRE
(
same_
item
_value
(
cell_value
,
interpolate_value
));
}
}
SECTION
(
"R2x2_affine_1d"
)
SECTION
(
"R2x2_affine_1d"
)
...
@@ -182,7 +182,7 @@ let R2x2_non_linear_1d: R^1 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[0]) + 3, sin(x
...
@@ -182,7 +182,7 @@ let R2x2_non_linear_1d: R^1 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[0]) + 3, sin(x
CellValue
<
const
TinyMatrix
<
2
>>
interpolate_value
=
CellValue
<
const
TinyMatrix
<
2
>>
interpolate_value
=
InterpolateItemValue
<
TinyMatrix
<
2
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
);
InterpolateItemValue
<
TinyMatrix
<
2
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
);
REQUIRE
(
same_
cell
_value
(
cell_value
,
interpolate_value
));
REQUIRE
(
same_
item
_value
(
cell_value
,
interpolate_value
));
}
}
SECTION
(
"R2x2_non_linear_1d"
)
SECTION
(
"R2x2_non_linear_1d"
)
...
@@ -204,7 +204,7 @@ let R2x2_non_linear_1d: R^1 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[0]) + 3, sin(x
...
@@ -204,7 +204,7 @@ let R2x2_non_linear_1d: R^1 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[0]) + 3, sin(x
CellValue
<
const
TinyMatrix
<
2
>>
interpolate_value
=
CellValue
<
const
TinyMatrix
<
2
>>
interpolate_value
=
InterpolateItemValue
<
TinyMatrix
<
2
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
);
InterpolateItemValue
<
TinyMatrix
<
2
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
);
REQUIRE
(
same_
cell
_value
(
cell_value
,
interpolate_value
));
REQUIRE
(
same_
item
_value
(
cell_value
,
interpolate_value
));
}
}
}
}
}
}
...
@@ -268,7 +268,7 @@ let R2x2_non_linear_2d: R^2 -> R^2x2, x -> (2*exp(x[0])*sin(x[1])+3, sin(x[0]-2*
...
@@ -268,7 +268,7 @@ let R2x2_non_linear_2d: R^2 -> R^2x2, x -> (2*exp(x[0])*sin(x[1])+3, sin(x[0]-2*
CellValue
<
const
double
>
interpolate_value
=
CellValue
<
const
double
>
interpolate_value
=
InterpolateItemValue
<
double
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
);
InterpolateItemValue
<
double
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
);
REQUIRE
(
same_
cell
_value
(
cell_value
,
interpolate_value
));
REQUIRE
(
same_
item
_value
(
cell_value
,
interpolate_value
));
}
}
SECTION
(
"scalar_non_linear_2d"
)
SECTION
(
"scalar_non_linear_2d"
)
...
@@ -288,7 +288,7 @@ let R2x2_non_linear_2d: R^2 -> R^2x2, x -> (2*exp(x[0])*sin(x[1])+3, sin(x[0]-2*
...
@@ -288,7 +288,7 @@ let R2x2_non_linear_2d: R^2 -> R^2x2, x -> (2*exp(x[0])*sin(x[1])+3, sin(x[0]-2*
CellValue
<
const
double
>
interpolate_value
=
CellValue
<
const
double
>
interpolate_value
=
InterpolateItemValue
<
double
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
);
InterpolateItemValue
<
double
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
);
REQUIRE
(
same_
cell
_value
(
cell_value
,
interpolate_value
));
REQUIRE
(
same_
item
_value
(
cell_value
,
interpolate_value
));
}
}
SECTION
(
"R3_affine_2d"
)
SECTION
(
"R3_affine_2d"
)
...
@@ -308,7 +308,7 @@ let R2x2_non_linear_2d: R^2 -> R^2x2, x -> (2*exp(x[0])*sin(x[1])+3, sin(x[0]-2*
...
@@ -308,7 +308,7 @@ let R2x2_non_linear_2d: R^2 -> R^2x2, x -> (2*exp(x[0])*sin(x[1])+3, sin(x[0]-2*
CellValue
<
const
TinyVector
<
3
>>
interpolate_value
=
CellValue
<
const
TinyVector
<
3
>>
interpolate_value
=
InterpolateItemValue
<
TinyVector
<
3
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
);
InterpolateItemValue
<
TinyVector
<
3
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
);
REQUIRE
(
same_
cell
_value
(
cell_value
,
interpolate_value
));
REQUIRE
(
same_
item
_value
(
cell_value
,
interpolate_value
));
}
}
SECTION
(
"R3_non_linear_2d"
)
SECTION
(
"R3_non_linear_2d"
)
...
@@ -328,7 +328,7 @@ let R2x2_non_linear_2d: R^2 -> R^2x2, x -> (2*exp(x[0])*sin(x[1])+3, sin(x[0]-2*
...
@@ -328,7 +328,7 @@ let R2x2_non_linear_2d: R^2 -> R^2x2, x -> (2*exp(x[0])*sin(x[1])+3, sin(x[0]-2*
CellValue
<
const
TinyVector
<
3
>>
interpolate_value
=
CellValue
<
const
TinyVector
<
3
>>
interpolate_value
=
InterpolateItemValue
<
TinyVector
<
3
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
);
InterpolateItemValue
<
TinyVector
<
3
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
);
REQUIRE
(
same_
cell
_value
(
cell_value
,
interpolate_value
));
REQUIRE
(
same_
item
_value
(
cell_value
,
interpolate_value
));
}
}
SECTION
(
"R2x2_affine_2d"
)
SECTION
(
"R2x2_affine_2d"
)
...
@@ -348,7 +348,7 @@ let R2x2_non_linear_2d: R^2 -> R^2x2, x -> (2*exp(x[0])*sin(x[1])+3, sin(x[0]-2*
...
@@ -348,7 +348,7 @@ let R2x2_non_linear_2d: R^2 -> R^2x2, x -> (2*exp(x[0])*sin(x[1])+3, sin(x[0]-2*
CellValue
<
const
TinyMatrix
<
2
>>
interpolate_value
=
CellValue
<
const
TinyMatrix
<
2
>>
interpolate_value
=
InterpolateItemValue
<
TinyMatrix
<
2
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
);
InterpolateItemValue
<
TinyMatrix
<
2
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
);
REQUIRE
(
same_
cell
_value
(
cell_value
,
interpolate_value
));
REQUIRE
(
same_
item
_value
(
cell_value
,
interpolate_value
));
}
}
SECTION
(
"R2x2_non_linear_2d"
)
SECTION
(
"R2x2_non_linear_2d"
)
...
@@ -369,7 +369,7 @@ let R2x2_non_linear_2d: R^2 -> R^2x2, x -> (2*exp(x[0])*sin(x[1])+3, sin(x[0]-2*
...
@@ -369,7 +369,7 @@ let R2x2_non_linear_2d: R^2 -> R^2x2, x -> (2*exp(x[0])*sin(x[1])+3, sin(x[0]-2*
CellValue
<
const
TinyMatrix
<
2
>>
interpolate_value
=
CellValue
<
const
TinyMatrix
<
2
>>
interpolate_value
=
InterpolateItemValue
<
TinyMatrix
<
2
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
);
InterpolateItemValue
<
TinyMatrix
<
2
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
);
REQUIRE
(
same_
cell
_value
(
cell_value
,
interpolate_value
));
REQUIRE
(
same_
item
_value
(
cell_value
,
interpolate_value
));
}
}
}
}
}
}
...
@@ -433,7 +433,7 @@ let R2x2_non_linear_3d: R^3 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[1]) + 3 * cos(
...
@@ -433,7 +433,7 @@ let R2x2_non_linear_3d: R^3 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[1]) + 3 * cos(
CellValue
<
const
double
>
interpolate_value
=
CellValue
<
const
double
>
interpolate_value
=
InterpolateItemValue
<
double
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
);
InterpolateItemValue
<
double
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
);
REQUIRE
(
same_
cell
_value
(
cell_value
,
interpolate_value
));
REQUIRE
(
same_
item
_value
(
cell_value
,
interpolate_value
));
}
}
SECTION
(
"scalar_non_linear_3d"
)
SECTION
(
"scalar_non_linear_3d"
)
...
@@ -453,7 +453,7 @@ let R2x2_non_linear_3d: R^3 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[1]) + 3 * cos(
...
@@ -453,7 +453,7 @@ let R2x2_non_linear_3d: R^3 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[1]) + 3 * cos(
CellValue
<
const
double
>
interpolate_value
=
CellValue
<
const
double
>
interpolate_value
=
InterpolateItemValue
<
double
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
);
InterpolateItemValue
<
double
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
);
REQUIRE
(
same_
cell
_value
(
cell_value
,
interpolate_value
));
REQUIRE
(
same_
item
_value
(
cell_value
,
interpolate_value
));
}
}
SECTION
(
"R3_affine_3d"
)
SECTION
(
"R3_affine_3d"
)
...
@@ -473,7 +473,7 @@ let R2x2_non_linear_3d: R^3 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[1]) + 3 * cos(
...
@@ -473,7 +473,7 @@ let R2x2_non_linear_3d: R^3 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[1]) + 3 * cos(
CellValue
<
const
TinyVector
<
3
>>
interpolate_value
=
CellValue
<
const
TinyVector
<
3
>>
interpolate_value
=
InterpolateItemValue
<
TinyVector
<
3
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
);
InterpolateItemValue
<
TinyVector
<
3
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
);
REQUIRE
(
same_
cell
_value
(
cell_value
,
interpolate_value
));
REQUIRE
(
same_
item
_value
(
cell_value
,
interpolate_value
));
}
}
SECTION
(
"R3_non_linear_3d"
)
SECTION
(
"R3_non_linear_3d"
)
...
@@ -493,7 +493,7 @@ let R2x2_non_linear_3d: R^3 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[1]) + 3 * cos(
...
@@ -493,7 +493,7 @@ let R2x2_non_linear_3d: R^3 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[1]) + 3 * cos(
CellValue
<
const
TinyVector
<
3
>>
interpolate_value
=
CellValue
<
const
TinyVector
<
3
>>
interpolate_value
=
InterpolateItemValue
<
TinyVector
<
3
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
);
InterpolateItemValue
<
TinyVector
<
3
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
);
REQUIRE
(
same_
cell
_value
(
cell_value
,
interpolate_value
));
REQUIRE
(
same_
item
_value
(
cell_value
,
interpolate_value
));
}
}
SECTION
(
"R2x2_affine_3d"
)
SECTION
(
"R2x2_affine_3d"
)
...
@@ -514,7 +514,7 @@ let R2x2_non_linear_3d: R^3 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[1]) + 3 * cos(
...
@@ -514,7 +514,7 @@ let R2x2_non_linear_3d: R^3 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[1]) + 3 * cos(
CellValue
<
const
TinyMatrix
<
2
>>
interpolate_value
=
CellValue
<
const
TinyMatrix
<
2
>>
interpolate_value
=
InterpolateItemValue
<
TinyMatrix
<
2
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
);
InterpolateItemValue
<
TinyMatrix
<
2
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
);
REQUIRE
(
same_
cell
_value
(
cell_value
,
interpolate_value
));
REQUIRE
(
same_
item
_value
(
cell_value
,
interpolate_value
));
}
}
SECTION
(
"R2x2_non_linear_3d"
)
SECTION
(
"R2x2_non_linear_3d"
)
...
@@ -535,16 +535,16 @@ let R2x2_non_linear_3d: R^3 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[1]) + 3 * cos(
...
@@ -535,16 +535,16 @@ let R2x2_non_linear_3d: R^3 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[1]) + 3 * cos(
CellValue
<
const
TinyMatrix
<
2
>>
interpolate_value
=
CellValue
<
const
TinyMatrix
<
2
>>
interpolate_value
=
InterpolateItemValue
<
TinyMatrix
<
2
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
);
InterpolateItemValue
<
TinyMatrix
<
2
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
);
REQUIRE
(
same_
cell
_value
(
cell_value
,
interpolate_value
));
REQUIRE
(
same_
item
_value
(
cell_value
,
interpolate_value
));
}
}
}
}
}
}
}
}
}
}
SECTION
(
"interpolate on item
s
list"
)
SECTION
(
"interpolate on item list"
)
{
{
auto
same_
cell
_value
=
[](
auto
interpolated
,
auto
reference
)
->
bool
{
auto
same_
item
_value
=
[](
auto
interpolated
,
auto
reference
)
->
bool
{
for
(
size_t
i
=
0
;
i
<
interpolated
.
size
();
++
i
)
{
for
(
size_t
i
=
0
;
i
<
interpolated
.
size
();
++
i
)
{
if
(
interpolated
[
i
]
!=
reference
[
i
])
{
if
(
interpolated
[
i
]
!=
reference
[
i
])
{
return
false
;
return
false
;
...
@@ -621,7 +621,7 @@ let R2x2_non_linear_1d: R^1 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[0]) + 3, sin(x
...
@@ -621,7 +621,7 @@ let R2x2_non_linear_1d: R^1 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[0]) + 3, sin(x
Array
<
const
double
>
interpolate_value
=
Array
<
const
double
>
interpolate_value
=
InterpolateItemValue
<
double
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
,
cell_id_list
);
InterpolateItemValue
<
double
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
,
cell_id_list
);
REQUIRE
(
same_
cell
_value
(
cell_value
,
interpolate_value
));
REQUIRE
(
same_
item
_value
(
cell_value
,
interpolate_value
));
}
}
SECTION
(
"scalar_non_linear_1d"
)
SECTION
(
"scalar_non_linear_1d"
)
...
@@ -642,7 +642,7 @@ let R2x2_non_linear_1d: R^1 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[0]) + 3, sin(x
...
@@ -642,7 +642,7 @@ let R2x2_non_linear_1d: R^1 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[0]) + 3, sin(x
Array
<
const
double
>
interpolate_value
=
Array
<
const
double
>
interpolate_value
=
InterpolateItemValue
<
double
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
,
cell_id_list
);
InterpolateItemValue
<
double
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
,
cell_id_list
);
REQUIRE
(
same_
cell
_value
(
cell_value
,
interpolate_value
));
REQUIRE
(
same_
item
_value
(
cell_value
,
interpolate_value
));
}
}
SECTION
(
"R3_affine_1d"
)
SECTION
(
"R3_affine_1d"
)
...
@@ -664,7 +664,7 @@ let R2x2_non_linear_1d: R^1 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[0]) + 3, sin(x
...
@@ -664,7 +664,7 @@ let R2x2_non_linear_1d: R^1 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[0]) + 3, sin(x
InterpolateItemValue
<
TinyVector
<
3
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
,
InterpolateItemValue
<
TinyVector
<
3
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
,
cell_id_list
);
cell_id_list
);
REQUIRE
(
same_
cell
_value
(
cell_value
,
interpolate_value
));
REQUIRE
(
same_
item
_value
(
cell_value
,
interpolate_value
));
}
}
SECTION
(
"R3_non_linear_1d"
)
SECTION
(
"R3_non_linear_1d"
)
...
@@ -686,7 +686,7 @@ let R2x2_non_linear_1d: R^1 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[0]) + 3, sin(x
...
@@ -686,7 +686,7 @@ let R2x2_non_linear_1d: R^1 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[0]) + 3, sin(x
InterpolateItemValue
<
TinyVector
<
3
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
,
InterpolateItemValue
<
TinyVector
<
3
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
,
cell_id_list
);
cell_id_list
);
REQUIRE
(
same_
cell
_value
(
cell_value
,
interpolate_value
));
REQUIRE
(
same_
item
_value
(
cell_value
,
interpolate_value
));
}
}
SECTION
(
"R2x2_affine_1d"
)
SECTION
(
"R2x2_affine_1d"
)
...
@@ -708,7 +708,7 @@ let R2x2_non_linear_1d: R^1 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[0]) + 3, sin(x
...
@@ -708,7 +708,7 @@ let R2x2_non_linear_1d: R^1 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[0]) + 3, sin(x
InterpolateItemValue
<
TinyMatrix
<
2
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
,
InterpolateItemValue
<
TinyMatrix
<
2
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
,
cell_id_list
);
cell_id_list
);
REQUIRE
(
same_
cell
_value
(
cell_value
,
interpolate_value
));
REQUIRE
(
same_
item
_value
(
cell_value
,
interpolate_value
));
}
}
SECTION
(
"R2x2_non_linear_1d"
)
SECTION
(
"R2x2_non_linear_1d"
)
...
@@ -730,7 +730,7 @@ let R2x2_non_linear_1d: R^1 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[0]) + 3, sin(x
...
@@ -730,7 +730,7 @@ let R2x2_non_linear_1d: R^1 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[0]) + 3, sin(x
InterpolateItemValue
<
TinyMatrix
<
2
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
,
InterpolateItemValue
<
TinyMatrix
<
2
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
,
cell_id_list
);
cell_id_list
);
REQUIRE
(
same_
cell
_value
(
cell_value
,
interpolate_value
));
REQUIRE
(
same_
item
_value
(
cell_value
,
interpolate_value
));
}
}
}
}
}
}
...
@@ -800,7 +800,7 @@ let R2x2_non_linear_2d: R^2 -> R^2x2, x -> (2*exp(x[0])*sin(x[1])+3, sin(x[0]-2*
...
@@ -800,7 +800,7 @@ let R2x2_non_linear_2d: R^2 -> R^2x2, x -> (2*exp(x[0])*sin(x[1])+3, sin(x[0]-2*
Array
<
const
double
>
interpolate_value
=
Array
<
const
double
>
interpolate_value
=
InterpolateItemValue
<
double
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
,
cell_id_list
);
InterpolateItemValue
<
double
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
,
cell_id_list
);
REQUIRE
(
same_
cell
_value
(
cell_value
,
interpolate_value
));
REQUIRE
(
same_
item
_value
(
cell_value
,
interpolate_value
));
}
}
SECTION
(
"scalar_non_linear_2d"
)
SECTION
(
"scalar_non_linear_2d"
)
...
@@ -820,7 +820,7 @@ let R2x2_non_linear_2d: R^2 -> R^2x2, x -> (2*exp(x[0])*sin(x[1])+3, sin(x[0]-2*
...
@@ -820,7 +820,7 @@ let R2x2_non_linear_2d: R^2 -> R^2x2, x -> (2*exp(x[0])*sin(x[1])+3, sin(x[0]-2*
Array
<
const
double
>
interpolate_value
=
Array
<
const
double
>
interpolate_value
=
InterpolateItemValue
<
double
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
,
cell_id_list
);
InterpolateItemValue
<
double
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
,
cell_id_list
);
REQUIRE
(
same_
cell
_value
(
cell_value
,
interpolate_value
));
REQUIRE
(
same_
item
_value
(
cell_value
,
interpolate_value
));
}
}
SECTION
(
"R3_affine_2d"
)
SECTION
(
"R3_affine_2d"
)
...
@@ -841,7 +841,7 @@ let R2x2_non_linear_2d: R^2 -> R^2x2, x -> (2*exp(x[0])*sin(x[1])+3, sin(x[0]-2*
...
@@ -841,7 +841,7 @@ let R2x2_non_linear_2d: R^2 -> R^2x2, x -> (2*exp(x[0])*sin(x[1])+3, sin(x[0]-2*
InterpolateItemValue
<
TinyVector
<
3
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
,
InterpolateItemValue
<
TinyVector
<
3
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
,
cell_id_list
);
cell_id_list
);
REQUIRE
(
same_
cell
_value
(
cell_value
,
interpolate_value
));
REQUIRE
(
same_
item
_value
(
cell_value
,
interpolate_value
));
}
}
SECTION
(
"R3_non_linear_2d"
)
SECTION
(
"R3_non_linear_2d"
)
...
@@ -862,7 +862,7 @@ let R2x2_non_linear_2d: R^2 -> R^2x2, x -> (2*exp(x[0])*sin(x[1])+3, sin(x[0]-2*
...
@@ -862,7 +862,7 @@ let R2x2_non_linear_2d: R^2 -> R^2x2, x -> (2*exp(x[0])*sin(x[1])+3, sin(x[0]-2*
InterpolateItemValue
<
TinyVector
<
3
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
,
InterpolateItemValue
<
TinyVector
<
3
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
,
cell_id_list
);
cell_id_list
);
REQUIRE
(
same_
cell
_value
(
cell_value
,
interpolate_value
));
REQUIRE
(
same_
item
_value
(
cell_value
,
interpolate_value
));
}
}
SECTION
(
"R2x2_affine_2d"
)
SECTION
(
"R2x2_affine_2d"
)
...
@@ -883,7 +883,7 @@ let R2x2_non_linear_2d: R^2 -> R^2x2, x -> (2*exp(x[0])*sin(x[1])+3, sin(x[0]-2*
...
@@ -883,7 +883,7 @@ let R2x2_non_linear_2d: R^2 -> R^2x2, x -> (2*exp(x[0])*sin(x[1])+3, sin(x[0]-2*
InterpolateItemValue
<
TinyMatrix
<
2
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
,
InterpolateItemValue
<
TinyMatrix
<
2
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
,
cell_id_list
);
cell_id_list
);
REQUIRE
(
same_
cell
_value
(
cell_value
,
interpolate_value
));
REQUIRE
(
same_
item
_value
(
cell_value
,
interpolate_value
));
}
}
SECTION
(
"R2x2_non_linear_2d"
)
SECTION
(
"R2x2_non_linear_2d"
)
...
@@ -904,7 +904,7 @@ let R2x2_non_linear_2d: R^2 -> R^2x2, x -> (2*exp(x[0])*sin(x[1])+3, sin(x[0]-2*
...
@@ -904,7 +904,7 @@ let R2x2_non_linear_2d: R^2 -> R^2x2, x -> (2*exp(x[0])*sin(x[1])+3, sin(x[0]-2*
InterpolateItemValue
<
TinyMatrix
<
2
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
,
InterpolateItemValue
<
TinyMatrix
<
2
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
,
cell_id_list
);
cell_id_list
);
REQUIRE
(
same_
cell
_value
(
cell_value
,
interpolate_value
));
REQUIRE
(
same_
item
_value
(
cell_value
,
interpolate_value
));
}
}
}
}
}
}
...
@@ -973,7 +973,7 @@ let R2x2_non_linear_3d: R^3 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[1]) + 3 * cos(
...
@@ -973,7 +973,7 @@ let R2x2_non_linear_3d: R^3 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[1]) + 3 * cos(
Array
<
const
double
>
interpolate_value
=
Array
<
const
double
>
interpolate_value
=
InterpolateItemValue
<
double
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
,
cell_id_list
);
InterpolateItemValue
<
double
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
,
cell_id_list
);
REQUIRE
(
same_
cell
_value
(
cell_value
,
interpolate_value
));
REQUIRE
(
same_
item
_value
(
cell_value
,
interpolate_value
));
}
}
SECTION
(
"scalar_non_linear_3d"
)
SECTION
(
"scalar_non_linear_3d"
)
...
@@ -993,7 +993,7 @@ let R2x2_non_linear_3d: R^3 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[1]) + 3 * cos(
...
@@ -993,7 +993,7 @@ let R2x2_non_linear_3d: R^3 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[1]) + 3 * cos(
Array
<
const
double
>
interpolate_value
=
Array
<
const
double
>
interpolate_value
=
InterpolateItemValue
<
double
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
,
cell_id_list
);
InterpolateItemValue
<
double
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
,
cell_id_list
);
REQUIRE
(
same_
cell
_value
(
cell_value
,
interpolate_value
));
REQUIRE
(
same_
item
_value
(
cell_value
,
interpolate_value
));
}
}
SECTION
(
"R3_affine_3d"
)
SECTION
(
"R3_affine_3d"
)
...
@@ -1014,7 +1014,7 @@ let R2x2_non_linear_3d: R^3 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[1]) + 3 * cos(
...
@@ -1014,7 +1014,7 @@ let R2x2_non_linear_3d: R^3 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[1]) + 3 * cos(
InterpolateItemValue
<
TinyVector
<
3
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
,
InterpolateItemValue
<
TinyVector
<
3
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
,
cell_id_list
);
cell_id_list
);
REQUIRE
(
same_
cell
_value
(
cell_value
,
interpolate_value
));
REQUIRE
(
same_
item
_value
(
cell_value
,
interpolate_value
));
}
}
SECTION
(
"R3_non_linear_3d"
)
SECTION
(
"R3_non_linear_3d"
)
...
@@ -1035,7 +1035,7 @@ let R2x2_non_linear_3d: R^3 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[1]) + 3 * cos(
...
@@ -1035,7 +1035,7 @@ let R2x2_non_linear_3d: R^3 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[1]) + 3 * cos(
InterpolateItemValue
<
TinyVector
<
3
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
,
InterpolateItemValue
<
TinyVector
<
3
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
,
cell_id_list
);
cell_id_list
);
REQUIRE
(
same_
cell
_value
(
cell_value
,
interpolate_value
));
REQUIRE
(
same_
item
_value
(
cell_value
,
interpolate_value
));
}
}
SECTION
(
"R2x2_affine_3d"
)
SECTION
(
"R2x2_affine_3d"
)
...
@@ -1057,7 +1057,7 @@ let R2x2_non_linear_3d: R^3 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[1]) + 3 * cos(
...
@@ -1057,7 +1057,7 @@ let R2x2_non_linear_3d: R^3 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[1]) + 3 * cos(
InterpolateItemValue
<
TinyMatrix
<
2
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
,
InterpolateItemValue
<
TinyMatrix
<
2
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
,
cell_id_list
);
cell_id_list
);
REQUIRE
(
same_
cell
_value
(
cell_value
,
interpolate_value
));
REQUIRE
(
same_
item
_value
(
cell_value
,
interpolate_value
));
}
}
SECTION
(
"R2x2_non_linear_3d"
)
SECTION
(
"R2x2_non_linear_3d"
)
...
@@ -1079,7 +1079,7 @@ let R2x2_non_linear_3d: R^3 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[1]) + 3 * cos(
...
@@ -1079,7 +1079,7 @@ let R2x2_non_linear_3d: R^3 -> R^2x2, x -> (2 * exp(x[0]) * sin(x[1]) + 3 * cos(
InterpolateItemValue
<
TinyMatrix
<
2
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
,
InterpolateItemValue
<
TinyMatrix
<
2
>
(
TinyVector
<
Dimension
>
)
>::
interpolate
(
function_symbol_id
,
xj
,
cell_id_list
);
cell_id_list
);
REQUIRE
(
same_
cell
_value
(
cell_value
,
interpolate_value
));
REQUIRE
(
same_
item
_value
(
cell_value
,
interpolate_value
));
}
}
}
}
}
}
...
...
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