Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dynamic
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
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
MostafaMollaali
dynamic
Commits
5e586651
Commit
5e586651
authored
5 years ago
by
Tom Fischer
Browse files
Options
Downloads
Patches
Plain Diff
[MeL/SurfaceExtraction] rename: surface->boundary.
Make clear that boundary (2d/3d) is handled.
parent
2d8dce3e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
MeshLib/MeshSurfaceExtraction.cpp
+14
-14
14 additions, 14 deletions
MeshLib/MeshSurfaceExtraction.cpp
with
14 additions
and
14 deletions
MeshLib/MeshSurfaceExtraction.cpp
+
14
−
14
View file @
5e586651
...
...
@@ -406,7 +406,7 @@ void createSurfaceElementsFromElement(
std
::
tuple
<
std
::
vector
<
MeshLib
::
Element
*>
,
std
::
vector
<
std
::
size_t
>
,
std
::
vector
<
std
::
size_t
>>
create
Surface
Elements
(
MeshLib
::
Mesh
const
&
bulk_mesh
)
create
Boundary
Elements
(
MeshLib
::
Mesh
const
&
bulk_mesh
)
{
std
::
vector
<
std
::
size_t
>
element_to_bulk_element_id_map
;
std
::
vector
<
std
::
size_t
>
element_to_bulk_face_id_map
;
...
...
@@ -449,13 +449,13 @@ std::unique_ptr<MeshLib::Mesh> getBoundaryElementsAsMesh(
ERR
(
"Cannot handle meshes of dimension %i"
,
mesh_dimension
);
}
// create
surface
elements based on the subsurface nodes
auto
[
surface
_elements
,
element_to_bulk_element_id_map
,
element_to_bulk_face_id_map
]
=
create
Surface
Elements
(
bulk_mesh
);
// create
boundary
elements based on the subsurface nodes
auto
[
boundary
_elements
,
element_to_bulk_element_id_map
,
element_to_bulk_face_id_map
]
=
create
Boundary
Elements
(
bulk_mesh
);
// create new nodes needed for the new surface elements
auto
[
surface
_nodes
,
node_id_map
]
=
createNodesAndIDMapFromElements
(
surface
_elements
,
bulk_mesh
.
getNumberOfNodes
());
auto
[
boundary
_nodes
,
node_id_map
]
=
createNodesAndIDMapFromElements
(
boundary
_elements
,
bulk_mesh
.
getNumberOfNodes
());
// create new elements using newly created nodes and delete temp-elements
std
::
vector
<
MeshLib
::
Element
*>
new_elements
;
...
...
@@ -466,7 +466,7 @@ std::unique_ptr<MeshLib::Mesh> getBoundaryElementsAsMesh(
}
catch
(
std
::
runtime_error
const
&
err
)
{
ERR
(
"BoundaryExtraction; could not create new
surface
elements:
\n
%s."
,
ERR
(
"BoundaryExtraction; could not create new
boundary
elements:
\n
%s."
,
err
.
what
());
std
::
for_each
(
surface_elements
.
begin
(),
surface_elements
.
end
(),
[](
MeshLib
::
Element
*
e
)
{
delete
e
;
});
...
...
@@ -478,27 +478,27 @@ std::unique_ptr<MeshLib::Mesh> getBoundaryElementsAsMesh(
[](
MeshLib
::
Element
*
e
)
{
delete
e
;
});
std
::
vector
<
std
::
size_t
>
nodes_to_bulk_nodes_id_map
;
nodes_to_bulk_nodes_id_map
.
reserve
(
surface
_nodes
.
size
());
std
::
transform
(
begin
(
surface
_nodes
),
end
(
surface
_nodes
),
nodes_to_bulk_nodes_id_map
.
reserve
(
boundary
_nodes
.
size
());
std
::
transform
(
begin
(
boundary
_nodes
),
end
(
boundary
_nodes
),
std
::
back_inserter
(
nodes_to_bulk_nodes_id_map
),
[](
MeshLib
::
Node
*
const
n
)
{
return
n
->
getID
();
});
std
::
unique_ptr
<
MeshLib
::
Mesh
>
surface
_mesh
(
new
Mesh
(
bulk_mesh
.
getName
()
+
"-
Surface"
,
surface
_nodes
,
new_elements
));
std
::
unique_ptr
<
MeshLib
::
Mesh
>
boundary
_mesh
(
new
Mesh
(
bulk_mesh
.
getName
()
+
"-
boundary"
,
boundary
_nodes
,
new_elements
));
addBulkIDPropertiesToMesh
(
*
surface
_mesh
,
subsfc_node_id_prop_name
,
nodes_to_bulk_nodes_id_map
,
*
boundary
_mesh
,
subsfc_node_id_prop_name
,
nodes_to_bulk_nodes_id_map
,
subsfc_element_id_prop_name
,
element_to_bulk_element_id_map
,
face_id_prop_name
,
element_to_bulk_face_id_map
);
/// Copies relevant parts of scalar arrays to the surface mesh
if
(
!
createSfcMeshProperties
(
*
surface
_mesh
,
bulk_mesh
.
getProperties
(),
if
(
!
createSfcMeshProperties
(
*
boundary
_mesh
,
bulk_mesh
.
getProperties
(),
nodes_to_bulk_nodes_id_map
,
element_to_bulk_element_id_map
))
{
ERR
(
"Transferring subsurface properties failed."
);
}
return
surface
_mesh
;
return
boundary
_mesh
;
}
}
// namespace BoundaryExtraction
...
...
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