/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation ------------------------------------------------------------------------------- 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 "transformFvPatchField.H" #include "IOstreams.H" #include "transformField.H" // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template Foam::transformFvPatchField::transformFvPatchField ( const fvPatch& p, const DimensionedField& iF ) : fvPatchField(p, iF) {} template Foam::transformFvPatchField::transformFvPatchField ( const transformFvPatchField& ptf, const fvPatch& p, const DimensionedField& iF, const fvPatchFieldMapper& mapper ) : fvPatchField(ptf, p, iF, mapper) {} template Foam::transformFvPatchField::transformFvPatchField ( const fvPatch& p, const DimensionedField& iF, const dictionary& dict ) : fvPatchField(p, iF, dict, IOobjectOption::NO_READ) {} template Foam::transformFvPatchField::transformFvPatchField ( const transformFvPatchField& ptf ) : fvPatchField(ptf) {} template Foam::transformFvPatchField::transformFvPatchField ( const transformFvPatchField& ptf, const DimensionedField& iF ) : fvPatchField(ptf, iF) {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template Foam::tmp> Foam::transformFvPatchField::valueInternalCoeffs ( const tmp& ) const { // OR (!is_rotational_vectorspace_v) if constexpr (std::is_arithmetic_v) { return tmp>::New(this->size(), pTraits::one); } else { return pTraits::one - snGradTransformDiag(); } } template Foam::tmp> Foam::transformFvPatchField::valueBoundaryCoeffs ( const tmp& ) const { return *this - cmptMultiply ( valueInternalCoeffs(this->patch().weights()), this->patchInternalField() ); } template Foam::tmp> Foam::transformFvPatchField::gradientInternalCoeffs() const { // OR (!is_rotational_vectorspace_v) if constexpr (std::is_arithmetic_v) { return tmp>::New(this->size(), Foam::zero{}); } else { return -this->patch().deltaCoeffs()*snGradTransformDiag(); } } template Foam::tmp> Foam::transformFvPatchField::gradientBoundaryCoeffs() const { return snGrad() - cmptMultiply(gradientInternalCoeffs(), this->patchInternalField()); } // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // template void Foam::transformFvPatchField::operator= ( const fvPatchField& ptf ) { this->evaluate(); } // ************************************************************************* //