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
1dc64adb
Commit
1dc64adb
authored
Nov 21, 2013
by
andy
Browse files
BUG: mappedPatchBase - cannot use samplePatch() for NEARESTCELL mode - must use samplePatch_
parent
4e19a1a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.C
View file @
1dc64adb
...
...
@@ -203,7 +203,7 @@ void Foam::mappedPatchBase::findSamples
{
case
NEARESTCELL
:
{
if
(
samplePatch
()
.
size
()
&&
samplePatch
()
!=
"none"
)
if
(
samplePatch
_
.
size
()
&&
samplePatch
_
!=
"none"
)
{
FatalErrorIn
(
...
...
@@ -495,7 +495,6 @@ void Foam::mappedPatchBase::findSamples
void
Foam
::
mappedPatchBase
::
calcMapping
()
const
{
static
bool
hasWarned
=
false
;
if
(
mapPtr_
.
valid
())
{
FatalErrorIn
(
"mappedPatchBase::calcMapping() const"
)
...
...
@@ -509,10 +508,8 @@ void Foam::mappedPatchBase::calcMapping() const
// Get offsetted points
const
pointField
offsettedPoints
(
samplePoints
(
patchPoints
()));
// Do a sanity check
// Am I sampling my own patch? This only makes sense for a non-zero
// offset.
// Do a sanity check - am I sampling my own patch?
// This only makes sense for a non-zero offset.
bool
sampleMyself
=
(
mode_
==
NEARESTPATCHFACE
...
...
@@ -550,7 +547,6 @@ void Foam::mappedPatchBase::calcMapping() const
<<
"offsetMode_:"
<<
offsetModeNames_
[
offsetMode_
]
<<
endl
;
}
// Get global list of all samples and the processor and face they come from.
pointField
samples
;
labelList
patchFaceProcs
;
...
...
@@ -565,7 +561,6 @@ void Foam::mappedPatchBase::calcMapping() const
patchFc
);
// Find processor and cell/face samples are in and actual location.
labelList
sampleProcs
;
labelList
sampleIndices
;
...
...
@@ -641,7 +636,6 @@ void Foam::mappedPatchBase::calcMapping() const
}
}
// Now we have all the data we need:
// - where sample originates from (so destination when mapping):
// patchFaces, patchFaceProcs.
...
...
@@ -688,7 +682,6 @@ void Foam::mappedPatchBase::calcMapping() const
}
}
// Determine schedule.
mapPtr_
.
reset
(
new
mapDistribute
(
sampleProcs
,
patchFaceProcs
));
...
...
@@ -806,38 +799,34 @@ void Foam::mappedPatchBase::calcAMI() const
}
AMIPtr_
.
clear
();
/*
const polyPatch& nbr = samplePolyPatch();
// pointField nbrPoints(offsettedPoints());
pointField nbrPoints(nbr.localPoints());
if
(
debug
)
{
const
polyPatch
&
nbr
=
samplePolyPatch
();
pointField
nbrPoints
(
nbr
.
localPoints
());
OFstream
os
(
patch_
.
name
()
+
"_neighbourPatch-org.obj"
);
meshTools
::
writeOBJ
(
os
,
samplePolyPatch
().
localFaces
(),
nbrPoints
);
}
// transform neighbour patch to local system
primitivePatch nbrPatch0
(
SubList<face>
// transform neighbour patch to local system
primitivePatch
nbrPatch0
(
nbr.localFaces(),
nbr.size()
),
nbrPoints
);
SubList
<
face
>
(
nbr
.
localFaces
(),
nbr
.
size
()
),
nbrPoints
);
if (debug)
{
OFstream
osN
(
patch_
.
name
()
+
"_neighbourPatch-trans.obj"
);
meshTools
::
writeOBJ
(
osN
,
nbrPatch0
,
nbrPoints
);
OFstream
osO
(
patch_
.
name
()
+
"_ownerPatch.obj"
);
meshTools
::
writeOBJ
(
osO
,
patch_
.
localFaces
(),
patch_
.
localPoints
());
}
*/
// Construct/apply AMI interpolation to determine addressing and weights
AMIPtr_
.
reset
(
...
...
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