Go to the documentation of this file.00001
00009 #ifndef PMLTransformation_hh
00010 #define PMLTransformation_hh
00011
00012 #include "basics.hh"
00013 #include "toolbox.hh"
00014 #include "formula.hh"
00015 #include "geometry.hh"
00016 #include "space.hh"
00017 namespace concepts {
00018
00019
00020
00021 template<uint dim>
00022 class FrmE_PMLTransformation :
00023 public ElementFormula< typename GeneralMapping<Cmplx,dim>::Type >
00024 {
00025 public:
00026 FrmE_PMLTransformation(const Formula<Real>& sigma,
00027 const Formula<Real>& sigmaDeriv);
00028
00029 virtual ~FrmE_PMLTransformation();
00030
00031 void addSector(const Real2d vtx0, const Real2d vtx1,
00032 const Real2d vtx2, const Real2d vtx3);
00033 void addSector(const Sequence<Real2d> vtx);
00034
00035 typename GeneralMapping<Cmplx,dim>::Type operator()
00036 (const ElementWithCell<Real>& elm, const Real p,
00037 const Real t = 0.0) const;
00038 typename GeneralMapping<Cmplx,dim>::Type operator()
00039 (const ElementWithCell<Real>& elm, const Real2d& p,
00040 const Real t = 0.0) const;
00041 typename GeneralMapping<Cmplx,dim>::Type operator()
00042 (const ElementWithCell<Real>& elm, const Real3d& p,
00043 const Real t = 0.0) const;
00045 virtual FrmE_PMLTransformation<dim>* clone() const;
00046
00047 private:
00049 Sequence<InverseVertexQuadSector2d> mapFromSectorToRefSector_;
00051 std::auto_ptr<const Formula<Real> > sigma_,sigmaDeriv_;
00053 mutable const ElementWithCell<Real>* lastElm_;
00055 mutable uint lastSector_;
00057 Real2d localCoord_(const ElementWithCell<Real>& elm,
00058 const Real2d& p) const;
00060 FrmE_PMLTransformation
00061 (const Formula<Real>* sigma, const Formula<Real>* sigmaDeriv,
00062 Sequence<InverseVertexQuadSector2d> mapFromSectorToRefSector);
00063
00064 static const uint OUTSIDEPMLSECTOR_ = -1;
00065 };
00066 }
00067
00068 #endif //PMLTransformation_hh