OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

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-2009 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 the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     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, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 Typedef
00026     Foam::scalarField
00027 
00028 Description
00029     Specialisation of Field<T> for scalar.
00030 
00031 SourceFiles
00032     scalarField.C
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef scalarField_H
00037 #define scalarField_H
00038 
00039 #include "Field.H"
00040 #include "scalar.H"
00041 
00042 #define TEMPLATE
00043 #include "FieldFunctionsM.H"
00044 
00045 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00046 
00047 namespace Foam
00048 {
00049 
00050 typedef Field<scalar> scalarField;
00051 
00052 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00053 
00054 template<>
00055 tmp<scalarField> scalarField::component(const direction) const;
00056 
00057 void component
00058 (
00059     scalarField& sf,
00060     const UList<scalar>& f,
00061     const direction
00062 );
00063 
00064 template<>
00065 void scalarField::replace(const direction, const UList<scalar>& sf);
00066 
00067 template<>
00068 void scalarField::replace(const direction, const scalar& s);
00069 
00070 
00071 void stabilise(scalarField& Res, const UList<scalar>& sf, const scalar s);
00072 tmp<scalarField> stabilise(const UList<scalar>&, const scalar s);
00073 tmp<scalarField> stabilise(const tmp<scalarField>&, const scalar s);
00074 
00075 
00076 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00077 
00078 BINARY_TYPE_OPERATOR(scalar, scalar, scalar, +, add)
00079 BINARY_TYPE_OPERATOR(scalar, scalar, scalar, -, subtract)
00080 
00081 BINARY_OPERATOR(scalar, scalar, scalar, *, multiply)
00082 BINARY_OPERATOR(scalar, scalar, scalar, /, divide)
00083 
00084 BINARY_TYPE_OPERATOR_SF(scalar, scalar, scalar, /, divide)
00085 
00086 BINARY_FUNCTION(scalar, scalar, scalar, pow)
00087 BINARY_TYPE_FUNCTION(scalar, scalar, scalar, pow)
00088 
00089 BINARY_FUNCTION(scalar, scalar, scalar, atan2)
00090 BINARY_TYPE_FUNCTION(scalar, scalar, scalar, atan2)
00091 
00092 
00093 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00094 
00095 UNARY_FUNCTION(scalar, scalar, pow3)
00096 UNARY_FUNCTION(scalar, scalar, pow4)
00097 UNARY_FUNCTION(scalar, scalar, pow5)
00098 UNARY_FUNCTION(scalar, scalar, pow6)
00099 UNARY_FUNCTION(scalar, scalar, sqrt)
00100 UNARY_FUNCTION(scalar, scalar, sign)
00101 UNARY_FUNCTION(scalar, scalar, pos)
00102 UNARY_FUNCTION(scalar, scalar, neg)
00103 UNARY_FUNCTION(scalar, scalar, exp)
00104 UNARY_FUNCTION(scalar, scalar, log)
00105 UNARY_FUNCTION(scalar, scalar, log10)
00106 UNARY_FUNCTION(scalar, scalar, sin)
00107 UNARY_FUNCTION(scalar, scalar, cos)
00108 UNARY_FUNCTION(scalar, scalar, tan)
00109 UNARY_FUNCTION(scalar, scalar, asin)
00110 UNARY_FUNCTION(scalar, scalar, acos)
00111 UNARY_FUNCTION(scalar, scalar, atan)
00112 UNARY_FUNCTION(scalar, scalar, sinh)
00113 UNARY_FUNCTION(scalar, scalar, cosh)
00114 UNARY_FUNCTION(scalar, scalar, tanh)
00115 UNARY_FUNCTION(scalar, scalar, asinh)
00116 UNARY_FUNCTION(scalar, scalar, acosh)
00117 UNARY_FUNCTION(scalar, scalar, atanh)
00118 UNARY_FUNCTION(scalar, scalar, erf)
00119 UNARY_FUNCTION(scalar, scalar, erfc)
00120 UNARY_FUNCTION(scalar, scalar, lgamma)
00121 UNARY_FUNCTION(scalar, scalar, j0)
00122 UNARY_FUNCTION(scalar, scalar, j1)
00123 UNARY_FUNCTION(scalar, scalar, y0)
00124 UNARY_FUNCTION(scalar, scalar, y1)
00125 
00126 
00127 #define BesselFunc(func)                                            \
00128 void func(scalarField& Res, const int n, const UList<scalar>& sf);  \
00129 tmp<scalarField> func(const int n, const UList<scalar>&);           \
00130 tmp<scalarField> func(const int n, const tmp<scalarField>&);
00131 
00132 BesselFunc(jn)
00133 BesselFunc(yn)
00134 
00135 #undef BesselFunc
00136 
00137 
00138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00139 
00140 } // End namespace Foam
00141 
00142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00143 
00144 #include "undefFieldFunctionsM.H"
00145 
00146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00147 
00148 #endif
00149 
00150 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd