1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
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 \*---------------------------------------------------------------------------*/
26 #include "DimensionedTensorNFields.H"
28 #define TEMPLATE template<class GeoMesh>
29 #include "DimensionedFieldFunctionsM.C"
31 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
33 #define TensorN_FieldFunctions(tensorType, diagTensorType, sphericalTensorType, \
34 vectorType, CmptType, args...) \
36 UNARY_FUNCTION(tensorType, tensorType,inv,inv) \
37 UNARY_FUNCTION(diagTensorType, tensorType,diag,diag) \
38 UNARY_FUNCTION(tensorType, tensorType, negSumDiag, negSumDiag) \
39 UNARY_FUNCTION(vectorType, tensorType, contractLinear,contractLinear) \
40 UNARY_FUNCTION(CmptType, tensorType, contractScalar,contractLinear) \
42 BINARY_OPERATOR(tensorType, CmptType, tensorType, /,'|',divide) \
43 BINARY_TYPE_OPERATOR(tensorType, CmptType, tensorType, /,'|',divide) \
45 BINARY_OPERATOR(vectorType, vectorType, tensorType, /,'|',divide) \
46 BINARY_TYPE_OPERATOR(vectorType, vectorType, tensorType, /,'|',divide) \
48 BINARY_OPERATOR(tensorType, tensorType, tensorType, /,'|',divide) \
49 BINARY_TYPE_OPERATOR(tensorType, tensorType, tensorType, /,'|',divide) \
51 BINARY_OPERATOR(tensorType, tensorType, diagTensorType, /,'|',divide) \
52 BINARY_TYPE_OPERATOR(tensorType, tensorType, diagTensorType, /,'|',divide) \
54 BINARY_OPERATOR(tensorType, diagTensorType, tensorType, /,'|',divide) \
55 BINARY_TYPE_OPERATOR(tensorType, diagTensorType, tensorType, /,'|',divide) \
57 BINARY_OPERATOR(tensorType, sphericalTensorType, tensorType, /,'|',divide) \
58 BINARY_TYPE_OPERATOR(tensorType, sphericalTensorType, tensorType, /,'|',divide) \
60 BINARY_OPERATOR(tensorType, tensorType, sphericalTensorType, /,'|',divide) \
61 BINARY_TYPE_OPERATOR(tensorType, tensorType, sphericalTensorType, /,'|',divide) \
63 BINARY_OPERATOR(tensorType, tensorType, tensorType, +,'+',add) \
64 BINARY_OPERATOR(tensorType, tensorType, tensorType, -,'-',subtract) \
66 BINARY_TYPE_OPERATOR(tensorType, tensorType, tensorType, +,'+',add) \
67 BINARY_TYPE_OPERATOR(tensorType, tensorType, tensorType, -,'-',subtract) \
69 BINARY_OPERATOR(tensorType, diagTensorType, tensorType, +,'+',add) \
70 BINARY_OPERATOR(tensorType, diagTensorType, tensorType, -,'-',subtract) \
72 BINARY_TYPE_OPERATOR(tensorType, diagTensorType, tensorType, +,'+',add) \
73 BINARY_TYPE_OPERATOR(tensorType, diagTensorType, tensorType, -,'-',subtract) \
75 BINARY_OPERATOR(tensorType, sphericalTensorType, tensorType, +,'+',add) \
76 BINARY_OPERATOR(tensorType, sphericalTensorType, tensorType, -,'-',subtract) \
78 BINARY_TYPE_OPERATOR(tensorType, sphericalTensorType, tensorType, +,'+',add) \
79 BINARY_TYPE_OPERATOR(tensorType, sphericalTensorType, tensorType, -,'-',subtract)
82 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
87 forAllVectorTensorNTypes(TensorN_FieldFunctions)
91 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
93 #undef TensorN_FieldFunctions
95 #include "undefFieldFunctionsM.H"
97 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
99 // ************************************************************************* //