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

app-bholger/gfem/PC_UC_Solver.h
Go to the documentation of this file.
00001 #pragma once
00002 
00003 #include <iostream>
00004 #include <memory>
00005 #include <algorithm>
00006 #include <sstream>
00007 #include <unistd.h> // for command line parsing
00008 #include <fstream>
00009 #include <memory>
00010 #include <vector>
00011 #include <fstream>
00012 #include <sstream>
00013 #include <string>
00014 #include <map>
00015 
00016 #include "basics.hh"
00017 #include "basics/outputMatlab.hh"
00018 #include "geometry.hh"
00019 #include "space.hh"
00020 #include "graphics.hh"
00021 #include "toolbox.hh"
00022 #include "function.hh"
00023 #include "operator.hh"
00024 #include "integration.hh"
00025 #include "graphics.hh"
00026 #include "linearFEM.hh"
00027 #include "linDG1D.hh"
00028 #include "hp2D.hh"
00029 #include "toolbox/inputParam.hh"
00030 
00031 namespace concepts {
00032 namespace gfem {
00033 
00034 typedef std::map<int, double> MID;
00035 
00039 class PC_UC_Solver {
00040 public:
00041     enum EquationType {TRANSVERSAL_ELECTRIC, TRANSVERSAL_MAGNETIC};
00042 
00043   PC_UC_Solver(const concepts::Space<concepts::Real>& space, 
00044           EquationType type, 
00045           const MID& attrToEpsilon, 
00046           double omega,
00047           const concepts::BoundaryConditions& bc);
00048 
00049   static concepts::PiecewiseConstFormula<concepts::Real> genTMCoeff(
00050           const MID& attToEps);
00051 
00052   static concepts::PiecewiseConstFormula<concepts::Real> genTECoeff(
00053           const MID& attToEps);
00054 
00055   void setRhs(const std::string& rhs_r, const std::string& rhs_i);
00056   //TODO: implement methods taking Formula or ElementFormula instances
00057   
00058   void solve(concepts::Cmplx k1, concepts::Cmplx k2,
00059       concepts::Vector<concepts::Cmplx>& sol );
00060 
00061   void setOmega(double omega);
00062 
00063 protected:
00064   const concepts::Space<concepts::Real>& space;
00065   concepts::BoundaryConditions bc;
00066 
00067   double omega;
00068 
00069   static concepts::PiecewiseConstFormula<concepts::Real> zero_F;
00070   static concepts::PiecewiseConstFormula<concepts::Real> one_F;
00071   concepts::PiecewiseConstFormula<concepts::Real> coeff_TM_F;
00072   concepts::PiecewiseConstFormula<concepts::Real> coeff_TE_F;
00073   hp2D::Laplace<concepts::Real>   lap_BF;
00074   hp2D::Advection<concepts::Real> adv_BF_1; 
00075   hp2D::Advection<concepts::Real> adv_BF_2; 
00076   hp2D::Identity<Real>    id_heat_BF;
00077   hp2D::Identity<Real>    id_mass_BF;
00078 
00079   concepts::Vector<concepts::Cmplx> rhs;
00080   concepts::SparseMatrix<concepts::Real> lap_M;
00081   concepts::SparseMatrix<concepts::Real> id_mass_M;
00082   concepts::SparseMatrix<concepts::Real> id_heat_M;
00083   concepts::SparseMatrix<concepts::Real> adv_M_1;
00084   concepts::SparseMatrix<concepts::Real> adv_M_2;
00085 
00086 };
00087 
00088 } // namespace
00089 } // namespace

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