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
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
agnumpde
dune-fufem
Commits
f18ff649
Commit
f18ff649
authored
3 years ago
by
graeser
Browse files
Options
Downloads
Plain Diff
Merge branch 'feature/avoid-localmatrix-reallocation' into 'master'
Avoid reallocation of local matrix See merge request
!105
parents
eb55ac50
ac7cccc6
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!105
Avoid reallocation of local matrix
Pipeline
#40797
passed
3 years ago
Stage: test
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/fufem/assemblers/dunefunctionsoperatorassembler.hh
+7
-8
7 additions, 8 deletions
dune/fufem/assemblers/dunefunctionsoperatorassembler.hh
with
7 additions
and
8 deletions
dune/fufem/assemblers/dunefunctionsoperatorassembler.hh
+
7
−
8
View file @
f18ff649
...
@@ -131,12 +131,13 @@ public:
...
@@ -131,12 +131,13 @@ public:
auto
localMatrix
=
LocalMatrix
();
auto
localMatrix
=
LocalMatrix
();
localMatrix
.
setSize
(
trialLocalView
.
maxSize
(),
ansatzLocalView
.
maxSize
());
for
(
const
auto
&
element
:
elements
(
trialBasis_
.
gridView
()))
for
(
const
auto
&
element
:
elements
(
trialBasis_
.
gridView
()))
{
{
// bind the localViews to the element
// bind the localViews to the element
bind
(
ansatzLocalView
,
trialLocalView
,
element
);
bind
(
ansatzLocalView
,
trialLocalView
,
element
);
localMatrix
.
setSize
(
trialLocalView
.
size
(),
ansatzLocalView
.
size
());
localAssembler
(
element
,
localMatrix
,
trialLocalView
,
ansatzLocalView
);
localAssembler
(
element
,
localMatrix
,
trialLocalView
,
ansatzLocalView
);
// Add element stiffness matrix onto the global stiffness matrix
// Add element stiffness matrix onto the global stiffness matrix
...
@@ -179,15 +180,17 @@ public:
...
@@ -179,15 +180,17 @@ public:
using
MatrixContainer
=
Dune
::
Matrix
<
LocalMatrix
>
;
using
MatrixContainer
=
Dune
::
Matrix
<
LocalMatrix
>
;
auto
matrixContrainer
=
MatrixContainer
(
2
,
2
);
auto
matrixContrainer
=
MatrixContainer
(
2
,
2
);
matrixContrainer
[
0
][
0
].
setSize
(
insideTrialLocalView
.
maxSize
(),
insideAnsatzLocalView
.
maxSize
());
matrixContrainer
[
0
][
1
].
setSize
(
insideTrialLocalView
.
maxSize
(),
outsideAnsatzLocalView
.
maxSize
());
matrixContrainer
[
1
][
0
].
setSize
(
outsideTrialLocalView
.
maxSize
(),
insideAnsatzLocalView
.
maxSize
());
matrixContrainer
[
1
][
1
].
setSize
(
outsideTrialLocalView
.
maxSize
(),
outsideAnsatzLocalView
.
maxSize
());
for
(
const
auto
&
element
:
elements
(
trialBasis_
.
gridView
()))
for
(
const
auto
&
element
:
elements
(
trialBasis_
.
gridView
()))
{
{
insideTrialLocalView
.
bind
(
element
);
insideTrialLocalView
.
bind
(
element
);
insideAnsatzLocalView
.
bind
(
element
);
insideAnsatzLocalView
.
bind
(
element
);
// Resize
matrixContrainer
[
0
][
0
].
setSize
(
insideTrialLocalView
.
size
(),
insideAnsatzLocalView
.
size
());
for
(
const
auto
&
is
:
intersections
(
trialBasis_
.
gridView
(),
element
))
for
(
const
auto
&
is
:
intersections
(
trialBasis_
.
gridView
(),
element
))
{
{
...
@@ -217,10 +220,6 @@ public:
...
@@ -217,10 +220,6 @@ public:
outsideAnsatzLocalView
.
bind
(
outsideElement
);
outsideAnsatzLocalView
.
bind
(
outsideElement
);
matrixContrainer
[
0
][
1
].
setSize
(
insideTrialLocalView
.
size
(),
outsideAnsatzLocalView
.
size
());
matrixContrainer
[
1
][
0
].
setSize
(
outsideTrialLocalView
.
size
(),
insideAnsatzLocalView
.
size
());
matrixContrainer
[
1
][
1
].
setSize
(
outsideTrialLocalView
.
size
(),
outsideAnsatzLocalView
.
size
());
localAssembler
(
is
,
matrixContrainer
,
insideTrialLocalView
,
insideAnsatzLocalView
,
outsideTrialLocalView
,
outsideAnsatzLocalView
);
localAssembler
(
is
,
matrixContrainer
,
insideTrialLocalView
,
insideAnsatzLocalView
,
outsideTrialLocalView
,
outsideAnsatzLocalView
);
for
(
size_t
i
=
0
;
i
<
insideTrialLocalView
.
size
();
i
++
)
for
(
size_t
i
=
0
;
i
<
insideTrialLocalView
.
size
();
i
++
)
...
...
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