mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: use primitive fields when calculating triSurface fields (#2758)
This commit is contained in:
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2015 OpenFOAM Foundation
|
Copyright (C) 2015 OpenFOAM Foundation
|
||||||
Copyright (C) 2020-2022 OpenCFD Ltd.
|
Copyright (C) 2020-2023 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -683,7 +683,8 @@ int main(int argc, char *argv[])
|
|||||||
IOobject::AUTO_WRITE
|
IOobject::AUTO_WRITE
|
||||||
),
|
),
|
||||||
s,
|
s,
|
||||||
dimensionedScalar("scale", dimLength, 1.0)
|
scalar(1),
|
||||||
|
dimLength
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -715,7 +716,8 @@ int main(int argc, char *argv[])
|
|||||||
),
|
),
|
||||||
s,
|
s,
|
||||||
dimLength,
|
dimLength,
|
||||||
distance*scale*pointNormals
|
// - calculate with primitive fields (#2758)
|
||||||
|
(distance*scale.field()*pointNormals)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -826,7 +828,9 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
|
|
||||||
// From scale update the pointDisplacement
|
// From scale update the pointDisplacement
|
||||||
pointDisplacement *= distance*scale/mag(pointDisplacement);
|
// - calculate with primitive fields (#2758)
|
||||||
|
pointDisplacement.normalise();
|
||||||
|
pointDisplacement.field() *= distance*scale.field();
|
||||||
|
|
||||||
|
|
||||||
// Do some smoothing (Lloyds algorithm)
|
// Do some smoothing (Lloyds algorithm)
|
||||||
|
|||||||
Reference in New Issue
Block a user