1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by
13 the Free Software Foundation, either version 3 of the License, or
14 (at your option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
24 \*---------------------------------------------------------------------------*/
26 #include "motionSmoother.H"
27 #include "twoDPointCorrector.H"
30 #include "fixedValuePointPatchFields.H"
31 #include "pointConstraint.H"
32 #include "syncTools.H"
33 #include "meshTools.H"
36 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
38 defineTypeNameAndDebug(Foam::motionSmoother, 0);
41 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
43 void Foam::motionSmoother::testSyncPositions
45 const pointField& fld,
49 pointField syncedFld(fld);
51 syncTools::syncPointPositions
55 minEqOp<point>(), // combine op
56 point(GREAT,GREAT,GREAT) // null
61 if (mag(syncedFld[i] - fld[i]) > maxMag)
65 "motionSmoother::testSyncPositions(const pointField&)"
66 ) << "On point " << i << " point:" << fld[i]
67 << " synchronised point:" << syncedFld[i]
74 //Foam::tmp<Foam::scalarField> Foam::motionSmoother::sumWeights
76 // const scalarField& edgeWeight
79 // tmp<scalarField> tsumWeight
87 // scalarField& sumWeight = tsumWeight();
89 // const edgeList& edges = mesh_.edges();
91 // forAll(edges, edgeI)
93 // if (isMasterEdge_.get(edgeI) == 1)
95 // const edge& e = edges[edgeI];
96 // const scalar w = edgeWeight[edgeI];
97 // sumWeight[e[0]] += w;
98 // sumWeight[e[1]] += w;
103 // // Add coupled contributions
104 // // ~~~~~~~~~~~~~~~~~~~~~~~~~
105 // syncTools::syncPointList
109 // plusEqOp<scalar>(),
110 // scalar(0) // null value
113 // return tsumWeight;
117 // From pointPatchInterpolation
118 void Foam::motionSmoother::makePatchPatchAddressing()
122 Pout<< "motionSmoother::makePatchPatchAddressing() : "
123 << "constructing boundary addressing"
127 const polyBoundaryMesh& bm = mesh_.boundaryMesh();
128 const pointBoundaryMesh& pbm = pMesh_.boundary();
130 // first count the total number of patch-patch points
132 label nPatchPatchPoints = 0;
136 if (!isA<emptyPolyPatch>(bm[patchi]))
138 nPatchPatchPoints += bm[patchi].boundaryPoints().size();
143 // Go through all patches and mark up the external edge points
144 Map<label> patchPatchPointSet(2*nPatchPatchPoints);
146 labelList patchPatchPoints(nPatchPatchPoints);
148 List<pointConstraint> patchPatchPointConstraints(nPatchPatchPoints);
154 if (!isA<emptyPolyPatch>(bm[patchi]))
156 const labelList& bp = bm[patchi].boundaryPoints();
157 const labelList& meshPoints = bm[patchi].meshPoints();
161 label ppp = meshPoints[bp[pointi]];
163 Map<label>::iterator iter = patchPatchPointSet.find(ppp);
165 if (iter == patchPatchPointSet.end())
167 patchPatchPointSet.insert(ppp, pppi);
168 patchPatchPoints[pppi] = ppp;
169 pbm[patchi].applyConstraint
172 patchPatchPointConstraints[pppi]
178 pbm[patchi].applyConstraint
181 patchPatchPointConstraints[iter()]
188 nPatchPatchPoints = pppi;
189 patchPatchPoints.setSize(nPatchPatchPoints);
190 patchPatchPointConstraints.setSize(nPatchPatchPoints);
192 patchPatchPointConstraintPoints_.setSize(nPatchPatchPoints);
193 patchPatchPointConstraintTensors_.setSize(nPatchPatchPoints);
195 label nConstraints = 0;
197 forAll(patchPatchPointConstraints, i)
199 if (patchPatchPointConstraints[i].first() != 0)
201 patchPatchPointConstraintPoints_[nConstraints] =
204 patchPatchPointConstraintTensors_[nConstraints] =
205 patchPatchPointConstraints[i].constraintTransformation();
211 patchPatchPointConstraintPoints_.setSize(nConstraints);
212 patchPatchPointConstraintTensors_.setSize(nConstraints);
217 OFstream str(mesh_.db().path()/"constraintPoints.obj");
219 Pout<< "Dumping " << patchPatchPointConstraintPoints_.size()
220 << " constraintPoints to " << str.name() << endl;
221 forAll(patchPatchPointConstraintPoints_, i)
223 label pointI = patchPatchPointConstraintPoints_[i];
225 meshTools::writeOBJ(str, mesh_.points()[pointI]);
228 Pout<< "motionSmoother::makePatchPatchAddressing() : "
229 << "finished constructing boundary addressing"
235 void Foam::motionSmoother::checkFld(const pointScalarField& fld)
239 const scalar val = fld[pointI];
241 if ((val > -GREAT) && (val < GREAT))
245 FatalErrorIn("motionSmoother::checkFld")
246 << "Problem : point:" << pointI << " value:" << val
247 << abort(FatalError);
253 Foam::labelHashSet Foam::motionSmoother::getPoints
255 const labelHashSet& faceLabels
258 labelHashSet usedPoints(mesh_.nPoints()/100);
260 forAllConstIter(labelHashSet, faceLabels, iter)
262 const face& f = mesh_.faces()[iter.key()];
266 usedPoints.insert(f[fp]);
274 // Smooth on selected points (usually patch points)
275 void Foam::motionSmoother::minSmooth
277 const PackedBoolList& isAffectedPoint,
278 const labelList& meshPoints,
279 const pointScalarField& fld,
280 pointScalarField& newFld
283 tmp<pointScalarField> tavgFld = avg
286 scalarField(mesh_.nEdges(), 1.0) // uniform weighting
288 const pointScalarField& avgFld = tavgFld();
290 forAll(meshPoints, i)
292 label pointI = meshPoints[i];
293 if (isAffectedPoint.get(pointI) == 1)
298 0.5*fld[pointI] + 0.5*avgFld[pointI]
303 newFld.correctBoundaryConditions();
304 applyCornerConstraints(newFld);
308 // Smooth on all internal points
309 void Foam::motionSmoother::minSmooth
311 const PackedBoolList& isAffectedPoint,
312 const pointScalarField& fld,
313 pointScalarField& newFld
316 tmp<pointScalarField> tavgFld = avg
319 scalarField(mesh_.nEdges(), 1.0) // uniform weighting
321 const pointScalarField& avgFld = tavgFld();
325 if (isAffectedPoint.get(pointI) == 1 && isInternalPoint(pointI))
330 0.5*fld[pointI] + 0.5*avgFld[pointI]
335 newFld.correctBoundaryConditions();
336 applyCornerConstraints(newFld);
340 // Scale on selected points
341 void Foam::motionSmoother::scaleField
343 const labelHashSet& pointLabels,
345 pointScalarField& fld
348 forAllConstIter(labelHashSet, pointLabels, iter)
350 if (isInternalPoint(iter.key()))
352 fld[iter.key()] *= scale;
355 fld.correctBoundaryConditions();
356 applyCornerConstraints(fld);
360 // Scale on selected points (usually patch points)
361 void Foam::motionSmoother::scaleField
363 const labelList& meshPoints,
364 const labelHashSet& pointLabels,
366 pointScalarField& fld
369 forAll(meshPoints, i)
371 label pointI = meshPoints[i];
373 if (pointLabels.found(pointI))
375 fld[pointI] *= scale;
381 bool Foam::motionSmoother::isInternalPoint(const label pointI) const
383 return isInternalPoint_.get(pointI) == 1;
387 void Foam::motionSmoother::getAffectedFacesAndPoints
389 const label nPointIter,
390 const faceSet& wrongFaces,
392 labelList& affectedFaces,
393 PackedBoolList& isAffectedPoint
396 isAffectedPoint.setSize(mesh_.nPoints());
399 faceSet nbrFaces(mesh_, "checkFaces", wrongFaces);
401 // Find possible points influenced by nPointIter iterations of
402 // scaling and smoothing by doing pointCellpoint walk.
403 // Also update faces-to-be-checked to extend one layer beyond the points
404 // that will get updated.
406 for (label i = 0; i < nPointIter; i++)
408 pointSet nbrPoints(mesh_, "grownPoints", getPoints(nbrFaces.toc()));
410 forAllConstIter(pointSet, nbrPoints, iter)
412 const labelList& pCells = mesh_.pointCells(iter.key());
414 forAll(pCells, pCellI)
416 const cell& cFaces = mesh_.cells()[pCells[pCellI]];
418 forAll(cFaces, cFaceI)
420 nbrFaces.insert(cFaces[cFaceI]);
424 nbrFaces.sync(mesh_);
426 if (i == nPointIter - 2)
428 forAllConstIter(faceSet, nbrFaces, iter)
430 const face& f = mesh_.faces()[iter.key()];
433 isAffectedPoint.set(f[fp], 1);
439 affectedFaces = nbrFaces.toc();
443 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
445 Foam::motionSmoother::motionSmoother
449 indirectPrimitivePatch& pp,
450 const labelList& adaptPatchIDs,
451 const dictionary& paramDict
457 adaptPatchIDs_(adaptPatchIDs),
458 paramDict_(paramDict),
464 mesh_.time().timeName(),
476 mesh_.time().timeName(),
482 dimensionedScalar("scale", dimless, 1.0)
484 oldPoints_(mesh_.points()),
485 isInternalPoint_(mesh_.nPoints(), 1),
486 twoDCorrector_(mesh_)
492 Foam::motionSmoother::motionSmoother
495 indirectPrimitivePatch& pp,
496 const labelList& adaptPatchIDs,
497 const pointVectorField& displacement,
498 const dictionary& paramDict
502 pMesh_(const_cast<pointMesh&>(displacement.mesh())),
504 adaptPatchIDs_(adaptPatchIDs),
505 paramDict_(paramDict),
511 mesh_.time().timeName(),
523 mesh_.time().timeName(),
529 dimensionedScalar("scale", dimless, 1.0)
531 oldPoints_(mesh_.points()),
532 isInternalPoint_(mesh_.nPoints(), 1),
533 twoDCorrector_(mesh_)
539 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
541 Foam::motionSmoother::~motionSmoother()
545 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
547 const Foam::polyMesh& Foam::motionSmoother::mesh() const
553 const Foam::pointMesh& Foam::motionSmoother::pMesh() const
559 const Foam::indirectPrimitivePatch& Foam::motionSmoother::patch() const
565 const Foam::labelList& Foam::motionSmoother::adaptPatchIDs() const
567 return adaptPatchIDs_;
571 const Foam::dictionary& Foam::motionSmoother::paramDict() const
577 Foam::pointVectorField& Foam::motionSmoother::displacement()
579 return displacement_;
583 const Foam::pointVectorField& Foam::motionSmoother::displacement() const
585 return displacement_;
589 const Foam::pointScalarField& Foam::motionSmoother::scale() const
595 const Foam::pointField& Foam::motionSmoother::oldPoints() const
601 void Foam::motionSmoother::correct()
603 oldPoints_ = mesh_.points();
607 // No need to update twoDmotion corrector since only holds edge labels
608 // which will remain the same as before. So unless the mesh was distorted
609 // severely outside of motionSmoother there will be no need.
613 void Foam::motionSmoother::setDisplacement(pointField& patchDisp)
615 // See comment in .H file about shared points.
616 const polyBoundaryMesh& patches = mesh_.boundaryMesh();
618 forAll(patches, patchI)
620 const polyPatch& pp = patches[patchI];
624 const labelList& meshPoints = pp.meshPoints();
626 forAll(meshPoints, i)
628 displacement_[meshPoints[i]] = vector::zero;
633 const labelList& ppMeshPoints = pp_.meshPoints();
635 // Set internal point data from displacement on combined patch points.
636 forAll(ppMeshPoints, patchPointI)
638 displacement_[ppMeshPoints[patchPointI]] = patchDisp[patchPointI];
641 // Adapt the fixedValue bc's (i.e. copy internal point data to
642 // boundaryField for all affected patches)
643 forAll(adaptPatchIDs_, i)
645 label patchI = adaptPatchIDs_[i];
647 displacement_.boundaryField()[patchI] ==
648 displacement_.boundaryField()[patchI].patchInternalField();
651 // Make consistent with non-adapted bc's by evaluating those now and
652 // resetting the displacement from the values.
653 // Note that we're just doing a correctBoundaryConditions with
654 // fixedValue bc's first.
655 labelHashSet adaptPatchSet(adaptPatchIDs_);
657 const lduSchedule& patchSchedule = mesh_.globalData().patchSchedule();
659 forAll(patchSchedule, patchEvalI)
661 label patchI = patchSchedule[patchEvalI].patch;
663 if (!adaptPatchSet.found(patchI))
665 if (patchSchedule[patchEvalI].init)
667 displacement_.boundaryField()[patchI]
668 .initEvaluate(Pstream::scheduled);
672 displacement_.boundaryField()[patchI]
673 .evaluate(Pstream::scheduled);
678 // Multi-patch constraints
679 applyCornerConstraints(displacement_);
681 // Correct for problems introduced by corner constraints
682 syncTools::syncPointList
686 maxMagEqOp(), // combine op
687 vector::zero // null value
690 // Adapt the fixedValue bc's (i.e. copy internal point data to
691 // boundaryField for all affected patches) to take the changes caused
692 // by multi-corner constraints into account.
693 forAll(adaptPatchIDs_, i)
695 label patchI = adaptPatchIDs_[i];
697 displacement_.boundaryField()[patchI] ==
698 displacement_.boundaryField()[patchI].patchInternalField();
703 OFstream str(mesh_.db().path()/"changedPoints.obj");
705 forAll(ppMeshPoints, patchPointI)
707 const vector& newDisp = displacement_[ppMeshPoints[patchPointI]];
709 if (mag(newDisp-patchDisp[patchPointI]) > SMALL)
711 const point& pt = mesh_.points()[ppMeshPoints[patchPointI]];
713 meshTools::writeOBJ(str, pt);
715 //Pout<< "Point:" << pt
716 // << " oldDisp:" << patchDisp[patchPointI]
717 // << " newDisp:" << newDisp << endl;
720 Pout<< "Written " << nVerts << " points that are changed to file "
721 << str.name() << endl;
724 // Now reset input displacement
725 forAll(ppMeshPoints, patchPointI)
727 patchDisp[patchPointI] = displacement_[ppMeshPoints[patchPointI]];
732 // correctBoundaryConditions with fixedValue bc's first.
733 void Foam::motionSmoother::correctBoundaryConditions
735 pointVectorField& displacement
738 labelHashSet adaptPatchSet(adaptPatchIDs_);
740 const lduSchedule& patchSchedule = mesh_.globalData().patchSchedule();
742 // 1. evaluate on adaptPatches
743 forAll(patchSchedule, patchEvalI)
745 label patchI = patchSchedule[patchEvalI].patch;
747 if (adaptPatchSet.found(patchI))
749 if (patchSchedule[patchEvalI].init)
751 displacement.boundaryField()[patchI]
752 .initEvaluate(Pstream::blocking);
756 displacement.boundaryField()[patchI]
757 .evaluate(Pstream::blocking);
763 // 2. evaluate on non-AdaptPatches
764 forAll(patchSchedule, patchEvalI)
766 label patchI = patchSchedule[patchEvalI].patch;
768 if (!adaptPatchSet.found(patchI))
770 if (patchSchedule[patchEvalI].init)
772 displacement.boundaryField()[patchI]
773 .initEvaluate(Pstream::blocking);
777 displacement.boundaryField()[patchI]
778 .evaluate(Pstream::blocking);
783 // Multi-patch constraints
784 applyCornerConstraints(displacement);
786 // Correct for problems introduced by corner constraints
787 syncTools::syncPointList
791 maxMagEqOp(), // combine op
792 vector::zero // null value
797 Foam::tmp<Foam::scalarField> Foam::motionSmoother::movePoints
799 pointField& newPoints
802 // Correct for 2-D motion
803 if (twoDCorrector_.required())
805 Info<< "Correcting 2-D mesh motion";
807 if (mesh_.globalData().parallel())
809 WarningIn("motionSmoother::movePoints(pointField& newPoints)")
810 << "2D mesh-motion probably not correct in parallel" << endl;
813 // We do not want to move 3D planes so project all points onto those
814 const pointField& oldPoints = mesh_.points();
815 const edgeList& edges = mesh_.edges();
817 const labelList& neIndices = twoDCorrector().normalEdgeIndices();
818 const vector& pn = twoDCorrector().planeNormal();
822 const edge& e = edges[neIndices[i]];
824 point& pStart = newPoints[e.start()];
826 pStart += pn*(pn & (oldPoints[e.start()] - pStart));
828 point& pEnd = newPoints[e.end()];
830 pEnd += pn*(pn & (oldPoints[e.end()] - pEnd));
833 // Correct tangentially
834 twoDCorrector_.correctPoints(newPoints);
835 Info<< " ...done" << endl;
840 Pout<< "motionSmoother::movePoints : testing sync of newPoints."
842 testSyncPositions(newPoints, 1E-6*mesh_.bounds().mag());
845 tmp<scalarField> tsweptVol = mesh_.movePoints(newPoints);
847 pp_.movePoints(mesh_.points());
853 Foam::scalar Foam::motionSmoother::setErrorReduction
855 const scalar errorReduction
858 scalar oldErrorReduction = readScalar(paramDict_.lookup("errorReduction"));
860 paramDict_.remove("errorReduction");
861 paramDict_.add("errorReduction", errorReduction);
863 return oldErrorReduction;
867 bool Foam::motionSmoother::scaleMesh
869 labelList& checkFaces,
870 const bool smoothMesh,
871 const label nAllowableErrors
874 List<labelPair> emptyBaffles;
885 bool Foam::motionSmoother::scaleMesh
887 labelList& checkFaces,
888 const List<labelPair>& baffles,
889 const bool smoothMesh,
890 const label nAllowableErrors
905 bool Foam::motionSmoother::scaleMesh
907 labelList& checkFaces,
908 const List<labelPair>& baffles,
909 const dictionary& paramDict,
910 const dictionary& meshQualityDict,
911 const bool smoothMesh,
912 const label nAllowableErrors
915 if (!smoothMesh && adaptPatchIDs_.empty())
917 FatalErrorIn("motionSmoother::scaleMesh(const bool")
918 << "You specified both no movement on the internal mesh points"
919 << " (smoothMesh = false)" << nl
920 << "and no movement on the patch (adaptPatchIDs is empty)" << nl
921 << "Hence nothing to adapt."
927 // Had a problem with patches moved non-synced. Check transformations.
928 const polyBoundaryMesh& patches = mesh_.boundaryMesh();
930 Pout<< "Entering scaleMesh : coupled patches:" << endl;
931 forAll(patches, patchI)
933 if (patches[patchI].coupled())
935 const coupledPolyPatch& pp =
936 refCast<const coupledPolyPatch>(patches[patchI]);
938 Pout<< '\t' << patchI << '\t' << pp.name()
939 << " parallel:" << pp.parallel()
940 << " separated:" << pp.separated()
941 << " forwardT:" << pp.forwardT().size()
947 const scalar errorReduction =
948 readScalar(paramDict.lookup("errorReduction"));
949 const label nSmoothScale =
950 readLabel(paramDict.lookup("nSmoothScale"));
953 // Note: displacement_ should already be synced already from setDisplacement
954 // but just to make sure.
955 syncTools::syncPointList
960 vector::zero // null value
963 // Set newPoints as old + scale*displacement
964 pointField newPoints;
966 // Create overall displacement with same b.c.s as displacement_
967 pointVectorField totalDisplacement
972 mesh_.time().timeName(),
978 scale_*displacement_,
979 displacement_.boundaryField().types()
981 correctBoundaryConditions(totalDisplacement);
985 Pout<< "scaleMesh : testing sync of totalDisplacement" << endl;
990 vector::zero, // null value
991 1E-6*mesh_.bounds().mag()
995 newPoints = oldPoints_ + totalDisplacement.internalField();
998 Info<< "Moving mesh using diplacement scaling :"
999 << " min:" << gMin(scale_.internalField())
1000 << " max:" << gMax(scale_.internalField())
1005 movePoints(newPoints);
1007 // Check. Returns parallel number of incorrect faces.
1008 faceSet wrongFaces(mesh_, "wrongFaces", mesh_.nFaces()/100+100);
1009 checkMesh(false, mesh_, meshQualityDict, checkFaces, baffles, wrongFaces);
1011 if (returnReduce(wrongFaces.size(), sumOp<label>()) <= nAllowableErrors)
1017 // Sync across coupled faces by extending the set.
1018 wrongFaces.sync(mesh_);
1021 // if errorReduction is set to zero, extend wrongFaces
1022 // to face-Cell-faces to ensure quick return to previously valid mesh
1024 if (mag(errorReduction) < SMALL)
1026 labelHashSet newWrongFaces(wrongFaces);
1027 forAllConstIter(labelHashSet, wrongFaces, iter)
1029 label own = mesh_.faceOwner()[iter.key()];
1030 const cell& ownFaces = mesh_.cells()[own];
1032 forAll(ownFaces, cfI)
1034 newWrongFaces.insert(ownFaces[cfI]);
1037 if (iter.key() < mesh_.nInternalFaces())
1039 label nei = mesh_.faceNeighbour()[iter.key()];
1040 const cell& neiFaces = mesh_.cells()[nei];
1042 forAll(neiFaces, cfI)
1044 newWrongFaces.insert(neiFaces[cfI]);
1048 wrongFaces.transfer(newWrongFaces);
1049 wrongFaces.sync(mesh_);
1053 // Find out points used by wrong faces and scale displacement.
1054 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1056 pointSet usedPoints(mesh_, "usedPoints", getPoints(wrongFaces));
1057 usedPoints.sync(mesh_);
1061 // Grow a few layers to determine
1062 // - points to be smoothed
1063 // - faces to be checked in next iteration
1064 PackedBoolList isAffectedPoint(mesh_.nPoints());
1065 getAffectedFacesAndPoints
1067 nSmoothScale, // smoothing iterations
1068 wrongFaces, // error faces
1075 Pout<< "Faces in error:" << wrongFaces.size()
1076 << " with points:" << usedPoints.size()
1080 if (adaptPatchIDs_.size())
1082 // Scale conflicting patch points
1083 scaleField(pp_.meshPoints(), usedPoints, errorReduction, scale_);
1087 // Scale conflicting internal points
1088 scaleField(usedPoints, errorReduction, scale_);
1091 for (label i = 0; i < nSmoothScale; i++)
1093 if (adaptPatchIDs_.size())
1095 // Smooth patch values
1096 pointScalarField oldScale(scale_);
1108 // Smooth internal values
1109 pointScalarField oldScale(scale_);
1110 minSmooth(isAffectedPoint, oldScale, scale_);
1115 syncTools::syncPointList
1120 -GREAT // null value
1126 Pout<< "scale_ after smoothing :"
1127 << " min:" << Foam::gMin(scale_)
1128 << " max:" << Foam::gMax(scale_)
1137 void Foam::motionSmoother::updateMesh()
1139 const pointBoundaryMesh& patches = pMesh_.boundary();
1141 // Check whether displacement has fixed value b.c. on adaptPatchID
1142 forAll(adaptPatchIDs_, i)
1144 label patchI = adaptPatchIDs_[i];
1148 !isA<fixedValuePointPatchVectorField>
1150 displacement_.boundaryField()[patchI]
1156 "motionSmoother::motionSmoother"
1157 ) << "Patch " << patches[patchI].name()
1158 << " has wrong boundary condition "
1159 << displacement_.boundaryField()[patchI].type()
1160 << " on field " << displacement_.name() << nl
1161 << "Only type allowed is "
1162 << fixedValuePointPatchVectorField::typeName
1163 << exit(FatalError);
1168 // Determine internal points. Note that for twoD there are no internal
1169 // points so we use the points of adaptPatchIDs instead
1171 twoDCorrector_.updateMesh();
1173 const labelList& meshPoints = pp_.meshPoints();
1175 forAll(meshPoints, i)
1177 isInternalPoint_.unset(meshPoints[i]);
1180 // Calculate master edge addressing
1181 isMasterEdge_ = syncTools::getMasterEdges(mesh_);
1183 makePatchPatchAddressing();
1187 // Specialisation of applyCornerConstraints for scalars because
1188 // no constraint need be applied
1190 void Foam::motionSmoother::applyCornerConstraints<Foam::scalar>
1192 GeometricField<scalar, pointPatchField, pointMesh>& pf
1197 // ************************************************************************* //