SPModel: libSPModel/src/_Interpolator.h Source File
VPAC - Computational Software Development
Main | SPModel | StGermain FrameWork |
Main Page | Alphabetical List | Class List | Directories | File List | Class Members | File Members

_Interpolator.h

Go to the documentation of this file.
00001 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00002 **
00003 ** Copyright (C), 2004, Victorian Partnership for Advanced Computing (VPAC) Ltd, 110 Victoria Street, Melbourne, 3053, Australia.
00004 **
00005 ** Authors:
00006 **  Ogar R. Widjaja, Computational Scientist, VPAC.
00007 **  Raquibul Hassan, Software Engineer, VPAC. (raq@vpac.org)
00008 **  Keith Hsuan, Computational Scientist, VPAC (keith@vpac.org)
00009 **  William F. Appelbe, Director, VPAC. (bill@vpac.org)
00010 **  Stevan M. Quenette, Senior Software Engineer, VPAC. (steve@vpac.org)
00011 **  Patrick D. Sunter, Software Engineer, VPAC. (patrick@vpac.org)
00012 **
00013 ** This file may be distributed under the terms of the VPAC Public License
00014 ** as defined by VPAC of Australia and appearing in the file
00015 ** LICENSE.VPL included in the packaging of this file.
00016 **
00017 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00018 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
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 /* public functions */
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