/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see .
\*---------------------------------------------------------------------------*/
namespace Foam
{
/* * * * * * * * * * * * * * * * Global functions * * * * * * * * * * * * * */
template
inline void component
(
pointPatchField::cmptType>& sf,
const pointPatchField& f,
const direction d
)
{}
template
inline void T
(
pointPatchField& f1,
const pointPatchField& f2
)
{}
template
inline void pow
(
Field::type>& f,
const pointPatchField& vf
)
{}
template
inline void sqr
(
Field::type>& f,
const pointPatchField& vf
)
{}
template
inline void magSqr
(
pointPatchField& sf,
const pointPatchField& f
)
{}
template
inline void mag
(
pointPatchField& sf,
const pointPatchField& f
)
{}
template
inline void cmptAv
(
pointPatchField::cmptType>& cf,
const pointPatchField& f
)
{}
template
inline void cmptMag
(
pointPatchField& cf,
const pointPatchField& f
)
{}
#define BINARY_FUNCTION(func) \
\
template \
inline void func \
( \
pointPatchField& f, \
const pointPatchField& f1, \
const pointPatchField& f2 \
) \
{} \
\
template \
inline void func \
( \
pointPatchField& f, \
const pointPatchField& f1, \
const Type& s \
) \
{}
BINARY_FUNCTION(max)
BINARY_FUNCTION(min)
BINARY_FUNCTION(cmptMultiply)
BINARY_FUNCTION(cmptDivide)
/* * * * * * * * * * * * * * * * Global operators * * * * * * * * * * * * * */
#define UNARY_OPERATOR(op, opFunc) \
\
template \
inline void opFunc \
( \
pointPatchField& f, \
const pointPatchField& f1 \
) \
{}
UNARY_OPERATOR(-, negate)
#define BINARY_OPERATOR(Type1, Type2, op, opFunc) \
\
template \
inline void opFunc \
( \
pointPatchField& f, \
const pointPatchField& f1, \
const pointPatchField& f2 \
) \
{}
BINARY_OPERATOR(scalar, Type, *, multiply)
BINARY_OPERATOR(Type, scalar, *, multiply)
BINARY_OPERATOR(Type, scalar, /, divide)
#define BINARY_TYPE_OPERATOR_SF(TYPE, op, opFunc) \
\
template \
inline void opFunc \
( \
pointPatchField& f, \
const TYPE& s, \
const pointPatchField& f1 \
) \
{}
#define BINARY_TYPE_OPERATOR_FS(TYPE, op, opFunc) \
\
template \
inline void opFunc \
( \
pointPatchField& f, \
const pointPatchField& f1, \
const TYPE& s \
) \
{}
BINARY_TYPE_OPERATOR_SF(scalar, *, multiply)
BINARY_TYPE_OPERATOR_FS(scalar, *, multiply)
BINARY_TYPE_OPERATOR_FS(scalar, /, divide)
#define PRODUCT_OPERATOR(product, op, opFunc) \
\
template \
< \
class Type1, \
class Type2 \
> \
inline void opFunc \
( \
pointPatchField \
::type>& f, \
const pointPatchField& f1, \
const pointPatchField& f2 \
) \
{} \
\
template \
< \
class Type, \
class Form, \
class Cmpt, \
int nCmpt \
> \
inline void opFunc \
( \
pointPatchField \
::type>& f, \
const pointPatchField& f1, \
const VectorSpace