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

src/expde/domain/sca_dom.h

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 // sca_dom.h
00020 //
00021 // ------------------------------------------------------------
00022 
00023 #ifndef SCADOM_H_
00024 #define SCADOM_H_
00025 
00026 #ifdef COMP_GNUOLD
00027 
00028 #else
00029   using std::ifstream;
00030 #endif 
00031 
00033 // 1. domains described by scattered data which
00034 //    are points at the boundary and normal vectors
00035 // 2. domains described by voxels
00037 class Scat_domain : public All_Domains  {
00038  protected:
00039  protected:
00040   // Konstruktor
00041   Scat_domain(int number);
00042 
00043   // storage for scattered data points (samples)
00044   int punkte;           // number of samples
00045   D3vector * sample, * normal;
00046 
00047   // interior bounding box
00048   D3vector bordermax;
00049   D3vector bordermin;
00050 
00051  public:
00052   // Konstruktor 
00053   Scat_domain(ifstream& Datei);
00054 
00055   // Groesse eines uniformen Grundgitters, Angabe in Levels:
00056   int  Give_n_uniform() { return n_uniform; } ;
00057   // Kann berechnet werden ob Kante im Gebiet? 
00058   bool calc_edge(D3vector V1, D3vector V2) { return true; }
00059   // ist Kante im Gebiet?       
00060   bool edge(D3vector V1, D3vector V2);
00061   // Kann der Abstand zum Rand in Richting d berechnet werden?
00062   calc_dis calc_distance(D3vector V, dir_3D d) {return yes; }
00063   // Abstand zum Rand in Richting d  
00064   double distance(D3vector V, dir_3D d);
00065   // ist Punkt im Gebiet? Diese Funktion sollte nur amAnfang verwendet werden.
00066   bool point_in_domain(D3vector V);
00067 
00068   // Beschreibung des Umgebenden Quadrates 
00069   D3vector GiveA() const { return A; }
00070   double   GiveH() const { return H; }
00071   D3vector GiveVecH() const { return VecH; }
00072 
00073   //
00074   int Give_number_of_scattered_data() { return punkte; };
00075 };
00076 
00077 class Six_corner_pyramid : public Scat_domain {
00078  public:
00079   Six_corner_pyramid(D3vector top1, D3vector top2, D3vector top3, 
00080                      D3vector top4, D3vector top5, D3vector top6,
00081                      D3vector down1, D3vector down2, D3vector down3, 
00082                      D3vector down4, D3vector down5, D3vector down6);
00083 };
00084 
00085 
00086 
00087 // some elementary member functions
00088 // --------------------------------------
00089 
00090 inline bool Scat_domain::edge(D3vector V1, D3vector V2) {
00091   return (point_in_domain(V1) && point_in_domain(V2));
00092 }
00093 
00094 #endif
00095 
00096         

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