00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00032 #ifndef __SPModel__Interpolator_h__
00033 #define __SPModel__Interpolator_h__
00034
00035 extern const Type _Interpolator_Type;
00036
00037 typedef float (Interpolator_InterpolateFunction) ( int meshLocalIndex, void *args );
00038 typedef void (Interpolator_InterpolateFromGridToMeshFunction)
00039 ( struct _Interpolator *interpolator, float **gridDeflectionArray,
00040 float *meshDeflectionArray );
00041
00042 typedef struct GridPoint_t{
00043 int i;
00044 int j;
00045 }GridPoint;
00046
00047 #define __Interpolator \
00048 __Stg_Component \
00049 Dictionary *dictionary; \
00050 SurfaceMesh *mesh; \
00051 SurfaceRegularMesh *regularMesh; \
00052 LinkedList **nodesForGridPoint; \
00053 GridPoint **gridPointsForNode; \
00054 int ***mappingTable; \
00055 Interpolator_InterpolateFromGridToMeshFunction *interpolateG2MFunc;
00056 struct _Interpolator{ __Interpolator };
00057
00058
00059 _Interpolator *_Interpolator_New( SizeT _sizeOfSelf,
00060 Type type,
00061 Stg_Class_DeleteFunction* _delete,
00062 Stg_Class_PrintFunction* _print,
00063 Stg_Class_CopyFunction* _copy,
00064 Stg_Component_DefaultConstructorFunction* _defaultConstructor,
00065 Stg_Component_ConstructFunction* _construct,
00066 Stg_Component_BuildFunction* _build,
00067 Stg_Component_InitialiseFunction* _initialise,
00068 Stg_Component_ExecuteFunction* _execute,
00069 Stg_Component_DestroyFunction* _destroy,
00070 Name name,
00071 Bool initFlag,
00072 Dictionary *dictionary,
00073 SurfaceMesh *mesh,
00074 SurfaceRegularMesh *regularMesh,
00075 Interpolator_InterpolateFromGridToMeshFunction *interpolateG2MFunc);
00076
00077 void _Interpolator_Init( _Interpolator *self );
00078
00079 void _Interpolator_Print( void *_interpolator, Stream *stream );
00080
00081 void _Interpolator_Delete( void *_interpolator );
00082
00083 void _Interpolator_Construct( void *_interpolator, Stg_ComponentFactory *cf );
00084
00085 void _Interpolator_Build( void *_interpolator, void *data );
00086
00087 void _Interpolator_Initialise( void *_interpolator, void *data );
00088
00089 void _Interpolator_Execute( void *_interpolator, void *data );
00090
00091 void _Interpolator_Destroy( void *_interpolator, void *data );
00092
00093 int interpolatorCompareFunction(void *data1, void *data2);
00094
00095 void interpolatorPrintFunction( void *data, void *stream );
00096
00097 void interpolatorDataCopyFunction( void **nodeData, void *newData, SizeT dataSize);
00098
00099 void interpolatorDataDeleteFunction( void *data );
00100
00101 void _Interpolator_RowColumn( _Interpolator *self, int gridId , int *row, int *column );
00102
00103
00104
00105 void _Interpolator_InterpolateFromMeshToGrid( _Interpolator *_interpolator,
00106 Interpolator_InterpolateFunction *interpolateFunction,
00107 void *arguments );
00108
00109 void _Interpolator_InterpolateFromGridToMesh( _Interpolator *interpolator,
00110 float **gridDeflectionArray,
00111 float *meshDeflectionArray );
00112
00113 #endif
00114