fixed writing out entries in advective bc
[OpenFOAM-1.6-ext.git] / src / VectorN / OpenFOAM / GeometricFields / GeometricTensorNFields.H
blob7c6c56236399edfec741d67c8af9126fe0d637a3
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright held by original author
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
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 the
13     Free Software Foundation; either version 2 of the License, or (at your
14     option) any later version.
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.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM; if not, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 Class
26     GeometricTensorNFields
28 Description
29     Specialisation of GeometricField<T> for TensorN.
31 SourceFiles
32     GeometricTensorNFields.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef GeometricTensorNFields_H
37 #define GeometricTensorNFields_H
39 #include "GeometricField.H"
40 #include "DimensionedTensorNFields.H"
41 #include "TensorNFieldFields.H"
43 #define TEMPLATE template<template<class> class PatchField, class GeoMesh>
44 #include "GeometricFieldFunctionsM.H"
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 #define TensorN_FieldFunctions(tensorType, diagTensorType, sphericalTensorType,     \
49     vectorType, CmptType, args...)                                                  \
50                                                                                     \
51 UNARY_FUNCTION(tensorType, tensorType,inv,inv)                                      \
52 UNARY_FUNCTION(diagTensorType, tensorType,diag,diag)                                \
53 UNARY_FUNCTION(tensorType, tensorType,negSumDiag,negSumDiag)                        \
54 UNARY_FUNCTION(CmptType, tensorType,contractScalar,contractScalar)                  \
55 UNARY_FUNCTION(vectorType, tensorType,contractLinear,contractLinear)                \
56                                                                                     \
57 BINARY_OPERATOR(tensorType, CmptType, tensorType, *,'*',multiply)                   \
58 BINARY_TYPE_OPERATOR(tensorType, CmptType, tensorType, *,'*',multiply)              \
59                                                                                     \
60 BINARY_OPERATOR(tensorType, CmptType, tensorType, /,'|',divide)                     \
61 BINARY_TYPE_OPERATOR(tensorType, CmptType, tensorType, /,'|',divide)                \
62                                                                                     \
63 BINARY_OPERATOR(vectorType, vectorType, tensorType, /,'|',divide)                   \
64 BINARY_TYPE_OPERATOR(vectorType, vectorType, tensorType, /,'|',divide)              \
65                                                                                     \
66 BINARY_OPERATOR(tensorType, tensorType, tensorType, /,'|',divide)                   \
67 BINARY_TYPE_OPERATOR(tensorType, tensorType, tensorType, /,'|',divide)              \
68                                                                                     \
69 BINARY_OPERATOR(tensorType, tensorType, diagTensorType, /,'|',divide)               \
70 BINARY_TYPE_OPERATOR(tensorType, tensorType, diagTensorType, /,'|',divide)          \
71                                                                                     \
72 BINARY_OPERATOR(tensorType, diagTensorType, tensorType, /,'|',divide)               \
73 BINARY_TYPE_OPERATOR(tensorType, diagTensorType, tensorType, /,'|',divide)          \
74                                                                                     \
75 BINARY_OPERATOR(tensorType, sphericalTensorType, tensorType, /,'|',divide)          \
76 BINARY_TYPE_OPERATOR(tensorType, sphericalTensorType, tensorType, /,'|',divide)     \
77                                                                                     \
78 BINARY_OPERATOR(tensorType, tensorType, sphericalTensorType, /,'|',divide)          \
79 BINARY_TYPE_OPERATOR(tensorType, tensorType, sphericalTensorType, /,'|',divide)     \
80                                                                                     \
81 BINARY_OPERATOR(tensorType, tensorType, tensorType, +,'+',add)                      \
82 BINARY_OPERATOR(tensorType, tensorType, tensorType, -,'-',subtract)                 \
83                                                                                     \
84 BINARY_TYPE_OPERATOR(tensorType, tensorType, tensorType, +,'+',add)                 \
85 BINARY_TYPE_OPERATOR(tensorType, tensorType, tensorType, -,'-',subtract)            \
86                                                                                     \
87 BINARY_OPERATOR(tensorType, diagTensorType, tensorType, +,'+',add)                  \
88 BINARY_OPERATOR(tensorType, diagTensorType, tensorType, -,'-',subtract)             \
89                                                                                     \
90 BINARY_TYPE_OPERATOR(tensorType, diagTensorType, tensorType, +,'+',add)             \
91 BINARY_TYPE_OPERATOR(tensorType, diagTensorType, tensorType, -,'-',subtract)        \
92                                                                                     \
93 BINARY_OPERATOR(tensorType, sphericalTensorType, tensorType, +,'+',add)             \
94 BINARY_OPERATOR(tensorType, sphericalTensorType, tensorType, -,'-',subtract)        \
95                                                                                     \
96 BINARY_TYPE_OPERATOR(tensorType, sphericalTensorType, tensorType, +,'+',add)        \
97 BINARY_TYPE_OPERATOR(tensorType, sphericalTensorType, tensorType, -,'-',subtract)
99 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
101 namespace Foam
104 forAllVectorTensorNTypes(TensorN_FieldFunctions)
108 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110 #undef TensorN_FieldFunctions
112 #include "undefFieldFunctionsM.H"
114 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
116 #ifdef NoRepository
117 #   include "GeometricTensorNFields.C"
118 #endif
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
122 #endif
124 // ************************************************************************* //