Avoid race condition with single processor compilation of conjugateHeatFoam
[foam-extend-3.0.git] / applications / solvers / coupled / conjugateHeatTransfer / thermalModel / thermalLaws / multiMaterialThermal / multiMaterialThermal.H
blobc17a226219a5cdf8c9874d2bfef11795a398df23
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | foam-extend: Open Source CFD
4    \\    /   O peration     |
5     \\  /    A nd           | For copyright notice see file Copyright
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of foam-extend.
11     foam-extend is free software: you can redistribute it and/or modify it
12     under the terms of the GNU General Public License as published by the
13     Free Software Foundation, either version 3 of the License, or (at your
14     option) any later version.
16     foam-extend is distributed in the hope that it will be useful, but
17     WITHOUT ANY WARRANTY; without even the implied warranty of
18     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19     General Public License for more details.
21     You should have received a copy of the GNU General Public License
22     along with foam-extend.  If not, see <http://www.gnu.org/licenses/>.
24 Class
25     multiMaterialThermal
27 Description
28     Zoned multi-material thermal model controlled by an indicator field.
30 Author
31     Hrvoje Jasak, Wikki Ltd.  All rights reserved.
33 SourceFiles
34     multiMaterialThermal.C
36 \*---------------------------------------------------------------------------*/
38 #ifndef multiMaterialThermal_H
39 #define multiMaterialThermal_H
41 #include "thermalLaw.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 namespace Foam
48 /*---------------------------------------------------------------------------*\
49                     Class multiMaterialThermal Declaration
50 \*---------------------------------------------------------------------------*/
52 class multiMaterialThermal
54     public thermalLaw,
55     public PtrList<thermalLaw>
57     // Private Member Functions
59         //- Disallow default bitwise copy construct
60         multiMaterialThermal(const multiMaterialThermal&);
62         //- Disallow default bitwise assignment
63         void operator=(const multiMaterialThermal&);
66         //- Calculate indicator field given index
67         tmp<volScalarField> indicator(const label index) const;
69 protected:
71     // Protected data
73         //- Material indicator field
74         volScalarField materials_;
76     // Protected member functions
78         //- Check that the laws and the material field are okay 
79         void readLaws
80         (
81             const volScalarField& T,
82             const dictionary& dict
83         );
85         //- Check that the laws and the material field are okay 
86         void checkLaws() const;
89 public:
91     //- Runtime type information
92     TypeName("multiMaterial");
94     // Static data members
97     // Constructors
99         //- Construct from dictionary
100         multiMaterialThermal
101         (
102             const word& name,
103             const volScalarField& T,
104             const dictionary& dict
105         );
107         //- Construct from dictionary and create default material field
108         multiMaterialThermal
109         (
110             const word& name,
111             const volScalarField& T,
112             const dictionary& dict,
113             const scalar defaultMaterial
114         );
116     // Destructor
118         virtual ~multiMaterialThermal();
121     // Member Functions
123         //- Return density
124         virtual tmp<volScalarField> rho() const;
126         //- Return specific heat capacity
127         virtual tmp<volScalarField> C() const;
129         //- Return thermal conductivity
130         virtual tmp<volScalarField> k() const;
132         //- Correct the rheological model
133         virtual void correct();
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 } // End namespace Foam
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 #endif
145 // ************************************************************************* //