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

Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Private Attributes
concepts::gfem::GfemDiffraction Class Reference

solver for unit cell problem for photonic crystals. More...

#include <gfemDiffraction.h>

Collaboration diagram for concepts::gfem::GfemDiffraction:
Collaboration graph
[legend]

List of all members.

Public Types

enum  EquationType { TRANSVERSAL_ELECTRIC, TRANSVERSAL_MAGNETIC }

Public Member Functions

void adjustFloquetT (int dir, Cmplx k, int pml_cellAttrib, RCP< const ElementFormula< Cmplx > > uinc_F, RCP< const ElementFormula< Cmplx2d > > Duinc_F, concepts::Set< uint > pml_innerAttrib, Real2d center)
void assemble ()
void compressSystemM ()
 Careful, the compression algorithm is heuristical and might completely destroy the condition number of the matrix.
double getb0 ()
const hp2D::TraceSpacegetTraceSpace ()
 GfemDiffraction (const SpaceOnCells< Real > &space, EquationType type, const MID &attrToEpsilon, double omega, const BoundaryConditions &bc, Set< uint > nonRefl_bdAttr)
void regularizeL2Penalty (double eps)
void set0thSommerfeld (Set< uint > nonRefl_bdAttr, RCP< concepts::ElementFormula< Cmplx > > rhs_F, RCP< concepts::ElementFormula< Cmplx > > dn_rhs_F, bool contribRHS=CONTRIB_RHS)
void setB0 (double b0)
void setDtN (Set< uint > nonRefl_bdAttrTop, Set< uint > nonRefl_bdAttrBottom, Set< uint > nonRefl_bdAttr, std::string u_inc_r, std::string u_inc_i, std::string Du_inc_r, std::string Du_inc_i, int approx_oder, double min_y=0)
 current limitation: incident field is independent of x_1 coordinate.
void setKPer (Cmplx k0)
void setNonRefl (Set< uint > nonRefl_bdAttr, std::string u_inc_r, std::string u_inc_i, std::string Du_inc_r, std::string Du_inc_i)
void setOmega (double omega)
void setPMLBC (Real2d center, Real2d dist, Real strength, Real powercoeff, Real omega, RCP< const ElementFormula< Cmplx > > uinc_F, RCP< const ElementFormula< Cmplx2d > > Duinc_F, int pml_cellAttrib, concepts::Set< uint > pml_innerAttrib, concepts::Set< uint > pml_outerAttrib, RCP< const ElementFormula< Cmplx > > b2_0_F)
void setPMLBC_sc (Real2d center, Real2d dist, Real strength, Real powercoeff, Real omega, RCP< const ElementFormula< Cmplx > > uinc_F, RCP< const ElementFormula< Cmplx2d > > Duinc_F, RCP< const ElementFormula< Cmplx > > DaDuinc_F, concepts::Set< uint > innerAttrib, concepts::Set< uint > pml_outerAttrib, RCP< const ElementFormula< Cmplx > > b2_0_F)
void setRhs (const std::string &rhs_r, const std::string &rhs_i)
 TODO: implement methods taking Formula or ElementFormula instances.
void solve (Vector< Cmplx > &sol)
 solve with LU decomposition
void storeBFeig (std::string path, bool verbose=false)
void storeSystemM (const std::string &filename, Vector< Cmplx > *sol=NULL)

Static Public Member Functions

static PiecewiseConstFormula
< Cmplx
genTECoeff (const MID &attToEps)
static PiecewiseConstFormula
< Cmplx
genTMCoeff (const MID &attToEps)

Public Attributes

PiecewiseConstFormula< CmplxcoeffId
PiecewiseConstFormula< CmplxcoeffLap
RCP
< concepts::MatrixElementFormula
< Cmplx, 2 > > 
coeffLapMat
RCP< SparseMatrix< Cmplx > > id_trace_M
RCP< const ElementFormula
< Cmplx > > 
pmlcoeff_ident
RCP< const ElementFormula
< Cmplx > > 
pmlLapCoeff_advectx
RCP< const ElementFormula
< Cmplx > > 
pmlLapCoeff_advecty
RCP< const ElementFormula
< Cmplx > > 
pmlLapCoeff_ident

