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
78bfd7af
Commit
78bfd7af
authored
2 years ago
by
Emmanuel Labourasse
Browse files
Options
Downloads
Patches
Plain Diff
fluxing 3D for quadrangular faces
parent
abd6eb6f
No related branches found
No related tags found
1 merge request
!167
Improve fluxing based remapping
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/algebra/TinyMatrix.hpp
+19
-0
19 additions, 0 deletions
src/algebra/TinyMatrix.hpp
src/scheme/FluxingAdvectionSolver.cpp
+4
-4
4 additions, 4 deletions
src/scheme/FluxingAdvectionSolver.cpp
tests/test_TinyMatrix.cpp
+5
-1
5 additions, 1 deletion
tests/test_TinyMatrix.cpp
with
28 additions
and
5 deletions
src/algebra/TinyMatrix.hpp
+
19
−
0
View file @
78bfd7af
...
@@ -43,6 +43,18 @@ class [[nodiscard]] TinyMatrix
...
@@ -43,6 +43,18 @@ class [[nodiscard]] TinyMatrix
}
}
}
}
template
<
typename
...
Args
>
PUGS_FORCEINLINE
constexpr
void
_unpackVariadicInput
(
const
TinyVector
<
M
,
T
>&
t
,
Args
&&
...
args
)
noexcept
{
for
(
size_t
j
=
0
;
j
<
M
;
++
j
)
{
m_values
[
_index
(
j
,
N
-
1
-
sizeof
...(
args
))]
=
t
[
j
];
}
if
constexpr
(
sizeof
...(
args
)
>
0
)
{
this
->
_unpackVariadicInput
(
std
::
forward
<
Args
>
(
args
)...);
}
}
public
:
public
:
PUGS_INLINE
PUGS_INLINE
constexpr
bool
constexpr
bool
...
@@ -322,6 +334,13 @@ class [[nodiscard]] TinyMatrix
...
@@ -322,6 +334,13 @@ class [[nodiscard]] TinyMatrix
this
->
_unpackVariadicInput
(
t
,
std
::
forward
<
Args
>
(
args
)...);
this
->
_unpackVariadicInput
(
t
,
std
::
forward
<
Args
>
(
args
)...);
}
}
template
<
typename
...
Args
>
PUGS_INLINE
explicit
constexpr
TinyMatrix
(
const
TinyVector
<
M
,
T
>&
t
,
Args
&&
...
args
)
noexcept
{
static_assert
(
sizeof
...(
args
)
==
N
-
1
,
"wrong number of parameters"
);
this
->
_unpackVariadicInput
(
t
,
std
::
forward
<
Args
>
(
args
)...);
}
// One does not use the '=default' constructor to avoid (unexpected)
// One does not use the '=default' constructor to avoid (unexpected)
// performances issues
// performances issues
PUGS_INLINE
PUGS_INLINE
...
...
This diff is collapsed.
Click to expand it.
src/scheme/FluxingAdvectionSolver.cpp
+
4
−
4
View file @
78bfd7af
...
@@ -205,10 +205,10 @@ FluxingAdvectionSolver<3>::_computeAlgebraicFluxingVolume()
...
@@ -205,10 +205,10 @@ FluxingAdvectionSolver<3>::_computeAlgebraicFluxingVolume()
const
Rd
&
x2
=
old_xr
[
face_to_node
[
2
]];
const
Rd
&
x2
=
old_xr
[
face_to_node
[
2
]];
const
Rd
&
x3
=
old_xr
[
face_to_node
[
3
]];
const
Rd
&
x3
=
old_xr
[
face_to_node
[
3
]];
const
Rd
&
x4
=
new_xr
[
face_to_node
[
1
]];
const
Rd
&
x4
=
new_xr
[
face_to_node
[
0
]];
const
Rd
&
x5
=
new_xr
[
face_to_node
[
0
]];
const
Rd
&
x5
=
new_xr
[
face_to_node
[
1
]];
const
Rd
&
x6
=
new_xr
[
face_to_node
[
1
]];
const
Rd
&
x6
=
new_xr
[
face_to_node
[
2
]];
const
Rd
&
x7
=
new_xr
[
face_to_node
[
0
]];
const
Rd
&
x7
=
new_xr
[
face_to_node
[
3
]];
const
Rd
&
a1
=
x6
-
x1
;
const
Rd
&
a1
=
x6
-
x1
;
const
Rd
&
a2
=
x6
-
x3
;
const
Rd
&
a2
=
x6
-
x3
;
...
...
This diff is collapsed.
Click to expand it.
tests/test_TinyMatrix.cpp
+
5
−
1
View file @
78bfd7af
...
@@ -32,10 +32,14 @@ TEST_CASE("TinyMatrix", "[algebra]")
...
@@ -32,10 +32,14 @@ TEST_CASE("TinyMatrix", "[algebra]")
REQUIRE
(
TinyMatrix
<
5
,
4
,
int
>::
NumberOfColumns
==
4
);
REQUIRE
(
TinyMatrix
<
5
,
4
,
int
>::
NumberOfColumns
==
4
);
TinyMatrix
<
3
,
4
,
int
>
A
(
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
);
TinyMatrix
<
3
,
4
,
int
>
A
(
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
);
TinyVector
<
3
,
int
>
x1
(
1
,
5
,
9
);
TinyVector
<
3
,
int
>
x2
(
2
,
6
,
10
);
TinyVector
<
3
,
int
>
x3
(
3
,
7
,
11
);
TinyVector
<
3
,
int
>
x4
(
4
,
8
,
12
);
REQUIRE
(((
A
(
0
,
0
)
==
1
)
and
(
A
(
0
,
1
)
==
2
)
and
(
A
(
0
,
2
)
==
3
)
and
(
A
(
0
,
3
)
==
4
)
and
//
REQUIRE
(((
A
(
0
,
0
)
==
1
)
and
(
A
(
0
,
1
)
==
2
)
and
(
A
(
0
,
2
)
==
3
)
and
(
A
(
0
,
3
)
==
4
)
and
//
(
A
(
1
,
0
)
==
5
)
and
(
A
(
1
,
1
)
==
6
)
and
(
A
(
1
,
2
)
==
7
)
and
(
A
(
1
,
3
)
==
8
)
and
//
(
A
(
1
,
0
)
==
5
)
and
(
A
(
1
,
1
)
==
6
)
and
(
A
(
1
,
2
)
==
7
)
and
(
A
(
1
,
3
)
==
8
)
and
//
(
A
(
2
,
0
)
==
9
)
and
(
A
(
2
,
1
)
==
10
)
and
(
A
(
2
,
2
)
==
11
)
and
(
A
(
2
,
3
)
==
12
)));
(
A
(
2
,
0
)
==
9
)
and
(
A
(
2
,
1
)
==
10
)
and
(
A
(
2
,
2
)
==
11
)
and
(
A
(
2
,
3
)
==
12
)));
REQUIRE
(
A
==
TinyMatrix
<
3
,
4
,
int
>
(
x1
,
x2
,
x3
,
x4
));
TinyMatrix
<
3
,
4
,
int
>
B
(
6
,
5
,
3
,
8
,
34
,
6
,
35
,
6
,
7
,
1
,
3
,
6
);
TinyMatrix
<
3
,
4
,
int
>
B
(
6
,
5
,
3
,
8
,
34
,
6
,
35
,
6
,
7
,
1
,
3
,
6
);
SECTION
(
"checking for opposed matrix"
)
SECTION
(
"checking for opposed matrix"
)
...
...
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