/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Copyright (C) 2025-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 "box.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { namespace zoneGenerators { defineTypeNameAndDebug(box, 0); addToRunTimeSelectionTable(zoneGenerator, box, dictionary); } } // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // inline bool Foam::zoneGenerators::box::contains(const point& p) const { forAll(boxes_, i) { if (boxes_[i].contains(p)) { return true; } } return false; } // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // Foam::zoneGenerators::box::box ( const word& name, const polyMesh& mesh, const dictionary& dict ) : volume(name, mesh, dict), boxes_ ( boundBox::found(dict) ? List(1, boundBox(dict)) : dict.found("boxes") ? dict.lookup>("boxes", dimensions::length) : List(1, boundBox(dict)) ) {} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // Foam::zoneGenerators::box::~box() {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // Foam::zoneSet Foam::zoneGenerators::box::generate() const { return volume::generate(*this); } // ************************************************************************* //