WIP area fields
This commit is contained in:
parent
64e5b7f626
commit
ce602d340b
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2016-2017 Wikki Ltd
|
Copyright (C) 2016-2017 Wikki Ltd
|
||||||
Copyright (C) 2018-2022 OpenCFD Ltd.
|
Copyright (C) 2018-2023 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -34,12 +34,14 @@ License
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
|
defineTemplateTypeNameAndDebug(areaLabelField::Internal, 0);
|
||||||
defineTemplateTypeNameAndDebug(areaScalarField::Internal, 0);
|
defineTemplateTypeNameAndDebug(areaScalarField::Internal, 0);
|
||||||
defineTemplateTypeNameAndDebug(areaVectorField::Internal, 0);
|
defineTemplateTypeNameAndDebug(areaVectorField::Internal, 0);
|
||||||
defineTemplateTypeNameAndDebug(areaSphericalTensorField::Internal, 0);
|
defineTemplateTypeNameAndDebug(areaSphericalTensorField::Internal, 0);
|
||||||
defineTemplateTypeNameAndDebug(areaSymmTensorField::Internal, 0);
|
defineTemplateTypeNameAndDebug(areaSymmTensorField::Internal, 0);
|
||||||
defineTemplateTypeNameAndDebug(areaTensorField::Internal, 0);
|
defineTemplateTypeNameAndDebug(areaTensorField::Internal, 0);
|
||||||
|
|
||||||
|
defineTemplateTypeNameAndDebug(areaLabelField, 0);
|
||||||
defineTemplateTypeNameAndDebug(areaScalarField, 0);
|
defineTemplateTypeNameAndDebug(areaScalarField, 0);
|
||||||
defineTemplateTypeNameAndDebug(areaVectorField, 0);
|
defineTemplateTypeNameAndDebug(areaVectorField, 0);
|
||||||
defineTemplateTypeNameAndDebug(areaSphericalTensorField, 0);
|
defineTemplateTypeNameAndDebug(areaSphericalTensorField, 0);
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2016-2017 Wikki Ltd
|
Copyright (C) 2016-2017 Wikki Ltd
|
||||||
Copyright (C) 2018-2022 OpenCFD Ltd.
|
Copyright (C) 2018-2023 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -75,6 +75,7 @@ using AreaInternalField = DimensionedField<Type, areaMesh>;
|
|||||||
|
|
||||||
// Typedefs
|
// Typedefs
|
||||||
|
|
||||||
|
typedef GeometricField<label, faPatchField, areaMesh> areaLabelField;
|
||||||
typedef GeometricField<scalar, faPatchField, areaMesh> areaScalarField;
|
typedef GeometricField<scalar, faPatchField, areaMesh> areaScalarField;
|
||||||
typedef GeometricField<vector, faPatchField, areaMesh> areaVectorField;
|
typedef GeometricField<vector, faPatchField, areaMesh> areaVectorField;
|
||||||
typedef GeometricField<sphericalTensor, faPatchField, areaMesh>
|
typedef GeometricField<sphericalTensor, faPatchField, areaMesh>
|
||||||
|
@ -30,17 +30,12 @@ License
|
|||||||
#include "areaFaMesh.H"
|
#include "areaFaMesh.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
makeFaPatchFields(calculated);
|
makeFaPatchFields(calculated);
|
||||||
|
makeFaPatchFieldType(label, calculated);
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
}
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
@ -38,6 +38,7 @@ namespace Foam
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
makeFaPatchTypeFieldTypedefs(calculated);
|
makeFaPatchTypeFieldTypedefs(calculated);
|
||||||
|
makeFaPatchFieldTypedef(label, calculated);
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
@ -212,6 +212,27 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * Template Specialisations * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<>
|
||||||
|
tmp<Field<label>> coupledFaPatchField<label>::snGrad() const;
|
||||||
|
|
||||||
|
template<>
|
||||||
|
void coupledFaPatchField<label>::evaluate(const Pstream::commsTypes);
|
||||||
|
|
||||||
|
template<>
|
||||||
|
tmp<Field<label>>
|
||||||
|
coupledFaPatchField<label>::valueInternalCoeffs(const tmp<scalarField>&) const;
|
||||||
|
|
||||||
|
template<>
|
||||||
|
tmp<Field<label>>
|
||||||
|
coupledFaPatchField<label>::valueBoundaryCoeffs(const tmp<scalarField>&) const;
|
||||||
|
|
||||||
|
template<>
|
||||||
|
tmp<Field<label>>
|
||||||
|
coupledFaPatchField<label>::gradientInternalCoeffs() const;
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
@ -29,17 +29,70 @@ License
|
|||||||
#include "coupledFaPatchFields.H"
|
#include "coupledFaPatchFields.H"
|
||||||
#include "areaFields.H"
|
#include "areaFields.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
makeFaPatchFieldsTypeName(coupled);
|
makeFaPatchFieldsTypeName(coupled);
|
||||||
|
makeFaPatchFieldTypeName(label, coupled);
|
||||||
|
}
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Specialisations * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<>
|
||||||
|
Foam::tmp<Foam::Field<Foam::label>>
|
||||||
|
Foam::coupledFaPatchField<Foam::label>::snGrad() const
|
||||||
|
{
|
||||||
|
// TBD: Treat like zero-gradient
|
||||||
|
return tmp<Field<label>>::New(this->size(), Zero);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<>
|
||||||
|
void Foam::coupledFaPatchField<Foam::label>::evaluate(const Pstream::commsTypes)
|
||||||
|
{
|
||||||
|
if (!this->updated())
|
||||||
|
{
|
||||||
|
this->updateCoeffs();
|
||||||
|
}
|
||||||
|
|
||||||
|
// TBD: Treat like zero-gradient
|
||||||
|
faPatchField<label>::operator=(this->patchInternalField());
|
||||||
|
faPatchField<label>::evaluate();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<>
|
||||||
|
Foam::tmp<Foam::Field<Foam::label>>
|
||||||
|
Foam::coupledFaPatchField<Foam::label>::valueInternalCoeffs
|
||||||
|
(
|
||||||
|
const tmp<scalarField>&
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
// TBD: Treat like zero-gradient
|
||||||
|
return tmp<Field<label>>::New(this->size(), label(1));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<>
|
||||||
|
Foam::tmp<Foam::Field<Foam::label>>
|
||||||
|
Foam::coupledFaPatchField<Foam::label>::valueBoundaryCoeffs
|
||||||
|
(
|
||||||
|
const tmp<scalarField>&
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
// TBD: Treat like zero-gradient
|
||||||
|
return tmp<Field<label>>::New(this->size(), Zero);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<>
|
||||||
|
Foam::tmp<Foam::Field<Foam::label>>
|
||||||
|
Foam::coupledFaPatchField<Foam::label>::gradientInternalCoeffs() const
|
||||||
|
{
|
||||||
|
// TBD: Treat like zero-gradient
|
||||||
|
return tmp<Field<label>>::New(this->size(), Zero);
|
||||||
|
}
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
@ -38,6 +38,7 @@ namespace Foam
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
makeFaPatchTypeFieldTypedefs(coupled);
|
makeFaPatchTypeFieldTypedefs(coupled);
|
||||||
|
makeFaPatchFieldTypedef(label, coupled);
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
@ -30,17 +30,12 @@ License
|
|||||||
#include "areaFaMesh.H"
|
#include "areaFaMesh.H"
|
||||||
#include "areaFields.H"
|
#include "areaFields.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
makeFaPatchFields(processor);
|
makeFaPatchFields(processor);
|
||||||
|
makeFaPatchFieldType(label, processor);
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
}
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
@ -38,6 +38,7 @@ namespace Foam
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
makeFaPatchTypeFieldTypedefs(processor);
|
makeFaPatchTypeFieldTypedefs(processor);
|
||||||
|
makeFaPatchFieldTypedef(label, processor);
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
@ -38,6 +38,7 @@ namespace Foam
|
|||||||
defineTemplateRunTimeSelectionTable(PatchTypeField, patchMapper); \
|
defineTemplateRunTimeSelectionTable(PatchTypeField, patchMapper); \
|
||||||
defineTemplateRunTimeSelectionTable(PatchTypeField, dictionary);
|
defineTemplateRunTimeSelectionTable(PatchTypeField, dictionary);
|
||||||
|
|
||||||
|
makeFaPatchField(faPatchLabelField);
|
||||||
makeFaPatchField(faPatchScalarField);
|
makeFaPatchField(faPatchScalarField);
|
||||||
makeFaPatchField(faPatchVectorField);
|
makeFaPatchField(faPatchVectorField);
|
||||||
makeFaPatchField(faPatchSphericalTensorField);
|
makeFaPatchField(faPatchSphericalTensorField);
|
||||||
|
@ -42,6 +42,7 @@ namespace Foam
|
|||||||
|
|
||||||
template<class Type> class faPatchField;
|
template<class Type> class faPatchField;
|
||||||
|
|
||||||
|
typedef faPatchField<label> faPatchLabelField;
|
||||||
typedef faPatchField<scalar> faPatchScalarField;
|
typedef faPatchField<scalar> faPatchScalarField;
|
||||||
typedef faPatchField<vector> faPatchVectorField;
|
typedef faPatchField<vector> faPatchVectorField;
|
||||||
typedef faPatchField<sphericalTensor> faPatchSphericalTensorField;
|
typedef faPatchField<sphericalTensor> faPatchSphericalTensorField;
|
||||||
|
Loading…
Reference in New Issue
Block a user