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
00028
00029
00030
00031
00032
00033
00034
00035
00036 #ifndef linearEdgeInterpolation_H
00037 #define linearEdgeInterpolation_H
00038
00039 #include "edgeInterpolationScheme.H"
00040 #include "areaFields.H"
00041
00042
00043
00044 namespace Foam
00045 {
00046
00047
00048
00049
00050
00051 template<class Type>
00052 class linearEdgeInterpolation
00053 :
00054 virtual public edgeInterpolationScheme<Type>
00055 {
00056
00057
00058
00059 void operator=(const linearEdgeInterpolation&);
00060
00061 public:
00062
00063
00064 TypeName("linear");
00065
00066
00067
00068
00069
00070 linearEdgeInterpolation(const faMesh& mesh)
00071 :
00072 edgeInterpolationScheme<Type>(mesh)
00073 {}
00074
00075
00076 linearEdgeInterpolation(const faMesh& mesh, Istream&)
00077 :
00078 edgeInterpolationScheme<Type>(mesh)
00079 {}
00080
00081
00082 linearEdgeInterpolation
00083 (
00084 const faMesh& mesh,
00085 const edgeScalarField&,
00086 Istream&
00087 )
00088 :
00089 edgeInterpolationScheme<Type>(mesh)
00090 {}
00091
00092
00093
00094
00095
00096 tmp<edgeScalarField> weights
00097 (
00098 const GeometricField<Type, faPatchField, areaMesh>&
00099 ) const
00100 {
00101 return this->mesh().edgeInterpolation::weights();
00102 }
00103 };
00104
00105
00106 template<class Type>
00107 tmp<GeometricField<Type, faPatchField, edgeMesh> >
00108 linearEdgeInterpolate(const GeometricField<Type, faPatchField, areaMesh>& vf)
00109 {
00110 return edgeInterpolationScheme<Type>::interpolate
00111 (
00112 vf,
00113 vf.mesh().edgeInterpolation::weights()
00114 );
00115 }
00116
00117
00118 template<class Type>
00119 tmp<GeometricField<Type, faPatchField, edgeMesh> >
00120 linearEdgeInterpolate
00121 (
00122 const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvf
00123 )
00124 {
00125 tmp<GeometricField<Type, faPatchField, edgeMesh> > tinterp =
00126 linearEdgeInterpolate(tvf());
00127 tvf.clear();
00128 return tinterp;
00129 }
00130
00131
00132
00133
00134 }
00135
00136
00137
00138 #endif
00139
00140