MultiRegionList.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2023-2024 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::MultiRegionList
26 
27 Description
28  Class which combines a UPtrList or PtrListr of region-associated objects
29  (meshes, solvers, domainDecompositions, ...) with the automatic region
30  prefixing provided by MultiRegionRefs.
31 
32 \*---------------------------------------------------------------------------*/
33 
34 #ifndef MultiRegionList_H
35 #define MultiRegionList_H
36 
37 #include "MultiRegionRefs.H"
38 #include "PtrList.H"
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 
45 /*---------------------------------------------------------------------------*\
46  Class MultiRegionListBase Declaration
47 \*---------------------------------------------------------------------------*/
48 
49 template<template<class> class Container, class Region>
51 :
52  private Container<Region>,
53  public MultiRegionRefs<Region>
54 {
55 public:
56 
57  // Constructors
58 
59  //- Construct from a list of regions
60  MultiRegionListBase(Container<Region>& regions, bool reuse)
61  :
62  Container<Region>(regions, reuse),
63  MultiRegionRefs<Region>(static_cast<Container<Region>&>(*this))
64  {}
65 
66  //- Construct from a list of regions
67  MultiRegionListBase(Container<Region>&& regions)
68  :
69  Container<Region>(std::move(regions)),
70  MultiRegionRefs<Region>(static_cast<Container<Region>&>(*this))
71  {}
72 
73 
74  // Member Functions
75 
76  //- Inherit the size method from the references
78 
79 
80  // Member Operators
81 
82  //- Inherit the access operator from the references
84 };
85 
86 
87 /*---------------------------------------------------------------------------*\
88  Typedef MultiRegionList Declaration
89 \*---------------------------------------------------------------------------*/
90 
91 template<class Region>
93 
94 
95 /*---------------------------------------------------------------------------*\
96  Typedef MultiRegionUList Declaration
97 \*---------------------------------------------------------------------------*/
98 
99 template<class Region>
101 
102 
103 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
104 
105 } // End namespace Foam
106 
107 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
108 
109 #endif
110 
111 // ************************************************************************* //
MultiRegionListBase(Container< Region > &regions, bool reuse)
Construct from a list of regions.
Class to wrap a UPtrList of of region-associated objects (meshes, solvers, domainDecompositions,...
Namespace for OpenFOAM.