Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

src/expde/grid/brick.cc

Go to the documentation of this file.
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 //
00019 // brick.cc
00020 //
00021 // ------------------------------------------------------------
00022 
00023 
00025 //
00026 // construction for Andreas Adelmann
00027 // construct set of processors 
00028 //
00030 
00031 
00032 
00033 // Include level 0:
00034 #ifdef COMP_GNUOLD
00035  #include <iostream.h>
00036  #include <fstream.h>
00037  #include <math.h>
00038  #include <time.h>
00039 #else
00040  #include <iostream>
00041  #include <fstream>
00042  #include <cmath>
00043  #include <ctime>
00044 #endif           
00045 
00046 #ifdef WITH_BRICK
00047 
00048 // Include level 0:
00049 #include "../parser.h"
00050 
00051 // Include level 1:
00052 #include "../paramete.h"
00053 #include "../abbrevi.h"
00054 #include "../math_lib/math_lib.h"
00055  
00056 // Include level 2:
00057 #include "../basic/basic.h"
00058 
00059 // Include level 3:
00060 #include "../domain/domain.h"
00061 
00062 // Include level 4:
00063 #include "../formulas/boundy.h"
00064 #include "../formulas/loc_sten.h"
00065 
00066 // for Andreas Adelmann
00067 #include "brick.h"
00068 
00069 // Include level 5:
00070 #include "gpar.h"
00071 #include "parallel.h"
00072 #include "mgcoeff.h"
00073 #include "sto_man.h"
00074 #include "gridbase.h"
00075 #include "grid.h"
00076 
00077 
00078 BrickInfo *Grid_base::getBrickInfo() {
00079   
00080   D3vector v_WSD;
00081   D3vector v_ENT;
00082 
00083   BrickInfo *brick_info;
00084   BInfoT     brick;
00085   int result_len;
00086   int ierror; 
00087 
00088   // 1. new brick
00089   brick_info = new BrickInfo();
00090   // 2. set cells in brick
00091   iterate_hash_proc {
00092     if(point_proc!=NULL) {
00093       if(point_proc->Give_Index().Tiefe()==n_parallel) {
00094         v_WSD = transform_coord(
00095                 point_proc->Give_Index().neighbour(WSDd).coordinate());
00096         v_ENT = transform_coord(
00097                 point_proc->Give_Index().neighbour(ENTd).coordinate());
00098           
00099         brick.localXMin[0]  = v_WSD.x - finest_meshsize * 0.5;
00100         brick.localXMin[1]  = v_WSD.y - finest_meshsize * 0.5;
00101         brick.localXMin[2]  = v_WSD.z - finest_meshsize * 0.5;
00102         
00103         brick.localXMax[0]  = v_ENT.x - finest_meshsize * 0.5;
00104         brick.localXMax[1]  = v_ENT.y - finest_meshsize * 0.5;
00105         brick.localXMax[2]  = v_ENT.z - finest_meshsize * 0.5;
00106         
00107         brick.eps           = finest_meshsize * 0.001;
00108         brick.rank = point_proc->Give_num_proc();
00109         brick_info->add(brick);
00110       }
00111     }
00112   }
00113   return brick_info;
00114 }
00115 #endif

Generated on Fri Nov 2 01:25:59 2007 for IPPL by doxygen 1.3.5