MCPcopy Create free account
hub / github.com/NanoComp/meep / epsmu_function

Function epsmu_function

libpympb/pympb.cpp:97–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95const double inf = 1.0e20;
96
97static void epsmu_function(symmetric_matrix *eps, symmetric_matrix *eps_inv, const mpb_real r[3],
98 void *epsilon_data, bool epsflag) {
99
100 mode_solver *ms = static_cast<mode_solver *>(epsilon_data);
101 meep_geom::material_type mat;
102 vector3 p;
103
104 // p needs to be in the lattice *unit* vector basis, while r is in the lattice
105 // vector basis. Also, shift origin to the center of the grid.
106 p.x = (r[0] - 0.5) * geometry_lattice.size.x;
107 p.y = (r[1] - 0.5) * geometry_lattice.size.y;
108 p.z = (r[2] - 0.5) * geometry_lattice.size.z;
109
110 // p = shift_to_unit_cell(p);
111
112 ms->get_material_pt(mat, p);
113 ms->material_epsmu(mat, eps, eps_inv, epsflag);
114}
115
116// This is the function passed to `set_maxwell_dielectric`
117void dielectric_function(symmetric_matrix *eps, symmetric_matrix *eps_inv, const mpb_real r[3],

Callers 2

dielectric_functionFunction · 0.85
mu_functionFunction · 0.85

Calls 2

material_epsmuMethod · 0.80
get_material_ptMethod · 0.45

Tested by

no test coverage detected