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
5d4047d3
Commit
5d4047d3
authored
3 weeks ago
by
Stéphane Del Pino
Browse files
Options
Downloads
Patches
Plain Diff
Displace symmetry utilities in `geometry/SymmetryUtils.hpp`
parent
4926b9a0
Branches
Branches containing commit
No related tags found
1 merge request
!205
High-order polynomial reconstruction
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/geometry/SymmetryUtils.hpp
+32
-0
32 additions, 0 deletions
src/geometry/SymmetryUtils.hpp
src/scheme/PolynomialReconstruction.cpp
+1
-26
1 addition, 26 deletions
src/scheme/PolynomialReconstruction.cpp
with
33 additions
and
26 deletions
src/geometry/SymmetryUtils.hpp
0 → 100644
+
32
−
0
View file @
5d4047d3
#ifndef SYMMETRY_UTILS_HPP
#define SYMMETRY_UTILS_HPP
#include
<algebra/TinyMatrix.hpp>
#include
<algebra/TinyVector.hpp>
#include
<utils/PugsMacros.hpp>
template
<
size_t
Dimension
>
PUGS_INLINE
auto
symmetrize_vector
(
const
TinyVector
<
Dimension
>&
normal
,
const
TinyVector
<
Dimension
>&
u
)
{
return
u
-
2
*
dot
(
u
,
normal
)
*
normal
;
}
template
<
size_t
Dimension
>
PUGS_INLINE
auto
symmetrize_matrix
(
const
TinyVector
<
Dimension
>&
normal
,
const
TinyMatrix
<
Dimension
>&
A
)
{
const
TinyMatrix
S
=
TinyMatrix
<
Dimension
>
{
identity
}
-
2
*
tensorProduct
(
normal
,
normal
);
return
S
*
A
*
S
;
}
template
<
size_t
Dimension
>
PUGS_INLINE
auto
symmetrize_coordinates
(
const
TinyVector
<
Dimension
>&
origin
,
const
TinyVector
<
Dimension
>&
normal
,
const
TinyVector
<
Dimension
>&
u
)
{
return
u
-
2
*
dot
(
u
-
origin
,
normal
)
*
normal
;
}
#endif // SYMMETRY_UTILS_HPP
This diff is collapsed.
Click to expand it.
src/scheme/PolynomialReconstruction.cpp
+
1
−
26
View file @
5d4047d3
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
#include
<algebra/Givens.hpp>
#include
<algebra/Givens.hpp>
#include
<algebra/ShrinkMatrixView.hpp>
#include
<algebra/ShrinkMatrixView.hpp>
#include
<algebra/ShrinkVectorView.hpp>
#include
<algebra/SmallMatrix.hpp>
#include
<algebra/SmallMatrix.hpp>
#include
<geometry/SymmetryUtils.hpp>
#include
<mesh/MeshData.hpp>
#include
<mesh/MeshData.hpp>
#include
<mesh/MeshDataManager.hpp>
#include
<mesh/MeshDataManager.hpp>
#include
<mesh/MeshFlatFaceBoundary.hpp>
#include
<mesh/MeshFlatFaceBoundary.hpp>
...
@@ -18,31 +18,6 @@
...
@@ -18,31 +18,6 @@
#include
<scheme/reconstruction_utils/ElementIntegralReconstructionMatrixBuilder.hpp>
#include
<scheme/reconstruction_utils/ElementIntegralReconstructionMatrixBuilder.hpp>
#include
<scheme/reconstruction_utils/MutableDiscreteFunctionDPkVariant.hpp>
#include
<scheme/reconstruction_utils/MutableDiscreteFunctionDPkVariant.hpp>
#warning put in a file in geometry
template
<
size_t
Dimension
>
PUGS_INLINE
auto
symmetrize_vector
(
const
TinyVector
<
Dimension
>&
normal
,
const
TinyVector
<
Dimension
>&
u
)
{
return
u
-
2
*
dot
(
u
,
normal
)
*
normal
;
}
template
<
size_t
Dimension
>
PUGS_INLINE
auto
symmetrize_matrix
(
const
TinyVector
<
Dimension
>&
normal
,
const
TinyMatrix
<
Dimension
>&
A
)
{
const
TinyMatrix
S
=
TinyMatrix
<
Dimension
>
{
identity
}
-
2
*
tensorProduct
(
normal
,
normal
);
return
S
*
A
*
S
;
}
template
<
size_t
Dimension
>
PUGS_INLINE
auto
symmetrize_coordinates
(
const
TinyVector
<
Dimension
>&
origin
,
const
TinyVector
<
Dimension
>&
normal
,
const
TinyVector
<
Dimension
>&
u
)
{
return
u
-
2
*
dot
(
u
-
origin
,
normal
)
*
normal
;
}
template
<
MeshConcept
MeshType
>
template
<
MeshConcept
MeshType
>
class
PolynomialReconstruction
::
Internal
class
PolynomialReconstruction
::
Internal
{
{
...
...
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