sources.hh
Go to the documentation of this file.
406 virtual Cmplx operator() (const ElementWithCell< Real > &elm, const Real3d &p, const Real t=0.0) const
412 virtual Cmplx operator() (const ElementWithCell< Real > &elm, const Real2d &p, const Real t=0.0) const
418 virtual Cmplx operator() (const ElementWithCell< Real > &elm, const Real p, const Real t=0.0) const
973 FormulaLayerPlaneWaveLayer(const Cmplx a, const Cmplx b, const Real kx, const Real ky, const int layer_label=0) :
1036 FormulaLayerPlaneWaveLayerGrad(const Cmplx a, const Cmplx b, const Real kx, const Real ky, const int layer_label=0) :
1040 a_(other.a_), b_(other.b_), kx_(other.kx_), ky_(other.ky_), layer_label_(other.layer_label_) {}
ElementFormulaContainer< Cmplx > coeff_b
Definition: sources.hh:445
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
Definition: sources.hh:441
virtual std::ostream & info(std::ostream &os) const
Definition: sources.hh:71
Formula for plane wave source in layered structure.
Definition: sources.hh:737
FormulaExpImag2DGrad(const Real2d k, const Cmplx u=1.0, Real2d x0=Real2d(0, 0))
Definition: sources.hh:166
virtual F operator()(const concepts::ElementWithCell< Real > &elm, const Real p, const Real t=0.0) const
Definition: pml_formula.h:212
FormulaLayerPlaneWaveLayer(const Cmplx a, const Cmplx b, const Real kx, const Real ky, const int layer_label=0)
Definition: sources.hh:973
virtual FormulaExpImag2DGrad * clone() const
Definition: sources.hh:170
#define conceptsThrowSimpleE(msg)
Throws a equivalent to conceptsAssert(false, exc)
Definition: exceptions.hh:411
virtual std::ostream & info(std::ostream &os) const
Definition: sources.hh:716
std::unique_ptr< Vector< Real > > epsilon_
Definition: sources.hh:723
Piecewise constant function defined by the attribute of a cell.
Definition: formula.hh:84
RCP< concepts::FormulaExpImag2D > u_inc
Definition: pml_formula.h:431
const std::string filename_
Definition: sources.hh:937
FormulaNormalOuterSP2D(const ElementFormulaContainer< Point< F, 2 > > vf, Real2d center=Real2d(0, 0), bool direction=OUTER)
Definition: sources.hh:229
static PiecewiseConstFormula< Cmplx > genTMCoeff(const MID &attToEps)
~FormulaLayerPlaneWaveTotalGrad()
Definition: sources.hh:1301
virtual F operator()(const concepts::ElementWithCell< G > &elm, const Real p, const Real t=0.0) const
Definition: pml_formula.h:330
FormulaExpImag2DRadialDer(const Real2d k, const Cmplx u=1.0)
Definition: sources.hh:123
Cmplx operator()(const Real3d &p, const Real t=0.0) const
Application operator.
Definition: sources.hh:985
Formula for plane wave source in layered structure.
Definition: sources.hh:958
Computes the scalar product <n, vf> of the normal n with a vector valued formula vf,...
Definition: pml_formula.h:195
std::unique_ptr< Vector< Cmplx > > rho_
Definition: sources.hh:724
ComposeFormulaMatVec(RCP< const ElementFormula< Mapping< F, DIM >, G > > A, RCP< const ElementFormula< Point< F, DIM >, G > > vf)
Definition: sources.hh:302
static PiecewiseConstFormula< Cmplx > genTECoeff(const MID &attToEps)
std::unique_ptr< Vector< Real > > d_
Definition: sources.hh:722
concepts::Real arg(const concepts::Point< concepts::Real, 2 > &p)
Returns the phase angle of a real 2D vector.
A cell in a mesh consist of topological information (neighbours, connectivity, orientation) and geome...
Definition: cell.hh:39
FormulaLayerPlaneWaveLayerGrad(const Cmplx a, const Cmplx b, const Real kx, const Real ky, const int layer_label=0)
Definition: sources.hh:1036
std::unique_ptr< Vector< Cmplx > > B_
Definition: sources.hh:943
Real3d elemMap(const Real coord_local) const
Definition: element.hh:86
virtual FormulaLayerPlaneWaveSourceGrad * clone() const
Definition: sources.hh:889
virtual Cmplx operator()(const Real3d &p, const Real t=0.0) const
Application operator.
Definition: sources.hh:683
FormulaLayerPlaneWaveSourceGrad(Vector< Real > &epsilon, Vector< Real > &d, const Real &kx, const Real omega)
Definition: sources.hh:755
~FormulaLayerPlaneWaveLayer()
Definition: sources.hh:979
concepts::ElementFormulaContainer< Cmplx > coeff_a
Definition: pml_formula.h:428
virtual Cmplx operator()(const Real p, const Real t=0.0) const
Application operator.
Definition: pml_formula.h:31
#define conceptsAssert(cond, exc)
Assert that a certain condition is fulfilled.
Definition: exceptions.hh:394
virtual concepts::Point< F, DIM > operator()(const concepts::ElementWithCell< G > &elm, const Real p, const Real t=0.0) const
Definition: pml_formula.h:284
ComposeFormulaMatVec(RCP< const ElementFormula< concepts::Mapping< F, DIM >, G > > A, RCP< const ElementFormula< concepts::Point< F, DIM >, G > > vf)
Definition: pml_formula.h:272
FormulaIncPlaneWaveSource(ElementFormulaContainer< Cmplx > coeff_a, ElementFormulaContainer< Cmplx > coeff_b, RCP< concepts::FormulaExpImag2D > u_inc)
Definition: pml_formula.h:362
Formula for plane wave source in layered structure.
Definition: sources.hh:1085
virtual std::ostream & info(std::ostream &os) const
Definition: sources.hh:150
#define DEBUGL(doit, msg)
~FormulaLayerPlaneWaveTotal()
Definition: sources.hh:1188
std::unique_ptr< Vector< Cmplx > > A_
Definition: sources.hh:942
Formula for gradient of plane wave source in layered structure.
Definition: sources.hh:1021
std::unique_ptr< Vector< Cmplx > > B_
Definition: sources.hh:727
Formula for plane wave source in layered structure.
Definition: sources.hh:505
void set(const uint attrib, const Formula< Cmplx > &formula)
Set the constant in an particular cell.
virtual FormulaLayerPlaneWaveSource * clone() const
Definition: sources.hh:675
virtual Cmplx2d operator()(const Real p, const Real t=0.0) const
Application operator.
Definition: pml_formula.h:147
virtual Cmplx operator()(const Real p, const Real t=0.0) const
Application operator.
Definition: pml_formula.h:63
FormulaLayerPlaneWaveTotalGrad(const Vector< Real > &epsilon, const Vector< Real > &d, const Real kx, const Real omega, const std::map< int, int > phystolayer)
Constructor.
Definition: sources.hh:1215
const std::string filename_
Definition: sources.hh:721
std::ostream & info(std::ostream &os) const
Definition: sources.hh:1003
std::ostream & info(std::ostream &os) const
Definition: sources.hh:1068
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
Definition: sources.hh:378
virtual std::ostream & info(std::ostream &os) const
Definition: sources.hh:197
Interface for a formula defined element by element.
Definition: elementFormula.hh:35
concepts::ElementFormulaContainer< Cmplx > coeff_b
Definition: pml_formula.h:428
std::unique_ptr< Vector< Cmplx > > rho_
Definition: sources.hh:940
std::unique_ptr< Vector< Real > > d_
Definition: sources.hh:938
FormulaExpImag1D(const Real k, const Cmplx u=1.0, Real x0=0.0)
Definition: sources.hh:53
Piecewise defined function defined by attributes.
Definition: formula.hh:218
ComposeFormulaVecEntry(RCP< const ElementFormula< Point< F, DIM >, G > > vf, int index)
Definition: sources.hh:348
F dot(const Point< F, dim > &b) const
Inner product, i.e. for complex arguments: this * conjugate(b)
static PiecewiseConstFormula< Cmplx > genTMCoeff(const MID &attToEps)
Definition: pml_formula.h:434
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
Definition: sources.hh:334
ComposeFormulaVecEntry(RCP< const ElementFormula< concepts::Point< F, DIM >, G > > vf, int index)
Definition: pml_formula.h:318
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
Definition: sources.hh:283
FormulaNormalOuterSP2D(const ElementFormulaContainer< concepts::Point< F, 2 > > vf, Real2d center=Real2d(0, 0), bool direction=OUTER)
Definition: pml_formula.h:200
const ElementFormulaContainer< concepts::Point< F, 2 > > vf
Definition: pml_formula.h:258
Formula for gradient of plane wave source in layered structure.
Definition: sources.hh:1198
std::complex< Real > Cmplx
Type for a complex number. It also depends on the setting of Real.
Definition: typedefs.hh:39
RCP< const ElementFormula< concepts::Point< F, DIM >, G > > vf
Definition: pml_formula.h:352
Cmplx2d operator()(const Real3d &p, const Real t=0.0) const
Application operator.
Definition: sources.hh:1048
virtual std::ostream & info(std::ostream &os) const
Definition: sources.hh:932
FormulaLayerPlaneWaveLayer * clone() const
Definition: sources.hh:981
FormulaExpImag2D(const Real2d k, const Cmplx u=1.0, Real2d x0=0.0)
Definition: sources.hh:85
FormulaLayerPlaneWaveLayerGrad * clone() const
Definition: sources.hh:1044
Point< F, dim > & ortho(const Point< F, dim > &a)
Change vector to the by 90 degrees (clockwise) rotated vector a (only 2D)
RCP< const ElementFormula< Point< F, DIM >, G > > vf
Definition: sources.hh:382
virtual Cmplx operator()(const Real p, const Real t=0.0) const
Application operator.
Definition: pml_formula.h:101
RCP< const ElementFormula< Mapping< F, DIM >, G > > A
Definition: sources.hh:338
Computes the Matrix-vector product A * vf, where A is a matrix valued formula and vf a vector valued ...
Definition: pml_formula.h:270
const ElementFormulaContainer< Point< F, 2 > > vf
Definition: sources.hh:287
FormulaLayerPlaneWaveLayerGrad(const FormulaLayerPlaneWaveLayerGrad &other)
Definition: sources.hh:1039
virtual const Cell & cell() const =0
Returns the cell on which the element is built.
static PiecewiseConstFormula< Cmplx > genTECoeff(const MID &attToEps)
Definition: pml_formula.h:463
FormulaIncPlaneWaveSource(ElementFormulaContainer< Cmplx > coeff_a, ElementFormulaContainer< Cmplx > coeff_b, RCP< FormulaExpImag2D > u_inc)
Definition: sources.hh:394
void ConstructFromBook()
Definition: sources.hh:624
std::unique_ptr< Vector< Real > > ky_
Definition: sources.hh:725
Solves a system of linear equations with general minimal residuals (GMRes).
Definition: gmres.hh:24
FormulaLayerPlaneWaveSource(Vector< Real > &epsilon, Vector< Real > &d, const Real &kx, const Real omega)
Definition: sources.hh:525
virtual FormulaExpImag2DRadialDer * clone() const
Definition: sources.hh:126
virtual std::ostream & info(std::ostream &os) const
Definition: sources.hh:108
#define conceptsAssert3(cond, exc, msg)
Assert that a certain condition is fulfilled.
Definition: exceptions.hh:442
RCP< const ElementFormula< concepts::Point< F, DIM >, G > > vf
Definition: pml_formula.h:309
RCP< const ElementFormula< concepts::Mapping< F, DIM >, G > > A
Definition: pml_formula.h:308
std::unique_ptr< Vector< Real > > epsilon_
Definition: sources.hh:939
RCP< const ElementFormula< Point< F, DIM >, G > > vf
Definition: sources.hh:339
virtual Cmplx2d operator()(const Real3d &p, const Real t=0.0) const
Application operator.
Definition: sources.hh:897
void ConstructFromBook()
Definition: sources.hh:834
std::unique_ptr< Vector< Cmplx > > A_
Definition: sources.hh:726
~FormulaLayerPlaneWaveLayerGrad()
Definition: sources.hh:1042
std::unique_ptr< Vector< Real > > ky_
Definition: sources.hh:941
virtual Cmplx operator()(const ElementWithCell< Real > &elm, const Real3d &p, const Real t=0.0) const
Definition: pml_formula.h:376
FormulaLayerPlaneWaveLayer(const FormulaLayerPlaneWaveLayer &other)
Definition: sources.hh:976
FormulaLayerPlaneWaveTotal(const Vector< Real > &epsilon, const Vector< Real > &d, const Real kx, const Real omega, const std::map< int, int > phystolayer)
Constructor.
Definition: sources.hh:1102