| 912 | |
| 913 | |
| 914 | void 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 | |
| 937 | void Foam::particle::patchData(vector& n, vector& U) const |
no test coverage detected