Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dune-fem-dg
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
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
dune-fem
dune-fem-dg
Commits
8dbfe3ef
Commit
8dbfe3ef
authored
2 years ago
by
Robert K
Browse files
Options
Downloads
Patches
Plain Diff
[feature][DGPass] Some minor optimizations to speedup FV operator.
parent
847f0ac8
No related branches found
No related tags found
1 merge request
!48
[feature][FVOperator] A specialized FV operator for finite volume.
Pipeline
#59883
passed
2 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/fem-dg/pass/dgpass.hh
+15
-16
15 additions, 16 deletions
dune/fem-dg/pass/dgpass.hh
with
15 additions
and
16 deletions
dune/fem-dg/pass/dgpass.hh
+
15
−
16
View file @
8dbfe3ef
...
...
@@ -541,7 +541,6 @@ namespace Fem
// only call geometry once, who know what is done in this function
const
Geometry
&
geo
=
entity
.
geometry
();
caller
().
setEntity
(
entity
,
volQuad
);
// if only flux, evaluate only flux
...
...
@@ -681,11 +680,12 @@ namespace Fem
// apply weights
fluxEn
*=
-
faceQuadInner
.
weight
(
l
);
diffFluxEn
*=
-
faceQuadInner
.
weight
(
l
);
if
constexpr
(
DiscreteModelCallerType
::
evaluateJacobian
)
diffFluxEn
*=
-
faceQuadInner
.
weight
(
l
);
}
if
(
DiscreteModelCallerType
::
evaluateJacobian
)
if
constexpr
(
DiscreteModelCallerType
::
evaluateJacobian
)
{
// update local functions at once
updEn
.
axpyQuadrature
(
faceQuadInner
,
valEnVec_
,
valJacEn_
);
...
...
@@ -805,10 +805,6 @@ namespace Fem
if
(
valEnVec_
.
size
()
<
volQuad_nop
)
{
valEnVec_
.
resize
(
volQuad_nop
);
}
if
(
valJacEn_
.
size
()
<
volQuad_nop
)
{
valJacEn_
.
resize
(
volQuad_nop
);
}
...
...
@@ -906,23 +902,26 @@ namespace Fem
// calculate num flux for multiplication with the basis
// wspeedS = fastest wave speed
wspeedS
+=
caller
().
numericalFlux
(
intersection
,
faceQuadInner
,
faceQuadOuter
,
l
,
fluxEn
,
fluxNb
,
diffFluxEn
,
diffFluxNb
)
faceQuadInner
,
faceQuadOuter
,
l
,
fluxEn
,
fluxNb
,
diffFluxEn
,
diffFluxNb
)
*
faceQuadInner
.
weight
(
l
);
// apply weights
fluxEn
*=
-
faceQuadInner
.
weight
(
l
);
fluxNb
*=
faceQuadOuter
.
weight
(
l
);
diffFluxEn
*=
-
faceQuadInner
.
weight
(
l
);
diffFluxNb
*=
faceQuadOuter
.
weight
(
l
);
if
constexpr
(
DiscreteModelCallerType
::
evaluateJacobian
)
{
diffFluxEn
*=
-
faceQuadInner
.
weight
(
l
);
diffFluxNb
*=
faceQuadOuter
.
weight
(
l
);
}
}
// update local functions at once
if
(
DiscreteModelCallerType
::
evaluateJacobian
)
if
constexpr
(
DiscreteModelCallerType
::
evaluateJacobian
)
updEn
.
axpyQuadrature
(
faceQuadInner
,
valEnVec_
,
valJacEn_
);
else
updEn
.
axpyQuadrature
(
faceQuadInner
,
valEnVec_
);
...
...
@@ -938,7 +937,7 @@ namespace Fem
// function which represents L(u_h)
// this update is convenient, so that we
// don't have to visit neighbor directly
if
(
DiscreteModelCallerType
::
evaluateJacobian
)
if
constexpr
(
DiscreteModelCallerType
::
evaluateJacobian
)
updNb
.
axpyQuadrature
(
faceQuadOuter
,
valNbVec_
,
valJacNb_
);
else
updNb
.
axpyQuadrature
(
faceQuadOuter
,
valNbVec_
);
...
...
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