/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Copyright (C) 2015-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 "fvMesh.H" // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template typename Foam::pTraits::labelType Foam::fvMesh::validComponents() const { return pow::rank>(this->solutionD()); } template Foam::UPtrList Foam::fvMesh::fields ( const bool strict, const HashSet& geometryFields ) const { HashTable fields ( const_cast(*this).lookupClass(strict) ); UPtrList curFields(fields.size()); label i = 0; forAllIter(typename HashTable, fields, iter) { if (!geometryFields.found(iter()->name())) { curFields.set(i++, iter()); } } curFields.setSize(i); return curFields; } template Foam::UPtrList Foam::fvMesh::curFields ( const bool strict, const HashSet& geometryFields ) const { HashTable fields ( const_cast(*this).lookupClass(strict) ); UPtrList curFields(fields.size()); label i = 0; forAllIter(typename HashTable, fields, iter) { if (!geometryFields.found(iter()->name()) && !iter()->isOldTime()) { curFields.set(i++, iter()); } } curFields.setSize(i); return curFields; } template Foam::tmp> Foam::fvMesh::lookupField ( const word& name ) const { return tmp> ( db().template lookupObject < DimensionedField >(name) ); } template class GeoField> void Foam::fvMesh::storeOldTimeFields() { UPtrList> curFields(this->curFields>()); forAll(curFields, i) { curFields[i].storeOldTimes(); } } template class GeoField> void Foam::fvMesh::storeOldTimeFields() { #define StoreOldTimeFields(Type, nullArg) \ storeOldTimeFields(); FOR_ALL_FIELD_TYPES(StoreOldTimeFields); #undef StoreOldTimeFields } template class GeoField> void Foam::fvMesh::nullOldestTimeFields() { UPtrList> curFields(this->curFields>()); forAll(curFields, i) { curFields[i].nullOldestTime(); } } template class GeoField> void Foam::fvMesh::nullOldestTimeFields() { #define nullOldestTimeFields(Type, nullArg) \ nullOldestTimeFields(); FOR_ALL_FIELD_TYPES(nullOldestTimeFields); #undef nullOldestTimeFields } // ************************************************************************* //