16#include "../diagonalizer.hpp"
18namespace plask {
namespace optical {
namespace modal {
21 size_long(12), size_tran(12),
25 expansion_rule(RULE_DIRECT),
27 refine_long(16), refine_tran(16),
35static inline void updatePML(
PML& pml,
XMLReader& reader) {
46 if (value.find(
',') == std::string::npos) {
51 long_field = boost::lexical_cast<T>(values.first);
52 tran_field = boost::lexical_cast<T>(values.second);
54 if (reader.
hasAttribute(attr+
"-long"))
throw XMLConflictingAttributesException(reader, attr, attr+
"-long");
55 if (reader.
hasAttribute(attr+
"-tran"))
throw XMLConflictingAttributesException(reader, attr, attr+
"-tran");
62static inline Expansion::Component readSymmetry(
const FourierSolver3D* solver,
const XMLReader& reader,
const std::string&
repr) {
63 AxisNames*
axes =
nullptr;
67 else if (
repr ==
"Etran" ||
repr ==
"Et" || (axes &&
repr ==
"E"+
axes->getNameForTran()) ||
68 repr ==
"Hlong" ||
repr ==
"Hl" || (axes &&
repr ==
"H"+
axes->getNameForLong()))
70 else if (
repr ==
"Elong" ||
repr ==
"El" || (axes &&
repr ==
"E"+
axes->getNameForLong()) ||
71 repr ==
"Htran" ||
repr ==
"Ht" || (axes &&
repr ==
"H"+
axes->getNameForTran()))
74 throw XMLBadAttrException(reader,
"symmetry",
repr,
"symmetric field component name (maybe you need to specify the geometry first)");
81 if (
param ==
"expansion") {
98 if (
dc != 1 &&
dc != 2)
115 }
else if (
param ==
"pmls") {
120 if (
node ==
"long") {
123 }
else if (
node ==
"tran") {
128 }
else if (
param ==
"mode") {
161 this->
stack.size(),
this->interface, (
this->interface==1)?
"" :
"s");
184 std::unique_ptr<RootDigger>
root;
204 throw Exception(
"{}: Cannot search for longitudinal wavevector with longitudinal symmetry",
getId());
215 throw Exception(
"{}: Cannot search for transverse wavevector with transverse symmetry",
getId());
240 throw BadInput(
getId(),
"unspecified incident polarization for reflectivity computation");
242 throw BadInput(
getId(),
"current longitudinal symmetry is inconsistent with the specified incident polarization");
244 throw BadInput(
getId(),
"current transverse symmetry is inconsistent with the specified incident polarization");
288 const shared_ptr<
const MeshD<3>>& dst_mesh,
294 while (
auto level = levels->yield()) {
296 for (
size_t i = 0; i != level->size(); ++i)
destination[level->index(i)] =
dest[i];