MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / constrainToMeshCentre

Function constrainToMeshCentre

src/lagrangian/basic/particle/particle.C:914–934  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

912
913
914void Foam::particle::constrainToMeshCentre()
915{
916 const Vector<label>& dirs = mesh_.geometricD();
917
918 bool isConstrained = false;
919 forAll(dirs, dirI)
920 {
921 if (dirs[dirI] == -1)
922 {
923 isConstrained = true;
924 break;
925 }
926 }
927
928 if (isConstrained)
929 {
930 vector pos = position();
931 meshTools::constrainToMeshCentre(mesh_, pos);
932 track(pos - position(), 0);
933 }
934}
935
936
937void Foam::particle::patchData(vector& n, vector& U) const

Callers 1

InjectionModel.CFile · 0.50

Calls 3

positionFunction · 0.85
forAllFunction · 0.50
trackFunction · 0.50

Tested by

no test coverage detected