Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-solvers
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
Show more breadcrumbs
agnumpde
dune-solvers
Commits
8ff8e9bc
Commit
8ff8e9bc
authored
10 years ago
by
Jonathan Youett
Browse files
Options
Downloads
Patches
Plain Diff
Dune::shared_ptr -> std::shared_ptr
parent
7f25bc50
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dune/solvers/iterationsteps/multigridstep.cc
+4
-4
4 additions, 4 deletions
dune/solvers/iterationsteps/multigridstep.cc
dune/solvers/iterationsteps/multigridstep.hh
+10
-10
10 additions, 10 deletions
dune/solvers/iterationsteps/multigridstep.hh
with
14 additions
and
14 deletions
dune/solvers/iterationsteps/multigridstep.cc
+
4
−
4
View file @
8ff8e9bc
...
@@ -114,8 +114,8 @@ void MultigridStep<MatrixType, VectorType, BitVectorType>::preprocess()
...
@@ -114,8 +114,8 @@ void MultigridStep<MatrixType, VectorType, BitVectorType>::preprocess()
// /////////////////////////////////////////////////////
// /////////////////////////////////////////////////////
for
(
int
i
=
this
->
numLevels
()
-
2
;
i
>=
0
;
i
--
)
for
(
int
i
=
this
->
numLevels
()
-
2
;
i
>=
0
;
i
--
)
{
{
this
->
matrixHierarchy_
[
i
]
=
Dune
::
shared_ptr
<
MatrixType
>
(
new
MatrixType
);
this
->
matrixHierarchy_
[
i
]
=
std
::
shared_ptr
<
MatrixType
>
(
new
MatrixType
);
this
->
xHierarchy_
[
i
]
=
Dune
::
shared_ptr
<
VectorType
>
(
new
VectorType
);
this
->
xHierarchy_
[
i
]
=
std
::
shared_ptr
<
VectorType
>
(
new
VectorType
);
// Compute which entries are present in the (sparse) coarse grid stiffness
// Compute which entries are present in the (sparse) coarse grid stiffness
// matrices.
// matrices.
...
@@ -209,8 +209,8 @@ void MultigridStep<MatrixType, VectorType, BitVectorType>::iterate()
...
@@ -209,8 +209,8 @@ void MultigridStep<MatrixType, VectorType, BitVectorType>::iterate()
int
&
level
=
this
->
level_
;
int
&
level
=
this
->
level_
;
// Define references just for ease of notation
// Define references just for ease of notation
std
::
vector
<
Dune
::
shared_ptr
<
const
MatrixType
>
>
const
&
mat
=
this
->
matrixHierarchy_
;
std
::
vector
<
std
::
shared_ptr
<
const
MatrixType
>
>
const
&
mat
=
this
->
matrixHierarchy_
;
std
::
vector
<
Dune
::
shared_ptr
<
VectorType
>
>&
x
=
this
->
xHierarchy_
;
std
::
vector
<
std
::
shared_ptr
<
VectorType
>
>&
x
=
this
->
xHierarchy_
;
std
::
vector
<
VectorType
>&
rhs
=
this
->
rhsHierarchy_
;
std
::
vector
<
VectorType
>&
rhs
=
this
->
rhsHierarchy_
;
// Solve directly if we're looking at the coarse problem
// Solve directly if we're looking at the coarse problem
...
...
This diff is collapsed.
Click to expand it.
dune/solvers/iterationsteps/multigridstep.hh
+
10
−
10
View file @
8ff8e9bc
...
@@ -102,7 +102,7 @@
...
@@ -102,7 +102,7 @@
* afterwards. This may change in the future.
* afterwards. This may change in the future.
*/
*/
template
<
class
DerivedTransfer
>
template
<
class
DerivedTransfer
>
void
setTransferOperators
(
const
std
::
vector
<
typename
Dune
::
shared_ptr
<
DerivedTransfer
>
>&
transfer
)
void
setTransferOperators
(
const
std
::
vector
<
typename
std
::
shared_ptr
<
DerivedTransfer
>
>&
transfer
)
{
{
mgTransfer_
.
resize
(
transfer
.
size
());
mgTransfer_
.
resize
(
transfer
.
size
());
for
(
size_t
j
=
0
;
j
<
transfer
.
size
();
++
j
)
for
(
size_t
j
=
0
;
j
<
transfer
.
size
();
++
j
)
...
@@ -146,7 +146,7 @@
...
@@ -146,7 +146,7 @@
}
}
/** \brief Set the smoother iteration step from a smart pointer*/
/** \brief Set the smoother iteration step from a smart pointer*/
virtual
void
setSmoother
(
Dune
::
shared_ptr
<
LinearIterationStep
<
MatrixType
,
VectorType
>
>
smoother
)
virtual
void
setSmoother
(
std
::
shared_ptr
<
LinearIterationStep
<
MatrixType
,
VectorType
>
>
smoother
)
{
{
presmootherDefault_
=
postsmootherDefault_
=
smoother
;
presmootherDefault_
=
postsmootherDefault_
=
smoother
;
...
@@ -170,17 +170,17 @@
...
@@ -170,17 +170,17 @@
}
}
/** \brief Set the smoother iteration step for a particular level, from a smart pointer */
/** \brief Set the smoother iteration step for a particular level, from a smart pointer */
virtual
void
setSmoother
(
Dune
::
shared_ptr
<
LinearIterationStep
<
MatrixType
,
VectorType
>
>
smoother
,
std
::
size_t
level
)
virtual
void
setSmoother
(
std
::
shared_ptr
<
LinearIterationStep
<
MatrixType
,
VectorType
>
>
smoother
,
std
::
size_t
level
)
{
{
levelWiseSmoothers_
[
level
]
=
smoother
;
levelWiseSmoothers_
[
level
]
=
smoother
;
}
}
protected
:
protected
:
/** \brief The presmoothers, one for each level */
/** \brief The presmoothers, one for each level */
std
::
vector
<
Dune
::
shared_ptr
<
LinearIterationStep
<
MatrixType
,
VectorType
>
>
>
presmoother_
;
std
::
vector
<
std
::
shared_ptr
<
LinearIterationStep
<
MatrixType
,
VectorType
>
>
>
presmoother_
;
/** \brief The postsmoothers, one for each level */
/** \brief The postsmoothers, one for each level */
std
::
vector
<
Dune
::
shared_ptr
<
LinearIterationStep
<
MatrixType
,
VectorType
>
>
>
postsmoother_
;
std
::
vector
<
std
::
shared_ptr
<
LinearIterationStep
<
MatrixType
,
VectorType
>
>
>
postsmoother_
;
public
:
public
:
/** \brief The base solver */
/** \brief The base solver */
...
@@ -200,7 +200,7 @@
...
@@ -200,7 +200,7 @@
int
level_
;
int
level_
;
//! The linear operators on each level
//! The linear operators on each level
std
::
vector
<
Dune
:
:
shared_ptr
<
const
MatrixType
>
>
matrixHierarchy_
;
std
::
vector
<
std
:
shared_ptr
<
const
MatrixType
>
>
matrixHierarchy_
;
protected
:
protected
:
//! Flags specifying the dirichlet nodes on each level
//! Flags specifying the dirichlet nodes on each level
...
@@ -211,7 +211,7 @@
...
@@ -211,7 +211,7 @@
*
*
* on the fine level it contains the iterate, whereas on the coarse levels the corresponding corrections
* on the fine level it contains the iterate, whereas on the coarse levels the corresponding corrections
*/
*/
std
::
vector
<
Dune
::
shared_ptr
<
VectorType
>
>
xHierarchy_
;
std
::
vector
<
std
::
shared_ptr
<
VectorType
>
>
xHierarchy_
;
std
::
vector
<
VectorType
>
rhsHierarchy_
;
std
::
vector
<
VectorType
>
rhsHierarchy_
;
...
@@ -220,9 +220,9 @@
...
@@ -220,9 +220,9 @@
protected
:
protected
:
Dune
::
shared_ptr
<
LinearIterationStep
<
MatrixType
,
VectorType
>
>
presmootherDefault_
;
std
::
shared_ptr
<
LinearIterationStep
<
MatrixType
,
VectorType
>
>
presmootherDefault_
;
Dune
::
shared_ptr
<
LinearIterationStep
<
MatrixType
,
VectorType
>
>
postsmootherDefault_
;
std
::
shared_ptr
<
LinearIterationStep
<
MatrixType
,
VectorType
>
>
postsmootherDefault_
;
typedef
std
::
map
<
std
::
size_t
,
Dune
::
shared_ptr
<
LinearIterationStep
<
MatrixType
,
VectorType
>
>
>
SmootherCache
;
typedef
std
::
map
<
std
::
size_t
,
std
::
shared_ptr
<
LinearIterationStep
<
MatrixType
,
VectorType
>
>
>
SmootherCache
;
SmootherCache
levelWiseSmoothers_
;
SmootherCache
levelWiseSmoothers_
;
bool
preprocessCalled
;
bool
preprocessCalled
;
...
...
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