Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-fufem
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
Package registry
Model registry
Operate
Environments
Terraform modules
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
fufem
dune-fufem
Commits
fc99052e
Commit
fc99052e
authored
2 years ago
by
Carsten Gräser
Browse files
Options
Downloads
Patches
Plain Diff
[test]Test matrix backend with mass and laplace assembler
parent
bbc9959a
Branches
feature/vector-based-matrixindexset
No related tags found
1 merge request
!150
Draft: Add support for partial matrix patterns to ISTLMatrixBackend and global assembler
Pipeline
#60395
failed
2 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/fufem/test/istlbackendtest.cc
+44
-5
44 additions, 5 deletions
dune/fufem/test/istlbackendtest.cc
with
44 additions
and
5 deletions
dune/fufem/test/istlbackendtest.cc
+
44
−
5
View file @
fc99052e
...
...
@@ -21,6 +21,7 @@
#include
<dune/fufem/backends/istlmatrixbackend.hh>
#include
<dune/fufem/assemblers/dunefunctionsoperatorassembler.hh>
#include
<dune/fufem/assemblers/localassemblers/massassembler.hh>
#include
<dune/fufem/assemblers/localassemblers/laplaceassembler.hh>
#include
<dune/fufem/test/common.hh>
// Due to a formerly unnoticed bug, activate bounds checking:
...
...
@@ -137,13 +138,20 @@ Dune::TestSuite testISTLMatrixBackendForBasisPartialPattern(Matrix& matrix, cons
#endif
auto
globalAssembler
=
Dune
::
Fufem
::
DuneFunctionsOperatorAssembler
(
basis
,
basis
);
auto
localAssembler
=
Dune
::
Fufem
::
MassAssembler
();
backend
.
assign
(
0.0
);
globalAssembler
.
assembleBulkEntries
(
backend
,
localAssembler
);
{
auto
localAssembler
=
Dune
::
Fufem
::
MassAssembler
();
backend
.
assign
(
0.0
);
globalAssembler
.
assembleBulkEntries
(
backend
,
localAssembler
);
// ToDo: Check entries e.g. by summing rows up and comparing with integral of basis function (partition of untity).
}
// ToDo: Check entries e.g. by summing rows up and comparing to one (partition of untity).
{
auto
localAssembler
=
Dune
::
Fufem
::
LaplaceAssembler
();
backend
.
assign
(
0.0
);
globalAssembler
.
assembleBulkEntries
(
backend
,
localAssembler
);
// ToDo: Check entries e.g. by summing rows up and comparing with zero (partition of untity).
}
return
suite
;
}
...
...
@@ -290,6 +298,7 @@ int main(int argc, char** argv) {
matrix
[
i
][
j
].
setSize
(
basis
.
size
({
i
}),
basis
.
size
({
j
}));
suite
.
subTest
(
testISTLMatrixBackendForBasis
<
K
,
Matrix
>
(
matrix
,
basis
));
}
//****************************************************************************
// Test with sparse matrix and block entries
//****************************************************************************
...
...
@@ -304,6 +313,36 @@ int main(int argc, char** argv) {
suite
.
subTest
(
testISTLMatrixBackendForBasis
<
K
,
Matrix
>
(
basis
));
}
//****************************************************************************
// Test with sparse matrix and DiagonalMatrix blocks
//****************************************************************************
{
using
Matrix
=
BCRSM
<
DM
<
K
,
2
>>
;
const
auto
basis
=
makeBasis
(
gridView
,
power
<
2
>
(
lagrange
<
1
>
()
)
);
Matrix
matrix
=
buildMatrixForBasis
<
Matrix
>
(
basis
);
suite
.
subTest
(
testISTLMatrixBackendForBasisPartialPattern
<
K
>
(
matrix
,
basis
));
}
//****************************************************************************
// Test with sparse matrix and ScaledIdentityMatrix blocks
//****************************************************************************
{
using
Matrix
=
BCRSM
<
SIM
<
K
,
2
>>
;
const
auto
basis
=
makeBasis
(
gridView
,
power
<
2
>
(
lagrange
<
1
>
()
)
);
Matrix
matrix
=
buildMatrixForBasis
<
Matrix
>
(
basis
);
suite
.
subTest
(
testISTLMatrixBackendForBasisPartialPattern
<
K
>
(
matrix
,
basis
));
}
//****************************************************************************
// Test with MTBM and uniform indices
//****************************************************************************
...
...
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