Forward compatibility: flex
[foam-extend-3.2.git] / src / foam / fields / DimensionedFields / DimensionedVectorNFields / DimensionedTensorNFields.C
blob9b404bf1aa057e980161f2db5991927c290cfc90
1 /*---------------------------------------------------------------------------*\
2   =========                 |
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 -------------------------------------------------------------------------------
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 \*---------------------------------------------------------------------------*/
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...)                                                  \
35                                                                                     \
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)                 \
41                                                                                     \
42 BINARY_OPERATOR(tensorType, CmptType, tensorType, /,'|',divide)                     \
43 BINARY_TYPE_OPERATOR(tensorType, CmptType, tensorType, /,'|',divide)                \
44                                                                                     \
45 BINARY_OPERATOR(vectorType, vectorType, tensorType, /,'|',divide)                   \
46 BINARY_TYPE_OPERATOR(vectorType, vectorType, tensorType, /,'|',divide)              \
47                                                                                     \
48 BINARY_OPERATOR(tensorType, tensorType, tensorType, /,'|',divide)                   \
49 BINARY_TYPE_OPERATOR(tensorType, tensorType, tensorType, /,'|',divide)              \
50                                                                                     \
51 BINARY_OPERATOR(tensorType, tensorType, diagTensorType, /,'|',divide)               \
52 BINARY_TYPE_OPERATOR(tensorType, tensorType, diagTensorType, /,'|',divide)          \
53                                                                                     \
54 BINARY_OPERATOR(tensorType, diagTensorType, tensorType, /,'|',divide)               \
55 BINARY_TYPE_OPERATOR(tensorType, diagTensorType, tensorType, /,'|',divide)          \
56                                                                                     \
57 BINARY_OPERATOR(tensorType, sphericalTensorType, tensorType, /,'|',divide)          \
58 BINARY_TYPE_OPERATOR(tensorType, sphericalTensorType, tensorType, /,'|',divide)     \
59                                                                                     \
60 BINARY_OPERATOR(tensorType, tensorType, sphericalTensorType, /,'|',divide)          \
61 BINARY_TYPE_OPERATOR(tensorType, tensorType, sphericalTensorType, /,'|',divide)     \
62                                                                                     \
63 BINARY_OPERATOR(tensorType, tensorType, tensorType, +,'+',add)                      \
64 BINARY_OPERATOR(tensorType, tensorType, tensorType, -,'-',subtract)                 \
65                                                                                     \
66 BINARY_TYPE_OPERATOR(tensorType, tensorType, tensorType, +,'+',add)                 \
67 BINARY_TYPE_OPERATOR(tensorType, tensorType, tensorType, -,'-',subtract)            \
68                                                                                     \
69 BINARY_OPERATOR(tensorType, diagTensorType, tensorType, +,'+',add)                  \
70 BINARY_OPERATOR(tensorType, diagTensorType, tensorType, -,'-',subtract)             \
71                                                                                     \
72 BINARY_TYPE_OPERATOR(tensorType, diagTensorType, tensorType, +,'+',add)             \
73 BINARY_TYPE_OPERATOR(tensorType, diagTensorType, tensorType, -,'-',subtract)        \
74                                                                                     \
75 BINARY_OPERATOR(tensorType, sphericalTensorType, tensorType, +,'+',add)             \
76 BINARY_OPERATOR(tensorType, sphericalTensorType, tensorType, -,'-',subtract)        \
77                                                                                     \
78 BINARY_TYPE_OPERATOR(tensorType, sphericalTensorType, tensorType, +,'+',add)        \
79 BINARY_TYPE_OPERATOR(tensorType, sphericalTensorType, tensorType, -,'-',subtract)
82 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
84 namespace Foam
87 forAllVectorTensorNTypes(TensorN_FieldFunctions)
91 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
93 #undef TensorN_FieldFunctions
95 #include "undefFieldFunctionsM.H"
97 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
99 // ************************************************************************* //