Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
wenqing
ogs
Commits
38b1df9e
Commit
38b1df9e
authored
6 years ago
by
Dmitri Naumov
Browse files
Options
Downloads
Patches
Plain Diff
[MeL] MS: Remove internal memory managment.
parent
421407d4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
MeshLib/MeshSubset.h
+6
-28
6 additions, 28 deletions
MeshLib/MeshSubset.h
with
6 additions
and
28 deletions
MeshLib/MeshSubset.h
+
6
−
28
View file @
38b1df9e
...
@@ -51,23 +51,15 @@ public:
...
@@ -51,23 +51,15 @@ public:
/// Construct a mesh subset from vector of nodes on the given mesh.
/// Construct a mesh subset from vector of nodes on the given mesh.
/// \param msh Mesh
/// \param msh Mesh
/// \param vec_items Vector of Node pointers.
/// \param vec_items Vector of Node pointers.
/// \param delete_ptr Deletes the vector of Node pointers if true.
MeshSubset
(
const
Mesh
&
msh
,
std
::
vector
<
Node
*>
const
*
vec_items
)
/// \note When delete_ptr is set only the vector is deleted, not the
:
_msh
(
msh
),
_nodes
(
vec_items
),
_eles
(
nullptr
)
/// elements of the vector.
MeshSubset
(
const
Mesh
&
msh
,
std
::
vector
<
Node
*>
const
*
vec_items
,
bool
const
delete_ptr
=
false
)
:
_msh
(
msh
),
_nodes
(
vec_items
),
_eles
(
nullptr
),
_delete_ptr
(
delete_ptr
)
{}
{}
/// Construct a mesh subset from vector of elements on the given mesh.
/// Construct a mesh subset from vector of elements on the given mesh.
/// \param msh Mesh
/// \param msh Mesh
/// \param vec_items Vector of Element pointers.
/// \param vec_items Vector of Element pointers.
/// \param delete_ptr Deletes the vector of Element pointers if true.
MeshSubset
(
const
Mesh
&
msh
,
std
::
vector
<
Element
*>
const
*
vec_items
)
/// \note When delete_ptr is set only the vector is deleted, not the
:
_msh
(
msh
),
_nodes
(
nullptr
),
_eles
(
vec_items
)
/// elements of the vector.
MeshSubset
(
const
Mesh
&
msh
,
std
::
vector
<
Element
*>
const
*
vec_items
,
bool
const
delete_ptr
=
false
)
:
_msh
(
msh
),
_nodes
(
nullptr
),
_eles
(
vec_items
),
_delete_ptr
(
delete_ptr
)
{}
{}
/// construct from both nodes and elements
/// construct from both nodes and elements
...
@@ -76,23 +68,11 @@ public:
...
@@ -76,23 +68,11 @@ public:
/// \param msh Mesh
/// \param msh Mesh
/// \param vec_nodes Vector of Node pointers.
/// \param vec_nodes Vector of Node pointers.
/// \param vec_eles Vector of Element pointers.
/// \param vec_eles Vector of Element pointers.
/// \param delete_ptr Deletes the vector of Node pointers if true.
/// \note When delete_ptr is set only the vectors are deleted, not the
/// elements of the vectors.
MeshSubset
(
const
Mesh
&
msh
,
std
::
vector
<
Node
*>
const
*
vec_nodes
,
MeshSubset
(
const
Mesh
&
msh
,
std
::
vector
<
Node
*>
const
*
vec_nodes
,
std
::
vector
<
Element
*>
const
*
vec_eles
,
bool
const
delete_ptr
=
false
)
std
::
vector
<
Element
*>
const
*
vec_eles
)
:
_msh
(
msh
),
_nodes
(
vec_nodes
),
_eles
(
vec_eles
)
,
_delete_ptr
(
delete_ptr
)
:
_msh
(
msh
),
_nodes
(
vec_nodes
),
_eles
(
vec_eles
)
{}
{}
~
MeshSubset
()
{
if
(
_delete_ptr
)
{
delete
_nodes
;
delete
_eles
;
}
}
/// return the total number of mesh items
/// return the total number of mesh items
std
::
size_t
getNumberOfTotalItems
()
const
std
::
size_t
getNumberOfTotalItems
()
const
{
{
...
@@ -160,7 +140,5 @@ private:
...
@@ -160,7 +140,5 @@ private:
Mesh
const
&
_msh
;
Mesh
const
&
_msh
;
std
::
vector
<
Node
*>
const
*
_nodes
;
std
::
vector
<
Node
*>
const
*
_nodes
;
std
::
vector
<
Element
*>
const
*
_eles
;
std
::
vector
<
Element
*>
const
*
_eles
;
bool
const
_delete_ptr
=
false
;
};
};
}
// namespace MeshLib
}
// namespace MeshLib
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