src/finiteVolume/interpolation: Modified code to conform to OpenFOAM coding standards

declaring the namespace in function definitions in C files
This commit is contained in:
Henry Weller 2015-12-09 22:23:38 +00:00
parent fc98b1f6dc
commit d1941723db
16 changed files with 152 additions and 322 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -28,15 +28,10 @@ License
#include "polyMesh.H"
#include "calculatedPointPatchFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * //
template<class Type>
interpolation<Type>::interpolation
Foam::interpolation<Type>::interpolation
(
const GeometricField<Type, fvPatchField, volMesh>& psi
)
@ -52,10 +47,6 @@ interpolation<Type>::interpolation
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
# include "interpolationNew.C"
#include "interpolationNew.C"
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -26,15 +26,10 @@ License
#include "interpolationCell.H"
#include "volFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * //
template<class Type>
interpolationCell<Type>::interpolationCell
Foam::interpolationCell<Type>::interpolationCell
(
const GeometricField<Type, fvPatchField, volMesh>& psi
)
@ -46,7 +41,7 @@ interpolationCell<Type>::interpolationCell
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type>
Type interpolationCell<Type>::interpolate
Type Foam::interpolationCell<Type>::interpolate
(
const vector&,
const label cellI,
@ -57,8 +52,4 @@ Type interpolationCell<Type>::interpolate
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -29,13 +29,7 @@ License
namespace Foam
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makeInterpolation(interpolationCell);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
makeInterpolation(interpolationCell);
}
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -26,15 +26,10 @@ License
#include "interpolationCellPatchConstrained.H"
#include "volFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * //
template<class Type>
interpolationCellPatchConstrained<Type>::interpolationCellPatchConstrained
Foam::interpolationCellPatchConstrained<Type>::interpolationCellPatchConstrained
(
const GeometricField<Type, fvPatchField, volMesh>& psi
)
@ -46,7 +41,7 @@ interpolationCellPatchConstrained<Type>::interpolationCellPatchConstrained
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type>
Type interpolationCellPatchConstrained<Type>::interpolate
Type Foam::interpolationCellPatchConstrained<Type>::interpolate
(
const vector& pt,
const label cellI,
@ -69,8 +64,4 @@ Type interpolationCellPatchConstrained<Type>::interpolate
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -29,13 +29,7 @@ License
namespace Foam
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makeInterpolation(interpolationCellPatchConstrained);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
makeInterpolation(interpolationCellPatchConstrained);
}
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -31,15 +31,10 @@ License
#include "findCellPointFaceTet.H"
#include "findCellPointFaceTriangle.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * //
template<class Type>
interpolationCellPointFace<Type>::interpolationCellPointFace
Foam::interpolationCellPointFace<Type>::interpolationCellPointFace
(
const GeometricField<Type, fvPatchField, volMesh>& psi
)
@ -61,7 +56,7 @@ interpolationCellPointFace<Type>::interpolationCellPointFace
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type>
Type interpolationCellPointFace<Type>::interpolate
Type Foam::interpolationCellPointFace<Type>::interpolate
(
const vector& position,
const label cellI,
@ -258,8 +253,7 @@ Type interpolationCellPointFace<Type>::interpolate
}
else
{
Info<< "interpolationCellPointFace<Type>::interpolate"
<< "(const vector&, const label cellI) const : "
InfoInFunction
<< "search failed; using closest cellFace value" << endl
<< "cell number " << cellI << tab
<< "position " << position << endl;
@ -363,8 +357,4 @@ Type interpolationCellPointFace<Type>::interpolate
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -29,13 +29,7 @@ License
namespace Foam
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makeInterpolation(interpolationCellPointFace);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
makeInterpolation(interpolationCellPointFace);
}
// ************************************************************************* //

View File

