AMROC Main     Blockstructured Adaptive Mesh Refinement in object-oriented C++


Main Page   Class Hierarchy   Compound List   File List  

GridFunctionCalls1.h

Go to the documentation of this file.
00001 #ifndef _included_GridFunctionCalls1_h
00002 #define _included_GridFunctionCalls1_h
00003 
00009 /*********************************************************************/
00010 /*** get times ***/
00011 /*********************************************************************/
00012 template <class Type>
00013 inline int StepSize(GridFunction(1)<Type>& GF, const int l)
00014    { return (GF.GF_StepSize(l)); }
00015 
00016 template <class Type>
00017 inline int TimeStep(GridFunction(1)<Type>& GF, const int l)
00018    { return (GF.GF_TimeStep(l)); }
00019 
00020 template <class Type>
00021 inline double DeltaT(GridFunction(1)<Type>& GF, const int l)
00022    { return (GF.GF_DeltaT(l)); }
00023 
00024 template <class Type>
00025 inline double DeltaX(GridFunction(1)<Type>& GF, const int dim, const int l)
00026    { return (GF.GF_DeltaX(dim,l)); }
00027 
00028 template <class Type>
00029 inline void PreviousTime(GridFunction(1)<Type>& GF, const int l)
00030    { GF.GF_PreviousTime(l); }
00031 
00032 template <class Type>
00033 inline void NextTime(GridFunction(1)<Type>& GF, const int l)
00034    { GF.GF_NextTime(l); }
00035 
00036 template <class Type>
00037 inline void SetPhysicalTime(GridFunction(1)<Type>& GF, const int t, 
00038                             const int l, const double pht)
00039    { GF.set_phystime_timevalue(t, l, pht); }
00040 
00041 template <class Type>
00042 inline double GetPhysicalTime(GridFunction(1)<Type>& GF, const int t, const int l)
00043    { return (GF.get_phystime_timevalue(t, l)); }
00044 /*********************************************************************/
00045 
00046 /*********************************************************************/
00047 /*** Set predefined functions ***/
00048 /*********************************************************************/
00049 template <class Type>
00050 inline void SetInitFunction(GridFunction(1)<Type>& GF, void* initf)
00051    { GF.GF_SetInitFunc(initf); }
00052 
00053 template <class Type>
00054 inline void SetUpdateFunction(GridFunction(1)<Type>& GF, void* uf)
00055    { GF.GF_SetUpdateFunc(uf); }
00056 
00057 template <class Type>
00058 inline void SetBndryUpdateFunction(GridFunction(1)<Type>& GF, void* buf)
00059    { GF.GF_SetBndryUpdateFunc(buf); }
00060 
00061 template <class Type>
00062 inline void SetAdaptiveBndryUpdateFunction(GridFunction(1)<Type>& GF, 
00063                                            void* abuf)
00064    { GF.GF_SetAdaptiveBndryUpdateFunc(abuf); }
00065 
00066 template <class Type>
00067 inline void SetProlongFunction(GridFunction(1)<Type>& GF, void* pf)
00068    { GF.GF_SetProlongFunc(pf); }
00069 
00070 template <class Type>
00071 inline void SetRestrictFunction(GridFunction(1)<Type>& GF, void* rf)
00072    { GF.GF_SetRestrictFunc(rf); }
00073 
00074 template <class Type>
00075 inline void SetIOFunction(GridFunction(1)<Type>& GF, void* iof)
00076    { GF.GF_SetIOFunc(iof); }
00077 /*********************************************************************/
00078 
00079 template <class Type>
00080 inline void SetMyArgs(GridFunction(1)<Type>& GF, const int c, const char* s) 
00081    { GF.GF_SetMyArgs(c, s); }
00082 
00083 /*********************************************************************/
00084 /*** Set boundary value ***/
00085 /*********************************************************************/
00086 template <class Type>
00087 inline void SetBoundaryValue(GridFunction(1)<Type>& GF, const Type v)
00088    { GF.GF_SetBoundaryValue(v); }
00089 /*********************************************************************/
00090 
00091 /*********************************************************************/
00092 /*** Cycle Times ***/
00093 /*********************************************************************/
00094 template <class Type>
00095 inline void SwapTimeLevels(GridFunction(1)<Type> &GF,
00096                            const int l, const int t1, const int t2)
00097    { GF.GF_SwapTimeLevels(l, t1, t2); }
00098 
00099 template <class Type>
00100 inline void CycleTimeLevels(GridFunction(1)<Type> &GF, const int l)
00101    { GF.GF_CycleTimeLevels(l); }
00102 /*********************************************************************/
00103 
00104 /*********************************************************************/
00105 /*** Sync Ghost Regions ***/
00106 /*********************************************************************/
00107 template <class Type>
00108 inline void Sync(GridFunction(1)<Type> &GF, const int t, const int l) 
00109    { GF.GF_Sync(t,l,DAGH_All,DAGH_Both); }
00110 
00111 template <class Type>
00112 inline void Sync(GridFunction(1)<Type> &GF, const int t, const int l, 
00113                  const int axis, const int dir) 
00114    { GF.GF_Sync(t,l,axis,dir); }
00115 
00116 /*********************************************************************/
00117 
00118 /*********************************************************************/
00119 /*** Fill ***/
00120 /*********************************************************************/
00121 template <class Type>
00122 inline void Initialize(GridFunction(1)<Type> &GF, 
00123                        const int t, const int l, 
00124                        const Type& val)
00125     { GF.GF_Fill(val, t, l); }
00126 /*********************************************************************/
00127 
00128 /*********************************************************************/
00129 /*** Use predefined functions ***/
00130 /*********************************************************************/
00131 template <class Type>
00132 inline void Initialize(GridFunction(1)<Type> &GF, 
00133                        const int t, const int l, 
00134                        char *args, const int cnt)
00135     { GF.GF_Init(t, l, args, cnt); }
00136 template <class Type>
00137 inline void Initialize(GridFunction(1)<Type> &GF, 
00138                        const int t, const int l, 
00139                        const BBox& bb,
00140                        char *args, const int cnt)
00141     { GF.GF_Init(t, l, bb, args, cnt); }
00142 
00143 template <class Type>
00144 inline void Update(GridFunction(1)<Type> &GF, 
00145                    const int tf, const int tt, const int l,
00146                    char *args, const int cnt)
00147     { GF.GF_Update(tf, tt, l, args, cnt); }
00148 template <class Type>
00149 inline void Update(GridFunction(1)<Type> &GF, 
00150                    const int tf, const int tt, const int l,
00151                    const BBox& bb,
00152                    char *args, const int cnt)
00153     { GF.GF_Update(tf, tt, l, bb, args, cnt); }
00154 
00155 template <class Type>
00156 inline void Prolong(GridFunction(1)<Type> &GF, 
00157                     const int tf, const int lf, const int tt, const int lt, 
00158                     char *args, const int cnt)
00159     { GF.GF_Prolong(tf, lf, tt, lt, args, cnt); }
00160 template <class Type>
00161 inline void Prolong(GridFunction(1)<Type> &GF, 
00162                     const int tf, const int lf, const int tt, const int lt,
00163                     const BBox& bb, char *args, const int cnt)
00164     { GF.GF_Prolong(tf, lf, tt, lt, bb, args, cnt); }
00165 
00166 template <class Type>
00167 inline void Restrict(GridFunction(1)<Type> &GF, 
00168                      const int tf, const int lf, const int tt, const int lt, 
00169                      char *args, const int cnt)
00170     { GF.GF_Restrict(tf, lf, tt, lt, args, cnt); }
00171 template <class Type>
00172 inline void Restrict(GridFunction(1)<Type> &GF, 
00173                      const int tf, const int lf, const int tt, const int lt,
00174                      const BBox& bb, char *args, const int cnt)
00175     { GF.GF_Restrict(tf, lf, tt, lt, bb, args, cnt); }
00176 
00177 template <class Type>
00178 inline void IO(GridFunction(1)<Type> &GF,
00179                const int t, const int l,
00180                char *args, const int cnt)
00181     { GF.GF_IO(t, l, args, cnt); }
00182 template <class Type>
00183 inline void IO(GridFunction(1)<Type> &GF,
00184                const int t, const int l,
00185                const BBox& bb,
00186                char *args, const int cnt)
00187     { GF.GF_IO(t, l, bb, args, cnt); }
00188 /*********************************************************************/
00189 
00190 /*********************************************************************/
00191 /*** Update Boundaries ***/
00192 /*********************************************************************/
00193 template <class Type>
00194 inline void AdaptiveBoundaryUpdate(GridFunction(1)<Type> &GF,
00195                                    const int t, const int l)
00196    { GF.GF_AdaptiveBndryUpdate(t, l); }
00197 template <class Type>
00198 inline void ExternalBoundaryUpdate(GridFunction(1)<Type> &GF,
00199                                    const int t, const int l)
00200    { GF.GF_ExternalBndryUpdate(t, l); }
00201 /*********************************************************************/
00202 
00203 /*********************************************************************/
00204 /*** Update Boundaries & Sync Ghost Regions ***/
00205 /*********************************************************************/
00206 template <class Type>
00207 inline void BoundaryUpdate(GridFunction(1)<Type> &GF, 
00208                            const int t, const int l) 
00209    { GF.GF_BndryUpdate(t,l); }
00210 
00211 /*********************************************************************/
00212 /*** Reduction Ops ***/
00213 /*********************************************************************/
00214 template <class Type>
00215 inline Type MaxVal(GridFunction(1)<Type>& GF, 
00216                    const int t, const int l)
00217    { return (GF.GF_maxval(t, l)); }
00218 template <class Type>
00219 inline Type MaxVal(GridFunction(1)<Type>& GF, 
00220                    const int t, const int l,
00221                    const BBox& where)
00222    { return (GF.GF_maxval(t, l, where)); }
00223 
00224 template <class Type>
00225 inline Type MinVal(GridFunction(1)<Type>& GF, 
00226                    const int t, const int l)
00227    { return (GF.GF_minval(t, l)); }
00228 template <class Type>
00229 inline Type MinVal(GridFunction(1)<Type>& GF, 
00230                    const int t, const int l,
00231                    const BBox& where)
00232    { return (GF.GF_minval(t, l, where)); }
00233 
00234 template <class Type>
00235 inline Type Sum(GridFunction(1)<Type>& GF, 
00236                    const int t, const int l)
00237    { return (GF.GF_sum(t, l)); }
00238 template <class Type>
00239 inline Type Sum(GridFunction(1)<Type>& GF,
00240                    const int t, const int l,
00241                    const BBox& where)
00242    { return (GF.GF_sum(t, l, where)); }
00243 
00244 template <class Type>
00245 inline Type Product(GridFunction(1)<Type>& GF, 
00246                    const int t, const int l)
00247    { return (GF.GF_product(t, l)); }
00248 template <class Type>
00249 inline Type Product(GridFunction(1)<Type>& GF,
00250                    const int t, const int l,
00251                    const BBox& where)
00252    { return (GF.GF_product(t, l, where)); }
00253 
00254 template <class Type>
00255 inline double Norm(GridFunction(1)<Type>& GF, 
00256                    const int t, const int l, const int param)
00257    { return (GF.GF_norm(t, l, param)); }
00258 
00259 template <class Type>
00260 inline double Norm(GridFunction(1)<Type>& GF,
00261                     const int t, const int l,
00262                     const BBox& where, const int param)
00263 { return (GF.GF_norm(t, l, where, param)); }
00264 /*********************************************************************/
00265 
00266 /*********************************************************************/
00267 /* IO Support */
00268 /*********************************************************************/
00269 template <class Type>
00270 inline void Write(GridFunction(1)<Type> &GF, int const t, int const l,
00271                   int const gfdtype, char *ioname)
00272   { GF.GF_Write(t,l,gfdtype,ioname); }
00273 template <class Type>
00274 inline void Write(GridFunction(1)<Type> &GF, int const t, int const l,
00275                   BBox const &where, int const gfdtype, char *ioname)
00276   { GF.GF_Write(t,l,where,gfdtype,ioname); }
00277 
00278 template <class Type>
00279 inline void Read(GridFunction(1)<Type> &GF, int const t, int const l,
00280                  int const gfdtype, char *ioname)
00281   { GF.GF_Read(t,l,gfdtype,ioname); }
00282 template <class Type>
00283 inline void Read(GridFunction(1)<Type> &GF, int const t, int const l,
00284                  BBox const &where, int const gfdtype, char *ioname)
00285   { GF.GF_Read(t,l,where,gfdtype,ioname); }
00286 /*********************************************************************/
00287 
00288 #endif


Quickstart     Users Guide     Programmers Reference     Installation      Examples     Download



AMROC Main      Home      Contact
last update: 06/01/04