Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-gfe
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
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
Sander, Oliver
dune-gfe
Commits
37c24e4b
Commit
37c24e4b
authored
5 years ago
by
Lisa Julia Nebel
Committed by
Sander, Oliver
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Use std::make_shared to create the BaseSolver of the Trustregion Algorithm
parent
90da04da
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#2314
canceled
5 years ago
Stage: test
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/gfe/riemanniantrsolver.cc
+9
-11
9 additions, 11 deletions
dune/gfe/riemanniantrsolver.cc
with
9 additions
and
11 deletions
dune/gfe/riemanniantrsolver.cc
+
9
−
11
View file @
37c24e4b
...
...
@@ -90,11 +90,9 @@ setup(const GridType& grid,
VectorCommunicator
<
GlobalMapper
,
typename
GridType
::
LeafGridView
::
CollectiveCommunication
,
Dune
::
BitSetVector
<
blocksize
>
>
vectorComm
(
*
globalMapper_
,
grid_
->
leafGridView
().
comm
(),
0
);
Dune
::
BitSetVector
<
blocksize
>*
globalDirichletNodes
=
NULL
;
globalDirichletNodes
=
new
Dune
::
BitSetVector
<
blocksize
>
(
vectorComm
.
reduceCopy
(
dirichletNodes
));
auto
globalDirichletNodes
=
new
Dune
::
BitSetVector
<
blocksize
>
(
vectorComm
.
reduceCopy
(
dirichletNodes
));
#else
Dune
::
BitSetVector
<
blocksize
>*
globalDirichletNodes
=
NULL
;
globalDirichletNodes
=
new
Dune
::
BitSetVector
<
blocksize
>
(
dirichletNodes
);
auto
globalDirichletNodes
=
new
Dune
::
BitSetVector
<
blocksize
>
(
dirichletNodes
);
#endif
// Make smoother (will be used for pre- and postsmoothing
...
...
@@ -133,11 +131,11 @@ setup(const GridType& grid,
LocalMapper
,
LocalMapper
>
matrixComm
(
*
globalMapper_
,
grid_
->
leafGridView
(),
localMapper
,
localMapper
,
0
);
ScalarMatrixType
*
A
=
new
ScalarMatrixType
(
matrixComm
.
reduceAdd
(
localA
));
auto
A
=
std
::
make_shared
<
ScalarMatrixType
>
(
matrixComm
.
reduceAdd
(
localA
));
#else
ScalarMatrixType
*
A
=
new
ScalarMatrixType
(
localA
);
auto
A
=
std
::
make_shared
<
ScalarMatrixType
>
(
localA
);
#endif
h1SemiNorm_
=
std
::
make_shared
<
H1SemiNorm
<
CorrectionType
>
>
(
*
A
);
h1SemiNorm_
=
std
::
make_shared
<
H1SemiNorm
<
CorrectionType
>
>
(
A
);
innerSolver_
=
std
::
make_shared
<::
LoopSolver
<
CorrectionType
>
>
(
mmgStep
,
innerIterations_
,
...
...
@@ -156,11 +154,11 @@ setup(const GridType& grid,
operatorAssembler
.
assemble
(
massStiffness
,
localMassMatrix
);
#if HAVE_MPI
ScalarMatrixType
*
massMatrix
=
new
ScalarMatrixType
(
matrixComm
.
reduceAdd
(
localMassMatrix
));
auto
massMatrix
=
std
::
make_shared
<
ScalarMatrixType
>
(
matrixComm
.
reduceAdd
(
localMassMatrix
));
#else
ScalarMatrixType
*
massMatrix
=
new
ScalarMatrixType
(
localMassMatrix
);
auto
massMatrix
=
std
::
make_shared
<
ScalarMatrixType
>
(
localMassMatrix
);
#endif
l2Norm_
=
std
::
make_shared
<
H1SemiNorm
<
CorrectionType
>
>
(
*
massMatrix
);
l2Norm_
=
std
::
make_shared
<
H1SemiNorm
<
CorrectionType
>
>
(
massMatrix
);
// Write all intermediate solutions, if requested
if
(
instrumented_
...
...
@@ -171,7 +169,7 @@ setup(const GridType& grid,
// Create Hessian matrix and its occupation structure
// ////////////////////////////////////////////////////////////
hessianMatrix_
=
std
::
unique
_ptr
<
MatrixType
>
(
new
MatrixType
);
hessianMatrix_
=
std
::
make_
unique
<
MatrixType
>
();
Dune
::
MatrixIndexSet
indices
(
grid_
->
size
(
1
),
grid_
->
size
(
1
));
assembler_
->
getNeighborsPerVertex
(
indices
);
indices
.
exportIdx
(
*
hessianMatrix_
);
...
...
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