32template<
class CloudType>
33bool Foam::MultiInteraction<CloudType>::read(
const dictionary&
dict)
37 Info<<
"Patch interaction model " << typeName <<
nl
38 <<
"Executing in turn " <<
endl;
41 for (
const entry& dEntry :
dict)
51 models_.resize(count);
54 for (
const entry& dEntry :
dict)
61 PatchInteractionModel<CloudType>::New
70 dict.readEntry(
"oneInteractionOnly", oneInteractionOnly_);
71 if (oneInteractionOnly_)
73 Info<<
"Stopping upon first model that interacts with particle."
78 Info<<
"Allowing multiple models to interact."
88template<
class CloudType>
101template<
class CloudType>
108 oneInteractionOnly_(pim.oneInteractionOnly_),
115template<
class CloudType>
120 if (models_[i].active())
129template<
class CloudType>
132 typename CloudType::parcelType&
p,
137 label origFacei =
p.face();
138 label patchi =
pp.index();
140 bool interacted =
false;
144 bool myInteracted = models_[i].correct
147 this->owner().pMesh().boundaryMesh()[patchi],
151 if (myInteracted && oneInteractionOnly_)
156 interacted = (interacted || myInteracted);
162 if (
p.face() != origFacei)
164 origFacei =
p.face();
179template<
class CloudType>
182 for (
auto& m : models_)
189template<
class CloudType>
192 PatchInteractionModel<CloudType>::info();
194 for (
auto& m : models_)
196 Log_<<
"Patch interaction model " << m.type() <<
':' << endl;
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
const CloudType & owner() const
Return const access to the owner cloud.
InfoProxy< IOstream > info() const noexcept
Return info proxy, used to print IOstream information to a stream.
Runs multiple patch interaction models in turn. Takes dictionary where all the subdictionaries are th...
virtual void postEvolve()
Post-evolve hook.
MultiInteraction(const dictionary &dict, CloudType &cloud)
Construct from dictionary.
virtual bool correct(typename CloudType::parcelType &p, const polyPatch &pp, bool &keepParticle)
Apply velocity correction.
virtual void info()
Write patch interaction.
virtual bool active() const
Flag to indicate whether model activates patch interaction model.
Templated patch interaction model class.
PatchInteractionModel(CloudType &owner)
Construct null from owner.
virtual void info()
Write patch interaction info.
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface....
A cloud is a registry collection of lagrangian particles.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A patch is a list of labels that address the faces in the global face list.
const dictionary & coeffDict() const
Return const access to the coefficients dictionary.
const dictionary & dict() const
Return const access to the cloud dictionary.
#define Log_
Report write to Foam::Info if the class log switch is true.
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
DSMCCloud< dsmcParcel > CloudType
messageStream Info
Information stream (stdout output on master, null elsewhere).
const word GlobalIOList< Tuple2< scalar, vector > >::typeName("scalarVectorTable")
Ostream & endl(Ostream &os)
Add newline and flush stream.
constexpr char nl
The newline '\n' character (0x0a).
#define forAll(list, i)
Loop across all elements in list.