Static Public Attributes

static const bool CONTRIB_RHS = true
static const bool NOCONTRIB_RHS = false
static PiecewiseConstFormula
< Cmplx
one_PW
static PiecewiseConstFormula
< Cmplx
zero_PW

Private Attributes

RCP< GfemAdvectionIgnoreadvect
RCP< SparseMatrix< Cmplx > > advect_M
double b0
 b_0 used in NRBC
BoundaryConditions bc
GfemIdentity id_mass_BF
RCP< GfemIdentityIgnoreid_mass_k2
RCP< SparseMatrix< Cmplx > > id_mass_k2_M
RCP< SparseMatrix< Cmplx > > id_mass_M
hp1D::Identity< Cmplxid_trace_BF
Cmplx kPer
 periodicity condition on qper boundary
GfemLaplace lap_BF
RCP< SparseMatrix< Cmplx > > lap_M
RCP< SparseMatrix< Cmplx > > lapPML_M
double omega
Vector< Cmplxrhs
RCP< FormulaPMLPowerSigma< Real > > sigma_x
RCP< FormulaPMLPowerSigma< Real > > sigma_y
const SpaceOnCells< Real > & space
RCP< SparseMatrix< Cmplx > > system_M
hp2D::TraceSpace trace_space

Detailed Description

solver for unit cell problem for photonic crystals.

Solves problems of transversal electric (TE) and trans. magnetic (TM) kind.

Definition at line 33 of file gfemDiffraction.h.


Member Enumeration Documentation

Enumerator:
TRANSVERSAL_ELECTRIC 
TRANSVERSAL_MAGNETIC 

Definition at line 35 of file gfemDiffraction.h.


Constructor & Destructor Documentation

concepts::gfem::GfemDiffraction::GfemDiffraction ( const SpaceOnCells< Real > &  space,
EquationType  type,
const MID attrToEpsilon,
double  omega,
const BoundaryConditions bc,
Set< uint >  nonRefl_bdAttr 
)

Member Function Documentation

void concepts::gfem::GfemDiffraction::adjustFloquetT ( int  dir,
Cmplx  k,
int  pml_cellAttrib,
RCP< const ElementFormula< Cmplx > >  uinc_F,
RCP< const ElementFormula< Cmplx2d > >  Duinc_F,
concepts::Set< uint >  pml_innerAttrib,
Real2d  center 
)
void concepts::gfem::GfemDiffraction::assemble ( )
void concepts::gfem::GfemDiffraction::compressSystemM ( ) [inline]

Careful, the compression algorithm is heuristical and might completely destroy the condition number of the matrix.

Definition at line 125 of file gfemDiffraction.h.

static PiecewiseConstFormula<Cmplx> concepts::gfem::GfemDiffraction::genTECoeff ( const MID attToEps) [static]
static PiecewiseConstFormula<Cmplx> concepts::gfem::GfemDiffraction::genTMCoeff ( const MID attToEps) [static]
double concepts::gfem::GfemDiffraction::getb0 ( ) [inline]

Definition at line 142 of file gfemDiffraction.h.

const hp2D::TraceSpace& concepts::gfem::GfemDiffraction::getTraceSpace ( ) [inline]

Definition at line 146 of file gfemDiffraction.h.

void concepts::gfem::GfemDiffraction::regularizeL2Penalty ( double  eps)
void concepts::gfem::GfemDiffraction::set0thSommerfeld ( Set< uint >  nonRefl_bdAttr,
RCP< concepts::ElementFormula< Cmplx > >  rhs_F,
RCP< concepts::ElementFormula< Cmplx > >  dn_rhs_F,
bool  contribRHS = CONTRIB_RHS 
)
void concepts::gfem::GfemDiffraction::setB0 ( double  b0) [inline]

Definition at line 138 of file gfemDiffraction.h.

void concepts::gfem::GfemDiffraction::setDtN ( Set< uint >  nonRefl_bdAttrTop,
Set< uint >  nonRefl_bdAttrBottom,
Set< uint >  nonRefl_bdAttr,
std::string  u_inc_r,
std::string  u_inc_i,
std::string  Du_inc_r,
std::string  Du_inc_i,
int  approx_oder,
double  min_y = 0 
)

