Blockstructured Adaptive Mesh Refinement in object-oriented C++
00001 #ifndef _included_GridFunction_h 00002 #define _included_GridFunction_h 00003 00009 #include "DAGHParams.h" 00010 00011 #include "List.h" 00012 00013 #include "GridDataParams.h" 00014 00015 #include "GridHierarchy.h" 00016 00017 #include "GridFunctionVoid.h" 00018 00019 #include "GridFunction1.h" 00020 #include "GridFunction2.h" 00021 #include "GridFunction3.h" 00022 00023 /*********************************************************************/ 00024 /*** Set it up ***/ 00025 /*********************************************************************/ 00026 inline void SetGridFunctionType(GridFunctionVoid& GFV, 00027 const int type) 00028 { GFV.GF_SetGridFunctionType(type); } 00029 00030 inline void SetCommType(GridFunctionVoid& GFV, const int c) 00031 { GFV.GF_SetCommType(c); } 00032 inline void SetBoundaryType(GridFunctionVoid& GFV, const int b) 00033 { GFV.GF_SetBoundaryType(b); } 00034 inline void SetAdaptBoundaryType(GridFunctionVoid& GFV, const int ab) 00035 { GFV.GF_SetAdaptBoundaryType(ab); } 00036 inline void SetExternalGhostFlag(GridFunctionVoid& GFV, const int e) 00037 { GFV.GF_SetExternalGhostFlag(e); } 00038 00039 inline void SetUpdateFlag(GridFunctionVoid& GFV, const int f) 00040 { GFV.GF_SetUpdateFlag(f); } 00041 inline void SetProlongFlag(GridFunctionVoid& GFV, const int f) 00042 { GFV.GF_SetProlongFlag(f); } 00043 inline void SetRestrictFlag(GridFunctionVoid& GFV, const int f) 00044 { GFV.GF_SetRestrictFlag(f); } 00045 inline void SetBndryUpdateFlag(GridFunctionVoid& GFV, const int f) 00046 { GFV.GF_SetBndryUpdateFlag(f); } 00047 inline void SetAdaptBndryUpdateFlag(GridFunctionVoid& GFV, const int f) 00048 { GFV.GF_SetAdaptBndryUpdateFlag(f); } 00049 inline void SetIOFlag(GridFunctionVoid& GFV, const int f) 00050 { GFV.GF_SetIOFlag(f); } 00051 inline void SetCheckpointFlag(GridFunctionVoid& GFV, const int f) 00052 { GFV.GF_SetCheckpointFlag(f); } 00053 00054 inline void SetBoundaryWidth(GridFunctionVoid& GFV, const int bw) 00055 { GFV.GF_BoundaryWidth(bw); } 00056 00057 inline void SetExternalGhostWidth(GridFunctionVoid& GFV, const int ew) 00058 { GFV.GF_ExternalGhostWidth(ew); } 00059 00060 inline void SetSpaceStencil(GridFunctionVoid& GFV, const int ss) 00061 { GFV.GF_SetSpaceStencil(ss); } 00062 inline void SetSpaceStencil(GridFunctionVoid& GFV, const int* ss) 00063 { GFV.GF_SetSpaceStencil(ss); } 00064 00065 inline void SetTimeStencil(GridFunctionVoid& GFV, const int ts) 00066 { GFV.GF_SetTimeStencil(ts); } 00067 00068 inline void SetTimeAlias(GridFunctionVoid& GFV, const int t, const int to) 00069 { GFV.GF_SetTimeAlias(t, to); } 00070 00071 inline void SetAlignment(GridFunctionVoid& GFV, const int a) 00072 { GFV.GF_SetAlignment(a); } 00073 00074 /*************************************************************************/ 00075 /* Set/Query Updated Timestep Info */ 00076 /*************************************************************************/ 00077 inline int UpdatedValueAt(GridFunctionVoid &GFV) 00078 { return GFV.updatedvaluestep(); } 00079 inline void SetUpdatedValueStep(GridFunctionVoid& GFV, const int ustep) 00080 { GFV.setupdatedvaluestep(ustep); } 00081 00082 00083 /*****************************************************************************/ 00084 /* set and query user flags */ 00085 /*****************************************************************************/ 00086 inline void SetUserFlag(GridFunctionVoid& GFV, 00087 const int id, const DAGHGFVFlagType& f) 00088 { GFV.GF_SetUserFlag(id, f); } 00089 00090 inline DAGHGFVFlagType GetUserFlag(GridFunctionVoid& GFV, 00091 const int id) 00092 { return (GFV.GF_GetUserFlag(id)); } 00093 00094 /*************************************************************************/ 00095 /* Ghost communications */ 00096 /*************************************************************************/ 00097 inline void Sync(List<GridFunctionVoid*> &gfvlist, const int t, const int l) 00098 { 00099 GridFunctionVoid** gfv = 0; 00100 DAGHListLoop(gfvlist, gfv, GridFunctionVoid*) { 00101 if ((*gfv)->comm()) (*gfv)->GF_WriteGhosts(t,l); 00102 if ((*gfv)->comm()) (*gfv)->GF_ReadGhosts(t,l); 00103 } DAGHEndLoop 00104 } 00105 00106 inline void Sync(List<GridFunctionVoid*> &gfvlist, const int t, const int l, 00107 const int axis, const int dir) 00108 { 00109 GridFunctionVoid** gfv = 0; 00110 DAGHListLoop(gfvlist, gfv, GridFunctionVoid*) { 00111 if ((*gfv)->comm()) (*gfv)->GF_WriteGhosts(t,l,axis,dir); 00112 if ((*gfv)->comm()) (*gfv)->GF_ReadGhosts(t,l,axis,dir); 00113 } DAGHEndLoop 00114 } 00115 00116 #endif
Quickstart Users Guide Programmers Reference Installation Examples Download
AMROC Main Home Contactlast update: 06/01/04