00001 /* class for handling essential Dirichlet boundary condition 00002 */ 00003 00004 #ifndef dirichlet_hh 00005 #define dirichlet_hh 00006 00007 #include "basics/outputOperator.hh" 00008 #include "basics/typedefs.hh" 00009 #include "space/space.hh" 00010 #include "space/element.hh" 00011 #include "geometry/mesh.hh" 00012 00013 00014 namespace concepts { 00015 00016 // ************************************************************* Dirichlet ** 00017 00021 template<class F> 00022 class Dirichlet : public OutputOperator { 00023 public: 00025 Dirichlet(Space<Real>& spc) : coeff_(0) {} 00027 std::map<int,F>* operator[](const Element<F>* elm) { 00028 return (coeff_) ? (*coeff_)[elm] : 0; } 00030 virtual ~Dirichlet(); 00031 protected: 00032 virtual std::ostream& info(std::ostream& os) const; 00034 virtual std::ostream& datainfo(std::ostream& os) const; 00036 // --> Idee: 00037 // Schlaufe über alle Formfunktionen, Eintrag für konkrete Funktion 00038 // nichtbenutzte Indizes bleiben Null 00039 // Alternative: Array, Schlaufe über benutzte Indizes, 00040 // Problematisch Zuordnung Index zur Formfunktion 00041 00042 // nicht schlimm, laufe ueber alle Eintraege in Data 00043 // Joiner<Array<Data>*, 1>* coeff_; 00044 00045 // Joiner<SparseArray<F>*, 1>* coeff_; 00046 00047 // Map okay, aber keine Ausgabe (info), geschrieben! 00048 //Joiner<std::map<int,F>*, 1>* coeff_; 00049 00050 00051 std::map<const Element<F>*, std::map<int,F>*>* coeff_; 00052 // schafft es Sparse'Matrix' auch? 00053 // es gibt Funktionen zum Multiplizieren mit Vektoren 00054 // das waere gut zum Ausrechnen der Funktionswerte 00055 // jedoch ist ein Raum (spc) nötig 00056 // Joiner<SparseMatrix<Real>*, 1>* coeff_; 00057 }; 00058 00059 00060 00061 } // namespace concepts 00062 00063 #endif // dirichlet_hh