diff --git a/include/maxwell_common.h b/include/maxwell_common.h index d60047cc9783ca474d2477326f77961d67e47196..b84cde3241a60f3a3241df4d4fb54f5dab49ad7e 100644 --- a/include/maxwell_common.h +++ b/include/maxwell_common.h @@ -17,6 +17,7 @@ eval_boundary_sources(const model& mod, const parameter_loader& mpl, size_t face_num_base = 0; for (auto& e : mod) { + auto etag = e.material_tag(); for (size_t iF = 0; iF < e.num_faces(); iF++) { auto gfnum = face_num_base + iF; @@ -26,13 +27,13 @@ eval_boundary_sources(const model& mod, const parameter_loader& mpl, auto& pf = e.face(iF); auto bar = pf.barycenter(); - auto eps = mpl.epsilon(e.gmsh_tag(), bar); - auto mu = mpl.mu(e.gmsh_tag(), bar); + auto eps = mpl.epsilon(etag, bar); + auto mu = mpl.mu(etag, bar); auto Z = std::sqrt(mu/eps); vec3d n = state.eds[e.number()].normals.row(iF); - switch ( mpl.boundary_type(bd.gmsh_entity) ) + switch ( mpl.boundary_type(bd.material_tag()) ) { case boundary_condition::UNSPECIFIED: break; diff --git a/src/maxwell_common.cpp b/src/maxwell_common.cpp index 8976fd8189af17cebf0ff32847d2d799129283bf..bc3215563d9af82f361fa624520d8cc9bd6755ce 100644 --- a/src/maxwell_common.cpp +++ b/src/maxwell_common.cpp @@ -79,7 +79,7 @@ init_lax_milgram(const model& mod, const parameter_loader& mpl, { auto& pe = e.cell(iT); auto bar = pe.barycenter(); - auto tag = e.gmsh_tag(); + auto tag = e.material_tag(); auto my_eps = mpl.epsilon(tag, bar); auto my_mu = mpl.mu(tag, bar); @@ -101,7 +101,7 @@ init_lax_milgram(const model& mod, const parameter_loader& mpl, auto& ne_e = mod.entity_at(neigh.iE); auto& ne_pe = ne_e.cell(neigh.iT); auto ne_bar = ne_pe.barycenter(); - auto ne_tag = ne_e.gmsh_tag(); + auto ne_tag = ne_e.material_tag(); auto ne_eps = mpl.epsilon(ne_tag, ne_bar); auto ne_mu = mpl.mu(ne_tag, ne_bar); @@ -233,7 +233,7 @@ void export_J_field_nodal(const model& mod, silo& sdb, const vecxd& Ex, for (auto& e : mod) { - auto etag = e.gmsh_tag(); + auto etag = e.material_tag(); for (size_t iT = 0; iT < e.num_cells(); iT++) { auto& pe = e.cell(iT); @@ -338,7 +338,7 @@ void export_J_field_zonal(const model& mod, silo& sdb, const vecxd& Ex, for (size_t iE = 0; iE < mod.num_entities(); iE++) { auto& e = mod.entity_at(iE); - auto etag = e.gmsh_tag(); + auto etag = e.material_tag(); for (size_t iT = 0; iT < e.num_cells(); iT++) { auto& pe = e.cell(iT); diff --git a/src/maxwell_cpu.cpp b/src/maxwell_cpu.cpp index f826dbb290d819cc107880f637d37338f5d51518..e1e167a5e8d60d1ceed2e527b05f83d02a84c43b 100644 --- a/src/maxwell_cpu.cpp +++ b/src/maxwell_cpu.cpp @@ -22,15 +22,15 @@ init_matparams(const model& mod, solver_state& state, for (auto& e : mod) { - auto tag = e.gmsh_tag(); + auto etag = e.material_tag(); for (size_t iT = 0; iT < e.num_cells(); iT++) { auto& pe = e.cell(iT); auto& re = e.cell_refelem(pe); auto bar = pe.barycenter(); - auto epsilon = mpl.epsilon(tag, bar); - auto mu = mpl.mu(tag, bar); - auto sigma = mpl.sigma(tag, bar); + auto epsilon = mpl.epsilon(etag, bar); + auto mu = mpl.mu(etag, bar); + auto sigma = mpl.sigma(etag, bar); auto ofs = e.cell_global_dof_offset(iT); for (size_t iD = 0; iD < re.num_basis_functions(); iD++) @@ -543,7 +543,7 @@ eval_volume_sources(const model& mod, const parameter_loader& mpl, solver_state& { for (auto& e : mod) { - auto etag = e.gmsh_tag(); + auto etag = e.material_tag(); if ( not mpl.volume_has_source(etag) ) continue; diff --git a/src/maxwell_gpu.cpp b/src/maxwell_gpu.cpp index 390cbbc31b3ed102dd1f3fb4399e52d5c0a1dc66..25e0d6b17cdc13a31c6e63027816cfb3ba25d2b6 100644 --- a/src/maxwell_gpu.cpp +++ b/src/maxwell_gpu.cpp @@ -24,15 +24,15 @@ init_matparams(const model& mod, solver_state_gpu& state, for (auto& e : mod) { - auto tag = e.gmsh_tag(); + auto etag = e.material_tag(); for (size_t iT = 0; iT < e.num_cells(); iT++) { auto& pe = e.cell(iT); auto& re = e.cell_refelem(pe); auto bar = pe.barycenter(); - auto v_epsilon = mpl.epsilon(tag, bar); - auto v_mu = mpl.mu(tag, bar); - auto v_sigma = mpl.sigma(tag, bar); + auto v_epsilon = mpl.epsilon(etag, bar); + auto v_mu = mpl.mu(etag, bar); + auto v_sigma = mpl.sigma(etag, bar); auto ofs = e.cell_global_dof_offset(iT); for (size_t iD = 0; iD < re.num_basis_functions(); iD++) @@ -485,7 +485,7 @@ eval_volume_sources(const model& mod, const parameter_loader& mpl, solver_state_ { for (auto& e : mod) { - auto etag = e.gmsh_tag(); + auto etag = e.material_tag(); if ( not mpl.volume_has_source(etag) ) continue; diff --git a/src/maxwell_interface.cpp b/src/maxwell_interface.cpp index 5e5e6555861905f8a00182bc097b90cf35bd0408..26161c41bb715a0811c28dc11926d6eadfc4d116 100644 --- a/src/maxwell_interface.cpp +++ b/src/maxwell_interface.cpp @@ -403,6 +403,11 @@ parameter_loader::validate_conditions(const model& mod) const if (not validate_interface_condition(mod, bd.gmsh_entity) ) success = false; break; + +#ifdef USE_MPI + case face_type::INTERPROCESS_BOUNDARY: + break; +#endif /* USE_MPI */ } } @@ -415,7 +420,7 @@ parameter_loader::validate_model_params(const model& mod) const bool success = true; for (auto& e : mod) { - auto tag = e.gmsh_tag(); + auto tag = e.material_tag(); bool eps_valid = validate_materials(MAT_EPS, tag); bool mu_valid = validate_materials(MAT_MU, tag); bool sigma_valid = validate_materials(MAT_SIGMA, tag); diff --git a/src/maxwell_solver.cpp b/src/maxwell_solver.cpp index eb2d0b4755ca52085d5276f158884eeddd77ceb8..dc8315b73eee2a7690bb6b40c51266f20ed6ae09 100644 --- a/src/maxwell_solver.cpp +++ b/src/maxwell_solver.cpp @@ -166,7 +166,7 @@ reinit_materials(const model& mod, maxwell::solver_state& state, maxwell::parame { for (auto& e : mod) { - auto tag = e.gmsh_tag(); + auto tag = e.material_tag(); for (size_t iT = 0; iT < e.num_cells(); iT++) { auto& pe = e.cell(iT);