|
[Sponsors] | |||||
|
|
|
#1 |
|
Member
Hannes Kröger
Join Date: Mar 2009
Location: Rostock, Germany
Posts: 77
Rep Power: 7 ![]() |
Hello all,
I have noted some strange behaviour of the laplaceTetDecompositionMotionSolver (autoPtr motionSolver_ in the following snippets). I don't know if this is a bug. Maybe someone can comment on this: I had expected the following code snippet to store the displacements of all mesh nodes (including boundary mesh points) in "deformedPoints": Code:
tmp<pointField> deformedPoints = -1.0 * motionSolver_().curPoints(); deformedPoints() += motionSolver_().newPoints(); I had to code the following to get the wanted displacements: Code:
motionSolver_().solve();
tmp<pointField> deformedPoints(new pointField(allPoints().size(), vector::zero));
const tetPointVectorField& motionU=
lookupObject<tetPointVectorField>("motionU");
forAll(allPoints(), ipi)
deformedPoints()[ipi]=motionU.internalField()[ipi] * time().deltaT().value();
forAll(motionU.boundaryField(), patchI)
{
if (isA<fixedValueTetPolyPatchVectorField>(motionU.boundaryField()[patchI]))
{
const labelList& meshPoints=boundaryMesh()[patchI].meshPoints();
const fixedValueTetPolyPatchVectorField& ppatch =
dynamic_cast<const fixedValueTetPolyPatchVectorField&>
(
motionU.boundaryField()[patchI]
);
forAll(meshPoints, mpi)
{
deformedPoints()[meshPoints[mpi]]=
ppatch[mpi] * time().deltaT().value();
}
}
}
Thanks in advance, Hannes |
|
|
|
|
|
|
|
|
#2 |
|
Member
Hannes Kröger
Join Date: Mar 2009
Location: Rostock, Germany
Posts: 77
Rep Power: 7 ![]() |
Ok, I got it. It should be like this to work as expected:
Code:
tmp<pointField> deformedPoints = -1.0 * motionSolver_().curPoints(); setMotionUBCs(); deformedPoints() += motionSolver_().newPoints(); |
|
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|