Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
e8a706fc
Commit
e8a706fc
authored
Jul 25, 2008
by
Mattijs Janssens
Browse files
not do points that are not to be split but are on multiple faces that are to be split
parent
30512ec1
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/dynamicMesh/polyTopoChange/polyTopoChange/localPointRegion.C
View file @
e8a706fc
...
...
@@ -110,6 +110,7 @@ bool Foam::localPointRegion::isDuplicate
void
Foam
::
localPointRegion
::
countPointRegions
(
const
polyMesh
&
mesh
,
const
boolList
&
candidatePoint
,
const
Map
<
label
>&
candidateFace
,
faceList
&
minRegion
)
...
...
@@ -144,38 +145,45 @@ void Foam::localPointRegion::countPointRegions
forAll
(
f
,
fp
)
{
label
pointI
=
f
[
fp
];
label
region
=
minRegion
[
faceI
][
fp
];
if
(
minPointRegion
[
pointI
]
==
-
1
)
{
minPointRegion
[
pointI
]
=
region
;
}
else
if
(
minPointRegion
[
pointI
]
!=
region
)
// Even points which were not candidates for splitting might
// be on multiple baffles that are being split so check.
if
(
candidatePoint
[
pointI
])
{
// Multiple regions for this point. Add.
Map
<
label
>::
iterator
iter
=
meshPointMap_
.
find
(
pointI
);
if
(
iter
!=
meshPointMap_
.
end
()
)
label
region
=
minRegion
[
faceI
][
fp
];
if
(
minPointRegion
[
pointI
]
==
-
1
)
{
labelList
&
regions
=
pointRegions
[
iter
()];
if
(
findIndex
(
regions
,
region
)
==
-
1
)
{
label
sz
=
regions
.
size
();
regions
.
setSize
(
sz
+
1
);
regions
[
sz
]
=
region
;
}
minPointRegion
[
pointI
]
=
region
;
}
else
else
if
(
minPointRegion
[
pointI
]
!=
region
)
{
label
localPointI
=
meshPointMap_
.
size
();
meshPointMap_
.
insert
(
pointI
,
localPointI
);
labelList
regions
(
2
);
regions
[
0
]
=
minPointRegion
[
pointI
];
regions
[
1
]
=
region
;
pointRegions
.
append
(
regions
);
}
// Multiple regions for this point. Add.
Map
<
label
>::
iterator
iter
=
meshPointMap_
.
find
(
pointI
);
if
(
iter
!=
meshPointMap_
.
end
())
{
labelList
&
regions
=
pointRegions
[
iter
()];
if
(
findIndex
(
regions
,
region
)
==
-
1
)
{
label
sz
=
regions
.
size
();
regions
.
setSize
(
sz
+
1
);
regions
[
sz
]
=
region
;
}
}
else
{
label
localPointI
=
meshPointMap_
.
size
();
meshPointMap_
.
insert
(
pointI
,
localPointI
);
labelList
regions
(
2
);
regions
[
0
]
=
minPointRegion
[
pointI
];
regions
[
1
]
=
region
;
pointRegions
.
append
(
regions
);
}
label
meshFaceMapI
=
meshFaceMap_
.
size
();
meshFaceMap_
.
insert
(
faceI
,
meshFaceMapI
);
label
meshFaceMapI
=
meshFaceMap_
.
size
();
meshFaceMap_
.
insert
(
faceI
,
meshFaceMapI
);
}
}
}
}
...
...
@@ -194,7 +202,9 @@ void Foam::localPointRegion::countPointRegions
forAll
(
f
,
fp
)
{
if
(
meshPointMap_
.
found
(
f
[
fp
]))
// Note: candidatePoint test not really necessary but
// speeds up rejection.
if
(
candidatePoint
[
f
[
fp
]]
&&
meshPointMap_
.
found
(
f
[
fp
]))
{
label
meshFaceMapI
=
meshFaceMap_
.
size
();
meshFaceMap_
.
insert
(
faceI
,
meshFaceMapI
);
...
...
@@ -421,7 +431,7 @@ void Foam::localPointRegion::calcPointRegions
// Count regions per point
countPointRegions
(
mesh
,
candidateFace
,
minRegion
);
countPointRegions
(
mesh
,
candidatePoint
,
candidateFace
,
minRegion
);
minRegion
.
clear
();
...
...
src/dynamicMesh/polyTopoChange/polyTopoChange/localPointRegion.H
View file @
e8a706fc
...
...
@@ -92,6 +92,7 @@ class localPointRegion
void
countPointRegions
(
const
polyMesh
&
mesh
,
const
boolList
&
candidatePoint
,
const
Map
<
label
>&
candidateFace
,
faceList
&
minRegion
);
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment