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
Dmitri Naumov
ogs
Commits
9ca7cb8c
Commit
9ca7cb8c
authored
8 years ago
by
Tom Fischer
Browse files
Options
Downloads
Patches
Plain Diff
[MeL] Clang format parts of MeshSurfaceExtraction.
parent
303b85a6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
MeshLib/MeshSurfaceExtraction.cpp
+10
-5
10 additions, 5 deletions
MeshLib/MeshSurfaceExtraction.cpp
MeshLib/MeshSurfaceExtraction.h
+11
-2
11 additions, 2 deletions
MeshLib/MeshSurfaceExtraction.h
with
21 additions
and
7 deletions
MeshLib/MeshSurfaceExtraction.cpp
+
10
−
5
View file @
9ca7cb8c
...
...
@@ -223,7 +223,10 @@ void MeshSurfaceExtraction::get2DSurfaceElements(const std::vector<MeshLib::Elem
}
}
void
MeshSurfaceExtraction
::
get2DSurfaceNodes
(
std
::
vector
<
MeshLib
::
Node
*>
&
sfc_nodes
,
std
::
size_t
n_all_nodes
,
const
std
::
vector
<
MeshLib
::
Element
*>
&
sfc_elements
,
std
::
vector
<
std
::
size_t
>
&
node_id_map
)
void
MeshSurfaceExtraction
::
get2DSurfaceNodes
(
std
::
vector
<
MeshLib
::
Node
*>&
sfc_nodes
,
std
::
size_t
n_all_nodes
,
const
std
::
vector
<
MeshLib
::
Element
*>&
sfc_elements
,
std
::
vector
<
std
::
size_t
>&
node_id_map
)
{
const
std
::
size_t
nNewElements
(
sfc_elements
.
size
());
std
::
vector
<
const
MeshLib
::
Node
*>
tmp_nodes
(
n_all_nodes
,
nullptr
);
...
...
@@ -236,8 +239,8 @@ void MeshSurfaceExtraction::get2DSurfaceNodes(std::vector<MeshLib::Node*> &sfc_n
tmp_nodes
[
node
->
getID
()]
=
node
;
}
}
const
std
::
size_t
nNodes
(
tmp_nodes
.
size
());
for
(
unsigned
i
=
0
;
i
<
nNodes
;
++
i
)
const
std
::
size_t
nNodes
(
tmp_nodes
.
size
());
for
(
unsigned
i
=
0
;
i
<
nNodes
;
++
i
)
{
if
(
tmp_nodes
[
i
])
{
...
...
@@ -251,11 +254,13 @@ std::vector<GeoLib::Point*> MeshSurfaceExtraction::getSurfaceNodes(const MeshLib
{
INFO
(
"Extracting surface nodes..."
);
std
::
vector
<
MeshLib
::
Element
*>
sfc_elements
;
get2DSurfaceElements
(
mesh
.
getElements
(),
sfc_elements
,
dir
,
angle
,
mesh
.
getDimension
());
get2DSurfaceElements
(
mesh
.
getElements
(),
sfc_elements
,
dir
,
angle
,
mesh
.
getDimension
());
std
::
vector
<
MeshLib
::
Node
*>
sfc_nodes
;
std
::
vector
<
std
::
size_t
>
node_id_map
(
mesh
.
getNumberOfNodes
());
get2DSurfaceNodes
(
sfc_nodes
,
mesh
.
getNumberOfNodes
(),
sfc_elements
,
node_id_map
);
get2DSurfaceNodes
(
sfc_nodes
,
mesh
.
getNumberOfNodes
(),
sfc_elements
,
node_id_map
);
for
(
auto
e
:
sfc_elements
)
delete
e
;
...
...
This diff is collapsed.
Click to expand it.
MeshLib/MeshSurfaceExtraction.h
+
11
−
2
View file @
9ca7cb8c
...
...
@@ -72,10 +72,19 @@ public:
private:
/// Functionality needed for getSurfaceNodes() and getMeshSurface()
static
void
get2DSurfaceElements
(
const
std
::
vector
<
MeshLib
::
Element
*>
&
all_elements
,
std
::
vector
<
MeshLib
::
Element
*>
&
sfc_elements
,
const
MathLib
::
Vector3
&
dir
,
double
angle
,
unsigned
mesh_dimension
);
static
void
get2DSurfaceElements
(
const
std
::
vector
<
MeshLib
::
Element
*>&
all_elements
,
std
::
vector
<
MeshLib
::
Element
*>&
sfc_elements
,
const
MathLib
::
Vector3
&
dir
,
double
angle
,
unsigned
mesh_dimension
);
/// Functionality needed for getSurfaceNodes() and getMeshSurface()
static
void
get2DSurfaceNodes
(
std
::
vector
<
MeshLib
::
Node
*>
&
sfc_nodes
,
std
::
size_t
n_all_nodes
,
const
std
::
vector
<
MeshLib
::
Element
*>
&
sfc_elements
,
std
::
vector
<
std
::
size_t
>
&
node_id_map
);
static
void
get2DSurfaceNodes
(
std
::
vector
<
MeshLib
::
Node
*>&
sfc_nodes
,
std
::
size_t
n_all_nodes
,
const
std
::
vector
<
MeshLib
::
Element
*>&
sfc_elements
,
std
::
vector
<
std
::
size_t
>&
node_id_map
);
};
}
// end 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