OpenFOAM logo
Open Source CFD Toolkit

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-2005 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 Class
00026     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 #include "FieldFunctionsM.H"
00042 
00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00044 
00045 namespace Foam
00046 {
00047 
00048 typedef Field<scalar> scalarField;
00049 
00050 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00051 
00052 template<>
00053 tmp<scalarField> scalarField::component(const direction) const;
00054 
00055 void component
00056 (
00057     scalarField& sf,
00058     const UList<scalar>& f,
00059     const direction
00060 );
00061 
00062 template<>
00063 void scalarField::replace(const direction, const UList<scalar>& sf);
00064 
00065 
00066 void stabilise(scalarField& Res, const UList<scalar>& sf, const scalar s);
00067 tmp<scalarField> stabilise(const UList<scalar>&, const scalar s);
00068 tmp<scalarField> stabilise(const tmp<scalarField>&, const scalar s);
00069 
00070 
00071 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00072 
00073 BINARY_TYPE_OPERATOR_RR(scalar, scalar, scalar, +, add)
00074 BINARY_TYPE_OPERATOR_RR(scalar, scalar, scalar, -, subtract)
00075 
00076 BINARY_OPERATOR_RR(scalar, scalar, scalar, *, multiply)
00077 BINARY_OPERATOR_RR(scalar, scalar, scalar, /, divide)
00078 
00079 BINARY_TYPE_OPERATOR_SF(scalar, scalar, scalar, /, divide)
00080 BINARY_TYPE_OPERATOR_SR(scalar, scalar, scalar, /, divide)
00081 
00082 BINARY_FUNCTION_RR(scalar, scalar, scalar, pow)
00083 BINARY_TYPE_FUNCTION_RR(scalar, scalar, scalar, pow)
00084 
00085 BINARY_FUNCTION_RR(scalar, scalar, scalar, atan2)
00086 BINARY_TYPE_FUNCTION_RR(scalar, scalar, scalar, atan2)
00087 
00088 
00089 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00090 
00091 UNARY_FUNCTION_R(scalar, scalar, pow3)
00092 UNARY_FUNCTION_R(scalar, scalar, pow4)
00093 UNARY_FUNCTION_R(scalar, scalar, sqrt)
00094 UNARY_FUNCTION_R(scalar, scalar, sign)
00095 UNARY_FUNCTION_R(scalar, scalar, pos)
00096 UNARY_FUNCTION_R(scalar, scalar, neg)
00097 UNARY_FUNCTION_R(scalar, scalar, exp)
00098 UNARY_FUNCTION_R(scalar, scalar, log)
00099 UNARY_FUNCTION_R(scalar, scalar, log10)
00100 UNARY_FUNCTION_R(scalar, scalar, sin)
00101 UNARY_FUNCTION_R(scalar, scalar, cos)
00102 UNARY_FUNCTION_R(scalar, scalar, tan)
00103 UNARY_FUNCTION_R(scalar, scalar, asin)
00104 UNARY_FUNCTION_R(scalar, scalar, acos)
00105 UNARY_FUNCTION_R(scalar, scalar, atan)
00106 UNARY_FUNCTION_R(scalar, scalar, sinh)
00107 UNARY_FUNCTION_R(scalar, scalar, cosh)
00108 UNARY_FUNCTION_R(scalar, scalar, tanh)
00109 UNARY_FUNCTION_R(scalar, scalar, asinh)
00110 UNARY_FUNCTION_R(scalar, scalar, acosh)
00111 UNARY_FUNCTION_R(scalar, scalar, atanh)
00112 UNARY_FUNCTION_R(scalar, scalar, erf)
00113 UNARY_FUNCTION_R(scalar, scalar, erfc)
00114 UNARY_FUNCTION_R(scalar, scalar, lgamma)
00115 UNARY_FUNCTION_R(scalar, scalar, j0)
00116 UNARY_FUNCTION_R(scalar, scalar, j1)
00117 UNARY_FUNCTION_R(scalar, scalar, y0)
00118 UNARY_FUNCTION_R(scalar, scalar, y1)
00119 
00120 
00121 #define BesselFunc(func)                                            \
00122 void func(scalarField& Res, const int n, const UList<scalar>& sf);  \
00123 tmp<scalarField> func(const int n, const UList<scalar>&);           \
00124 tmp<scalarField> func(const int n, const tmp<scalarField>&);
00125 
00126 BesselFunc(jn)
00127 BesselFunc(yn)
00128 
00129 #undef BesselFunc
00130 
00131 
00132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00133 
00134 } // End namespace Foam
00135 
00136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00137 
00138 #include "undefFieldFunctionsM.H"
00139 
00140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00141 
00142 #endif
00143 
00144 // ************************************************************************* //
For further information go to www.openfoam.org