/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2012-2017 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 "fixedJumpAMIFvPatchField.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template Foam::fixedJumpAMIFvPatchField::fixedJumpAMIFvPatchField ( const fvPatch& p, const DimensionedField& iF ) : jumpCyclicAMIFvPatchField(p, iF), jump_(this->size(), Zero) {} template Foam::fixedJumpAMIFvPatchField::fixedJumpAMIFvPatchField ( const fixedJumpAMIFvPatchField& ptf, const fvPatch& p, const DimensionedField& iF, const fvPatchFieldMapper& mapper ) : jumpCyclicAMIFvPatchField(ptf, p, iF, mapper), jump_(ptf.jump_, mapper) {} template Foam::fixedJumpAMIFvPatchField::fixedJumpAMIFvPatchField ( const fvPatch& p, const DimensionedField& iF, const dictionary& dict ) : jumpCyclicAMIFvPatchField(p, iF), jump_(p.size(), Zero) { if (this->cyclicAMIPatch().owner()) { jump_.assign("jump", dict, p.size(), IOobjectOption::MUST_READ); } if (!this->readValueEntry(dict)) { this->evaluate(Pstream::commsTypes::buffered); } } template Foam::fixedJumpAMIFvPatchField::fixedJumpAMIFvPatchField ( const fixedJumpAMIFvPatchField& ptf ) : jumpCyclicAMIFvPatchField(ptf), jump_(ptf.jump_) {} template Foam::fixedJumpAMIFvPatchField::fixedJumpAMIFvPatchField ( const fixedJumpAMIFvPatchField& ptf, const DimensionedField& iF ) : jumpCyclicAMIFvPatchField(ptf, iF), jump_(ptf.jump_) {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template Foam::tmp> Foam::fixedJumpAMIFvPatchField::jump() const { if (this->cyclicAMIPatch().owner()) { return jump_; } else { const fixedJumpAMIFvPatchField& nbrPatch = refCast> ( this->neighbourPatchField() ); if (this->cyclicAMIPatch().applyLowWeightCorrection()) { return this->cyclicAMIPatch().interpolate ( nbrPatch.jump(), Field(this->size(), Zero) ); } else { return this->cyclicAMIPatch().interpolate(nbrPatch.jump()); } } } template void Foam::fixedJumpAMIFvPatchField::autoMap ( const fvPatchFieldMapper& m ) { jumpCyclicAMIFvPatchField::autoMap(m); jump_.autoMap(m); } template void Foam::fixedJumpAMIFvPatchField::rmap ( const fvPatchField& ptf, const labelList& addr ) { jumpCyclicAMIFvPatchField::rmap(ptf, addr); const fixedJumpAMIFvPatchField& tiptf = refCast>(ptf); jump_.rmap(tiptf.jump_, addr); } template void Foam::fixedJumpAMIFvPatchField::write(Ostream& os) const { fvPatchField::write(os); os.writeEntry("patchType", this->interfaceFieldType()); if (this->cyclicAMIPatch().owner()) { jump_.writeEntry("jump", os); } fvPatchField::writeValueEntry(os); } // ************************************************************************* //