Code simplification: GeometricField<Type, pointPatchField, pointMesh> -> PointField<Type>
Using the PointField<Type> partial specialisation of GeometricField<Type, pointPatchField, pointMesh> simplified the code and improves readability.
This commit is contained in:
@ -121,7 +121,7 @@ void subsetPointFields
|
||||
const fvMeshSubset& subsetter,
|
||||
const pointMesh& pMesh,
|
||||
const wordList& fieldNames,
|
||||
PtrList<GeometricField<Type, pointPatchField, pointMesh>>& subFields
|
||||
PtrList<PointField<Type>>& subFields
|
||||
)
|
||||
{
|
||||
const fvMesh& baseMesh = subsetter.baseMesh();
|
||||
@ -132,7 +132,7 @@ void subsetPointFields
|
||||
|
||||
Info<< "Subsetting field " << fieldName << endl;
|
||||
|
||||
GeometricField<Type, pointPatchField, pointMesh> fld
|
||||
PointField<Type> fld
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
|
||||
@ -145,10 +145,10 @@ public:
|
||||
|
||||
//- Decompose point field
|
||||
template<class Type>
|
||||
tmp<GeometricField<Type, pointPatchField, pointMesh>>
|
||||
tmp<PointField<Type>>
|
||||
decomposeField
|
||||
(
|
||||
const GeometricField<Type, pointPatchField, pointMesh>&
|
||||
const PointField<Type>&
|
||||
) const;
|
||||
|
||||
//- Decompose a list of fields
|
||||
|
||||
@ -32,7 +32,7 @@ template<class Type>
|
||||
Foam::tmp<Foam::GeometricField<Type, Foam::pointPatchField, Foam::pointMesh>>
|
||||
Foam::pointFieldDecomposer::decomposeField
|
||||
(
|
||||
const GeometricField<Type, pointPatchField, pointMesh>& field
|
||||
const PointField<Type>& field
|
||||
) const
|
||||
{
|
||||
// Create and map the internal field values
|
||||
@ -73,9 +73,9 @@ Foam::pointFieldDecomposer::decomposeField
|
||||
}
|
||||
|
||||
// Create the field for the processor
|
||||
return tmp<GeometricField<Type, pointPatchField, pointMesh>>
|
||||
return tmp<PointField<Type>>
|
||||
(
|
||||
new GeometricField<Type, pointPatchField, pointMesh>
|
||||
new PointField<Type>
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
|
||||
@ -114,7 +114,7 @@ public:
|
||||
|
||||
//- Reconstruct field
|
||||
template<class Type>
|
||||
tmp<GeometricField<Type, pointPatchField, pointMesh>>
|
||||
tmp<PointField<Type>>
|
||||
reconstructField(const IOobject& fieldIoObject);
|
||||
|
||||
//- Reconstruct and write all fields
|
||||
|
||||
@ -32,7 +32,7 @@ Foam::tmp<Foam::GeometricField<Type, Foam::pointPatchField, Foam::pointMesh>>
|
||||
Foam::pointFieldReconstructor::reconstructField(const IOobject& fieldIoObject)
|
||||
{
|
||||
// Read the field for all the processors
|
||||
PtrList<GeometricField<Type, pointPatchField, pointMesh>> procFields
|
||||
PtrList<PointField<Type>> procFields
|
||||
(
|
||||
procMeshes_.size()
|
||||
);
|
||||
@ -42,7 +42,7 @@ Foam::pointFieldReconstructor::reconstructField(const IOobject& fieldIoObject)
|
||||
procFields.set
|
||||
(
|
||||
proci,
|
||||
new GeometricField<Type, pointPatchField, pointMesh>
|
||||
new PointField<Type>
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
@ -67,7 +67,7 @@ Foam::pointFieldReconstructor::reconstructField(const IOobject& fieldIoObject)
|
||||
|
||||
forAll(procMeshes_, proci)
|
||||
{
|
||||
const GeometricField<Type, pointPatchField, pointMesh>&
|
||||
const PointField<Type>&
|
||||
procField = procFields[proci];
|
||||
|
||||
// Get processor-to-global addressing for use in rmap
|
||||
@ -118,9 +118,9 @@ Foam::pointFieldReconstructor::reconstructField(const IOobject& fieldIoObject)
|
||||
|
||||
// Construct and write the field
|
||||
// setting the internalField and patchFields
|
||||
return tmp<GeometricField<Type, pointPatchField, pointMesh>>
|
||||
return tmp<PointField<Type>>
|
||||
(
|
||||
new GeometricField<Type, pointPatchField, pointMesh>
|
||||
new PointField<Type>
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
@ -149,7 +149,7 @@ void Foam::pointFieldReconstructor::reconstructFields
|
||||
{
|
||||
word fieldClassName
|
||||
(
|
||||
GeometricField<Type, pointPatchField, pointMesh>::typeName
|
||||
PointField<Type>::typeName
|
||||
);
|
||||
|
||||
IOobjectList fields = objects.lookupClass(fieldClassName);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -533,7 +533,7 @@ void ensightField
|
||||
template<class Type>
|
||||
void ensightPointField
|
||||
(
|
||||
const GeometricField<Type, pointPatchField, pointMesh>& pf,
|
||||
const PointField<Type>& pf,
|
||||
const ensightMesh& eMesh,
|
||||
const fileName& postProcPath,
|
||||
const word& prepend,
|
||||
@ -729,7 +729,7 @@ void ensightField
|
||||
{
|
||||
if (nodeValues)
|
||||
{
|
||||
tmp<GeometricField<Type, pointPatchField, pointMesh>> pfld
|
||||
tmp<PointField<Type>> pfld
|
||||
(
|
||||
volPointInterpolation::New(vf.mesh()).interpolate(vf)
|
||||
);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -123,7 +123,7 @@ public:
|
||||
(
|
||||
const UPtrList
|
||||
<
|
||||
const GeometricField<Type, pointPatchField, pointMesh>
|
||||
const PointField<Type>
|
||||
>&
|
||||
);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -66,12 +66,12 @@ void Foam::patchWriter::write
|
||||
template<class Type>
|
||||
void Foam::patchWriter::write
|
||||
(
|
||||
const UPtrList<const GeometricField<Type, pointPatchField, pointMesh>>& flds
|
||||
const UPtrList<const PointField<Type>>& flds
|
||||
)
|
||||
{
|
||||
forAll(flds, fieldi)
|
||||
{
|
||||
const GeometricField<Type, pointPatchField, pointMesh>& fld =
|
||||
const PointField<Type>& fld =
|
||||
flds[fieldi];
|
||||
|
||||
os_ << fld.name() << ' ' << pTraits<Type>::nComponents << ' '
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -68,7 +68,7 @@ namespace vtkWriteOps
|
||||
(
|
||||
std::ostream&,
|
||||
const bool binary,
|
||||
const GeometricField<Type, pointPatchField, pointMesh>&,
|
||||
const PointField<Type>&,
|
||||
const vtkMesh&
|
||||
);
|
||||
|
||||
@ -80,7 +80,7 @@ namespace vtkWriteOps
|
||||
std::ostream&,
|
||||
const bool binary,
|
||||
const GeometricField<Type, fvPatchField, volMesh>&,
|
||||
const GeometricField<Type, pointPatchField, pointMesh>&,
|
||||
const PointField<Type>&,
|
||||
const vtkMesh&
|
||||
);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -65,7 +65,7 @@ void Foam::vtkWriteOps::write
|
||||
(
|
||||
std::ostream& os,
|
||||
const bool binary,
|
||||
const GeometricField<Type, pointPatchField, pointMesh>& pvf,
|
||||
const PointField<Type>& pvf,
|
||||
const vtkMesh& vMesh
|
||||
)
|
||||
{
|
||||
@ -98,7 +98,7 @@ void Foam::vtkWriteOps::write
|
||||
std::ostream& os,
|
||||
const bool binary,
|
||||
const GeometricField<Type, fvPatchField, volMesh>& vvf,
|
||||
const GeometricField<Type, pointPatchField, pointMesh>& pvf,
|
||||
const PointField<Type>& pvf,
|
||||
const vtkMesh& vMesh
|
||||
)
|
||||
{
|
||||
|
||||
@ -535,7 +535,7 @@ class vtkPVFoam
|
||||
void convertVolFieldBlock
|
||||
(
|
||||
const GeometricField<Type, fvPatchField, volMesh>&,
|
||||
autoPtr<GeometricField<Type, pointPatchField, pointMesh>>&,
|
||||
autoPtr<PointField<Type>>&,
|
||||
vtkMultiBlockDataSet* output,
|
||||
const arrayRange&,
|
||||
const List<polyDecomp>& decompLst
|
||||
@ -641,7 +641,7 @@ class vtkPVFoam
|
||||
template<class Type>
|
||||
void convertPointFieldBlock
|
||||
(
|
||||
const GeometricField<Type, pointPatchField, pointMesh>&,
|
||||
const PointField<Type>&,
|
||||
vtkMultiBlockDataSet* output,
|
||||
const arrayRange&,
|
||||
const List<polyDecomp>&
|
||||
@ -651,7 +651,7 @@ class vtkPVFoam
|
||||
template<class Type>
|
||||
void convertPointField
|
||||
(
|
||||
const GeometricField<Type, pointPatchField, pointMesh>&,
|
||||
const PointField<Type>&,
|
||||
const GeometricField<Type, fvPatchField, volMesh>&,
|
||||
vtkMultiBlockDataSet* output,
|
||||
const arrayRange&,
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -54,7 +54,7 @@ void Foam::vtkPVFoam::convertPointFields
|
||||
if
|
||||
(
|
||||
iter()->headerClassName()
|
||||
!= GeometricField<Type, pointPatchField, pointMesh>::typeName
|
||||
!= PointField<Type>::typeName
|
||||
)
|
||||
{
|
||||
continue;
|
||||
@ -66,7 +66,7 @@ void Foam::vtkPVFoam::convertPointFields
|
||||
<< fieldName << endl;
|
||||
}
|
||||
|
||||
GeometricField<Type, pointPatchField, pointMesh> ptf
|
||||
PointField<Type> ptf
|
||||
(
|
||||
*iter(),
|
||||
pMesh
|
||||
@ -172,7 +172,7 @@ void Foam::vtkPVFoam::convertPointFields
|
||||
template<class Type>
|
||||
void Foam::vtkPVFoam::convertPointFieldBlock
|
||||
(
|
||||
const GeometricField<Type, pointPatchField, pointMesh>& ptf,
|
||||
const PointField<Type>& ptf,
|
||||
vtkMultiBlockDataSet* output,
|
||||
const arrayRange& range,
|
||||
const List<polyDecomp>& decompLst
|
||||
@ -201,7 +201,7 @@ void Foam::vtkPVFoam::convertPointFieldBlock
|
||||
template<class Type>
|
||||
void Foam::vtkPVFoam::convertPointField
|
||||
(
|
||||
const GeometricField<Type, pointPatchField, pointMesh>& ptf,
|
||||
const PointField<Type>& ptf,
|
||||
const GeometricField<Type, fvPatchField, volMesh>& tf,
|
||||
vtkMultiBlockDataSet* output,
|
||||
const arrayRange& range,
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -73,7 +73,7 @@ void Foam::vtkPVFoam::convertVolFields
|
||||
);
|
||||
|
||||
// Interpolated field (demand driven)
|
||||
autoPtr<GeometricField<Type, pointPatchField, pointMesh>> ptfPtr;
|
||||
autoPtr<PointField<Type>> ptfPtr;
|
||||
if (interpFields)
|
||||
{
|
||||
if (debug)
|
||||
@ -329,7 +329,7 @@ template<class Type>
|
||||
void Foam::vtkPVFoam::convertVolFieldBlock
|
||||
(
|
||||
const GeometricField<Type, fvPatchField, volMesh>& tf,
|
||||
autoPtr<GeometricField<Type, pointPatchField, pointMesh>>& ptfPtr,
|
||||
autoPtr<PointField<Type>>& ptfPtr,
|
||||
vtkMultiBlockDataSet* output,
|
||||
const arrayRange& range,
|
||||
const List<polyDecomp>& decompLst
|
||||
|
||||
@ -54,14 +54,12 @@ class GeometricField;
|
||||
template<class Type>
|
||||
using PointField = GeometricField<Type, pointPatchField, pointMesh>;
|
||||
|
||||
typedef GeometricField<label, pointPatchField, pointMesh> pointLabelField;
|
||||
typedef GeometricField<scalar, pointPatchField, pointMesh> pointScalarField;
|
||||
typedef GeometricField<vector, pointPatchField, pointMesh> pointVectorField;
|
||||
typedef GeometricField<sphericalTensor, pointPatchField, pointMesh>
|
||||
pointSphericalTensorField;
|
||||
typedef GeometricField<symmTensor, pointPatchField, pointMesh>
|
||||
pointSymmTensorField;
|
||||
typedef GeometricField<tensor, pointPatchField, pointMesh> pointTensorField;
|
||||
typedef PointField<label> pointLabelField;
|
||||
typedef PointField<scalar> pointScalarField;
|
||||
typedef PointField<vector> pointVectorField;
|
||||
typedef PointField<sphericalTensor> pointSphericalTensorField;
|
||||
typedef PointField<symmTensor> pointSymmTensorField;
|
||||
typedef PointField<tensor> pointTensorField;
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -30,7 +30,7 @@ License
|
||||
template<class Type>
|
||||
Type Foam::interpolatePointToCell
|
||||
(
|
||||
const GeometricField<Type, pointPatchField, pointMesh>& ptf,
|
||||
const PointField<Type>& ptf,
|
||||
const label celli
|
||||
)
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -50,7 +50,7 @@ namespace Foam
|
||||
template<class Type>
|
||||
Type interpolatePointToCell
|
||||
(
|
||||
const GeometricField<Type, pointPatchField, pointMesh>& ptf,
|
||||
const PointField<Type>& ptf,
|
||||
const label celli
|
||||
);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -108,8 +108,8 @@ class fvMeshAdder
|
||||
const mapAddedPolyMesh& meshMap,
|
||||
const labelListList& oldMeshPoints,
|
||||
|
||||
GeometricField<Type, pointPatchField, pointMesh>& fld,
|
||||
const GeometricField<Type, pointPatchField, pointMesh>& fldToAdd
|
||||
PointField<Type>& fld,
|
||||
const PointField<Type>& fldToAdd
|
||||
);
|
||||
|
||||
//- Update single dimensionedField.
|
||||
|
||||
@ -603,15 +603,15 @@ void Foam::fvMeshAdder::MapPointField
|
||||
const mapAddedPolyMesh& meshMap,
|
||||
const labelListList& oldMeshPoints,
|
||||
|
||||
GeometricField<Type, pointPatchField, pointMesh>& fld,
|
||||
const GeometricField<Type, pointPatchField, pointMesh>& fldToAdd
|
||||
PointField<Type>& fld,
|
||||
const PointField<Type>& fldToAdd
|
||||
)
|
||||
{
|
||||
// This is a bit tricky:
|
||||
// - mesh pointed to by fld is invalid
|
||||
// - pointPatches pointed to be fld are invalid
|
||||
|
||||
typename GeometricField<Type, pointPatchField, pointMesh>::
|
||||
typename PointField<Type>::
|
||||
Boundary& bfld = fld.boundaryFieldRef();
|
||||
|
||||
// Internal field
|
||||
|
||||
@ -292,20 +292,20 @@ public:
|
||||
|
||||
//- Map point field
|
||||
template<class Type>
|
||||
static tmp<GeometricField<Type, pointPatchField, pointMesh>>
|
||||
static tmp<PointField<Type>>
|
||||
interpolate
|
||||
(
|
||||
const GeometricField<Type, pointPatchField, pointMesh>&,
|
||||
const PointField<Type>&,
|
||||
const pointMesh& sMesh,
|
||||
const labelList& patchMap,
|
||||
const labelList& pointMap
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
tmp<GeometricField<Type, pointPatchField, pointMesh>>
|
||||
tmp<PointField<Type>>
|
||||
interpolate
|
||||
(
|
||||
const GeometricField<Type, pointPatchField, pointMesh>&
|
||||
const PointField<Type>&
|
||||
) const;
|
||||
|
||||
//- Map dimensioned field
|
||||
|
||||
@ -358,7 +358,7 @@ template<class Type>
|
||||
Foam::tmp<Foam::GeometricField<Type, Foam::pointPatchField, Foam::pointMesh>>
|
||||
Foam::fvMeshSubset::interpolate
|
||||
(
|
||||
const GeometricField<Type, pointPatchField, pointMesh>& pf,
|
||||
const PointField<Type>& pf,
|
||||
const pointMesh& sMesh,
|
||||
const labelList& patchMap,
|
||||
const labelList& pointMap
|
||||
@ -400,9 +400,9 @@ Foam::fvMeshSubset::interpolate
|
||||
}
|
||||
|
||||
// Create the complete field from the pieces
|
||||
tmp<GeometricField<Type, pointPatchField, pointMesh>> tresF
|
||||
tmp<PointField<Type>> tresF
|
||||
(
|
||||
new GeometricField<Type, pointPatchField, pointMesh>
|
||||
new PointField<Type>
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
@ -419,13 +419,13 @@ Foam::fvMeshSubset::interpolate
|
||||
patchFields
|
||||
)
|
||||
);
|
||||
GeometricField<Type, pointPatchField, pointMesh>& resF = tresF.ref();
|
||||
PointField<Type>& resF = tresF.ref();
|
||||
|
||||
|
||||
// 2. Change the pointPatchFields to the correct type using a mapper
|
||||
// constructor (with reference to the now correct internal field)
|
||||
|
||||
typename GeometricField<Type, pointPatchField, pointMesh>::
|
||||
typename PointField<Type>::
|
||||
Boundary& bf = resF.boundaryFieldRef();
|
||||
|
||||
forAll(bf, patchi)
|
||||
@ -490,7 +490,7 @@ template<class Type>
|
||||
Foam::tmp<Foam::GeometricField<Type, Foam::pointPatchField, Foam::pointMesh>>
|
||||
Foam::fvMeshSubset::interpolate
|
||||
(
|
||||
const GeometricField<Type, pointPatchField, pointMesh>& sf
|
||||
const PointField<Type>& sf
|
||||
) const
|
||||
{
|
||||
return interpolate
|
||||
|
||||
@ -170,17 +170,17 @@ class motionSmootherAlgo
|
||||
|
||||
//- Average of connected points.
|
||||
template<class Type>
|
||||
tmp<GeometricField<Type, pointPatchField, pointMesh>> avg
|
||||
tmp<PointField<Type>> avg
|
||||
(
|
||||
const GeometricField<Type, pointPatchField, pointMesh>& fld,
|
||||
const PointField<Type>& fld,
|
||||
const scalarField& edgeWeight
|
||||
) const;
|
||||
|
||||
//- Average position of connected points.
|
||||
template<class Type>
|
||||
tmp<GeometricField<Type, pointPatchField, pointMesh>> avgPositions
|
||||
tmp<PointField<Type>> avgPositions
|
||||
(
|
||||
const GeometricField<Type, pointPatchField, pointMesh>& fld,
|
||||
const PointField<Type>& fld,
|
||||
const scalarField& edgeWeight
|
||||
) const;
|
||||
|
||||
@ -188,7 +188,7 @@ class motionSmootherAlgo
|
||||
template<class Type>
|
||||
static void checkConstraints
|
||||
(
|
||||
GeometricField<Type, pointPatchField, pointMesh>&
|
||||
PointField<Type>&
|
||||
);
|
||||
|
||||
//- Test synchronisation of generic field (not positions!) on points
|
||||
@ -466,9 +466,9 @@ public:
|
||||
template<class Type>
|
||||
void smooth
|
||||
(
|
||||
const GeometricField<Type, pointPatchField, pointMesh>& fld,
|
||||
const PointField<Type>& fld,
|
||||
const scalarField& edgeWeight,
|
||||
GeometricField<Type, pointPatchField, pointMesh>& newFld
|
||||
PointField<Type>& newFld
|
||||
) const;
|
||||
|
||||
|
||||
|
||||
@ -35,7 +35,7 @@ License
|
||||
template<class Type>
|
||||
void Foam::motionSmootherAlgo::checkConstraints
|
||||
(
|
||||
GeometricField<Type, pointPatchField, pointMesh>& pf
|
||||
PointField<Type>& pf
|
||||
)
|
||||
{
|
||||
const polyMesh& mesh = pf.mesh();
|
||||
@ -135,20 +135,20 @@ template<class Type>
|
||||
Foam::tmp<Foam::GeometricField<Type, Foam::pointPatchField, Foam::pointMesh>>
|
||||
Foam::motionSmootherAlgo::avg
|
||||
(
|
||||
const GeometricField<Type, pointPatchField, pointMesh>& fld,
|
||||
const PointField<Type>& fld,
|
||||
const scalarField& edgeWeight
|
||||
) const
|
||||
{
|
||||
tmp<GeometricField<Type, pointPatchField, pointMesh>> tres
|
||||
tmp<PointField<Type>> tres
|
||||
(
|
||||
GeometricField<Type, pointPatchField, pointMesh>::New
|
||||
PointField<Type>::New
|
||||
(
|
||||
"avg("+fld.name()+')',
|
||||
fld.mesh(),
|
||||
dimensioned<Type>("zero", fld.dimensions(), Zero)
|
||||
)
|
||||
);
|
||||
GeometricField<Type, pointPatchField, pointMesh>& res = tres.ref();
|
||||
PointField<Type>& res = tres.ref();
|
||||
|
||||
const polyMesh& mesh = fld.mesh()();
|
||||
|
||||
@ -224,9 +224,9 @@ Foam::motionSmootherAlgo::avg
|
||||
template<class Type>
|
||||
void Foam::motionSmootherAlgo::smooth
|
||||
(
|
||||
const GeometricField<Type, pointPatchField, pointMesh>& fld,
|
||||
const PointField<Type>& fld,
|
||||
const scalarField& edgeWeight,
|
||||
GeometricField<Type, pointPatchField, pointMesh>& newFld
|
||||
PointField<Type>& newFld
|
||||
) const
|
||||
{
|
||||
tmp<pointVectorField> tavgFld = avg(fld, edgeWeight);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2017-2019 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2017-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -78,9 +78,9 @@ tmp<GeometricField<Type, fvPatchField, volMesh>> levelSetAverage
|
||||
const volScalarField& levelC,
|
||||
const pointScalarField& levelP,
|
||||
const GeometricField<Type, fvPatchField, volMesh>& positiveC,
|
||||
const GeometricField<Type, pointPatchField, pointMesh>& positiveP,
|
||||
const PointField<Type>& positiveP,
|
||||
const GeometricField<Type, fvPatchField, volMesh>& negativeC,
|
||||
const GeometricField<Type, pointPatchField, pointMesh>& negativeP
|
||||
const PointField<Type>& negativeP
|
||||
);
|
||||
|
||||
//- Calculate the volume-fraction that a level set occupies. This gives the
|
||||
|
||||
@ -176,9 +176,9 @@ Foam::levelSetAverage
|
||||
const volScalarField& levelC,
|
||||
const pointScalarField& levelP,
|
||||
const GeometricField<Type, fvPatchField, volMesh>& positiveC,
|
||||
const GeometricField<Type, pointPatchField, pointMesh>& positiveP,
|
||||
const PointField<Type>& positiveP,
|
||||
const GeometricField<Type, fvPatchField, volMesh>& negativeC,
|
||||
const GeometricField<Type, pointPatchField, pointMesh>& negativeP
|
||||
const PointField<Type>& negativeP
|
||||
)
|
||||
{
|
||||
const fvMesh& mesh = levelC.mesh();
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -45,7 +45,7 @@ Foam::fv::faceCorrectedSnGrad<Type>::fullGradCorrection
|
||||
{
|
||||
const fvMesh& mesh = this->mesh();
|
||||
|
||||
GeometricField<Type, pointPatchField, pointMesh> pvf
|
||||
PointField<Type> pvf
|
||||
(
|
||||
volPointInterpolation::New(mesh).interpolate(vf)
|
||||
);
|
||||
|
||||
@ -46,7 +46,7 @@ template<class Type>
|
||||
Foam::interpolationCellPoint<Type>::interpolationCellPoint
|
||||
(
|
||||
const GeometricField<Type, fvPatchField, volMesh>& psi,
|
||||
tmp<GeometricField<Type, pointPatchField, pointMesh>> psip
|
||||
tmp<PointField<Type>> psip
|
||||
)
|
||||
:
|
||||
fieldInterpolation<Type, interpolationCellPoint<Type>>(psi),
|
||||
|
||||
@ -69,7 +69,7 @@ public:
|
||||
interpolationCellPoint
|
||||
(
|
||||
const GeometricField<Type, fvPatchField, volMesh>& psi,
|
||||
tmp<GeometricField<Type, pointPatchField, pointMesh>> psip
|
||||
tmp<PointField<Type>> psip
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -43,7 +43,7 @@ Foam::interpolationCellPointWallModified<Type>::calcPointField
|
||||
<< typeName << " interpolation is only defined for vector fields"
|
||||
<< exit(FatalError);
|
||||
|
||||
return tmp<GeometricField<TYPE, pointPatchField, pointMesh>>(nullptr);
|
||||
return tmp<PointField<TYPE>>(nullptr);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -62,7 +62,7 @@ class interpolationCellPointWallModified
|
||||
//- Compute the point field for a type. This just throws an error. This
|
||||
// interpolation method is only defined for vector fields.
|
||||
template <class TYPE>
|
||||
tmp<GeometricField<TYPE, pointPatchField, pointMesh>> calcPointField
|
||||
tmp<PointField<TYPE>> calcPointField
|
||||
(
|
||||
const GeometricField<TYPE, fvPatchField, volMesh>& psi
|
||||
) const;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -43,23 +43,20 @@ SourceFiles
|
||||
#ifndef pointMVCWeight_H
|
||||
#define pointMVCWeight_H
|
||||
|
||||
#include "point.H"
|
||||
#include "pointFieldsFwd.H"
|
||||
#include "scalarField.H"
|
||||
#include "vectorField.H"
|
||||
#include "Map.H"
|
||||
#include "DynamicList.H"
|
||||
#include "point.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
class polyMesh;
|
||||
class pointMesh;
|
||||
template<class T> class pointPatchField;
|
||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||
class GeometricField;
|
||||
class face;
|
||||
class polyMesh;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class pointMVCWeight Declaration
|
||||
@ -142,7 +139,7 @@ public:
|
||||
template<class Type>
|
||||
inline Type interpolate
|
||||
(
|
||||
const GeometricField<Type, pointPatchField, pointMesh>& psip
|
||||
const PointField<Type>& psip
|
||||
) const;
|
||||
};
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -30,7 +30,7 @@ License
|
||||
template<class Type>
|
||||
inline Type Foam::pointMVCWeight::interpolate
|
||||
(
|
||||
const GeometricField<Type, pointPatchField, pointMesh>& psip
|
||||
const PointField<Type>& psip
|
||||
) const
|
||||
{
|
||||
const labelList& vertices = psip.mesh()().cellPoints()[cellIndex_];
|
||||
|
||||
@ -52,7 +52,7 @@ Foam::interpolationVolPointInterpolation<Type>::
|
||||
interpolationVolPointInterpolation
|
||||
(
|
||||
const GeometricField<Type, fvPatchField, volMesh>& psi,
|
||||
tmp<GeometricField<Type, pointPatchField, pointMesh>> psip
|
||||
tmp<PointField<Type>> psip
|
||||
)
|
||||
:
|
||||
psip_(psip)
|
||||
|
||||
@ -52,7 +52,7 @@ protected:
|
||||
// Protected data
|
||||
|
||||
//- Interpolated volfield
|
||||
const GeometricField<Type, pointPatchField, pointMesh> psip_;
|
||||
const PointField<Type> psip_;
|
||||
|
||||
|
||||
public:
|
||||
@ -74,7 +74,7 @@ public:
|
||||
interpolationVolPointInterpolation
|
||||
(
|
||||
const GeometricField<Type, fvPatchField, volMesh>& psi,
|
||||
tmp<GeometricField<Type, pointPatchField, pointMesh>> psip
|
||||
tmp<PointField<Type>> psip
|
||||
);
|
||||
|
||||
|
||||
@ -86,7 +86,7 @@ public:
|
||||
// Member Functions
|
||||
|
||||
//- Access the point field
|
||||
inline const GeometricField<Type, pointPatchField, pointMesh>&
|
||||
inline const PointField<Type>&
|
||||
psip() const
|
||||
{
|
||||
return psip_;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -40,7 +40,7 @@ correction
|
||||
{
|
||||
const fvMesh& mesh = this->mesh();
|
||||
|
||||
GeometricField<Type, pointPatchField, pointMesh> pvf
|
||||
PointField<Type> pvf
|
||||
(
|
||||
volPointInterpolation::New(mesh).interpolate(vf)
|
||||
);
|
||||
|
||||
@ -424,7 +424,7 @@ void Foam::pointConstraints::constrainDisplacement
|
||||
template<>
|
||||
void Foam::pointConstraints::constrainCorners<Foam::scalar>
|
||||
(
|
||||
GeometricField<scalar, pointPatchField, pointMesh>& pf
|
||||
PointField<scalar>& pf
|
||||
) const
|
||||
{}
|
||||
|
||||
@ -432,7 +432,7 @@ void Foam::pointConstraints::constrainCorners<Foam::scalar>
|
||||
template<>
|
||||
void Foam::pointConstraints::constrainCorners<Foam::label>
|
||||
(
|
||||
GeometricField<label, pointPatchField, pointMesh>& pf
|
||||
PointField<label>& pf
|
||||
) const
|
||||
{}
|
||||
|
||||
|
||||
@ -155,14 +155,14 @@ public:
|
||||
template<class Type>
|
||||
static void setPatchFields
|
||||
(
|
||||
GeometricField<Type, pointPatchField, pointMesh>&
|
||||
PointField<Type>&
|
||||
);
|
||||
|
||||
//- Apply patch-patch constraints only
|
||||
template<class Type>
|
||||
void constrainCorners
|
||||
(
|
||||
GeometricField<Type, pointPatchField, pointMesh>& pf
|
||||
PointField<Type>& pf
|
||||
) const;
|
||||
|
||||
//- Apply boundary conditions (single-patch constraints) and
|
||||
@ -172,7 +172,7 @@ public:
|
||||
template<class Type>
|
||||
void constrain
|
||||
(
|
||||
GeometricField<Type, pointPatchField, pointMesh>& pf,
|
||||
PointField<Type>& pf,
|
||||
const bool overrideValue = false
|
||||
) const;
|
||||
|
||||
@ -196,13 +196,13 @@ public:
|
||||
template<>
|
||||
void pointConstraints::constrainCorners<scalar>
|
||||
(
|
||||
GeometricField<scalar, pointPatchField, pointMesh>& pf
|
||||
PointField<scalar>& pf
|
||||
) const;
|
||||
|
||||
template<>
|
||||
void pointConstraints::constrainCorners<label>
|
||||
(
|
||||
GeometricField<label, pointPatchField, pointMesh>& pf
|
||||
PointField<label>& pf
|
||||
) const;
|
||||
|
||||
|
||||
|
||||
@ -88,10 +88,10 @@ void Foam::pointConstraints::syncUntransformedData
|
||||
template<class Type>
|
||||
void Foam::pointConstraints::setPatchFields
|
||||
(
|
||||
GeometricField<Type, pointPatchField, pointMesh>& pf
|
||||
PointField<Type>& pf
|
||||
)
|
||||
{
|
||||
typename GeometricField<Type, pointPatchField, pointMesh>::
|
||||
typename PointField<Type>::
|
||||
Boundary& pfbf = pf.boundaryFieldRef();
|
||||
|
||||
forAll(pfbf, patchi)
|
||||
@ -110,7 +110,7 @@ void Foam::pointConstraints::setPatchFields
|
||||
template<class Type>
|
||||
void Foam::pointConstraints::constrainCorners
|
||||
(
|
||||
GeometricField<Type, pointPatchField, pointMesh>& pf
|
||||
PointField<Type>& pf
|
||||
) const
|
||||
{
|
||||
forAll(patchPatchPointConstraintPoints_, pointi)
|
||||
@ -127,7 +127,7 @@ void Foam::pointConstraints::constrainCorners
|
||||
template<class Type>
|
||||
void Foam::pointConstraints::constrain
|
||||
(
|
||||
GeometricField<Type, pointPatchField, pointMesh>& pf,
|
||||
PointField<Type>& pf,
|
||||
const bool overrideFixedValue
|
||||
) const
|
||||
{
|
||||
|
||||
@ -78,7 +78,7 @@ void Foam::volPointInterpolation::pushUntransformedData
|
||||
template<class Type>
|
||||
void Foam::volPointInterpolation::addSeparated
|
||||
(
|
||||
GeometricField<Type, pointPatchField, pointMesh>& pf
|
||||
PointField<Type>& pf
|
||||
) const
|
||||
{
|
||||
if (debug)
|
||||
@ -86,10 +86,10 @@ void Foam::volPointInterpolation::addSeparated
|
||||
Pout<< "volPointInterpolation::addSeparated" << endl;
|
||||
}
|
||||
|
||||
typename GeometricField<Type, pointPatchField, pointMesh>::
|
||||
typename PointField<Type>::
|
||||
Internal& pfi = pf.ref();
|
||||
|
||||
typename GeometricField<Type, pointPatchField, pointMesh>::
|
||||
typename PointField<Type>::
|
||||
Boundary& pfbf = pf.boundaryFieldRef();
|
||||
|
||||
forAll(pfbf, patchi)
|
||||
@ -127,14 +127,14 @@ template<class Type>
|
||||
void Foam::volPointInterpolation::interpolateInternalField
|
||||
(
|
||||
const GeometricField<Type, fvPatchField, volMesh>& vf,
|
||||
GeometricField<Type, pointPatchField, pointMesh>& pf
|
||||
PointField<Type>& pf
|
||||
) const
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Pout<< "volPointInterpolation::interpolateInternalField("
|
||||
<< "const GeometricField<Type, fvPatchField, volMesh>&, "
|
||||
<< "GeometricField<Type, pointPatchField, pointMesh>&) : "
|
||||
<< "PointField<Type>&) : "
|
||||
<< "interpolating field from cells to points"
|
||||
<< endl;
|
||||
}
|
||||
@ -211,7 +211,7 @@ template<class Type>
|
||||
void Foam::volPointInterpolation::interpolateBoundaryField
|
||||
(
|
||||
const GeometricField<Type, fvPatchField, volMesh>& vf,
|
||||
GeometricField<Type, pointPatchField, pointMesh>& pf
|
||||
PointField<Type>& pf
|
||||
) const
|
||||
{
|
||||
const primitivePatch& boundary = boundaryPtr_();
|
||||
@ -329,7 +329,7 @@ template<class Type>
|
||||
void Foam::volPointInterpolation::interpolateBoundaryField
|
||||
(
|
||||
const GeometricField<Type, fvPatchField, volMesh>& vf,
|
||||
GeometricField<Type, pointPatchField, pointMesh>& pf,
|
||||
PointField<Type>& pf,
|
||||
const bool overrideFixedValue
|
||||
) const
|
||||
{
|
||||
@ -346,14 +346,14 @@ template<class Type>
|
||||
void Foam::volPointInterpolation::interpolate
|
||||
(
|
||||
const GeometricField<Type, fvPatchField, volMesh>& vf,
|
||||
GeometricField<Type, pointPatchField, pointMesh>& pf
|
||||
PointField<Type>& pf
|
||||
) const
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Pout<< "volPointInterpolation::interpolate("
|
||||
<< "const GeometricField<Type, fvPatchField, volMesh>&, "
|
||||
<< "GeometricField<Type, pointPatchField, pointMesh>&) : "
|
||||
<< "PointField<Type>&) : "
|
||||
<< "interpolating field from cells to points"
|
||||
<< endl;
|
||||
}
|
||||
@ -376,9 +376,9 @@ Foam::volPointInterpolation::interpolate
|
||||
const pointMesh& pm = pointMesh::New(vf.mesh());
|
||||
|
||||
// Construct tmp<pointField>
|
||||
tmp<GeometricField<Type, pointPatchField, pointMesh>> tpf
|
||||
tmp<PointField<Type>> tpf
|
||||
(
|
||||
GeometricField<Type, pointPatchField, pointMesh>::New
|
||||
PointField<Type>::New
|
||||
(
|
||||
"volPointInterpolate(" + vf.name() + ')',
|
||||
pm,
|
||||
@ -405,7 +405,7 @@ Foam::volPointInterpolation::interpolate
|
||||
) const
|
||||
{
|
||||
// Construct tmp<pointField>
|
||||
tmp<GeometricField<Type, pointPatchField, pointMesh>> tpf =
|
||||
tmp<PointField<Type>> tpf =
|
||||
interpolate(tvf(), patchFieldTypes);
|
||||
tvf.clear();
|
||||
return tpf;
|
||||
@ -444,9 +444,9 @@ Foam::volPointInterpolation::interpolate
|
||||
}
|
||||
|
||||
|
||||
tmp<GeometricField<Type, pointPatchField, pointMesh>> tpf
|
||||
tmp<PointField<Type>> tpf
|
||||
(
|
||||
GeometricField<Type, pointPatchField, pointMesh>::New
|
||||
PointField<Type>::New
|
||||
(
|
||||
name,
|
||||
pm,
|
||||
@ -521,7 +521,7 @@ Foam::volPointInterpolation::interpolate
|
||||
) const
|
||||
{
|
||||
// Construct tmp<pointField>
|
||||
tmp<GeometricField<Type, pointPatchField, pointMesh>> tpf =
|
||||
tmp<PointField<Type>> tpf =
|
||||
interpolate(tvf());
|
||||
tvf.clear();
|
||||
return tpf;
|
||||
|
||||
@ -115,7 +115,7 @@ public:
|
||||
//- Interpolate volField using inverse distance weighting
|
||||
// returning pointField
|
||||
template<class Type>
|
||||
tmp<GeometricField<Type, pointPatchField, pointMesh>> interpolate
|
||||
tmp<PointField<Type>> interpolate
|
||||
(
|
||||
const GeometricField<Type, fvPatchField, volMesh>&
|
||||
) const;
|
||||
@ -123,7 +123,7 @@ public:
|
||||
//- Interpolate tmp<volField> using inverse distance weighting
|
||||
// returning pointField
|
||||
template<class Type>
|
||||
tmp<GeometricField<Type, pointPatchField, pointMesh>> interpolate
|
||||
tmp<PointField<Type>> interpolate
|
||||
(
|
||||
const tmp<GeometricField<Type, fvPatchField, volMesh>>&
|
||||
) const;
|
||||
@ -137,7 +137,7 @@ public:
|
||||
void interpolateUnconstrained
|
||||
(
|
||||
const GeometricField<Type, fvPatchField, volMesh>&,
|
||||
GeometricField<Type, pointPatchField, pointMesh>&
|
||||
PointField<Type>&
|
||||
) const;
|
||||
|
||||
//- Interpolate from volField to pointField
|
||||
@ -146,13 +146,13 @@ public:
|
||||
void interpolate
|
||||
(
|
||||
const GeometricField<Type, fvPatchField, volMesh>&,
|
||||
GeometricField<Type, pointPatchField, pointMesh>&
|
||||
PointField<Type>&
|
||||
) const;
|
||||
|
||||
//- Interpolate volField using inverse distance weighting
|
||||
// returning pointField with name. Optionally caches.
|
||||
template<class Type>
|
||||
tmp<GeometricField<Type, pointPatchField, pointMesh>> interpolate
|
||||
tmp<PointField<Type>> interpolate
|
||||
(
|
||||
const GeometricField<Type, fvPatchField, volMesh>&,
|
||||
const word& name,
|
||||
|
||||
@ -39,14 +39,14 @@ template<class Type>
|
||||
void Foam::volPointInterpolation::interpolateUnconstrained
|
||||
(
|
||||
const GeometricField<Type, fvPatchField, volMesh>& vf,
|
||||
GeometricField<Type, pointPatchField, pointMesh>& pf
|
||||
PointField<Type>& pf
|
||||
) const
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Pout<< "volPointInterpolation::interpolateUnconstrained("
|
||||
<< "const GeometricField<Type, fvPatchField, volMesh>&, "
|
||||
<< "GeometricField<Type, pointPatchField, pointMesh>&) : "
|
||||
<< "PointField<Type>&) : "
|
||||
<< "interpolating field from cells to points"
|
||||
<< endl;
|
||||
}
|
||||
@ -139,7 +139,7 @@ template<class Type>
|
||||
void Foam::volPointInterpolation::interpolate
|
||||
(
|
||||
const GeometricField<Type, fvPatchField, volMesh>& vf,
|
||||
GeometricField<Type, pointPatchField, pointMesh>& pf
|
||||
PointField<Type>& pf
|
||||
) const
|
||||
{
|
||||
interpolateUnconstrained(vf, pf);
|
||||
@ -180,9 +180,9 @@ Foam::volPointInterpolation::interpolate
|
||||
}
|
||||
}
|
||||
|
||||
tmp<GeometricField<Type, pointPatchField, pointMesh>> tpf
|
||||
tmp<PointField<Type>> tpf
|
||||
(
|
||||
GeometricField<Type, pointPatchField, pointMesh>::New
|
||||
PointField<Type>::New
|
||||
(
|
||||
name,
|
||||
pm,
|
||||
@ -255,7 +255,7 @@ Foam::volPointInterpolation::interpolate
|
||||
const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf
|
||||
) const
|
||||
{
|
||||
tmp<GeometricField<Type, pointPatchField, pointMesh>> tpf =
|
||||
tmp<PointField<Type>> tpf =
|
||||
interpolate(tvf());
|
||||
|
||||
tvf.clear();
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2012-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -64,7 +64,7 @@ protected:
|
||||
template<class Type>
|
||||
wordList cellMotionBoundaryTypes
|
||||
(
|
||||
const typename GeometricField<Type, pointPatchField, pointMesh>::
|
||||
const typename PointField<Type>::
|
||||
Boundary& pmUbf
|
||||
) const;
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -32,7 +32,7 @@ License
|
||||
template<class Type>
|
||||
Foam::wordList Foam::fvMotionSolver::cellMotionBoundaryTypes
|
||||
(
|
||||
const typename GeometricField<Type, pointPatchField, pointMesh>::
|
||||
const typename PointField<Type>::
|
||||
Boundary& pmUbf
|
||||
) const
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -96,9 +96,9 @@ void Foam::cellMotionFvPatchField<Type>::updateCoeffs()
|
||||
word pfName = this->internalField().name();
|
||||
pfName.replace("cell", "point");
|
||||
|
||||
const GeometricField<Type, pointPatchField, pointMesh>& pointMotion =
|
||||
const PointField<Type>& pointMotion =
|
||||
this->db().objectRegistry::template
|
||||
lookupObject<GeometricField<Type, pointPatchField, pointMesh>>
|
||||
lookupObject<PointField<Type>>
|
||||
(pfName);
|
||||
|
||||
forAll(p, i)
|
||||
|
||||
@ -163,7 +163,7 @@ bool Foam::AveragingMethod<Type>::write(const bool write) const
|
||||
mesh_,
|
||||
dimensioned<Type>("zero", dimless, Zero)
|
||||
);
|
||||
GeometricField<TypeGrad, fvPatchField, volMesh> cellGrad
|
||||
GeometricField<GradType, fvPatchField, volMesh> cellGrad
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
@ -172,9 +172,9 @@ bool Foam::AveragingMethod<Type>::write(const bool write) const
|
||||
mesh_
|
||||
),
|
||||
mesh_,
|
||||
dimensioned<TypeGrad>("zero", dimless, Zero)
|
||||
dimensioned<GradType>("zero", dimless, Zero)
|
||||
);
|
||||
GeometricField<Type, pointPatchField, pointMesh> pointValue
|
||||
PointField<Type> pointValue
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
@ -185,7 +185,7 @@ bool Foam::AveragingMethod<Type>::write(const bool write) const
|
||||
pointMesh_,
|
||||
dimensioned<Type>("zero", dimless, Zero)
|
||||
);
|
||||
GeometricField<TypeGrad, pointPatchField, pointMesh> pointGrad
|
||||
PointField<GradType> pointGrad
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
@ -194,7 +194,7 @@ bool Foam::AveragingMethod<Type>::write(const bool write) const
|
||||
mesh_
|
||||
),
|
||||
pointMesh_,
|
||||
dimensioned<TypeGrad>("zero", dimless, Zero)
|
||||
dimensioned<GradType>("zero", dimless, Zero)
|
||||
);
|
||||
|
||||
// Barycentric coordinates of the tet vertices
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -62,7 +62,7 @@ protected:
|
||||
//- Protected typedefs
|
||||
|
||||
//- Gradient type
|
||||
typedef typename outerProduct<vector, Type>::type TypeGrad;
|
||||
typedef typename outerProduct<vector, Type>::type GradType;
|
||||
|
||||
|
||||
//- Protected data
|
||||
@ -149,7 +149,7 @@ public:
|
||||
) const = 0;
|
||||
|
||||
//- Interpolate gradient
|
||||
virtual TypeGrad interpolateGrad
|
||||
virtual GradType interpolateGrad
|
||||
(
|
||||
const barycentric& coordinates,
|
||||
const tetIndices& tetIs
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -112,7 +112,7 @@ Type Foam::AveragingMethods::Basic<Type>::interpolate
|
||||
|
||||
|
||||
template<class Type>
|
||||
typename Foam::AveragingMethods::Basic<Type>::TypeGrad
|
||||
typename Foam::AveragingMethods::Basic<Type>::GradType
|
||||
Foam::AveragingMethods::Basic<Type>::interpolateGrad
|
||||
(
|
||||
const barycentric& coordinates,
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -67,7 +67,7 @@ public:
|
||||
// Public Typedefs
|
||||
|
||||
//- Gradient type
|
||||
typedef typename AveragingMethod<Type>::TypeGrad TypeGrad;
|
||||
typedef typename AveragingMethod<Type>::GradType GradType;
|
||||
|
||||
|
||||
private:
|
||||
@ -78,7 +78,7 @@ private:
|
||||
Field<Type>& data_;
|
||||
|
||||
//- Gradient field
|
||||
Field<TypeGrad> dataGrad_;
|
||||
Field<GradType> dataGrad_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
@ -138,7 +138,7 @@ public:
|
||||
) const;
|
||||
|
||||
//- Interpolate gradient
|
||||
TypeGrad interpolateGrad
|
||||
GradType interpolateGrad
|
||||
(
|
||||
const barycentric& coordinates,
|
||||
const tetIndices& tetIs
|
||||
@ -148,7 +148,7 @@ public:
|
||||
tmp<Field<Type>> primitiveField() const;
|
||||
|
||||
//- Return an internal field of the gradient
|
||||
tmp<Field<TypeGrad>> internalFieldGrad() const;
|
||||
tmp<Field<GradType>> internalFieldGrad() const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -159,7 +159,7 @@ Type Foam::AveragingMethods::Dual<Type>::interpolate
|
||||
|
||||
|
||||
template<class Type>
|
||||
typename Foam::AveragingMethods::Dual<Type>::TypeGrad
|
||||
typename Foam::AveragingMethods::Dual<Type>::GradType
|
||||
Foam::AveragingMethods::Dual<Type>::interpolateGrad
|
||||
(
|
||||
const barycentric& coordinates,
|
||||
@ -185,7 +185,7 @@ Foam::AveragingMethods::Dual<Type>::interpolateGrad
|
||||
|
||||
const vector t( - T.T().x() - T.T().y() - T.T().z());
|
||||
|
||||
const TypeGrad S
|
||||
const GradType S
|
||||
(
|
||||
dataDual_[triIs[0]],
|
||||
dataDual_[triIs[1]],
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -71,7 +71,7 @@ public:
|
||||
// Public Typedefs
|
||||
|
||||
//- Gradient type
|
||||
typedef typename AveragingMethod<Type>::TypeGrad TypeGrad;
|
||||
typedef typename AveragingMethod<Type>::GradType GradType;
|
||||
|
||||
|
||||
private:
|
||||
@ -154,7 +154,7 @@ public:
|
||||
) const;
|
||||
|
||||
//- Interpolate gradient
|
||||
TypeGrad interpolateGrad
|
||||
GradType interpolateGrad
|
||||
(
|
||||
const barycentric& coordinates,
|
||||
const tetIndices& tetIs
|
||||
@ -168,7 +168,7 @@ public:
|
||||
tmp<Field<Type>> primitiveField() const;
|
||||
|
||||
//- Return an internal field of the gradient
|
||||
tmp<Field<TypeGrad>> internalFieldGrad() const;
|
||||
tmp<Field<GradType>> internalFieldGrad() const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -143,7 +143,7 @@ void Foam::AveragingMethods::Moment<Type>::add
|
||||
+ coordinates[3]*this->mesh_.points()[triIs[2]];
|
||||
|
||||
const Type v = value/this->mesh_.V()[celli];
|
||||
const TypeGrad dv = transform_[celli] & (v*delta/scale_[celli]);
|
||||
const GradType dv = transform_[celli] & (v*delta/scale_[celli]);
|
||||
|
||||
data_[celli] += v;
|
||||
dataX_[celli] += v + dv.x();
|
||||
@ -171,7 +171,7 @@ Type Foam::AveragingMethods::Moment<Type>::interpolate
|
||||
return
|
||||
data_[celli]
|
||||
+ (
|
||||
TypeGrad
|
||||
GradType
|
||||
(
|
||||
dataX_[celli] - data_[celli],
|
||||
dataY_[celli] - data_[celli],
|
||||
@ -183,7 +183,7 @@ Type Foam::AveragingMethods::Moment<Type>::interpolate
|
||||
|
||||
|
||||
template<class Type>
|
||||
typename Foam::AveragingMethods::Moment<Type>::TypeGrad
|
||||
typename Foam::AveragingMethods::Moment<Type>::GradType
|
||||
Foam::AveragingMethods::Moment<Type>::interpolateGrad
|
||||
(
|
||||
const barycentric& coordinates,
|
||||
@ -193,7 +193,7 @@ Foam::AveragingMethods::Moment<Type>::interpolateGrad
|
||||
const label celli(tetIs.cell());
|
||||
|
||||
return
|
||||
TypeGrad
|
||||
GradType
|
||||
(
|
||||
dataX_[celli] - data_[celli],
|
||||
dataY_[celli] - data_[celli],
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -68,7 +68,7 @@ public:
|
||||
// Public Typedefs
|
||||
|
||||
//- Gradient type
|
||||
typedef typename AveragingMethod<Type>::TypeGrad TypeGrad;
|
||||
typedef typename AveragingMethod<Type>::GradType GradType;
|
||||
|
||||
|
||||
private:
|
||||
@ -151,7 +151,7 @@ public:
|
||||
) const;
|
||||
|
||||
//- Interpolate gradient
|
||||
TypeGrad interpolateGrad
|
||||
GradType interpolateGrad
|
||||
(
|
||||
const barycentric& coordinates,
|
||||
const tetIndices& tetIs
|
||||
@ -161,7 +161,7 @@ public:
|
||||
tmp<Field<Type>> primitiveField() const;
|
||||
|
||||
//- Return an internal field of the gradient
|
||||
tmp<Field<TypeGrad>> internalFieldGrad() const;
|
||||
tmp<Field<GradType>> internalFieldGrad() const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -52,7 +52,7 @@ Foam::sampledSurfaces::sampledIsoSurfaceSurface::interpolateField
|
||||
|
||||
if (isA<interpolationVolPointInterpolation<Type>>(interpolator))
|
||||
{
|
||||
const GeometricField<Type, pointPatchField, pointMesh>& pField =
|
||||
const PointField<Type>& pField =
|
||||
refCast<const interpolationVolPointInterpolation<Type>>
|
||||
(interpolator).psip();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user