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

Function eval_material_func

scheme/structure.cpp:349–370  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

347}
348
349static material_type eval_material_func(function material_func, vector3 p) {
350 SCM pscm = ctl_convert_vector3_to_scm(p);
351 material_type material;
352 SCM mo;
353
354 mo = gh_call1(material_func, pscm);
355 material_type_input(mo, &material);
356
357 while (material.which_subclass == MTS::MATERIAL_FUNCTION) {
358 material_type m;
359
360 mo = gh_call1(material.subclass.material_function_data->material_func, pscm);
361 material_type_input(mo, &m);
362 material_type_destroy(material);
363 material = m;
364 }
365
366 if (material.which_subclass == MTS::MATERIAL_TYPE_SELF) { epsilon_file_material(material, p); }
367 CK(material.which_subclass != MTS::MATERIAL_FUNCTION, "infinite loop in material functions");
368
369 return material;
370}
371
372static int variable_material(int which_subclass) {
373 return (which_subclass == MTS::MATERIAL_FUNCTION);

Callers 2

get_material_ptMethod · 0.85
sigma_rowMethod · 0.85

Calls 1

epsilon_file_materialFunction · 0.70

Tested by

no test coverage detected