Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove verbose argument from meepgeom::set_materials_from_geometry #1000

Merged
merged 3 commits into from
Aug 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions python/meep.i
Original file line number Diff line number Diff line change
Expand Up @@ -1600,7 +1600,6 @@ meep::structure *create_structure_and_set_materials(vector3 cell_size,
geometric_object_list gobj_list,
vector3 center,
bool _ensure_periodicity,
bool verbose,
meep_geom::material_type _default_material,
meep_geom::absorber_list alist,
meep_geom::material_type_list extra_materials,
Expand All @@ -1627,7 +1626,7 @@ meep::structure *create_structure_and_set_materials(vector3 cell_size,

if (set_materials) {
meep_geom::set_materials_from_geometry(s, gobj_list, center, use_anisotropic_averaging, tol,
maxeval, _ensure_periodicity, verbose, _default_material,
maxeval, _ensure_periodicity, _default_material,
alist, extra_materials);
}

Expand Down
2 changes: 0 additions & 2 deletions python/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1066,7 +1066,6 @@ def _init_structure(self, k=False):
self.geometry,
self.geometry_center,
self.ensure_periodicity and not not self.k_point,
self.verbose,
self.default_material,
absorbers,
self.extra_materials,
Expand Down Expand Up @@ -1095,7 +1094,6 @@ def set_materials(self, geometry=None, default_material=None):
self.subpixel_tol,
self.subpixel_maxeval,
self.ensure_periodicity,
False,
default_material if default_material else self.default_material,
absorbers,
self.extra_materials
Expand Down
9 changes: 2 additions & 7 deletions src/meepgeom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,6 @@ class geom_epsilon : public meep::material_function {
void add_susceptibilities(meep::structure *s);
void add_susceptibilities(meep::field_type ft, meep::structure *s);

static bool verbose;

private:
void get_material_pt(material_type &material, const meep::vec &r);

Expand All @@ -368,7 +366,6 @@ class geom_epsilon : public meep::material_function {
};

/***********************************************************************/
bool geom_epsilon::verbose = false;

geom_epsilon::geom_epsilon(geometric_object_list g, material_type_list mlist,
const meep::volume &v) {
Expand Down Expand Up @@ -397,7 +394,7 @@ geom_epsilon::geom_epsilon(geometric_object_list g, material_type_list mlist,
geom_fix_object_list(geometry);
geom_box box = gv2box(v);
geometry_tree = create_geom_box_tree0(geometry, box);
if (meep::verbosity > 0 && verbose && meep::am_master()) {
if (meep::verbosity > 2 && meep::am_master()) {
master_printf("Geometric-object bounding-box tree:\n");
display_geom_box_tree(5, geometry_tree);

Expand Down Expand Up @@ -1475,11 +1472,9 @@ void add_absorbing_layer(absorber_list alist, double thickness, int direction, i
/***************************************************************/
void set_materials_from_geometry(meep::structure *s, geometric_object_list g, vector3 center,
bool use_anisotropic_averaging, double tol, int maxeval,
bool _ensure_periodicity, bool verbose,
bool _ensure_periodicity,
material_type _default_material, absorber_list alist,
material_type_list extra_materials) {
geom_epsilon::verbose = verbose;

// set global variables in libctlgeom based on data fields in s
geom_initialize();
geometry_center = center;
Expand Down
2 changes: 1 addition & 1 deletion src/meepgeom.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ void set_materials_from_geometry(meep::structure *s, geometric_object_list g,
bool use_anisotropic_averaging = true,
double tol = DEFAULT_SUBPIXEL_TOL,
int maxeval = DEFAULT_SUBPIXEL_MAXEVAL,
bool ensure_periodicity = false, bool verbose = false,
bool ensure_periodicity = false,
material_type _default_material = vacuum, absorber_list alist = 0,
material_type_list extra_materials = material_type_list());

Expand Down
1 change: 0 additions & 1 deletion tests/absorber-1d-ll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ int main(int argc, char *argv[]) {
DEFAULT_SUBPIXEL_TOL, // tol
DEFAULT_SUBPIXEL_MAXEVAL, // maxeval
false, // ensure_periodicity
false, // verbose
meep_geom::vacuum, alist);

if (alist) meep_geom::destroy_absorber_list(alist);
Expand Down
3 changes: 1 addition & 2 deletions tests/user-defined-material.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,9 @@ int main(int argc, char *argv[]) {
vector3 center = {0, 0, 0};
bool use_anisotropic_averaging = true;
bool ensure_periodicity = true;
bool verbose = false;
meep_geom::set_materials_from_geometry(&the_structure, g, center, use_anisotropic_averaging,
DEFAULT_SUBPIXEL_TOL, DEFAULT_SUBPIXEL_MAXEVAL,
ensure_periodicity, verbose, my_material);
ensure_periodicity, my_material);

fields f(&the_structure);

Expand Down