Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-gdt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
ag-ohlberger
dune-community
dune-gdt
Commits
81d53a30
Commit
81d53a30
authored
4 years ago
by
Dr. Felix Tobias Schindler
Browse files
Options
Downloads
Patches
Plain Diff
[tools.sparsity-pattern] deduce stencil from spaces
parent
ebbaa14e
No related branches found
No related tags found
3 merge requests
!10
Draft: consolidate refactoring work
,
!5
Work on refactor operators bindings
,
!1
Refactor operators
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dune/gdt/tools/sparsity-pattern.hh
+13
-5
13 additions, 5 deletions
dune/gdt/tools/sparsity-pattern.hh
dune/gdt/type_traits.hh
+2
-1
2 additions, 1 deletion
dune/gdt/type_traits.hh
with
15 additions
and
6 deletions
dune/gdt/tools/sparsity-pattern.hh
+
13
−
5
View file @
81d53a30
...
...
@@ -163,7 +163,7 @@ template <class TGV, size_t t_r, size_t t_rC, class TR, class AGV, size_t a_r, s
XT
::
LA
::
SparsityPatternDefault
make_sparsity_pattern
(
const
SpaceInterface
<
TGV
,
t_r
,
t_rC
,
TR
>&
test_space
,
const
SpaceInterface
<
AGV
,
a_r
,
a_rC
,
AR
>&
ansatz_space
,
const
GV
&
grid_view
,
const
Stencil
stencil
)
const
Stencil
stencil
=
Stencil
::
automatic
)
{
if
(
stencil
==
Stencil
::
element
)
return
make_element_sparsity_pattern
(
test_space
,
ansatz_space
,
grid_view
);
...
...
@@ -171,7 +171,13 @@ XT::LA::SparsityPatternDefault make_sparsity_pattern(const SpaceInterface<TGV, t
return
make_intersection_sparsity_pattern
(
test_space
,
ansatz_space
,
grid_view
);
else
if
(
stencil
==
Stencil
::
element_and_intersection
)
return
make_element_and_intersection_sparsity_pattern
(
test_space
,
ansatz_space
,
grid_view
);
else
else
if
(
stencil
==
Stencil
::
automatic
)
{
if
(
test_space
.
continuous
(
0
)
||
ansatz_space
.
continuous
(
0
)
||
test_space
.
continuous_normal_components
()
||
ansatz_space
.
continuous_normal_components
())
return
make_element_and_intersection_sparsity_pattern
(
test_space
,
ansatz_space
,
grid_view
);
else
return
make_element_sparsity_pattern
(
test_space
,
ansatz_space
,
grid_view
);
}
else
DUNE_THROW
(
XT
::
Common
::
Exceptions
::
wrong_input_given
,
"Unknown Stencil encountered (see below), add an appropriate method!"
<<
"
\n
stencil = "
<<
stencil
);
...
...
@@ -179,15 +185,17 @@ XT::LA::SparsityPatternDefault make_sparsity_pattern(const SpaceInterface<TGV, t
template
<
class
SGV
,
size_t
r
,
size_t
rC
,
class
R
,
class
GV
>
XT
::
LA
::
SparsityPatternDefault
make_sparsity_pattern
(
const
SpaceInterface
<
SGV
,
r
,
rC
,
R
>&
space
,
const
GV
&
grid_view
,
const
Stencil
stencil
)
XT
::
LA
::
SparsityPatternDefault
make_sparsity_pattern
(
const
SpaceInterface
<
SGV
,
r
,
rC
,
R
>&
space
,
const
GV
&
grid_view
,
const
Stencil
stencil
=
Stencil
::
automatic
)
{
return
make_sparsity_pattern
(
space
,
space
,
grid_view
,
stencil
);
}
template
<
class
GV
,
size_t
r
,
size_t
rC
,
class
R
>
XT
::
LA
::
SparsityPatternDefault
make_sparsity_pattern
(
const
SpaceInterface
<
GV
,
r
,
rC
,
R
>&
space
,
const
Stencil
stencil
)
XT
::
LA
::
SparsityPatternDefault
make_sparsity_pattern
(
const
SpaceInterface
<
GV
,
r
,
rC
,
R
>&
space
,
const
Stencil
stencil
=
Stencil
::
automatic
)
{
return
make_sparsity_pattern
(
space
,
space
.
grid_view
(),
stencil
);
}
...
...
This diff is collapsed.
Click to expand it.
dune/gdt/type_traits.hh
+
2
−
1
View file @
81d53a30
...
...
@@ -56,7 +56,8 @@ enum class Stencil
{
element
,
intersection
,
element_and_intersection
element_and_intersection
,
automatic
};
...
...
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