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
36d6a5fe
Commit
36d6a5fe
authored
6 years ago
by
Christian Engwer
Browse files
Options
Downloads
Patches
Plain Diff
[amg] cleanup constructors/destructors of Amg::Hierarchy
parent
ef0e3a0c
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!274
Feature/amg memory management
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/istl/paamg/hierarchy.hh
+3
-45
3 additions, 45 deletions
dune/istl/paamg/hierarchy.hh
with
3 additions
and
45 deletions
dune/istl/paamg/hierarchy.hh
+
3
−
45
View file @
36d6a5fe
...
...
@@ -110,29 +110,10 @@ namespace Dune
*/
Hierarchy
(
const
std
::
shared_ptr
<
MemberType
>
&
first
);
/**
* @brief Construct a new hierarchy.
* @param first The first element in the hierarchy.
* @todo remove in 2.6
*/
Hierarchy
(
MemberType
&
first
)
DUNE_DEPRECATED_MSG
(
"Use the constructor taking a shared_ptr"
);
/**
* @brief Construct a new hierarchy.
* @param first Pointer to the first element in the hierarchy.
* @warning Hierarchy will be responsible for the memory
* management of the pointer.
* @todo remove in 2.6
*/
Hierarchy
(
MemberType
*
first
)
DUNE_DEPRECATED_MSG
(
"Use the constructor taking a shared_ptr"
);
/**
* @brief Construct a new empty hierarchy.
*/
Hierarchy
();
Hierarchy
()
=
default
;
/**
* @brief Copy constructor.
* @brief Copy constructor
(deep copy!)
.
*/
Hierarchy
(
const
Hierarchy
&
other
);
/**
...
...
@@ -292,9 +273,6 @@ namespace Dune
*/
std
::
size_t
levels
()
const
;
/** @brief Destructor. */
~
Hierarchy
();
private
:
/** @brief fix memory management of the finest element in the hierarchy
...
...
@@ -1241,14 +1219,9 @@ namespace Dune
return
built_
;
}
template
<
class
T
,
class
A
>
Hierarchy
<
T
,
A
>::
Hierarchy
()
:
finest_
(
0
),
coarsest_
(
0
),
allocator_
(),
levels_
(
0
)
{}
template
<
class
T
,
class
A
>
Hierarchy
<
T
,
A
>::
Hierarchy
(
const
std
::
shared_ptr
<
MemberType
>
&
first
)
:
originalFinest_
(
first
)
,
allocator_
()
:
originalFinest_
(
first
)
{
finest_
=
std
::
allocate_shared
<
Element
>
(
allocator_
);
finest_
->
element_
=
originalFinest_
;
...
...
@@ -1256,21 +1229,6 @@ namespace Dune
levels_
=
1
;
}
template
<
class
T
,
class
A
>
Hierarchy
<
T
,
A
>::
Hierarchy
(
MemberType
&
first
)
:
Hierarchy
(
stackobject_to_shared_ptr
(
first
))
{}
#warning get rid of this constructor
template
<
class
T
,
class
A
>
Hierarchy
<
T
,
A
>::
Hierarchy
(
MemberType
*
first
)
:
Hierarchy
(
std
::
shared_ptr
<
MemberType
>
(
first
))
{}
template
<
class
T
,
class
A
>
Hierarchy
<
T
,
A
>::~
Hierarchy
()
{}
//! \brief deep copy of a given hierarchy
#warning do we catually want to support this? This might be very expensive?!
template
<
class
T
,
class
A
>
...
...
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