00001 // expde: expression templates for partial differential equations. 00002 // Copyright (C) 2001 Christoph Pflaum 00003 // This program is free software; you can redistribute it and/or modify 00004 // it under the terms of the GNU General Public License as published by 00005 // the Free Software Foundation; either version 2 of the License, or 00006 // (at your option) any later version. 00007 // 00008 // This program is distributed in the hope that it will be useful, 00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00011 // GNU General Public License for more details. 00012 // 00013 // SEE Notice1.doc made by 00014 // LAWRENCE LIVERMORE NATIONAL LABORATORY 00015 // 00016 00017 // ------------------------------------------------------------ 00018 // listcf2.h 00019 // 00020 // ------------------------------------------------------------ 00021 00022 #define initialize_cellpoi true 00023 00024 00025 // points of Randzellfreiheitsgrad 00026 class P_cellpoi { 00027 public: 00028 P_cellpoi(Index3D I, P_cellpoi* Next) : 00029 ind(I), next(Next) {}; 00030 00031 // initialize 00032 void initialize(const Grid* gitter, int level); 00033 00034 // idem 00035 double *varM(const Grid* gitter) const; 00036 00037 // physical coordinates 00038 D3vector coordinate(const Grid* gitter) const; 00039 double coordinateX(const Grid* gitter) const; 00040 double coordinateY(const Grid* gitter) const; 00041 double coordinateZ(const Grid* gitter) const; 00042 00043 // index of cell 00044 Index3D Ind() const { return ind; }; 00045 00046 // for iteration: 00047 P_cellpoi* Next() { return next; }; 00048 00049 private: 00050 Index3D ind; 00051 P_cellpoi *next; 00052 00053 double* pointer_varM; 00054 }; 00055 00056 00057 inline void P_cellpoi::initialize(const Grid* gitter, int level) { 00058 pointer_varM = gitter->Give_variable_cellpoi(ind); 00059 } 00060 00061 00062 inline D3vector P_cellpoi::coordinate(const Grid* gitter) const { 00063 return gitter->transform_coord_cellpoi(ind); 00064 }; 00065 inline double P_cellpoi::coordinateX(const Grid* gitter) const { 00066 return gitter->transform_coordX_cellpoi(ind); 00067 }; 00068 inline double P_cellpoi::coordinateY(const Grid* gitter) const { 00069 return gitter->transform_coordY_cellpoi(ind); 00070 }; 00071 inline double P_cellpoi::coordinateZ(const Grid* gitter) const { 00072 return gitter->transform_coordZ_cellpoi(ind); 00073 }; 00074 00075 inline double *P_cellpoi::varM(const Grid* gitter) const { 00076 return pointer_varM; 00077 }; 00078