Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-istl
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
Service Desk
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
Core Modules
dune-istl
Commits
4ea0ff3d
Commit
4ea0ff3d
authored
2 years ago
by
Simon Praetorius
Browse files
Options
Downloads
Patches
Plain Diff
Align the implementation with the AMG class
parent
e8d56d05
No related branches found
No related tags found
1 merge request
!524
Add FastAMG constructor with shared_ptr arguments
Pipeline
#60794
passed
2 years ago
Stage: .pre
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/istl/paamg/fastamg.hh
+16
-25
16 additions, 25 deletions
dune/istl/paamg/fastamg.hh
with
16 additions
and
25 deletions
dune/istl/paamg/fastamg.hh
+
16
−
25
View file @
4ea0ff3d
...
...
@@ -103,11 +103,11 @@ namespace Dune
* @param pinfo The information about the parallel distribution of the data.
*/
template
<
class
C
>
FastAMG
(
std
::
shared_ptr
<
Operator
>
fineOperator
,
FastAMG
(
std
::
shared_ptr
<
const
Operator
>
fineOperator
,
const
C
&
criterion
,
const
Parameters
&
parms
=
Parameters
(),
bool
symmetric
=
true
,
std
::
shared_ptr
<
ParallelInformation
>
pinfo
=
std
::
make_shared
<
ParallelInformation
>
());
const
ParallelInformation
&
pinfo
=
ParallelInformation
());
/**
* @brief Construct an AMG with an inexact coarse solver based on the smoother.
...
...
@@ -125,21 +125,10 @@ namespace Dune
FastAMG
(
const
Operator
&
fineOperator
,
const
C
&
criterion
,
const
Parameters
&
parms
=
Parameters
(),
bool
symmetric
=
true
)
:
FastAMG
(
stackobject_to_shared_ptr
(
const_cast
<
Operator
&>
(
fineOperator
)),
criterion
,
parms
,
symmetric
)
{}
//! \copydoc FastAMG(const std::shared_ptr<Operator>&,const C&,const Parameters&,bool,std::shared_ptr<ParallelInformation>)
template
<
class
C
>
FastAMG
(
const
Operator
&
fineOperator
,
const
C
&
criterion
,
const
Parameters
&
parms
,
bool
symmetric
,
const
ParallelInformation
&
pinfo
)
:
FastAMG
(
stackobject_to_shared_ptr
(
const_cast
<
Operator
&>
(
fineOperator
)),
criterion
,
parms
,
symmetric
,
stackobject_to_shared_ptr
(
const_cast
<
ParallelInformation
&>
(
pinfo
)))
bool
symmetric
=
true
,
const
ParallelInformation
&
pinfo
=
ParallelInformation
())
:
FastAMG
(
stackobject_to_shared_ptr
(
fineOperator
),
criterion
,
parms
,
symmetric
,
pinfo
)
{}
/**
...
...
@@ -201,8 +190,8 @@ namespace Dune
*/
template
<
class
C
>
void
createHierarchies
(
C
&
criterion
,
std
::
shared_ptr
<
Operator
>
fineOperator
,
std
::
shared_ptr
<
PI
>
pinfo
);
std
::
shared_ptr
<
const
Operator
>
fineOperator
,
const
PI
&
pinfo
);
/**
* @brief A struct that holds the context of the current level.
...
...
@@ -348,11 +337,11 @@ namespace Dune
}
template
<
class
M
,
class
X
,
class
PI
,
class
A
>
template
<
class
C
>
FastAMG
<
M
,
X
,
PI
,
A
>::
FastAMG
(
std
::
shared_ptr
<
Operator
>
fineOperator
,
FastAMG
<
M
,
X
,
PI
,
A
>::
FastAMG
(
std
::
shared_ptr
<
const
Operator
>
fineOperator
,
const
C
&
criterion
,
const
Parameters
&
parms
,
bool
symmetric_
,
std
::
shared_ptr
<
PI
>
pinfo
)
const
PI
&
pinfo
)
:
solver_
(),
rhs_
(),
lhs_
(),
residual_
(),
scalarProduct_
(),
gamma_
(
parms
.
getGamma
()),
preSteps_
(
parms
.
getNoPreSmoothSteps
()),
postSteps_
(
parms
.
getNoPostSmoothSteps
()),
buildHierarchy_
(
true
),
...
...
@@ -369,17 +358,19 @@ namespace Dune
// TODO: reestablish compile time checks.
//static_assert(static_cast<int>(PI::category)==static_cast<int>(S::category),
// "Matrix and Solver must match in terms of category!");
createHierarchies
(
criterion
,
std
::
move
(
fineOperator
),
std
::
move
(
pinfo
)
)
;
createHierarchies
(
criterion
,
std
::
move
(
fineOperator
),
pinfo
);
}
template
<
class
M
,
class
X
,
class
PI
,
class
A
>
template
<
class
C
>
void
FastAMG
<
M
,
X
,
PI
,
A
>::
createHierarchies
(
C
&
criterion
,
std
::
shared_ptr
<
Operator
>
fineOperator
,
std
::
shared_ptr
<
PI
>
pinfo
)
std
::
shared_ptr
<
const
Operator
>
fineOperator
,
const
PI
&
pinfo
)
{
Timer
watch
;
matrices_
=
std
::
make_shared
<
OperatorHierarchy
>
(
std
::
move
(
fineOperator
),
std
::
move
(
pinfo
));
matrices_
=
std
::
make_shared
<
OperatorHierarchy
>
(
std
::
const_pointer_cast
<
Operator
>
(
std
::
move
(
fineOperator
)),
stackobject_to_shared_ptr
(
const_cast
<
PI
&>
(
pinfo
)));
matrices_
->
template
build
<
NegateSet
<
typename
PI
::
OwnerSet
>
>
(
criterion
);
...
...
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