Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
I
integration-cfmesh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
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
Community
integration-cfmesh
Commits
6bb61e2e
Commit
6bb61e2e
authored
10 years ago
by
Franjo
Browse files
Options
Downloads
Patches
Plain Diff
Improved stability of the procedure for generating edges
parent
fcd1649b
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
meshLibrary/utilities/surfaceTools/meshSurfaceEngine/meshSurfaceEngineCalculateBoundaryNodesAndFaces.C
+42
-41
42 additions, 41 deletions
...eEngine/meshSurfaceEngineCalculateBoundaryNodesAndFaces.C
with
42 additions
and
41 deletions
meshLibrary/utilities/surfaceTools/meshSurfaceEngine/meshSurfaceEngineCalculateBoundaryNodesAndFaces.C
+
42
−
41
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
;
edge
LongList
edgesHelper
;
# ifdef USE_OMP
# pragma omp for schedule(static)
# endif
forAll
(
b
Faces
,
b
f
I
)
forAll
(
p
Faces
,
b
p
I
)
{
const
face
&
bf
=
bFaces
[
bfI
]
;
std
::
set
<
std
::
pair
<
label
,
label
>
>
edgesAtPoint
;
forAll
(
bf
,
pI
)
forAll
Row
(
pFaces
,
bpI
,
p
f
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
&
pointFac
es
=
this
->
p
oint
Fac
es
();
const
VRWGraph
&
bpEdg
es
=
this
->
boundaryP
oint
Edg
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
(
e
dges
,
edge
I
)
forAll
(
faceE
dges
,
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
;
}
}
...
...
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