/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Copyright (C) 2011-2026 OpenFOAM Foundation \\/ 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 . \*---------------------------------------------------------------------------*/ #include "valuePointPatchField.H" #include "fieldMapper.H" // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // template void Foam::valuePointPatchField::checkFieldSize() const { if (this->size() != this->patch().size()) { FatalErrorInFunction << "field does not correspond to patch. " << endl << "Field size: " << size() << " patch size: " << this->patch().size() << abort(FatalError); } } // * * * * * * * * * * * * * * * * 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()) { if (dict.found("value")) { Field::operator= ( Field("value", iF.dimensions(), dict, p.size()) ); } else if (!valueRequired) { Field::operator=(Zero); } else { FatalIOErrorInFunction(dict) << "Essential entry 'value' missing" << exit(FatalIOError); } } template Foam::valuePointPatchField::valuePointPatchField ( const valuePointPatchField& ptf, const pointPatch& p, const DimensionedField& iF, const fieldMapper& mapper ) : pointPatchField(ptf, p, iF, mapper), Field(mapper(ptf)) {} template Foam::valuePointPatchField::valuePointPatchField ( const valuePointPatchField& ptf, const DimensionedField& iF ) : pointPatchField(ptf, iF), Field(ptf) {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template void Foam::valuePointPatchField::map ( const pointPatchField& ptf, const fieldMapper& mapper ) { const valuePointPatchField& vptf = refCast>(ptf); mapper(*this, vptf); } template void Foam::valuePointPatchField::reset ( const pointPatchField& ptf ) { Field::reset(refCast>(ptf)); } template void Foam::valuePointPatchField::updateCoeffs() { if (this->updated()) { return; } // Get internal field to insert values into Field& iF = const_cast&>(this->primitiveField()); this->setInternalField(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->setInternalField(iF, *this); pointPatchField::evaluate(); } template void Foam::valuePointPatchField::write(Ostream& os) const { pointPatchField::write(os); writeEntry(os, "value", static_cast&>(*this)); } // * * * * * * * * * * * * * * * 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= ( pointPatchField&& ptf ) { Field::operator=(this->patchInternalField()); } template void Foam::valuePointPatchField::operator= ( const Field& ul ) { Field::operator=(ul); } template void Foam::valuePointPatchField::operator= ( const UList& ul ) { Field::operator=(ul); } 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); } // ************************************************************************* //