WIP area fields
This commit is contained in:
parent
64e5b7f626
commit
ce602d340b
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016-2017 Wikki Ltd
|
||||
Copyright (C) 2018-2022 OpenCFD Ltd.
|
||||
Copyright (C) 2018-2023 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -34,12 +34,14 @@ License
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
defineTemplateTypeNameAndDebug(areaLabelField::Internal, 0);
|
||||
defineTemplateTypeNameAndDebug(areaScalarField::Internal, 0);
|
||||
defineTemplateTypeNameAndDebug(areaVectorField::Internal, 0);
|
||||
defineTemplateTypeNameAndDebug(areaSphericalTensorField::Internal, 0);
|
||||
defineTemplateTypeNameAndDebug(areaSymmTensorField::Internal, 0);
|
||||
defineTemplateTypeNameAndDebug(areaTensorField::Internal, 0);
|
||||
|
||||
defineTemplateTypeNameAndDebug(areaLabelField, 0);
|
||||
defineTemplateTypeNameAndDebug(areaScalarField, 0);
|
||||
defineTemplateTypeNameAndDebug(areaVectorField, 0);
|
||||
defineTemplateTypeNameAndDebug(areaSphericalTensorField, 0);
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016-2017 Wikki Ltd
|
||||
Copyright (C) 2018-2022 OpenCFD Ltd.
|
||||
Copyright (C) 2018-2023 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -75,6 +75,7 @@ using AreaInternalField = DimensionedField<Type, areaMesh>;
|
||||
|
||||
// Typedefs
|
||||
|
||||
typedef GeometricField<label, faPatchField, areaMesh> areaLabelField;
|
||||
typedef GeometricField<scalar, faPatchField, areaMesh> areaScalarField;
|
||||
typedef GeometricField<vector, faPatchField, areaMesh> areaVectorField;
|
||||
typedef GeometricField<sphericalTensor, faPatchField, areaMesh>
|
||||
|
@ -30,17 +30,12 @@ License
|
||||
#include "areaFaMesh.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
makeFaPatchFields(calculated);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
makeFaPatchFieldType(label, calculated);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
@ -38,6 +38,7 @@ namespace Foam
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
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
|
||||
|
@ -29,17 +29,70 @@ License
|
||||
#include "coupledFaPatchFields.H"
|
||||
#include "areaFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
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);
|
||||
makeFaPatchFieldTypedef(label, coupled);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -30,17 +30,12 @@ License
|
||||
#include "areaFaMesh.H"
|
||||
#include "areaFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
makeFaPatchFields(processor);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
makeFaPatchFieldType(label, processor);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
@ -38,6 +38,7 @@ namespace Foam
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makeFaPatchTypeFieldTypedefs(processor);
|
||||
makeFaPatchFieldTypedef(label, processor);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -38,6 +38,7 @@ namespace Foam
|
||||
defineTemplateRunTimeSelectionTable(PatchTypeField, patchMapper); \
|
||||
defineTemplateRunTimeSelectionTable(PatchTypeField, dictionary);
|
||||
|
||||
makeFaPatchField(faPatchLabelField);
|
||||
makeFaPatchField(faPatchScalarField);
|
||||
makeFaPatchField(faPatchVectorField);
|
||||
makeFaPatchField(faPatchSphericalTensorField);
|
||||
|
@ -42,6 +42,7 @@ namespace Foam
|
||||
|
||||
template<class Type> class faPatchField;
|
||||
|
||||
typedef faPatchField<label> faPatchLabelField;
|
||||
typedef faPatchField<scalar> faPatchScalarField;
|
||||
typedef faPatchField<vector> faPatchVectorField;
|
||||
typedef faPatchField<sphericalTensor> faPatchSphericalTensorField;
|
||||
|
Loading…
Reference in New Issue
Block a user