Files
openfoam/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.H
2010-07-28 16:42:53 +01:00

346 lines
10 KiB
C++

/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::processorCyclicFvPatchField
Description
Foam::processorCyclicFvPatchField
SourceFiles
processorCyclicFvPatchField.C
\*---------------------------------------------------------------------------*/
#ifndef processorCyclicFvPatchField_H
#define processorCyclicFvPatchField_H
//#include "coupledFvPatchField.H"
//#include "processorLduInterfaceField.H"
#include "processorCyclicFvPatch.H"
#include "processorFvPatchField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class processorCyclicFvPatch Declaration
\*---------------------------------------------------------------------------*/
template<class Type>
class processorCyclicFvPatchField
:
// public processorLduInterfaceField,
// public coupledFvPatchField<Type>
public processorFvPatchField<Type>
{
// Private data
//- Local reference cast into the processor patch
const processorCyclicFvPatch& procPatch_;
// Private Member Functions
// //- Get other patchfield
// const coupledFvPatchField<Type>& patchField
// (
// const label patchID
// ) const;
public:
//- Runtime type information
TypeName(processorCyclicFvPatch::typeName_());
// Constructors
//- Construct from patch and internal field
processorCyclicFvPatchField
(
const fvPatch&,
const DimensionedField<Type, volMesh>&
);
//- Construct from patch and internal field and patch field
processorCyclicFvPatchField
(
const fvPatch&,
const DimensionedField<Type, volMesh>&,
const Field<Type>&
);
//- Construct from patch, internal field and dictionary
processorCyclicFvPatchField
(
const fvPatch&,
const DimensionedField<Type, volMesh>&,
const dictionary&
);
//- Construct by mapping given processorCyclicFvPatchField onto a
// new patch
processorCyclicFvPatchField
(
const processorCyclicFvPatchField<Type>&,
const fvPatch&,
const DimensionedField<Type, volMesh>&,
const fvPatchFieldMapper&
);
//- Construct as copy
processorCyclicFvPatchField(const processorCyclicFvPatchField<Type>&);
//- Construct and return a clone
virtual tmp<fvPatchField<Type> > clone() const
{
return tmp<fvPatchField<Type> >
(
new processorCyclicFvPatchField<Type>(*this)
);
}
//- Construct as copy setting internal field reference
processorCyclicFvPatchField
(
const processorCyclicFvPatchField<Type>&,
const DimensionedField<Type, volMesh>&
);
//- Construct and return a clone setting internal field reference
virtual tmp<fvPatchField<Type> > clone
(
const DimensionedField<Type, volMesh>& iF
) const
{
return tmp<fvPatchField<Type> >
(
new processorCyclicFvPatchField<Type>(*this, iF)
);
}
// Destructor
~processorCyclicFvPatchField();
// Member functions
// Access
// //- Return true if running parallel
// virtual bool coupled() const
// {
// if (Pstream::parRun())
// {
// return true;
// }
// else
// {
// return false;
// }
// }
//
// //- Return neighbour field given internal field
// tmp<Field<Type> > patchNeighbourField() const;
//
//
// // Evaluation functions
//
// //- Initialise the evaluation of the patch field
// virtual void initEvaluate(const Pstream::commsTypes commsType);
//
// //- Evaluate the patch field
// virtual void evaluate(const Pstream::commsTypes commsType);
//
// //- Return patch-normal gradient
// virtual tmp<Field<Type> > snGrad() const;
//
// //- Initialise neighbour matrix update
// virtual void initInterfaceMatrixUpdate
// (
// const scalarField& psiInternal,
// scalarField& result,
// const lduMatrix& m,
// const scalarField& coeffs,
// const direction cmpt,
// const Pstream::commsTypes commsType
// ) const;
//
// //- Update result field based on interface functionality
// virtual void updateInterfaceMatrix
// (
// const scalarField& psiInternal,
// scalarField& result,
// const lduMatrix& m,
// const scalarField& coeffs,
// const direction cmpt,
// const Pstream::commsTypes commsType
// ) const;
//
// //- Processor coupled interface functions
//
// //- Return processor number
// virtual int myProcNo() const
// {
// return procPatch_.myProcNo();
// }
//
// //- Return neigbour processor number
// virtual int neighbProcNo() const
// {
// return procPatch_.neighbProcNo();
// }
//- Does the patch field perform the transfromation
virtual bool doTransform() const
{
return !(procPatch_.parallel() || pTraits<Type>::rank == 0);
}
//- Return face transformation tensor
virtual const tensorField& forwardT() const
{
return procPatch_.forwardT();
}
// //- Return rank of component for transform
// virtual int rank() const
// {
// return pTraits<Type>::rank;
// }
// //- Transform given patch component field
// void transformCoupleField
// (
// scalarField& f,
// const direction cmpt
// ) const;
// // Referred-patch functionality. Get called with a slice (size, start)
// // of a patch that supplies fields and geometry/topology.
//
// //- Get patch-normal gradient
// virtual void snGrad
// (
// Field<Type>& exchangeBuf,
// const Field<Type>& subFld,
// const coupledFvPatch& referringPatch,
// const label size,
// const label start
// ) const
// {
// notImplemented("processorCyclicFvPatchField::snGrad(..)");
// }
//
// //- Initialise the evaluation of the patch field.
// virtual void initEvaluate
// (
// Field<Type>& exchangeBuf,
// const coupledFvPatch& referringPatch,
// const label size,
// const label start
// ) const
// {
// notImplemented
// (
// "processorCyclicFvPatchField::initEvaluate(..)"
// );
// }
//
// //- Evaluate the patch field.
// virtual void evaluate
// (
// Field<Type>& exchangeBuf,
// const coupledFvPatch& referringPatch,
// const label size,
// const label start
// ) const
// {
// notImplemented("processorCyclicFvPatchField::evaluate(..)");
// }
//
// //- Initialise neighbour matrix update
// virtual void initInterfaceMatrixUpdate
// (
// const scalarField& psiInternal,
// scalarField& result,
// const lduMatrix& m,
// const scalarField& coeffs,
// const direction cmpt,
// const coupledFvPatch& referringPatch,
// const label size,
// const label start,
// scalarField& exchangeBuf
// ) const
// {
// notImplemented
// (
// "processorCyclicFvPatchField::"
// "initInterfaceMatrixUpdate(..)"
// );
// }
//
// //- Update result field based on interface functionality
// virtual void updateInterfaceMatrix
// (
// const scalarField& psiInternal,
// scalarField& result,
// const lduMatrix&,
// const scalarField& coeffs,
// const direction,
// const coupledFvPatch& referringPatch,
// const label size,
// const label start,
// scalarField& exchangeBuf
// ) const
// {
// notImplemented
// (
// "processorCyclicFvPatchField::updateInterfaceMatrix(..)"
// );
// }
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
# include "processorCyclicFvPatchField.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //