mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Allowing cloud_ to be written by objectRegistry. Writes all data
and doesn't produce spurious writes when subcycling. BUG: Missing Foam:: scope. STYLE: Removing commented out inplaceReorders.
This commit is contained in:
@ -346,7 +346,7 @@ void Foam::InteractionLists<ParticleType>::prepareParticlesToRefer
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
void InteractionLists<ParticleType>::prepareParticleToBeReferred
|
||||
void Foam::InteractionLists<ParticleType>::prepareParticleToBeReferred
|
||||
(
|
||||
ParticleType* particle,
|
||||
labelPair giat
|
||||
@ -362,11 +362,11 @@ void InteractionLists<ParticleType>::prepareParticleToBeReferred
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
void InteractionLists<ParticleType>::writeReferredParticleCloud()
|
||||
void Foam::InteractionLists<ParticleType>::writeReferredParticleCloud()
|
||||
{
|
||||
bool writeCloud = true;
|
||||
|
||||
if (mesh_.time().outputTime() && writeCloud)
|
||||
if (writeCloud)
|
||||
{
|
||||
cloud_.clear();
|
||||
|
||||
@ -379,10 +379,6 @@ void InteractionLists<ParticleType>::writeReferredParticleCloud()
|
||||
cloud_.addParticle(iter().clone().ptr());
|
||||
}
|
||||
}
|
||||
|
||||
Particle<ParticleType>::writeFields(cloud_);
|
||||
|
||||
cloud_.clear();
|
||||
}
|
||||
}
|
||||
|
||||
@ -579,34 +575,16 @@ Foam::InteractionLists<ParticleType>::InteractionLists
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// Perform reordering of ril_, to remove any referred cells
|
||||
// that do not interact. They will not be sent from
|
||||
// originating processors. This assumes that the
|
||||
// disappearance of the cell from the sending list of the
|
||||
// source processor, simply removes the referred cell from the
|
||||
// ril_, all of the subsequent indices shuffle down one, but
|
||||
// the order and structure is preserved, i.e. it, is as if the
|
||||
// cell had never been referred in the first place.
|
||||
// Perform subset of ril_, to remove any referred cells that do
|
||||
// not interact. They will not be sent from originating
|
||||
// processors. This assumes that the disappearance of the cell
|
||||
// from the sending list of the source processor, simply removes
|
||||
// the referred cell from the ril_, all of the subsequent indices
|
||||
// shuffle down one, but the order and structure is preserved,
|
||||
// i.e. it, is as if the cell had never been referred in the first
|
||||
// place.
|
||||
|
||||
// labelList oldToNew(globalIAndTToExchange.size(), -1);
|
||||
|
||||
// label refCellI = 0;
|
||||
|
||||
// forAll(bbRequiredByAnyCell, bbReqI)
|
||||
// {
|
||||
// if (bbRequiredByAnyCell[bbReqI])
|
||||
// {
|
||||
// oldToNew[bbReqI] = refCellI++;
|
||||
// }
|
||||
// }
|
||||
|
||||
// inplaceReorder(oldToNew, ril_);
|
||||
|
||||
// ril_.setSize(refCellI);
|
||||
|
||||
inplaceSubset(bbRequiredByAnyCell, ril_);
|
||||
}
|
||||
inplaceSubset(bbRequiredByAnyCell, ril_);
|
||||
|
||||
// Send information about which cells are actually required back
|
||||
// to originating processors.
|
||||
@ -636,38 +614,9 @@ Foam::InteractionLists<ParticleType>::InteractionLists
|
||||
// Move all of the used cells to refer to the start of the list
|
||||
// and truncate it
|
||||
|
||||
{
|
||||
// labelList oldToNew(globalIAndTToExchange.size(), -1);
|
||||
inplaceSubset(bbRequiredByAnyCell, globalIAndTToExchange);
|
||||
|
||||
// label refCellI = 0;
|
||||
|
||||
// forAll(bbRequiredByAnyCell, bbReqI)
|
||||
// {
|
||||
// if (bbRequiredByAnyCell[bbReqI])
|
||||
// {
|
||||
// oldToNew[bbReqI] = refCellI++;
|
||||
// }
|
||||
// }
|
||||
|
||||
// inplaceReorder
|
||||
// (
|
||||
// oldToNew,
|
||||
// globalIAndTToExchange
|
||||
// );
|
||||
|
||||
// inplaceReorder
|
||||
// (
|
||||
// oldToNew,
|
||||
// procToDistributeTo
|
||||
// );
|
||||
|
||||
// globalIAndTToExchange.setSize(refCellI);
|
||||
// procToDistributeTo.setSize(refCellI);
|
||||
|
||||
inplaceSubset(bbRequiredByAnyCell, globalIAndTToExchange);
|
||||
|
||||
inplaceSubset(bbRequiredByAnyCell, procToDistributeTo);
|
||||
}
|
||||
inplaceSubset(bbRequiredByAnyCell, procToDistributeTo);
|
||||
|
||||
preDistributionSize = procToDistributeTo.size();
|
||||
|
||||
|
||||
@ -81,7 +81,7 @@ Foam::InteractionLists<ParticleType>::rilInverse() const
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
const Foam::List<IDLList<ParticleType> >&
|
||||
const Foam::List<Foam::IDLList<ParticleType> >&
|
||||
Foam::InteractionLists<ParticleType>::referredParticles() const
|
||||
{
|
||||
return referredParticles_;
|
||||
@ -89,7 +89,7 @@ Foam::InteractionLists<ParticleType>::referredParticles() const
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
Foam::List<IDLList<ParticleType> >&
|
||||
Foam::List<Foam::IDLList<ParticleType> >&
|
||||
Foam::InteractionLists<ParticleType>::referredParticles()
|
||||
{
|
||||
return referredParticles_;
|
||||
|
||||
Reference in New Issue
Block a user