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
Merge requests
!38
Implement calculation of Nlr (face normal at node) in 2D
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
Implement calculation of Nlr (face normal at node) in 2D
feature/Nlr-in-2D
into
develop
Overview
0
Commits
1
Pipelines
0
Changes
1
Merged
Implement calculation of Nlr (face normal at node) in 2D
Stéphane Del Pino
requested to merge
feature/Nlr-in-2D
into
develop
Jul 7, 2020
Overview
0
Commits
1
Pipelines
0
Changes
1
0
0
Merge request reports
Compare
develop
develop (base)
and
latest version
latest version
3a0ebe2a
1 commit,
Jul 7, 2020
1 file
+
19
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
src/mesh/MeshData.hpp
+
19
−
1
View file @ 3a0ebe2a
Edit in single-file editor
Open in Web IDE
Show full file
@@ -105,7 +105,25 @@ class MeshData : public IMeshData
if
constexpr
(
Dimension
==
1
)
{
static_assert
(
Dimension
!=
1
,
"Nlr does not make sense in 1d"
);
}
else
if
constexpr
(
Dimension
==
2
)
{
throw
NotImplementedError
(
"Nlr are not yet computed in 2d"
);
const
NodeValue
<
const
Rd
>&
xr
=
m_mesh
.
xr
();
NodeValuePerFace
<
Rd
>
Nlr
(
m_mesh
.
connectivity
());
const
auto
&
face_to_node_matrix
=
m_mesh
.
connectivity
().
faceToNodeMatrix
();
parallel_for
(
m_mesh
.
numberOfFaces
(),
PUGS_LAMBDA
(
FaceId
l
)
{
const
auto
&
face_nodes
=
face_to_node_matrix
[
l
];
const
Rd
xr0
=
xr
[
face_nodes
[
0
]];
const
Rd
xr1
=
xr
[
face_nodes
[
1
]];
const
Rd
dx
=
xr1
-
xr0
;
const
Rd
Nr
=
0.5
*
Rd
{
dx
[
1
],
-
dx
[
0
]};
Nlr
(
l
,
0
)
=
Nr
;
Nlr
(
l
,
1
)
=
Nr
;
});
m_Nlr
=
std
::
make_shared
<
NodeValuePerFace
<
const
Rd
>>
(
Nlr
);
}
else
{
const
NodeValue
<
const
Rd
>&
xr
=
m_mesh
.
xr
();
Loading