/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016-2017 Wikki Ltd ------------------------------------------------------------------------------- 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 . \*---------------------------------------------------------------------------*/ #include "coupledFaPatchField.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template Foam::coupledFaPatchField::coupledFaPatchField ( const faPatch& p, const DimensionedField& iF ) : lduInterfaceField(refCast(p)), faPatchField(p, iF) {} template Foam::coupledFaPatchField::coupledFaPatchField ( const faPatch& p, const DimensionedField& iF, const Field& f ) : lduInterfaceField(refCast(p)), faPatchField(p, iF, f) {} template Foam::coupledFaPatchField::coupledFaPatchField ( const coupledFaPatchField& ptf, const faPatch& p, const DimensionedField& iF, const faPatchFieldMapper& mapper ) : lduInterfaceField(refCast(p)), faPatchField(ptf, p, iF, mapper) {} template Foam::coupledFaPatchField::coupledFaPatchField ( const faPatch& p, const DimensionedField& iF, const dictionary& dict, IOobjectOption::readOption requireValue ) : lduInterfaceField(refCast(p, dict)), faPatchField(p, iF, dict, requireValue) {} template Foam::coupledFaPatchField::coupledFaPatchField ( const coupledFaPatchField& ptf ) : lduInterfaceField(refCast(ptf.patch())), faPatchField(ptf) {} template Foam::coupledFaPatchField::coupledFaPatchField ( const coupledFaPatchField& ptf, const DimensionedField& iF ) : lduInterfaceField(refCast(ptf.patch())), faPatchField(ptf, iF) {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template Foam::tmp> Foam::coupledFaPatchField::snGrad() const { return (patchNeighbourField() - this->patchInternalField()) *this->patch().deltaCoeffs(); } template void Foam::coupledFaPatchField::initEvaluate(const Pstream::commsTypes) { if (!this->updated()) { this->updateCoeffs(); } } template void Foam::coupledFaPatchField::evaluate(const Pstream::commsTypes) { Field::operator= ( lerp ( this->patchNeighbourField(), this->patchInternalField(), this->patch().weights() ) ); } template Foam::tmp> Foam::coupledFaPatchField::valueInternalCoeffs ( const tmp& w ) const { return Type(pTraits::one)*w; } template Foam::tmp> Foam::coupledFaPatchField::valueBoundaryCoeffs ( const tmp& w ) const { return Type(pTraits::one)*(1.0 - w); } template Foam::tmp> Foam::coupledFaPatchField::gradientInternalCoeffs() const { return -Type(pTraits::one)*this->patch().deltaCoeffs(); } template Foam::tmp> Foam::coupledFaPatchField::gradientBoundaryCoeffs() const { return -gradientInternalCoeffs(); } template void Foam::coupledFaPatchField::write(Ostream& os) const { faPatchField::write(os); faPatchField::writeValueEntry(os); } // ************************************************************************* //