Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
integration-cfmesh
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Community
integration-cfmesh
Commits
6bb61e2e
Commit
6bb61e2e
authored
Jul 14, 2015
by
Franjo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved stability of the procedure for generating edges
parent
fcd1649b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
41 deletions
+42
-41
meshLibrary/utilities/surfaceTools/meshSurfaceEngine/meshSurfaceEngineCalculateBoundaryNodesAndFaces.C
...eEngine/meshSurfaceEngineCalculateBoundaryNodesAndFaces.C
+42
-41
No files found.
meshLibrary/utilities/surfaceTools/meshSurfaceEngine/meshSurfaceEngineCalculateBoundaryNodesAndFaces.C
View file @
6bb61e2e
...
...
@@ -29,7 +29,6 @@ Description
#include "demandDrivenData.H"
#include "boolList.H"
#include "helperFunctions.H"
#include "helperFunctionsPar.H"
#include "VRWGraphSMPModifier.H"
#include "labelledPoint.H"
#include "HashSet.H"
...
...
@@ -887,6 +886,7 @@ void meshSurfaceEngine::calculateEdgesAndAddressing() const
{
const
VRWGraph
&
pFaces
=
pointFaces
();
const
faceList
::
subList
&
bFaces
=
boundaryFaces
();
const
labelList
&
bPoints
=
boundaryPoints
();
const
labelList
&
bp
=
this
->
bp
();
edgesPtr_
=
new
edgeList
();
...
...
@@ -911,47 +911,41 @@ void meshSurfaceEngine::calculateEdgesAndAddressing() const
# pragma omp parallel num_threads(nThreads)
# endif
{
LongList
<
edge
>
edgesHelper
;
edgeLongList
edgesHelper
;
# ifdef USE_OMP
# pragma omp for schedule(static)
# endif
forAll
(
bFaces
,
bf
I
)
forAll
(
pFaces
,
bp
I
)
{
const
face
&
bf
=
bFaces
[
bfI
]
;
std
::
set
<
std
::
pair
<
label
,
label
>
>
edgesAtPoint
;
forAll
(
bf
,
p
I
)
forAll
Row
(
pFaces
,
bpI
,
pf
I
)
{
const
edge
fe
=
bf
.
faceEdge
(
pI
);
const
label
bpI
=
bp
[
fe
.
start
()];
const
label
e
=
fe
.
end
();
DynList
<
label
>
edgeFaces
;
const
label
bfI
=
pFaces
(
bpI
,
pfI
);
const
face
&
bf
=
bFaces
[
bfI
];
bool
store
(
true
);
const
label
pos
=
bf
.
which
(
bPoints
[
bpI
]
);
//- find all faces attached to this edge
//- store the edge in case the face faceI is the face
//- with the smallest label
forAllRow
(
pFaces
,
bpI
,
pfI
)
if
(
bp
[
bf
.
nextLabel
(
pos
)]
>=
bpI
)
{
const
label
ofI
=
pFaces
(
bpI
,
pfI
);
const
face
&
of
=
bFaces
[
ofI
];
if
(
of
.
which
(
e
)
<
0
)
continue
;
if
(
ofI
<
bfI
)
{
store
=
false
;
break
;
}
edgeFaces
.
append
(
ofI
);
edgesAtPoint
.
insert
(
std
::
make_pair
(
bf
[
pos
],
bf
.
nextLabel
(
pos
))
);
}
if
(
bp
[
bf
.
prevLabel
(
pos
)]
>=
bpI
)
{
edgesAtPoint
.
insert
(
std
::
make_pair
(
bf
[
pos
],
bf
.
prevLabel
(
pos
))
);
}
if
(
store
)
edgesHelper
.
append
(
fe
);
}
std
::
set
<
std
::
pair
<
label
,
label
>
>::
const_iterator
it
;
for
(
it
=
edgesAtPoint
.
begin
();
it
!=
edgesAtPoint
.
end
();
++
it
)
edgesHelper
.
append
(
edge
(
it
->
first
,
it
->
second
));
}
//- this enables other threads to see the number of edges
...
...
@@ -1099,7 +1093,7 @@ void meshSurfaceEngine::calculateFaceEdgesAddressing() const
const
faceList
::
subList
&
bFaces
=
this
->
boundaryFaces
();
const
labelList
&
bp
=
this
->
bp
();
const
edgeList
&
edges
=
this
->
edges
();
const
VRWGraph
&
pointFaces
=
this
->
pointFac
es
();
const
VRWGraph
&
bpEdges
=
this
->
boundaryPointEdg
es
();
faceEdgesPtr_
=
new
VRWGraph
(
bFaces
.
size
());
VRWGraph
&
faceEdges
=
*
faceEdgesPtr_
;
...
...
@@ -1122,29 +1116,36 @@ void meshSurfaceEngine::calculateFaceEdgesAddressing() const
# pragma omp barrier
# pragma omp master
{
# endif
VRWGraphSMPModifier
(
faceEdges
).
setSizeAndRowSize
(
nfe
);
# ifdef USE_OMP
}
# pragma omp barrier
# pragma omp for schedule(
static
)
# pragma omp for schedule(
dynamic, 100
)
# endif
forAll
(
edges
,
edge
I
)
forAll
(
faceEdges
,
bf
I
)
{
const
edge
ee
=
edges
[
edgeI
];
const
label
bpI
=
bp
[
ee
.
start
()];
const
face
&
bf
=
bFaces
[
bfI
];
forAll
Row
(
pointFaces
,
bpI
,
pf
I
)
forAll
(
bf
,
e
I
)
{
const
label
bfI
=
pointFaces
(
bpI
,
pf
I
);
const
edge
e
=
bf
.
faceEdge
(
e
I
);
const
face
&
bf
=
bFaces
[
bfI
];
forAll
(
bf
,
eI
)
const
label
bps
=
bp
[
e
.
start
()];
forAllRow
(
bpEdges
,
bps
,
peI
)
{
if
(
bf
.
faceEdge
(
eI
)
==
ee
)
const
label
beI
=
bpEdges
(
bps
,
peI
);
const
edge
&
ee
=
edges
[
beI
];
if
(
e
==
ee
)
{
faceEdges
[
bfI
][
eI
]
=
edg
eI
;
faceEdges
(
bfI
,
eI
)
=
b
eI
;
break
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment