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

SurfaceMeshDecomp.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 */
00031 #ifndef __SPModel_SurfaceMeshDecomp_h__
00032 #define __SPModel_SurfaceMeshDecomp_h__
00033 
00034 typedef void (SurfaceMeshDecomp_SyncMeshFunction) ( _SurfaceMeshDecomp *surfaceMeshDecomp, SurfaceMesh *mesh );
00035 
00036 typedef void (SurfaceMeshDecomp_ComputeHaloNodesFunction) ( _SurfaceMeshDecomp *meshDecomp );
00037 
00038 typedef void (SurfaceMeshDecomp_AllocateNodesFunction) ( _SurfaceMeshDecomp *meshDecomp );
00039 
00040 typedef struct HaloPackage_t{
00041     float x, y, h;
00042     int id, receiver;
00043 }HaloPackage; 
00044 
00045     #define __SurfaceMeshDecomp\
00046         struct{ __Stg_Component }; \
00047         SurfaceMesh                 *mesh; \
00048         BTree                       ***processorHaloNodes; \
00049         BTree                       ***processorForeignHaloNodes; \
00050         int                         *processorLoad; \
00051         Dictionary                  *dictionary; \
00052         SurfaceMeshDecomp_SyncMeshFunction *syncMesh; \
00053         SurfaceMeshDecomp_ComputeHaloNodesFunction *computeHaloNodes; \
00054         SurfaceMeshDecomp_AllocateNodesFunction *allocateNodes; \
00055         HaloPackage                 **incomingHaloPackage; \
00056         HaloPackage                 **outgoingHaloPackage;
00057     struct _SurfaceMeshDecomp{ __SurfaceMeshDecomp };
00058 
00059 _SurfaceMeshDecomp *_SurfaceMeshDecomp_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                                     SurfaceMeshDecomp_SyncMeshFunction *_syncMesh,
00075                                     SurfaceMeshDecomp_ComputeHaloNodesFunction *_computeHaloNodes,
00076                                     SurfaceMeshDecomp_AllocateNodesFunction *_allocateNodes );
00077 
00078 void _SurfaceMeshDecomp_Init( _SurfaceMeshDecomp *self );
00079 
00080 void _SurfaceMeshDecomp_Print( void *surfaceMeshDecomp, Stream *stream );
00081 
00082 void _SurfaceMeshDecomp_Delete( void *surfaceMeshDecomp );
00083 
00084 void _SurfaceMeshDecomp_Construct( void *surfaceMeshDecomp, Stg_ComponentFactory *cf );
00085 
00086 void _SurfaceMeshDecomp_Build( void *surfaceMeshDecomp, void *data );
00087 
00088 void _SurfaceMeshDecomp_Initialise( void *surfaceMeshDecomp, void *data );
00089 
00090 void _SurfaceMeshDecomp_Execute( void *surfaceMeshDecomp, void *data );
00091 
00092 void _SurfaceMeshDecomp_Destroy( void *surfaceMeshDecomp, void *data );
00093 
00096 void _SurfaceMeshDecomp_SyncMesh( _SurfaceMeshDecomp *surfaceMeshDecomp, SurfaceMesh *mesh );
00097 
00098 void _SurfaceMeshDecomp_ComputeHaloNodes( _SurfaceMeshDecomp *meshDecomp );
00099 
00100 void _SurfaceMeshDecomp_AllocateNodes( _SurfaceMeshDecomp *meshDecomp );
00101 
00102 #endif
00103