Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dumux
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
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
dumux-repositories
dumux
Commits
266db842
Commit
266db842
authored
3 years ago
by
Kilian Weishaupt
Committed by
Timo Koch
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[freeflow][md] Add coupling jacobian pattern for fcstaggered
parent
1bc99753
No related branches found
No related tags found
1 merge request
!2823
[freeflow] Add mass/energy model and donea/channel/sincos test with new staggered
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dumux/multidomain/couplingjacobianpattern.hh
+45
-0
45 additions, 0 deletions
dumux/multidomain/couplingjacobianpattern.hh
with
45 additions
and
0 deletions
dumux/multidomain/couplingjacobianpattern.hh
+
45
−
0
View file @
266db842
...
...
@@ -169,6 +169,51 @@ Dune::MatrixIndexSet getCouplingJacobianPattern(const CouplingManager& couplingM
return
pattern
;
}
/*!
* \ingroup MultiDomain
* \brief Helper function to generate coupling Jacobian pattern (off-diagonal blocks)
* for the staggered scheme (degrees of freedom on cell centers)
*/
template
<
bool
isImplicit
,
class
CouplingManager
,
class
GridGeometryI
,
class
GridGeometryJ
,
std
::
size_t
i
,
std
::
size_t
j
,
typename
std
::
enable_if_t
<
(
GridGeometryI
::
discMethod
==
DiscretizationMethod
::
fcstaggered
),
int
>
=
0
>
Dune
::
MatrixIndexSet
getCouplingJacobianPattern
(
const
CouplingManager
&
couplingManager
,
Dune
::
index_constant
<
i
>
domainI
,
const
GridGeometryI
&
gridGeometryI
,
Dune
::
index_constant
<
j
>
domainJ
,
const
GridGeometryJ
&
gridGeometryJ
)
{
Dune
::
MatrixIndexSet
pattern
(
gridGeometryI
.
numDofs
(),
gridGeometryJ
.
numDofs
());
auto
fvGeometry
=
localView
(
gridGeometryI
);
for
(
const
auto
&
elementI
:
elements
(
gridGeometryI
.
gridView
()))
{
fvGeometry
.
bindElement
(
elementI
);
for
(
const
auto
&
scv
:
scvs
(
fvGeometry
))
{
const
auto
globalI
=
scv
.
dofIndex
();
const
auto
&
stencil
=
couplingManager
.
couplingStencil
(
domainI
,
elementI
,
scv
,
domainJ
);
for
(
const
auto
globalJ
:
stencil
)
{
assert
(
globalJ
<
gridGeometryJ
.
numDofs
());
pattern
.
add
(
globalI
,
globalJ
);
if
(
gridGeometryI
.
isPeriodic
())
{
if
(
gridGeometryI
.
dofOnPeriodicBoundary
(
globalI
))
{
const
auto
globalIP
=
gridGeometryI
.
periodicallyMappedDof
(
globalI
);
if
(
globalI
>
globalIP
)
pattern
.
add
(
globalIP
,
globalJ
);
}
}
}
}
}
return
pattern
;
}
}
// end namespace Dumux
#endif
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