Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)

app-bholger/gfem/gfemBasisOne.h
Go to the documentation of this file.
00001 #pragma once
00002 
00003 #include <string>
00004 
00005 #include "basics.hh"
00006 #include "geometry.hh"
00007 #include "space.hh"
00008 #include "graphics.hh"
00009 #include "toolbox.hh"
00010 #include "function.hh"
00011 #include "operator.hh"
00012 #include "linearFEM.hh"
00013 #include "linDG1D.hh"
00014 #include "hp2D.hh"
00015 #include "gfemIdentity.h"
00016 #include "gfemLaplace.h"
00017 #include "hp2D/formula.hh"
00018 #include "PC_UC_Solver.h"
00019 
00020 namespace concepts {
00021 namespace gfem {
00022 
00023 class GfemBasisOne : public PC_UC_Solver {
00024   public:
00025 
00026   GfemBasisOne(const concepts::Space<concepts::Real>& space, 
00027           EquationType type, 
00028           const MID& attrToEpsilon, 
00029           double omega,
00030           const concepts::BoundaryConditions& bc) 
00031     : PC_UC_Solver(space, type, attrToEpsilon, omega, bc)
00032   {
00033 
00034   }
00035  
00036   ~GfemBasisOne() {
00037     for(int i=0; i < (int)uc_sols.size(); ++i)
00038       delete uc_sols[i];
00039     uc_sols.clear();
00040   }
00041 
00046   void releaseContents() {
00047     uc_sols.clear();
00048   }
00049 
00051   void solve(concepts::Cmplx k1, concepts::Cmplx k2) {
00052     UC_Sol* ucSol = new UC_Sol(space, k1, k2);
00053     PC_UC_Solver::solve(k1, k2, ucSol->vec);
00054 
00055     uc_sols.push_back(ucSol);
00056   }
00057  
00060   void addSolution(UC_Sol* sol) {
00061     uc_sols.push_back(sol);
00062   }
00063 
00064   void orthogonalize();
00065 
00066   const UC_Sol& getSolution(int i) const {
00067     return *(uc_sols[i]);
00068   }
00069 
00070   UC_Sol& getSolution(int i) {
00071     return *(uc_sols[i]);
00072   }
00073 
00074   int size() const {
00075     return uc_sols.size();
00076   } 
00077 
00078   void cutoff(double sigma_thresh);
00079 
00080   void printSigmas() const;
00081 
00082   void setAllKs(Cmplx k1, Cmplx k2);
00083 
00084 private:
00085   void transformReal();
00086   void sort();
00087 
00088   std::vector< UC_Sol* > uc_sols;
00089 };
00090 
00091 } // namespace
00092 } // namespace

Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)