42 displacementComponentLaplacianFvMotionSolver,
50 Foam::direction Foam::displacementComponentLaplacianFvMotionSolver::cmpt
59 else if (cmptName ==
"y")
63 else if (cmptName ==
"z")
71 "displacementComponentLaplacianFvMotionSolver::"
72 "displacementComponentLaplacianFvMotionSolver"
73 "(const polyMesh& mesh, Istream& msData)"
74 ) <<
"Given component name " << cmptName <<
" should be x, y or z"
84 Foam::displacementComponentLaplacianFvMotionSolver::
85 displacementComponentLaplacianFvMotionSolver
93 cmpt_(cmpt(cmptName_)),
114 "pointDisplacement" + cmptName_,
115 fvMesh_.time().timeName(),
126 "cellDisplacement" + cmptName_,
136 pointDisplacement_.dimensions(),
139 cellMotionBoundaryTypes<scalar>(pointDisplacement_.boundaryField())
141 pointLocation_(NULL),
148 found(
"frozenPointsZone")
149 ? fvMesh_.pointZones().findZoneID(lookup(
"frozenPointsZone"))
156 fvMesh_.time().timeName(),
164 Info<<
"displacementComponentLaplacianFvMotionSolver:" <<
nl
165 <<
" diffusivity : " << diffusivityPtr_().type() <<
nl
166 <<
" frozenPoints zone : " << frozenPointsZone_ <<
endl;
182 Info<<
"displacementComponentLaplacianFvMotionSolver :"
183 <<
" Read pointVectorField "
184 << io.name() <<
" to be used for boundary conditions on points."
186 <<
"Boundary conditions:"
187 << pointLocation_().boundaryField().types() <<
endl;
211 if (pointLocation_.valid())
215 Info<<
"displacementComponentLaplacianFvMotionSolver : applying "
216 <<
" boundary conditions on " << pointLocation_().name()
217 <<
" to new point location."
223 pointLocation_().internalField() = fvMesh_.points();
225 pointLocation_().internalField().replace
228 points0_ + pointDisplacement_.internalField()
231 pointLocation_().correctBoundaryConditions();
234 if (frozenPointsZone_ != -1)
236 const pointZone& pz = fvMesh_.pointZones()[frozenPointsZone_];
240 label pointI = pz[i];
242 pointLocation_()[pointI][cmpt_] = points0_[pointI];
246 twoDCorrectPoints(pointLocation_().internalField());
257 points0_ + pointDisplacement_.internalField()
261 if (frozenPointsZone_ != -1)
263 const pointZone& pz = fvMesh_.pointZones()[frozenPointsZone_];
267 label pointI = pz[i];
269 tcurPoints()[pointI][cmpt_] = points0_[pointI];
273 twoDCorrectPoints(tcurPoints());
284 movePoints(fvMesh_.points());
286 diffusivityPtr_->correct();
287 pointDisplacement_.boundaryField().updateCoeffs();
293 diffusivityPtr_->operator()(),
295 "laplacian(diffusivity,cellDisplacement)"
317 : fvMesh_.points().component(cmpt_)
327 forAll(newPoints0, pointI)
329 label oldPointI = mpm.
pointMap()[pointI];
335 if (masterPointI == pointI)
337 newPoints0[pointI] = points0_[oldPointI];
351 "displacementLaplacianFvMotionSolver::updateMesh"
352 "(const mapPolyMesh& mpm)"
353 ) <<
"Cannot work out coordinates of introduced vertices."
354 <<
" New vertex " << pointI <<
" at coordinate "
358 points0_.transfer(newPoints0);
362 diffusivityPtr_.reset(NULL);