Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-gfe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
Sander, Oliver
dune-gfe
Commits
848b253c
Commit
848b253c
authored
8 months ago
by
Sander, Oliver
Browse files
Options
Downloads
Patches
Plain Diff
InterpolationDerivatives: Avoid uninitialized values if doValue is false
parent
ba54c18f
No related branches found
No related tags found
1 merge request
!158
Fix derivatives of nonconforming interpolation
Pipeline
#15760
failed
8 months ago
Stage: .pre
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/gfe/interpolationderivatives.hh
+9
-2
9 additions, 2 deletions
dune/gfe/interpolationderivatives.hh
with
9 additions
and
2 deletions
dune/gfe/interpolationderivatives.hh
+
9
−
2
View file @
848b253c
...
@@ -813,6 +813,9 @@ namespace Dune::GFE
...
@@ -813,6 +813,9 @@ namespace Dune::GFE
Matrix
<
double
>&
firstDerivative
,
Matrix
<
double
>&
firstDerivative
,
Matrix
<
FieldMatrix
<
double
,
blocksize
,
blocksize
>
>&
secondDerivative
)
const
Matrix
<
FieldMatrix
<
double
,
blocksize
,
blocksize
>
>&
secondDerivative
)
const
{
{
constexpr
size_t
valueSize
=
TargetSpace
::
CoordinateType
::
dimension
;
constexpr
size_t
derivativeSize
=
TargetSpace
::
CoordinateType
::
dimension
*
gridDim
;
const
size_t
nDofs
=
localInterpolationRule_
.
size
();
const
size_t
nDofs
=
localInterpolationRule_
.
size
();
////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
...
@@ -985,9 +988,13 @@ namespace Dune::GFE
...
@@ -985,9 +988,13 @@ namespace Dune::GFE
}
}
// Project Euclidean gradient onto the normal space
// Project Euclidean gradient onto the normal space
// The range of input variables that the density depends on
const
size_t
begin
=
(
doValue_
)
?
0
:
valueSize
;
const
size_t
end
=
(
doDerivative_
)
?
valueSize
+
derivativeSize
:
valueSize
;
Matrix
<
FieldMatrix
<
double
,
1
,
embeddedBlocksize
>
>
projectedGradient
(
embeddedFirstDerivative
.
N
(),
nDofs
);
Matrix
<
FieldMatrix
<
double
,
1
,
embeddedBlocksize
>
>
projectedGradient
(
embeddedFirstDerivative
.
N
(),
nDofs
);
for
(
size_t
i
=
0
;
i
<
embeddedFirstDerivative
.
N
()
;
i
++
)
for
(
size_t
i
=
begin
;
i
<
end
;
i
++
)
for
(
size_t
j
=
0
;
j
<
nDofs
;
j
++
)
for
(
size_t
j
=
0
;
j
<
nDofs
;
j
++
)
projectedGradient
[
i
][
j
][
0
]
=
normalFirstDerivative
[
i
][
j
]
*
localInterpolationRule_
.
coefficient
(
j
).
globalCoordinates
();
projectedGradient
[
i
][
j
][
0
]
=
normalFirstDerivative
[
i
][
j
]
*
localInterpolationRule_
.
coefficient
(
j
).
globalCoordinates
();
...
@@ -1004,7 +1011,7 @@ namespace Dune::GFE
...
@@ -1004,7 +1011,7 @@ namespace Dune::GFE
{
{
typename
TargetSpace
::
EmbeddedTangentVector
z
=
orthonormalFrames_
[
row
][
subRow
];
typename
TargetSpace
::
EmbeddedTangentVector
z
=
orthonormalFrames_
[
row
][
subRow
];
for
(
size_t
i
=
0
;
i
<
embeddedFirstDerivative
.
N
()
;
i
++
)
for
(
size_t
i
=
begin
;
i
<
end
;
i
++
)
{
{
auto
tmp1
=
localInterpolationRule_
.
coefficient
(
row
).
weingarten
(
z
,
projectedGradient
[
i
][
row
][
0
]);
auto
tmp1
=
localInterpolationRule_
.
coefficient
(
row
).
weingarten
(
z
,
projectedGradient
[
i
][
row
][
0
]);
...
...
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