FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

scalarField.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software: you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
00023 
00024 Typedef
00025     Foam::scalarField
00026 
00027 Description
00028     Specialisation of Field<T> for scalar.
00029 
00030 SourceFiles
00031     scalarField.C
00032 
00033 \*---------------------------------------------------------------------------*/
00034 
00035 #ifndef scalarField_H
00036 #define scalarField_H
00037 
00038 #include <OpenFOAM/Field.H>
00039 #include <OpenFOAM/scalar.H>
00040 
00041 #define TEMPLATE
00042 #include <OpenFOAM/FieldFunctionsM.H>
00043 
00044 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00045 
00046 namespace Foam
00047 {
00048 
00049 typedef Field<scalar> scalarField;
00050 
00051 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00052 
00053 template<>
00054 tmp<scalarField> scalarField::component(const direction) const;
00055 
00056 void component
00057 (
00058     scalarField& sf,
00059     const UList<scalar>& f,
00060     const direction
00061 );
00062 
00063 template<>
00064 void scalarField::replace(const direction, const UList<scalar>& sf);
00065 
00066 template<>
00067 void scalarField::replace(const direction, const scalar& s);
00068 
00069 
00070 void stabilise(scalarField& Res, const UList<scalar>& sf, const scalar s);
00071 tmp<scalarField> stabilise(const UList<scalar>&, const scalar s);
00072 tmp<scalarField> stabilise(const tmp<scalarField>&, const scalar s);
00073 
00074 
00075 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00076 
00077 BINARY_TYPE_OPERATOR(scalar, scalar, scalar, +, add)
00078 BINARY_TYPE_OPERATOR(scalar, scalar, scalar, -, subtract)
00079 
00080 BINARY_OPERATOR(scalar, scalar, scalar, *, multiply)
00081 BINARY_OPERATOR(scalar, scalar, scalar, /, divide)
00082 
00083 BINARY_TYPE_OPERATOR_SF(scalar, scalar, scalar, /, divide)
00084 
00085 BINARY_FUNCTION(scalar, scalar, scalar, pow)
00086 BINARY_TYPE_FUNCTION(scalar, scalar, scalar, pow)
00087 
00088 BINARY_FUNCTION(scalar, scalar, scalar, atan2)
00089 BINARY_TYPE_FUNCTION(scalar, scalar, scalar, atan2)
00090 
00091 
00092 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00093 
00094 UNARY_FUNCTION(scalar, scalar, pow3)
00095 UNARY_FUNCTION(scalar, scalar, pow4)
00096 UNARY_FUNCTION(scalar, scalar, pow5)
00097 UNARY_FUNCTION(scalar, scalar, pow6)
00098 UNARY_FUNCTION(scalar, scalar, sqrt)
00099 UNARY_FUNCTION(scalar, scalar, sign)
00100 UNARY_FUNCTION(scalar, scalar, pos)
00101 UNARY_FUNCTION(scalar, scalar, neg)
00102 UNARY_FUNCTION(scalar, scalar, exp)
00103 UNARY_FUNCTION(scalar, scalar, log)
00104 UNARY_FUNCTION(scalar, scalar, log10)
00105 UNARY_FUNCTION(scalar, scalar, sin)
00106 UNARY_FUNCTION(scalar, scalar, cos)
00107 UNARY_FUNCTION(scalar, scalar, tan)
00108 UNARY_FUNCTION(scalar, scalar, asin)
00109 UNARY_FUNCTION(scalar, scalar, acos)
00110 UNARY_FUNCTION(scalar, scalar, atan)
00111 UNARY_FUNCTION(scalar, scalar, sinh)
00112 UNARY_FUNCTION(scalar, scalar, cosh)
00113 UNARY_FUNCTION(scalar, scalar, tanh)
00114 UNARY_FUNCTION(scalar, scalar, asinh)
00115 UNARY_FUNCTION(scalar, scalar, acosh)
00116 UNARY_FUNCTION(scalar, scalar, atanh)
00117 UNARY_FUNCTION(scalar, scalar, erf)
00118 UNARY_FUNCTION(scalar, scalar, erfc)
00119 UNARY_FUNCTION(scalar, scalar, lgamma)
00120 UNARY_FUNCTION(scalar, scalar, j0)
00121 UNARY_FUNCTION(scalar, scalar, j1)
00122 UNARY_FUNCTION(scalar, scalar, y0)
00123 UNARY_FUNCTION(scalar, scalar, y1)
00124 
00125 
00126 #define BesselFunc(func)                                            \
00127 void func(scalarField& Res, const int n, const UList<scalar>& sf);  \
00128 tmp<scalarField> func(const int n, const UList<scalar>&);           \
00129 tmp<scalarField> func(const int n, const tmp<scalarField>&);
00130 
00131 BesselFunc(jn)
00132 BesselFunc(yn)
00133 
00134 #undef BesselFunc
00135 
00136 
00137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00138 
00139 } // End namespace Foam
00140 
00141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00142 
00143 #include <OpenFOAM/undefFieldFunctionsM.H>
00144 
00145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00146 
00147 #endif
00148 
00149 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines