/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation Copyright (C) 2019-2022 OpenCFD 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 "valuePointPatchField.H" #include "pointPatchFieldMapper.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * // template Foam::valuePointPatchField::valuePointPatchField ( const pointPatch& p, const DimensionedField& iF ) : pointPatchField(p, iF), Field(p.size()) {} template Foam::valuePointPatchField::valuePointPatchField ( const pointPatch& p, const DimensionedField& iF, const dictionary& dict, const bool valueRequired ) : pointPatchField(p, iF, dict), Field(p.size()) { const auto* hasValue = dict.findEntry("value", keyType::LITERAL); if (hasValue) { Field::assign(*hasValue, p.size()); } else if (!valueRequired) { Field::operator=(Zero); } else { FatalIOErrorInFunction(dict) << "Essential entry 'value' missing on patch " << p.name() << endl << exit(FatalIOError); } } template Foam::valuePointPatchField::valuePointPatchField ( const valuePointPatchField& ptf, const pointPatch& p, const DimensionedField& iF, const pointPatchFieldMapper& mapper ) : pointPatchField(ptf, p, iF, mapper), Field(ptf, mapper) {} template Foam::valuePointPatchField::valuePointPatchField ( const valuePointPatchField& ptf, const DimensionedField& iF ) : pointPatchField(ptf, iF), Field(ptf) {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template void Foam::valuePointPatchField::autoMap ( const pointPatchFieldMapper& m ) { Field::autoMap(m); } template void Foam::valuePointPatchField::rmap ( const pointPatchField& ptf, const labelList& addr ) { Field::rmap ( refCast> ( ptf ), addr ); } template void Foam::valuePointPatchField::updateCoeffs() { if (this->updated()) { return; } // Get internal field to insert values into Field& iF = const_cast&>(this->primitiveField()); this->setInInternalField(iF, *this); pointPatchField::updateCoeffs(); } template void Foam::valuePointPatchField::evaluate(const Pstream::commsTypes) { // Get internal field to insert values into Field& iF = const_cast&>(this->primitiveField()); this->setInInternalField(iF, *this); pointPatchField::evaluate(); } template void Foam::valuePointPatchField::write(Ostream& os) const { pointPatchField::write(os); this->writeEntry("value", os); } // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // template void Foam::valuePointPatchField::operator= ( const valuePointPatchField& ptf ) { Field::operator=(ptf); } template void Foam::valuePointPatchField::operator= ( const pointPatchField& ptf ) { Field::operator=(this->patchInternalField()); } template void Foam::valuePointPatchField::operator= ( const Field& tf ) { Field::operator=(tf); } template void Foam::valuePointPatchField::operator= ( const Type& t ) { Field::operator=(t); } template void Foam::valuePointPatchField::operator== ( const valuePointPatchField& ptf ) { Field::operator=(ptf); } template void Foam::valuePointPatchField::operator== ( const pointPatchField& ptf ) { Field::operator=(this->patchInternalField()); } template void Foam::valuePointPatchField::operator== ( const Field& tf ) { Field::operator=(tf); } template void Foam::valuePointPatchField::operator== ( const Type& t ) { Field::operator=(t); } // ************************************************************************* //