Mapping clean-up

This commit is contained in:
Hrvoje Jasak 2011-06-28 18:26:15 +01:00
parent 137014f511
commit c45aa2d032
2 changed files with 10 additions and 15 deletions

View file

@ -173,15 +173,15 @@ tmp<Field<Type> > ggiGAMGInterface::fastReduce(const UList<Type>& ff) const
} }
// Prepare to receive remote data // Prepare to receive remote data
const labelList& za = zoneAddressing(); const labelList& sza = shadowInterface().zoneAddressing();
tmp<Field<Type> > treceiveBuf tmp<Field<Type> > treceiveBuf
( (
new Field<Type>(za.size(), pTraits<Type>::zero) new Field<Type>(sza.size(), pTraits<Type>::zero)
); );
Field<Type>& receiveBuf = treceiveBuf(); Field<Type>& receiveBuf = treceiveBuf();
if (!za.empty()) if (!sza.empty())
{ {
// Opt: reconsider mode of communication // Opt: reconsider mode of communication
IPstream::read IPstream::read

View file

@ -61,9 +61,9 @@ Foam::tmp<Foam::Field<Type> > Foam::ggiPolyPatch::fastExpand
{ {
FatalErrorIn FatalErrorIn
( (
"tmp<Field<Type> > ggiPolyPatch::fastExpand" "tmp<Field<Type> > ggiPolyPatch::fastExpand\n"
"(" "(\n"
" const Field<Type>& ff" " const Field<Type>& ff\n"
") const" ") const"
) << "Incorrect patch field size. Field size: " ) << "Incorrect patch field size. Field size: "
<< ff.size() << " patch size: " << size() << ff.size() << " patch size: " << size()
@ -130,7 +130,7 @@ Foam::tmp<Foam::Field<Type> > Foam::ggiPolyPatch::fastExpand
// Expanded field complete, send required data to other processors // Expanded field complete, send required data to other processors
for (label procI = 1; procI < Pstream::nProcs(); procI++) for (label procI = 1; procI < Pstream::nProcs(); procI++)
{ {
const labelList& curSAddr = sendAddr()[procI]; const labelList& curSAddr = shadow().sendAddr()[procI];
if (!curSAddr.empty()) if (!curSAddr.empty())
{ {
@ -170,7 +170,7 @@ Foam::tmp<Foam::Field<Type> > Foam::ggiPolyPatch::fastExpand
} }
// Prepare to receive remote data // Prepare to receive remote data
const labelList& rza = remoteZoneAddressing(); const labelList& rza = shadow().remoteZoneAddressing();
if (!rza.empty()) if (!rza.empty())
{ {
@ -325,9 +325,8 @@ Foam::tmp<Foam::Field<Type> > Foam::ggiPolyPatch::interpolate
} }
else else
{ {
// Note: fast expand is always done on the local side // Expand shadow
// HJ, 24/Jun/2011 Field<Type> expandField = shadow().fastExpand(ff);
Field<Type> expandField = fastExpand(ff);
tmp<Field<Type> > tresult(new Field<Type>(size())); tmp<Field<Type> > tresult(new Field<Type>(size()));
Field<Type>& result = tresult(); Field<Type>& result = tresult();
@ -360,10 +359,6 @@ Foam::tmp<Foam::Field<Type> > Foam::ggiPolyPatch::interpolate
// Obsolete. HJ, 12/Jun/2011 // Obsolete. HJ, 12/Jun/2011
// Expand the field to zone size // Expand the field to zone size
// Note: with full fields it is the shadow side that does
// the expand. This is different than fastExpand because
// the addressing is stored remotely.
// HJ, 24/Jun/2011
Field<Type> expandField = shadow().expand(ff); Field<Type> expandField = shadow().expand(ff);
Field<Type> zoneField; Field<Type> zoneField;