Class documentation of Concepts

Loading...
Searching...
No Matches
pml_formula.hh
Go to the documentation of this file.
1
14#ifndef waveprop_pmlformula_hh
15#define waveprop_pmlformula_hh
16
17
18#include <iostream>
19#include <memory>
20#include "stdio.h"
21#include "basics.hh"
22#include "formula/formula.hh"
24#include "geometry/formula.hh"
25#include "hp2D.hh"
26
27#include "pml_edge.hh"
28
29#define pmlHolger_D 0
30
31namespace concepts {
32
33
34 // **************************************************** FormulaPMLPowerSigma **
35
36 // Sigma for Cartesian PML, see Collino & Monk
37
38 template<typename F=Real>
39 class FormulaPMLPowerSigma : public Formula<F> {
40 public:
41 FormulaPMLPowerSigma(const Real offset, const int power=2
42 , const F sigma0 = 5.0, const Real center=0)
43 : offset_(offset)
44 , center_(center)
45 , power_(power)
46 , sigma0_(sigma0)
47 {}
48
49 virtual FormulaPMLPowerSigma* clone() const {
50 return new FormulaPMLPowerSigma(offset_, power_, sigma0_, center_);
51 }
52
53 bool inPMLregion(const Real p, const Real t = 0.0)
54 {
55 Real arg = fabs(p - center_) - offset_;
56
57 return arg >= 0;
58 }
59
60 virtual F operator() (const Real p, const Real t = 0.0) const {
61 Real arg = fabs(p - center_) - offset_;
62 if (arg < 0)
63 return F(0);
64 return sigma0_ * powi(arg , power_);
65 }
66
67 virtual F operator() (const Real2d& p, const Real t = 0.0) const {
68 return (*this)(p[0], t);
69 }
70
71 virtual F operator() (const Real3d& p, const Real t = 0.0) const {
72 return (*this)(p[0], t);
73 }
74 template<typename Real>
75 static inline Real powi(Real x, int powercoeff) {
76#if 1
77 Real res(1);
78 for(int i = 0; i < powercoeff; ++i) {
79 res *= x;
80 }
81 return res;
82#else
83 return pow(x, powercoeff);
84#endif
85 }
86 protected:
87 virtual std::ostream& info(std::ostream& os) const {
88 return os << concepts::typeOf(*this)<<"(" << sigma0_ << " * ( |x - (" << center_
89 << ")| - " << offset_ << ")_+^" << power_ << ")))";
90 }
91 private:
92 const Real offset_;
93 const Real center_;
94 const int power_;
95 const F sigma0_; // PML strength
96 };
97
98 // ************************************************** FormulaPMLPowerSigma2D **
99
114 template<typename F=Real>
115 class FormulaPMLPowerSigma2D : public Formula<F> {
116 public:
124 FormulaPMLPowerSigma2D(const Real offset, const int power = 2,
125 const F sigma0 = 5.0,
126 const Real2d& center = Real2d(0,0))
127 : offset_(offset), center_(center), power_(power), sigma0_(sigma0) {
128 }
129
130 virtual FormulaPMLPowerSigma2D* clone() const {
131 return new FormulaPMLPowerSigma2D(offset_, power_, sigma0_, center_);
132 }
133
134 virtual F operator() (const Real p, const Real t = 0.0) const {
135 conceptsThrowSimpleE("FormulaPMLPowerSigma2D currently only supports 2D!");
136 assert(false);
137 }
138
139 inline bool inPMLregion(const Real2d& p, const Real t = 0.0) const
140 {
141
142 Real arg = (p-center_).l2() - offset_;
143 return arg >= 0;
144 }
145
146 virtual F operator() (const Real2d& p, const Real t = 0.0) const {
147 Real dist = (p-center_).l2() - offset_;
148 if (dist < 0)
149 return F(0);
150 return sigma0_ * powi(dist, power_);
151 }
152
153 virtual F operator() (const Real3d& p, const Real t = 0.0) const {
154 return (*this)( Real2d(p[0], p[1]), t);
155 }
156
157 template<typename Real>
158 static inline Real powi(Real x, int powercoeff) {
159#if 1
160 Real res(1);
161 for (int i = 0; i < powercoeff; ++i) {
162 res *= x;
163 }
164 return res;
165#else
166 return pow(x, powercoeff);
167#endif
168 }
169 protected:
170 virtual std::ostream& info(std::ostream& os) const{
171 return os << concepts::typeOf(*this)<<"(" << sigma0_ << " * ( |x - (" << center_[0]
172 << "," << center_[1] << ")| - " << offset_ << ")_+^" << power_ << ")))";
173 }
174 private:
176 const Real offset_;
178 const Real2d center_;
179 // PML exponent
180 const int power_;
181 // PML strength
182 const F sigma0_;
183 };
184
185 // ************************************************* FormulaPMLPowerSigmaB2D **
186
203 template<typename F=Real>
204 class FormulaPMLPowerSigmaB2D : public Formula<F> {
205 public:
213 FormulaPMLPowerSigmaB2D(const Real offset, const int power = 2,
214 const F sigma0 = 5.0,
215 const Real2d& center = Real2d(0,0))
216 : offset_(offset), center_(center), power_(power), sigma0_(sigma0) {}
217
219 return new FormulaPMLPowerSigmaB2D(offset_, power_, sigma0_, center_);
220 }
221
222 virtual F operator() (const Real p, const Real t = 0.0) const {
224 ("FormulaPMLPowerSigmaB2D currently only supports 2D!"); assert(false);
225 }
226
227 inline bool inPMLregion(const Real2d& p, const Real t = 0.0) const
228 {
229 Real arg = (p-center_).l2() - offset_;
230 return arg >= 0;
231 }
232
233 virtual F operator() (const Real2d& p, const Real t = 0.0) const {
234 Real rho = (p-center_).l2();
235 Real arg = rho - offset_;
236 if (arg<0)
237 return F(0);
238 return sigma0_ * powi( arg , power_ + 1) / (rho) / (power_ + 1);
239 }
240
241 virtual F operator() (const Real3d& p, const Real t = 0.0) const {
242 return (*this)( Real2d(p[0], p[1]), t);
243 }
244
245 template<typename Real>
246 static inline Real powi(Real x, int powercoeff) {
247#if 1
248 Real res(1);
249 for (int i = 0; i < powercoeff; ++i) {
250 res *= x;
251 }
252 return res;
253#else
254 return pow(x, powercoeff);
255#endif
256 }
257 protected:
258 virtual std::ostream& info(std::ostream& os) const {
259 return os << concepts::typeOf(*this)<<"(" << sigma0_ << " * ( |x - ("
260 << center_[0] << "," << center_[1] << ")| - "
261 << offset_ << ")_+^" << power_ << ")))";
262 }
263 private:
265 const Real offset_;
267 const Real2d center_;
268 // PML exponent
269 const int power_;
270 // PML strength
271 const F sigma0_;
272 };
273
274 // ********************************************************** FomulaPMLCart **
275
279 class FormulaPMLCart : public ElementFormula<Cmplx> {
280 public:
281 enum PMLMode { DXDX, DYDY, IDENT, DX, DY };
282
283 FormulaPMLCart(const ElementFormulaContainer<Cmplx> coeff_a
284 , const ElementFormulaContainer<Cmplx> coeff_b
285 , RCP<Formula<Real> > sigma_x
286 , RCP<Formula<Real> > sigma_y
287 , PMLMode mode
288 , double omega
289 )
290 : coeff_a_(coeff_a)
291 , coeff_b_(coeff_b)
292 , sigma_x_(sigma_x)
293 , sigma_y_(sigma_y)
294 , mode_(mode)
295 , omega_(omega)
296 {}
297
298 virtual FormulaPMLCart* clone() const {
299 return new FormulaPMLCart(*this);
300 }
301
302 virtual Cmplx operator() (const ElementWithCell< Real > &elm, const Real3d &p, const Real t=0.0) const
303 {
304 Real2d px = elm.elemMap(p);
305 return operator()(elm, p, px, t);
306 }
307 virtual Cmplx operator() (const ElementWithCell< Real > &elm, const Real2d &p, const Real t=0.0) const
308 {
309 Real2d px = elm.elemMap(p);
310 return operator()(elm, p, px, t);
311 }
312 virtual Cmplx operator() (const ElementWithCell< Real > &elm, const Real p, const Real t=0.0) const
313 {
314 Real2d px = elm.elemMap(p);
315 return operator()(elm, p, px, t);
316 }
317
318 Cmplx gammaX(Real x) const {
319 return Cmplx(1, (*sigma_x_)(x) / omega_);
320 }
321
322 Cmplx gammaY(Real y) const {
323 return Cmplx(1, (*sigma_y_)(y) / omega_);
324 }
325
326 template <class RealNd>
327 inline Cmplx operator() (const ElementWithCell< Real > &elm, const RealNd &p, Real2d px,
328 const Real t=0.0) const
329 {
330 switch(mode_) {
331 case DXDX: return gammaY(px[1]) / gammaX(px[0]) * coeff_a_(elm, p);
332 case DX: return gammaY(px[1]) * coeff_a_(elm, p);
333 case DYDY: return gammaX(px[0]) / gammaY(px[1]) * coeff_a_(elm, p);
334 case DY: return gammaX(px[0]) * coeff_a_(elm, p);
335 case IDENT: return gammaX(px[0]) * gammaY(px[1]) * coeff_b_(elm, p);
336 }
337 conceptsThrowSimpleE("FormulaPMLCart has gone mad!"); assert(false);
338 }
339
340
341 protected:
342 virtual std::ostream& info(std::ostream& os) const {
343 return os << concepts::typeOf(*this)<<"(coeffs: "
344 << coeff_a_ << ", " << coeff_b_ << ", sigmas:"
345 << *sigma_x_ << ", " << *sigma_y_
346 << ")";
347 }
348 private:
349 const ElementFormulaContainer<Cmplx> coeff_a_;
350 const ElementFormulaContainer<Cmplx> coeff_b_;
351 RCP<Formula<Real> > sigma_x_;
352 RCP<Formula<Real> > sigma_y_;
353 PMLMode mode_;
354 double omega_;
355 };
356
357 // ************************************************ FormulaPMLBoxRestriction **
358
360 class FormulaPMLBoxRestriction : public ElementFormula<F, G> {
361 public:
362 FormulaPMLBoxRestriction(
363 RCP<FormulaPMLPowerSigma<Real> > sigma_x
364 , RCP<FormulaPMLPowerSigma<Real> > sigma_y
365 , RCP<ElementFormula<F, G> > formula
366 )
367 : sigma_x(sigma_x)
368 , sigma_y(sigma_y)
369 , formula(formula)
370 { }
371
372 virtual F operator() (const ElementWithCell< Real > &elm, const Real3d &p, const Real t=0.0) const
373 {
374 Real2d px = elm.elemMap(p);
375 return operator()(elm, p, px, t);
376 }
377
378 virtual F operator() (const ElementWithCell< Real > &elm, const Real2d &p, const Real t=0.0) const
379 {
380 Real2d px = elm.elemMap(p);
381 return operator()(elm, p, px, t);
382 }
383
384 virtual F operator() (const ElementWithCell< Real > &elm, const Real p, const Real t=0.0) const
385 {
386 Real2d px = elm.elemMap(p);
387 return operator()(elm, p, px, t);
388 }
389
390 template <class RealNd>
391 F operator() (const ElementWithCell< Real > &elm, const RealNd &p, Real2d px,
392 const Real t=0.0) const
393 {
394 if ( sigma_x->inPMLregion(px[0], t) || sigma_y->inPMLregion(px[1], t)) {
395 return formula->operator()(elm, p, t);
396 } else {
397 //cout << "out: " << px << p << formula->operator()(elm, p, t) << endl;
398
399 return F(0);
400 //return formula->operator()(elm, p, t);
401 }
402 }
403
405 return new FormulaPMLBoxRestriction(*this);
406 }
407
408 protected:
409 virtual std::ostream& info(std::ostream& os) const {
410 return os << concepts::typeOf(*this)<<"(" << formula << " :" << *sigma_x << ", " << sigma_y << ")))";
411 }
412 private:
415 RCP<ElementFormula<F> > formula;
416 };
417
418 // ******************************************************** FormulaPMLRadia **
419
432 class FormulaPMLRadia : public ElementFormula<Cmplx> {
433 public:
434 enum PMLMode { AD1, AD2, AS1, AS2, IDENT};
435
448 PMLMode mode, const Real2d& center = Real2d(0,0));
449
450 virtual FormulaPMLRadia* clone() const {
451 return new FormulaPMLRadia(*this);
452 }
453
454 virtual Cmplx operator() (const ElementWithCell< Real > &elm,
455 const Real p, const Real t = 0.0) const;
456 virtual Cmplx operator() (const ElementWithCell< Real > &elm,
457 const Real2d &p, const Real t = 0.0) const;
458 virtual Cmplx operator() (const ElementWithCell< Real > &elm,
459 const Real3d &p, const Real t = 0.0) const;
460
461 inline RCP<Formula<Real> > sigma() const { return sigma_; }
462 inline RCP<Formula<Real> > sigmaB() const { return sigmaB_; }
463 protected:
464 virtual std::ostream& info(std::ostream& os) const;
465 private:
467 RCP<Formula<Real> > sigma_;
469 RCP<Formula<Real> > sigmaB_;
471 PMLMode mode_;
473 Real2d center_;
474
475
479 inline Cmplx gamma_(Real2d &p) const{
480 return Cmplx(1, (*sigma_) (p));
481 }
485 inline Cmplx gammaB_(Real2d &p) const{
486 return Cmplx(1, (*sigmaB_)(p));
487 }
488 };
489
490 // ******************************************************* RadialPMLFormulas **
491
498 public:
506 RadialPMLFormulas(const Real offset, const int power = 2,
507 const Real sigma0 = 5.0,
508 const Real2d& center = Real2d(0,0));
509
515 return A_;
516 }
522 return M_;
523 }
524
525 inline RCP<Formula<Real> > sigma() const { return M_.sigma(); }
526 inline RCP<Formula<Real> > sigmaB() const { return M_.sigmaB(); }
527 protected:
528 virtual std::ostream& info(std::ostream& os) const;
529 private:
540 };
541
542
543
544
545 // ******************************************************* new cartesian PML **
546
553 class FormulaPMLCartNew : public ElementFormula<Cmplx> {
554 public:
555 enum PMLMode { DXDX, DYDY, IDENT, DX, DY , ZERO};
556
558 RCP<Formula<Real> > sigma_y,
559 PMLMode mode )
560 : sigma_x_(sigma_x),
561 sigma_y_(sigma_y),
562 mode_(mode)
563 {}
564
565 virtual FormulaPMLCartNew* clone() const {
566 return new FormulaPMLCartNew(*this);
567 }
568
569 virtual Cmplx operator() (const ElementWithCell< Real > &elm, const Real3d &p, const Real t=0.0) const
570 {
571 Real2d px = elm.elemMap(p);
572 return operator()(elm, p, px, t);
573 }
574 virtual Cmplx operator() (const ElementWithCell< Real > &elm, const Real2d &p, const Real t=0.0) const
575 {
576 Real2d px = elm.elemMap(p);
577 return operator()(elm, p, px, t);
578 }
579 virtual Cmplx operator() (const ElementWithCell< Real > &elm, const Real p, const Real t=0.0) const
580 {
581 Real2d px = elm.elemMap(p);
582 return operator()(elm, p, px, t);
583 }
584
585 inline RCP<Formula<Real> > sigmax() const { return sigma_x_; }
586 inline RCP<Formula<Real> > sigmay() const { return sigma_y_; }
587
588 Cmplx gammaX(Real x) const {
589 return Cmplx(1., (*sigma_x_)(x) );
590 }
591
592 Cmplx gammaY(Real y) const {
593 return Cmplx(1., (*sigma_y_)(y) );
594 }
595
596 template <class RealNd>
597 inline Cmplx operator() (const ElementWithCell< Real > &elm, const RealNd &p, Real2d px, const Real t=0.0) const
598 {
599 switch(mode_) {
600 case DXDX: return gammaY(px[1]) / gammaX(px[0]);
601 case DX: return gammaY(px[1]) ;
602 case DYDY: return gammaX(px[0]) / gammaY(px[1]) ;
603 case DY: return gammaX(px[0]) ;
604 case ZERO : return 0.0;
605 case IDENT: return gammaX(px[0]) * gammaY(px[1]) ;
606 }
607 conceptsThrowSimpleE("FormulaPMLCart has gone mad!"); assert(false);
608 }
609
610
611 protected:
612 virtual std::ostream& info(std::ostream& os) const {
613 return os << concepts::typeOf(*this)<<"( sigma x ="
614 << *sigma_x_ << ", sigma y = " << *sigma_y_
615 << ")";
616 }
617 private:
618 RCP<Formula<Real> > sigma_x_;
619 RCP<Formula<Real> > sigma_y_;
620 PMLMode mode_;
621
622 };
623
629
630 private:
639
640 public:
651 const int power = 2,
652 const Real sigma0 = 5.0,
653 const Real center_x =0,
654 const Real center_y = 0);
655
660 return A_;
661 }
666 return M_;
667 }
668
669 inline RCP<Formula<Real> > sigmax() const { return M_.sigmax(); }
670 inline RCP<Formula<Real> > sigmay() const { return M_.sigmay(); }
671
672 friend std::ostream& operator<<(std::ostream& out, const CartesianPMLFormulas &ca)
673 {
674 return(ca.info(out));
675 }
676protected:
677 virtual std::ostream& info(std::ostream& os) const;
678 };
679
680
681
682 // *********************************************************** hamburger PML **
687 class FormulaPMLHamburger : public ElementFormula<Cmplx>{
688 public:
689 enum PMLMode {M1, M2, M3, M4, IDENT};
690 private:
691 Real R;
692 Real d;
693 int power;
694 Real sigma0;
695 Real center_x, center_y;
696 Real2d center_point_up, center_point_down;
697 PMLMode mode;
699 FormulaPMLRadia RadiaUp;
700 FormulaPMLRadia RadiaDown;
701
702 FormulaPMLCartNew::PMLMode convert_mode_to_cart(FormulaPMLHamburger::PMLMode mode)
703 {
704 // modeCart
705 switch (mode){
706 case M1: return(FormulaPMLCartNew::DXDX);
707 case M2: return(FormulaPMLCartNew::ZERO);
708 case M3: return(FormulaPMLCartNew::ZERO);
709 case M4: return(FormulaPMLCartNew::DYDY);
710 case IDENT: return(FormulaPMLCartNew::IDENT);
711 }
712 return(FormulaPMLCartNew::IDENT);
713 }
714 FormulaPMLRadia::PMLMode convert_mode_to_radia(FormulaPMLHamburger::PMLMode mode)
715 {
716 // modeRadia
717 switch (mode){
718 case M1: return(FormulaPMLRadia::AD1);
719 case M2: return(FormulaPMLRadia::AS1);
720 case M3: return(FormulaPMLRadia::AS2);
721 case M4: return(FormulaPMLRadia::AD2);
722 case IDENT: return(FormulaPMLRadia::IDENT);
723 }
724 return(FormulaPMLRadia::IDENT);
725 }
726 public:
727 FormulaPMLHamburger(const Real R_,
728 const Real d_,
729 const int power_,
730 const Real sigma0_,
731 const Real center_x_,
732 const Real center_y_,
733 PMLMode mode_)
734 : R(R_),
735 d(d_),
736 power(power_),
737 sigma0(sigma0_),
738 center_x(center_x_),
739 center_y(center_y_),
740 center_point_up(center_x,center_y+d/2.),
741 center_point_down(center_x,center_y-d/2.),
742 mode(mode_),
743 Cart(
744 makeRCP(new FormulaPMLPowerSigma<Real>(R, power, sigma0, center_x)),
746 convert_mode_to_cart(mode)),
747 RadiaUp(
748 makeRCP(new FormulaPMLPowerSigma2D<Real>(R, power, sigma0)),
749 makeRCP(new FormulaPMLPowerSigmaB2D<Real>(R, power,sigma0)),
750 convert_mode_to_radia(mode),
751 center_point_up),
752 RadiaDown(
753 makeRCP(new FormulaPMLPowerSigma2D<Real>(R, power, sigma0)),
754 makeRCP(new FormulaPMLPowerSigmaB2D<Real>(R, power,sigma0)),
755 convert_mode_to_radia(mode),
756 center_point_down)
757
758 {
759
760 }
761
762 virtual FormulaPMLHamburger* clone() const {
763 return new FormulaPMLHamburger(*this);
764 }
765
766 virtual Cmplx operator() (const ElementWithCell< Real > &elm, const Real3d &p, const Real t=0.0) const
767 {
768 Real2d px = elm.elemMap(p);
769 return operator()(elm, p, px, t);
770 }
771
772 virtual Cmplx operator() (const ElementWithCell< Real > &elm, const Real2d &p, const Real t=0.0) const
773 {
774 Real2d px = elm.elemMap(p);
775 return operator()(elm, p, px, t);
776 }
777
778 virtual Cmplx operator() (const ElementWithCell< Real > &elm, const Real p, const Real t=0.0) const
779 {
780 Real2d px = elm.elemMap(p);
781 return operator()(elm, p, px, t);
782 }
783
784
785 template <class RealNd>
786 inline Cmplx operator() (const ElementWithCell< Real > &elm, const RealNd &p, Real2d px, const Real t=0.0) const
787 {
788
789 // px is the point in global coordinates
790 if (px[1]>d/2.){
791 // Upper "Bread" Part
792 return RadiaUp(elm, p, t);
793 }
794 else if (px[1]< -d/2.){
795 // Lower "Bread" Part
796 return(RadiaDown(elm, p, t));
797 }
798 else {
799 // "Steak" Part
800 return(Cart(elm, p, px, t));
801 }
802 }
803
804
805 protected:
806 virtual std::ostream& info(std::ostream& os) const {
807 return os << concepts::typeOf(*this)<<"( sigma x ="
808 << *Cart.sigmax() << ", sigma y = " << *Cart.sigmay()
809 << ", sigma up = "<< *RadiaUp.sigma()
810 << ", sigma down = " << *RadiaDown.sigma() << ")";
811 }
812 };
813
825
826 private:
827 Real R_, d_;
828 int power_;
829 Real sigma0_, center_x_, center_y_;
838
839 public:
853 const Real d,
854 const int power = 2,
855 const Real sigma0 = 5.0,
856 const Real center_x =0,
857 const Real center_y = 0);
858
863 return A_;
864 }
869 return M_;
870 }
871
872
873
874 friend std::ostream& operator<<(std::ostream& out, const HamburgerPMLFormulas &ca)
875 {
876 return(ca.info(out));
877 }
878protected:
879 virtual std::ostream& info(std::ostream& os) const;
880 };
881
882
883} // namespace concepts
884
885#endif // waveprop_pmlformula_hh
886
concepts::Array< F > pow(const concepts::Array< F > &a, const F e)
Returns the power of values in the array a with e.
Definition arrayOp.hh:56
ElementFormulaContainer< MapCmplx2d > A() const
ElementFormulaContainer< Cmplx > M() const
CartesianPMLFormulas(const Real offset_x, const Real offset_y, const int power=2, const Real sigma0=5.0, const Real center_x=0, const Real center_y=0)
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual FormulaPMLBoxRestriction * clone() const
Virtual copy constructor.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual FormulaPMLCartNew * clone() const
Virtual copy constructor.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual FormulaPMLCart * clone() const
Virtual copy constructor.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual FormulaPMLHamburger * clone() const
Virtual copy constructor.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
FormulaPMLPowerSigma2D(const Real offset, const int power=2, const F sigma0=5.0, const Real2d &center=Real2d(0, 0))
virtual FormulaPMLPowerSigma2D * clone() const
Virtual copy constructor.
virtual F operator()(const Real p, const Real t=0.0) const
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual FormulaPMLPowerSigmaB2D * clone() const
Virtual copy constructor.
FormulaPMLPowerSigmaB2D(const Real offset, const int power=2, const F sigma0=5.0, const Real2d &center=Real2d(0, 0))
virtual F operator()(const Real p, const Real t=0.0) const
virtual FormulaPMLPowerSigma * clone() const
Virtual copy constructor.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual F operator()(const Real p, const Real t=0.0) const
virtual FormulaPMLRadia * clone() const
Virtual copy constructor.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
FormulaPMLRadia(RCP< Formula< Real > > sigma, RCP< Formula< Real > > sigmaB, PMLMode mode, const Real2d &center=Real2d(0, 0))
ElementFormulaContainer< Cmplx > M() const
HamburgerPMLFormulas(const Real R, const Real d, const int power=2, const Real sigma0=5.0, const Real center_x=0, const Real center_y=0)
ElementFormulaContainer< MapCmplx2d > A() const
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
ElementFormulaContainer< MapCmplx2d > A() const
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
ElementFormulaContainer< Cmplx > M() const
RadialPMLFormulas(const Real offset, const int power=2, const Real sigma0=5.0, const Real2d &center=Real2d(0, 0))
#define conceptsThrowSimpleE(msg)
std::string typeOf(const T &t)
Definition output.hh:43
double Real
Definition typedefs.hh:39
RCP< T > makeRCP(T *x)
Set< F > makeSet(uint n, const F &first,...)
Definition set.hh:320
std::complex< Real > Cmplx
Type for a complex number. It also depends on the setting of Real.
Definition typedefs.hh:42