distanceSurfaceTemplates.C
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #include "distanceSurface.H"
00028 #include "isoSurface.H"
00029 #include "volFieldsFwd.H"
00030 #include "pointFields.H"
00031 #include "volPointInterpolation.H"
00032
00033
00034
00035 template <class Type>
00036 Foam::tmp<Foam::Field<Type> >
00037 Foam::distanceSurface::sampleField
00038 (
00039 const GeometricField<Type, fvPatchField, volMesh>& vField
00040 ) const
00041 {
00042 return tmp<Field<Type> >(new Field<Type>(vField, surface().meshCells()));
00043 }
00044
00045
00046 template <class Type>
00047 Foam::tmp<Foam::Field<Type> >
00048 Foam::distanceSurface::interpolateField
00049 (
00050 const interpolation<Type>& interpolator
00051 ) const
00052 {
00053 const fvMesh& fvm = static_cast<const fvMesh&>(mesh());
00054
00055
00056 const GeometricField<Type, fvPatchField, volMesh>& volFld =
00057 interpolator.psi();
00058
00059 tmp<GeometricField<Type, pointPatchField, pointMesh> > pointFld
00060 (
00061 volPointInterpolation::New(fvm).interpolate(volFld)
00062 );
00063
00064
00065 return surface().interpolate(volFld, pointFld());
00066 }
00067
00068
00069
Copyright © 2000-2009 OpenCFD Ltd