current limitation: incident field is independent of x_1 coordinate.

  • min_y: formerly y coordinate of incident field, can now be arbitrary
void concepts::gfem::GfemDiffraction::setKPer ( Cmplx  k0)
void concepts::gfem::GfemDiffraction::setNonRefl ( Set< uint >  nonRefl_bdAttr,
std::string  u_inc_r,
std::string  u_inc_i,
std::string  Du_inc_r,
std::string  Du_inc_i 
)
Deprecated:
: use set0thSommerfeld
void concepts::gfem::GfemDiffraction::setOmega ( double  omega)
void concepts::gfem::GfemDiffraction::setPMLBC ( Real2d  center,
Real2d  dist,
Real  strength,
Real  powercoeff,
Real  omega,
RCP< const ElementFormula< Cmplx > >  uinc_F,
RCP< const ElementFormula< Cmplx2d > >  Duinc_F,
int  pml_cellAttrib,
concepts::Set< uint >  pml_innerAttrib,
concepts::Set< uint >  pml_outerAttrib,
RCP< const ElementFormula< Cmplx > >  b2_0_F 
)
void concepts::gfem::GfemDiffraction::setPMLBC_sc ( Real2d  center,
Real2d  dist,
Real  strength,
Real  powercoeff,
Real  omega,
RCP< const ElementFormula< Cmplx > >  uinc_F,
RCP< const ElementFormula< Cmplx2d > >  Duinc_F,
RCP< const ElementFormula< Cmplx > >  DaDuinc_F,
concepts::Set< uint >  innerAttrib,
concepts::Set< uint >  pml_outerAttrib,
RCP< const ElementFormula< Cmplx > >  b2_0_F 
)
void concepts::gfem::GfemDiffraction::setRhs ( const std::string &  rhs_r,
const std::string &  rhs_i 
)

TODO: implement methods taking Formula or ElementFormula instances.

void concepts::gfem::GfemDiffraction::solve ( Vector< Cmplx > &  sol)

solve with LU decomposition

void concepts::gfem::GfemDiffraction::storeBFeig ( std::string  path,
bool  verbose = false 
)
void concepts::gfem::GfemDiffraction::storeSystemM ( const std::string &  filename,
Vector< Cmplx > *  sol = NULL 
)

Member Data Documentation

Definition at line 182 of file gfemDiffraction.h.

Definition at line 190 of file gfemDiffraction.h.

b_0 used in NRBC

Definition at line 160 of file gfemDiffraction.h.

Definition at line 157 of file gfemDiffraction.h.

Definition at line 167 of file gfemDiffraction.h.

Definition at line 168 of file gfemDiffraction.h.

Definition at line 173 of file gfemDiffraction.h.

Definition at line 67 of file gfemDiffraction.h.

Definition at line 179 of file gfemDiffraction.h.

Definition at line 183 of file gfemDiffraction.h.

Definition at line 189 of file gfemDiffraction.h.

Definition at line 188 of file gfemDiffraction.h.

Definition at line 181 of file gfemDiffraction.h.

Definition at line 175 of file gfemDiffraction.h.

periodicity condition on qper boundary

Definition at line 161 of file gfemDiffraction.h.

Definition at line 178 of file gfemDiffraction.h.

Definition at line 186 of file gfemDiffraction.h.

Definition at line 187 of file gfemDiffraction.h.

Definition at line 68 of file gfemDiffraction.h.

Definition at line 159 of file gfemDiffraction.h.

Definition at line 165 of file gfemDiffraction.h.

Definition at line 169 of file gfemDiffraction.h.

Definition at line 171 of file gfemDiffraction.h.

Definition at line 172 of file gfemDiffraction.h.

Definition at line 170 of file gfemDiffraction.h.

Definition at line 185 of file gfemDiffraction.h.

Definition at line 194 of file gfemDiffraction.h.

Definition at line 195 of file gfemDiffraction.h.

Definition at line 155 of file gfemDiffraction.h.

Definition at line 192 of file gfemDiffraction.h.

Definition at line 156 of file gfemDiffraction.h.

Definition at line 164 of file gfemDiffraction.h.


The documentation for this class was generated from the following file:

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