@ -27,16 +27,9 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace limitFuncs
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
template<class Type>
inline tmp<volScalarField> magSqr<Type>::operator()
inline Foam::tmp<Foam::volScalarField>
Foam::limitFuncs::magSqr<Type>::operator()
(
const GeometricField<Type, fvPatchField, volMesh>& phi
) const
@ -46,7 +39,8 @@ inline tmp<volScalarField> magSqr<Type>::operator()
template<>
inline tmp<volScalarField> magSqr<scalar>::operator()
inline Foam::tmp<Foam::volScalarField>
Foam::limitFuncs::magSqr<Foam::scalar>::operator()
(
const volScalarField& phi
) const
@ -56,7 +50,8 @@ inline tmp<volScalarField> magSqr<scalar>::operator()
template<>
inline tmp<volScalarField> magSqr<symmTensor>::operator()
inline Foam::tmp<Foam::volScalarField>
Foam::limitFuncs::magSqr<Foam::symmTensor>::operator()
(
const volSymmTensorField& phi
) const
@ -66,7 +61,8 @@ inline tmp<volScalarField> magSqr<symmTensor>::operator()
template<>
inline tmp<volScalarField> magSqr<tensor>::operator()
inline Foam::tmp<Foam::volScalarField>
Foam::limitFuncs::magSqr<Foam::tensor>::operator()
(
const volTensorField& phi
) const
@ -76,7 +72,8 @@ inline tmp<volScalarField> magSqr<tensor>::operator()
template<class Type>
inline tmp<volScalarField> rhoMagSqr<Type>::operator()
inline Foam::tmp<Foam::volScalarField>
Foam::limitFuncs::rhoMagSqr<Type>::operator()
(
const GeometricField<Type, fvPatchField, volMesh>& phi
) const
@ -88,7 +85,8 @@ inline tmp<volScalarField> rhoMagSqr<Type>::operator()
template<>
inline tmp<volScalarField> rhoMagSqr<scalar>::operator()
inline Foam::tmp<Foam::volScalarField>
Foam::limitFuncs::rhoMagSqr<Foam::scalar>::operator()
(
const volScalarField& phi
) const
@ -99,9 +97,4 @@ inline tmp<volScalarField> rhoMagSqr<scalar>::operator()
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace limitFuncs
} // End namespace Foam
// ************************************************************************* //

View File

@ -28,16 +28,11 @@ License
#include "surfaceFields.H"
#include "coupledFvPatchField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
template<class Type>
tmp<limitedSurfaceInterpolationScheme<Type> >
limitedSurfaceInterpolationScheme<Type>::New
Foam::tmp<Foam::limitedSurfaceInterpolationScheme<Type> >
Foam::limitedSurfaceInterpolationScheme<Type>::New
(
const fvMesh& mesh,
Istream& schemeData
@ -84,10 +79,9 @@ limitedSurfaceInterpolationScheme<Type>::New
}
// Return weighting factors for scheme given by name in dictionary
template<class Type>
tmp<limitedSurfaceInterpolationScheme<Type> >
limitedSurfaceInterpolationScheme<Type>::New
Foam::tmp<Foam::limitedSurfaceInterpolationScheme<Type> >
Foam::limitedSurfaceInterpolationScheme<Type>::New
(
const fvMesh& mesh,
const surfaceScalarField& faceFlux,
@ -138,14 +132,16 @@ limitedSurfaceInterpolationScheme<Type>::New
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class Type>
limitedSurfaceInterpolationScheme<Type>::~limitedSurfaceInterpolationScheme()
Foam::limitedSurfaceInterpolationScheme<Type>::
~limitedSurfaceInterpolationScheme()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type>
tmp<surfaceScalarField> limitedSurfaceInterpolationScheme<Type>::weights
Foam::tmp<Foam::surfaceScalarField>
Foam::limitedSurfaceInterpolationScheme<Type>::weights
(
const GeometricField<Type, fvPatchField, volMesh>& phi,
const surfaceScalarField& CDweights,
@ -187,7 +183,8 @@ tmp<surfaceScalarField> limitedSurfaceInterpolationScheme<Type>::weights
}
template<class Type>
tmp<surfaceScalarField> limitedSurfaceInterpolationScheme<Type>::weights
Foam::tmp<Foam::surfaceScalarField>
Foam::limitedSurfaceInterpolationScheme<Type>::weights
(
const GeometricField<Type, fvPatchField, volMesh>& phi
) const
@ -201,8 +198,8 @@ tmp<surfaceScalarField> limitedSurfaceInterpolationScheme<Type>::weights
}
template<class Type>
tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
limitedSurfaceInterpolationScheme<Type>::flux
Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh> >
Foam::limitedSurfaceInterpolationScheme<Type>::flux
(
const GeometricField<Type, fvPatchField, volMesh>& phi
) const
@ -211,8 +208,4 @@ limitedSurfaceInterpolationScheme<Type>::flux
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -31,16 +31,11 @@ Description
#include "volFields.H"
#include "surfaceFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
//- Construct from face-flux field and coefficient
template<class Type>
multivariateSurfaceInterpolationScheme<Type>::
Foam::multivariateSurfaceInterpolationScheme<Type>::
multivariateSurfaceInterpolationScheme
(
const fvMesh& mesh,
@ -56,10 +51,9 @@ multivariateSurfaceInterpolationScheme
// * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
// Return weighting factors for scheme given by name in dictionary
template<class Type>
tmp<multivariateSurfaceInterpolationScheme<Type> >
multivariateSurfaceInterpolationScheme<Type>::New
Foam::tmp<Foam::multivariateSurfaceInterpolationScheme<Type> >
Foam::multivariateSurfaceInterpolationScheme<Type>::New
(
const fvMesh& mesh,
const multivariateSurfaceInterpolationScheme<Type>::fieldTable& vtfs,
@ -99,13 +93,9 @@ multivariateSurfaceInterpolationScheme<Type>::New
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class Type>
multivariateSurfaceInterpolationScheme<Type>::
Foam::multivariateSurfaceInterpolationScheme<Type>::
~multivariateSurfaceInterpolationScheme()
{}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -27,19 +27,9 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace fvc
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Return weighting factors for scheme given by name in dictionary
template<class Type>
tmp<surfaceInterpolationScheme<Type> > scheme
Foam::tmp<Foam::surfaceInterpolationScheme<Type> >
Foam::fvc::scheme
(
const surfaceScalarField& faceFlux,
Istream& streamData
@ -54,9 +44,8 @@ tmp<surfaceInterpolationScheme<Type> > scheme
}
// Return weighting factors for scheme given by name in dictionary
template<class Type>
tmp<surfaceInterpolationScheme<Type> > scheme
Foam::tmp<Foam::surfaceInterpolationScheme<Type> > Foam::fvc::scheme
(
const surfaceScalarField& faceFlux,
const word& name
@ -71,9 +60,8 @@ tmp<surfaceInterpolationScheme<Type> > scheme
}
// Return weighting factors for scheme given by name in dictionary
template<class Type>
tmp<surfaceInterpolationScheme<Type> > scheme
Foam::tmp<Foam::surfaceInterpolationScheme<Type> > Foam::fvc::scheme
(
const fvMesh& mesh,
Istream& streamData
@ -87,9 +75,8 @@ tmp<surfaceInterpolationScheme<Type> > scheme
}
// Return weighting factors for scheme given by name in dictionary
template<class Type>
tmp<surfaceInterpolationScheme<Type> > scheme
Foam::tmp<Foam::surfaceInterpolationScheme<Type> > Foam::fvc::scheme
(
const fvMesh& mesh,
const word& name
@ -103,10 +90,9 @@ tmp<surfaceInterpolationScheme<Type> > scheme
}
// Interpolate field onto faces using scheme given by name in dictionary
template<class Type>
tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
interpolate
Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh> >
Foam::fvc::interpolate
(
const GeometricField<Type, fvPatchField, volMesh>& vf,
const surfaceScalarField& faceFlux,
@ -115,21 +101,18 @@ interpolate
{
if (surfaceInterpolation::debug)
{
Info<< "interpolate"
<< "(const GeometricField<Type, fvPatchField, volMesh>&, "
<< "const surfaceScalarField&, Istream&) : "
InfoInFunction
<< "interpolating GeometricField<Type, fvPatchField, volMesh> "
<< endl;
<< vf.name() << endl;
}
return scheme<Type>(faceFlux, schemeData)().interpolate(vf);
}
// Interpolate field onto faces using scheme given by name in dictionary
template<class Type>
tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
interpolate
Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh> >
Foam::fvc::interpolate
(
const GeometricField<Type, fvPatchField, volMesh>& vf,
const surfaceScalarField& faceFlux,
@ -138,21 +121,17 @@ interpolate
{
if (surfaceInterpolation::debug)
{
Info<< "interpolate"
<< "(const GeometricField<Type, fvPatchField, volMesh>&, "
<< "const surfaceScalarField&, const word&) : "
InfoInFunction
<< "interpolating GeometricField<Type, fvPatchField, volMesh> "
<< "using " << name
<< endl;
<< vf.name() << " using " << name << endl;
}
return scheme<Type>(faceFlux, name)().interpolate(vf);
}
// Interpolate field onto faces using scheme given by name in dictionary
template<class Type>
tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
interpolate
Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh> >
Foam::fvc::interpolate
(
const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf,
const surfaceScalarField& faceFlux,
@ -167,10 +146,9 @@ interpolate
return tsf;
}
// Interpolate field onto faces using scheme given by name in dictionary
template<class Type>
tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
interpolate
Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh> >
Foam::fvc::interpolate
(
const GeometricField<Type, fvPatchField, volMesh>& vf,
const tmp<surfaceScalarField>& tFaceFlux,
@ -185,10 +163,9 @@ interpolate
return tsf;
}
// Interpolate field onto faces using scheme given by name in dictionary
template<class Type>
tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
interpolate
Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh> >
Foam::fvc::interpolate
(
const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf,
const tmp<surfaceScalarField>& tFaceFlux,
@ -205,10 +182,9 @@ interpolate
}
// Interpolate field onto faces using scheme given by name in dictionary
template<class Type>
tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
interpolate
Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh> >
Foam::fvc::interpolate
(
const GeometricField<Type, fvPatchField, volMesh>& vf,
Istream& schemeData
@ -216,20 +192,17 @@ interpolate
{
if (surfaceInterpolation::debug)
{
Info<< "interpolate"
<< "(const GeometricField<Type, fvPatchField, volMesh>&, "
<< "Istream&) : "
InfoInFunction
<< "interpolating GeometricField<Type, fvPatchField, volMesh> "
<< endl;
<< vf.name() << endl;
}
return scheme<Type>(vf.mesh(), schemeData)().interpolate(vf);
}
// Interpolate field onto faces using scheme given by name in dictionary
template<class Type>
tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
interpolate
Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh> >
Foam::fvc::interpolate
(
const GeometricField<Type, fvPatchField, volMesh>& vf,
const word& name
@ -237,21 +210,18 @@ interpolate
{
if (surfaceInterpolation::debug)
{
Info<< "interpolate"
<< "(const GeometricField<Type, fvPatchField, volMesh>&, "
<< "const word&) : "
InfoInFunction
<< "interpolating GeometricField<Type, fvPatchField, volMesh> "
<< "using " << name
<< vf.name() << " using " << name
<< endl;
}
return scheme<Type>(vf.mesh(), name)().interpolate(vf);
}
// Interpolate field onto faces using scheme given by name in dictionary
template<class Type>
tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
interpolate
Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh> >
Foam::fvc::interpolate
(
const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf,
const word& name
@ -266,20 +236,18 @@ interpolate
}
// Interpolate field onto faces using central differencing
template<class Type>
tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
interpolate
Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh> >
Foam::fvc::interpolate
(
const GeometricField<Type, fvPatchField, volMesh>& vf
)
{
if (surfaceInterpolation::debug)
{
Info<< "interpolate"
<< "(const GeometricField<Type, fvPatchField, volMesh>&) : "
InfoInFunction
<< "interpolating GeometricField<Type, fvPatchField, volMesh> "
<< "using run-time selected scheme"
<< vf.name() << " using run-time selected scheme"
<< endl;
}
@ -287,10 +255,9 @@ interpolate
}
// Interpolate field onto faces using central differencing
template<class Type>
tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
interpolate
Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh> >
Foam::fvc::interpolate
(
const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf
)
@ -303,7 +270,8 @@ interpolate
template<class Type>
tmp<FieldField<fvsPatchField, Type> > interpolate
Foam::tmp<Foam::FieldField<Foam::fvsPatchField, Type> >
Foam::fvc::interpolate
(
const FieldField<fvPatchField, Type>& fvpff
)
@ -328,7 +296,8 @@ tmp<FieldField<fvsPatchField, Type> > interpolate
template<class Type>
tmp<FieldField<fvsPatchField, Type> > interpolate
Foam::tmp<Foam::FieldField<Foam::fvsPatchField, Type> >
Foam::fvc::interpolate
(
const tmp<FieldField<fvPatchField, Type> >& tfvpff
)
@ -339,12 +308,4 @@ tmp<FieldField<fvsPatchField, Type> > interpolate
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace fvc
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -21,9 +21,6 @@ License
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Description
Abstract base class for surface interpolation schemes.
\*---------------------------------------------------------------------------*/
#include "surfaceInterpolationScheme.H"
@ -31,16 +28,11 @@ Description
#include "surfaceFields.H"
#include "coupledFvPatchField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
// Return weighting factors for scheme given by name in dictionary
template<class Type>
tmp<surfaceInterpolationScheme<Type> > surfaceInterpolationScheme<Type>::New
Foam::tmp<Foam::surfaceInterpolationScheme<Type> >
Foam::surfaceInterpolationScheme<Type>::New
(
const fvMesh& mesh,
Istream& schemeData
@ -64,7 +56,7 @@ tmp<surfaceInterpolationScheme<Type> > surfaceInterpolationScheme<Type>::New
{
Info<< "surfaceInterpolationScheme<Type>::New"
"(const fvMesh&, Istream&)"
" : discretisation scheme = "
" : discretisation scheme === "
<< schemeName
<< endl;
}
@ -88,9 +80,9 @@ tmp<surfaceInterpolationScheme<Type> > surfaceInterpolationScheme<Type>::New
}
// Return weighting factors for scheme given by name in dictionary
template<class Type>
tmp<surfaceInterpolationScheme<Type> > surfaceInterpolationScheme<Type>::New
Foam::tmp<Foam::surfaceInterpolationScheme<Type> >
Foam::surfaceInterpolationScheme<Type>::New
(
const fvMesh& mesh,
const surfaceScalarField& faceFlux,
@ -142,17 +134,15 @@ tmp<surfaceInterpolationScheme<Type> > surfaceInterpolationScheme<Type>::New
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class Type>
surfaceInterpolationScheme<Type>::~surfaceInterpolationScheme()
Foam::surfaceInterpolationScheme<Type>::~surfaceInterpolationScheme()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
//- Return the face-interpolate of the given cell field
// with the given owner and neighbour weighting factors
template<class Type>
tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
surfaceInterpolationScheme<Type>::interpolate
Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh> >
Foam::surfaceInterpolationScheme<Type>::interpolate
(
const GeometricField<Type, fvPatchField, volMesh>& vf,
const tmp<surfaceScalarField>& tlambdas,
@ -234,11 +224,9 @@ surfaceInterpolationScheme<Type>::interpolate
}
//- Return the face-interpolate of the given cell field
// with the given weighting factors
template<class Type>
tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
surfaceInterpolationScheme<Type>::interpolate
Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh> >
Foam::surfaceInterpolationScheme<Type>::interpolate
(
const GeometricField<Type, fvPatchField, volMesh>& vf,
const tmp<surfaceScalarField>& tlambdas
@ -313,11 +301,9 @@ surfaceInterpolationScheme<Type>::interpolate
}
//- Return the face-interpolate of the given cell field
// with explicit correction
template<class Type>
tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
surfaceInterpolationScheme<Type>::interpolate
Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh> >
Foam::surfaceInterpolationScheme<Type>::interpolate
(
const GeometricField<Type, fvPatchField, volMesh>& vf
) const
@ -345,11 +331,9 @@ surfaceInterpolationScheme<Type>::interpolate
}
//- Return the face-interpolate of the given cell field
// with explicit correction
template<class Type>
tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
surfaceInterpolationScheme<Type>::interpolate
Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh> >
Foam::surfaceInterpolationScheme<Type>::interpolate
(
const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf
) const
@ -361,8 +345,4 @@ surfaceInterpolationScheme<Type>::interpolate
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -30,19 +30,17 @@ License
#include "globalMeshData.H"
#include "twoDPointCorrector.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineTypeNameAndDebug(pointConstraints, 0);
defineTypeNameAndDebug(pointConstraints, 0);
}
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
void pointConstraints::makePatchPatchAddressing()
void Foam::pointConstraints::makePatchPatchAddressing()
{
if (debug)
{
@ -325,7 +323,7 @@ void pointConstraints::makePatchPatchAddressing()
// * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * //
pointConstraints::pointConstraints(const pointMesh& pm)
Foam::pointConstraints::pointConstraints(const pointMesh& pm)
:
MeshObject<pointMesh, Foam::UpdateableMeshObject, pointConstraints>(pm)
{
@ -342,7 +340,7 @@ pointConstraints::pointConstraints(const pointMesh& pm)
// * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * * //
pointConstraints::~pointConstraints()
Foam::pointConstraints::~pointConstraints()
{
if (debug)
{
@ -353,19 +351,19 @@ pointConstraints::~pointConstraints()
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void pointConstraints::updateMesh(const mapPolyMesh&)
void Foam::pointConstraints::updateMesh(const mapPolyMesh&)
{
makePatchPatchAddressing();
}
bool pointConstraints::movePoints()
bool Foam::pointConstraints::movePoints()
{
return true;
}
void pointConstraints::constrainDisplacement
void Foam::pointConstraints::constrainDisplacement
(
pointVectorField& pf,
const bool overrideFixedValue
@ -402,10 +400,8 @@ void pointConstraints::constrainDisplacement
}
// Specialisation of constrainCorners for scalars because
// no constraint need be applied
template<>
void pointConstraints::constrainCorners<scalar>
void Foam::pointConstraints::constrainCorners<Foam::scalar>
(
GeometricField<scalar, pointPatchField, pointMesh>& pf
) const
@ -413,15 +409,11 @@ void pointConstraints::constrainCorners<scalar>
template<>
void pointConstraints::constrainCorners<label>
void Foam::pointConstraints::constrainCorners<Foam::label>
(
GeometricField<label, pointPatchField, pointMesh>& pf
) const
{}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -29,13 +29,8 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
template<class Type, class CombineOp>
void pointConstraints::syncUntransformedData
void Foam::pointConstraints::syncUntransformedData
(
const polyMesh& mesh,
List<Type>& pointData,
@ -91,7 +86,7 @@ void pointConstraints::syncUntransformedData
template<class Type>
void pointConstraints::setPatchFields
void Foam::pointConstraints::setPatchFields
(
GeometricField<Type, pointPatchField, pointMesh>& pf
)
@ -110,7 +105,7 @@ void pointConstraints::setPatchFields
template<class Type>
void pointConstraints::constrainCorners
void Foam::pointConstraints::constrainCorners
(
GeometricField<Type, pointPatchField, pointMesh>& pf
) const
@ -127,7 +122,7 @@ void pointConstraints::constrainCorners
template<class Type>
void pointConstraints::constrain
void Foam::pointConstraints::constrain
(
GeometricField<Type, pointPatchField, pointMesh>& pf,
const bool overrideFixedValue
@ -151,8 +146,4 @@ void pointConstraints::constrain
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -32,13 +32,8 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
template<class Type>
void volPointInterpolation::pushUntransformedData
void Foam::volPointInterpolation::pushUntransformedData
(
List<Type>& pointData
) const
@ -81,7 +76,7 @@ void volPointInterpolation::pushUntransformedData
template<class Type>
void volPointInterpolation::addSeparated
void Foam::volPointInterpolation::addSeparated
(
GeometricField<Type, pointPatchField, pointMesh>& pf
) const
@ -123,7 +118,7 @@ void volPointInterpolation::addSeparated
template<class Type>
void volPointInterpolation::interpolateInternalField
void Foam::volPointInterpolation::interpolateInternalField
(
const GeometricField<Type, fvPatchField, volMesh>& vf,
GeometricField<Type, pointPatchField, pointMesh>& pf
@ -160,7 +155,7 @@ void volPointInterpolation::interpolateInternalField
template<class Type>
tmp<Field<Type> > volPointInterpolation::flatBoundaryField
Foam::tmp<Foam::Field<Type> > Foam::volPointInterpolation::flatBoundaryField
(
const GeometricField<Type, fvPatchField, volMesh>& vf
) const
@ -207,7 +202,7 @@ tmp<Field<Type> > volPointInterpolation::flatBoundaryField
template<class Type>
void volPointInterpolation::interpolateBoundaryField
void Foam::volPointInterpolation::interpolateBoundaryField
(
const GeometricField<Type, fvPatchField, volMesh>& vf,
GeometricField<Type, pointPatchField, pointMesh>& pf
@ -261,7 +256,7 @@ void volPointInterpolation::interpolateBoundaryField
template<class Type>
void volPointInterpolation::interpolateBoundaryField
void Foam::volPointInterpolation::interpolateBoundaryField
(
const GeometricField<Type, fvPatchField, volMesh>& vf,
GeometricField<Type, pointPatchField, pointMesh>& pf,
@ -278,7 +273,7 @@ void volPointInterpolation::interpolateBoundaryField
template<class Type>
void volPointInterpolation::interpolate
void Foam::volPointInterpolation::interpolate
(
const GeometricField<Type, fvPatchField, volMesh>& vf,
GeometricField<Type, pointPatchField, pointMesh>& pf
@ -301,8 +296,8 @@ void volPointInterpolation::interpolate
template<class Type>
tmp<GeometricField<Type, pointPatchField, pointMesh> >
volPointInterpolation::interpolate
Foam::tmp<Foam::GeometricField<Type, Foam::pointPatchField, Foam::pointMesh> >
Foam::volPointInterpolation::interpolate
(
const GeometricField<Type, fvPatchField, volMesh>& vf,
const wordList& patchFieldTypes
@ -337,8 +332,8 @@ volPointInterpolation::interpolate
template<class Type>
tmp<GeometricField<Type, pointPatchField, pointMesh> >
volPointInterpolation::interpolate
Foam::tmp<Foam::GeometricField<Type, Foam::pointPatchField, Foam::pointMesh> >
Foam::volPointInterpolation::interpolate
(
const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf,
const wordList& patchFieldTypes
@ -353,8 +348,8 @@ volPointInterpolation::interpolate
template<class Type>
tmp<GeometricField<Type, pointPatchField, pointMesh> >
volPointInterpolation::interpolate
Foam::tmp<Foam::GeometricField<Type, Foam::pointPatchField, Foam::pointMesh> >
Foam::volPointInterpolation::interpolate
(
const GeometricField<Type, fvPatchField, volMesh>& vf,
const word& name,
@ -448,8 +443,8 @@ volPointInterpolation::interpolate
template<class Type>
tmp<GeometricField<Type, pointPatchField, pointMesh> >
volPointInterpolation::interpolate
Foam::tmp<Foam::GeometricField<Type, Foam::pointPatchField, Foam::pointMesh> >
Foam::volPointInterpolation::interpolate
(
const GeometricField<Type, fvPatchField, volMesh>& vf
) const
@ -459,8 +454,8 @@ volPointInterpolation::interpolate
template<class Type>
tmp<GeometricField<Type, pointPatchField, pointMesh> >
volPointInterpolation::interpolate
Foam::tmp<Foam::GeometricField<Type, Foam::pointPatchField, Foam::pointMesh> >
Foam::volPointInterpolation::interpolate
(
const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf
) const
@ -473,8 +468,4 @@ volPointInterpolation::interpolate
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -31,19 +31,17 @@ License
#include "pointConstraints.H"
#include "surfaceFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineTypeNameAndDebug(volPointInterpolation, 0);
defineTypeNameAndDebug(volPointInterpolation, 0);
}
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
void volPointInterpolation::calcBoundaryAddressing()
void Foam::volPointInterpolation::calcBoundaryAddressing()
{
if (debug)
{
@ -154,7 +152,7 @@ void volPointInterpolation::calcBoundaryAddressing()
}
void volPointInterpolation::makeInternalWeights(scalarField& sumWeights)
void Foam::volPointInterpolation::makeInternalWeights(scalarField& sumWeights)
{
if (debug)
{
@ -194,7 +192,7 @@ void volPointInterpolation::makeInternalWeights(scalarField& sumWeights)
}
void volPointInterpolation::makeBoundaryWeights(scalarField& sumWeights)
void Foam::volPointInterpolation::makeBoundaryWeights(scalarField& sumWeights)
{
if (debug)
{
@ -242,7 +240,7 @@ void volPointInterpolation::makeBoundaryWeights(scalarField& sumWeights)
}
void volPointInterpolation::makeWeights()
void Foam::volPointInterpolation::makeWeights()
{
if (debug)
{
@ -348,7 +346,7 @@ void volPointInterpolation::makeWeights()
// * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * //
volPointInterpolation::volPointInterpolation(const fvMesh& vm)
Foam::volPointInterpolation::volPointInterpolation(const fvMesh& vm)
:
MeshObject<fvMesh, Foam::UpdateableMeshObject, volPointInterpolation>(vm)
{
@ -358,19 +356,19 @@ volPointInterpolation::volPointInterpolation(const fvMesh& vm)
// * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * * //
volPointInterpolation::~volPointInterpolation()
Foam::volPointInterpolation::~volPointInterpolation()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void volPointInterpolation::updateMesh(const mapPolyMesh&)
void Foam::volPointInterpolation::updateMesh(const mapPolyMesh&)
{
makeWeights();
}
bool volPointInterpolation::movePoints()
bool Foam::volPointInterpolation::movePoints()
{
makeWeights();
@ -378,7 +376,7 @@ bool volPointInterpolation::movePoints()
}
void volPointInterpolation::interpolateDisplacement
void Foam::volPointInterpolation::interpolateDisplacement
(
const volVectorField& vf,
pointVectorField& pf
@ -396,8 +394,4 @@ void volPointInterpolation::interpolateDisplacement
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //