Commit 27e3b1f9 authored by Andrew Heather's avatar Andrew Heather
Browse files

STYLE: relocating files

parent 452a281a
......@@ -97,10 +97,10 @@ $(faceToCell)/MeshObjects/centredCFCFaceToCellStencilObject.C
functionObjects/fvMeshFunctionObject/fvMeshFunctionObject.C
functionObjects/volRegion/volRegion.C
functionObjects/fieldSelection/fieldSelection.C
functionObjects/fieldSelection/fileFieldSelection.C
functionObjects/fieldSelection/volFieldSelection.C
functionObjects/fieldSelection/solverFieldSelection.C
functionObjects/fieldSelections/fieldSelection/fieldSelection.C
functionObjects/fieldSelections/fileFieldSelection/fileFieldSelection.C
functionObjects/fieldSelections/volFieldSelection/volFieldSelection.C
functionObjects/fieldSelections/solverFieldSelection/solverFieldSelection.C
fvPatchFields = fields/fvPatchFields
$(fvPatchFields)/fvPatchField/fvPatchFields.C
......
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2017-2019 OpenCFD Ltd.
\\/ 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 <http://www.gnu.org/licenses/>.
Class
Foam::functionObjects::fieldSelection
Description
Helper class to manage field selections
The class holds a list of field name filters which are then applied to a
set of field objects (in derived classes) from which the resulting set is
available via the selection() function. This returns a list of
(fieldName, component) objects, e.g. for U.component(0) this is (U, 0).
SourceFiles
fieldSelection.C
\*---------------------------------------------------------------------------*/
#ifndef functionObjects_fieldSelection_H
#define functionObjects_fieldSelection_H
#include "fieldInfo.H"
#include "DynamicList.H"
#include "HashSet.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
class dictionary;
class objectRegistry;
namespace functionObjects
{
/*---------------------------------------------------------------------------*\
Class fieldSelection Declaration
\*---------------------------------------------------------------------------*/
class fieldSelection
:
public List<fieldInfo>
{
private:
// Private Member Functions
//- No copy construct
fieldSelection(const fieldSelection&) = delete;
protected:
// Protected member data
//- Reference to the database
const objectRegistry& obr_;
//- Flag to indicate whether components are allowed
const bool includeComponents_;
//- Current field selection
List<fieldInfo> selection_;
// Protected Member Functions
//- Add registered objects of a given type
template<class Type>
void addRegistered(DynamicList<fieldInfo>& set) const;
public:
//- Construct from object registry
fieldSelection
(
const objectRegistry& obr,
const bool includeComponents = false
);
//- Destructor
virtual ~fieldSelection() = default;
// Member Functions
//- Return the cuurent filters
inline HashSet<wordRe> filters() const;
inline const List<fieldInfo>& selection() const;
//- Return the current field selection
inline wordHashSet selectionNames() const;
//- Reset the field filters to the given field names
virtual bool resetFieldFilters(const HashSet<wordRe>& names);
//- Reset the field filters to the given field name
virtual bool resetFieldFilters(const wordRe& name);
//- Read the fieldSelection data from dictionary
virtual bool read(const dictionary& dict);
//- Return whether the field names contain a pattern
virtual bool containsPattern() const;
//- Clear the current selection
virtual void clearSelection();
//- Update the selection
virtual bool updateSelection();
//- Check that all requested fielda have been found
virtual bool checkSelection();
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace functionObjects
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "fieldSelectionI.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
#include "fieldSelectionTemplates.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment