double CustomMatrixForm::er(int marker, double x, double y) const { if (in_load(x, y)) { double cx = -0.152994121; double cy = 0.030598824; double r = std::sqrt(sqr(cx - x) + sqr(cy - y)); return (7.5 + 1) / 2.0 - (7.5 - 1) * std::atan(10.0*(r - 0.043273273)) / M_PI; } return 1.0; }
// Relative permittivity as a function of x, y. double er(int marker, double x, double y) const { if (align_mesh && marker == 1) return 7.5; if (!align_mesh && in_load(x,y)) { double cx = -0.152994121; double cy = 0.030598824; double r = sqrt(sqr(cx - x) + sqr(cy - y)); return (7.5 + 1)/2.0 - (7.5 - 1) * atan(10.0*(r - 0.043273273)) / M_PI; } return 1.0; }
double CustomResidualForm::gamma(int marker, double x, double y) const { if (in_load(x, y)) { double cx = -0.152994121; double cy = 0.030598824; double r = std::sqrt(sqr(cx - x) + sqr(cy - y)); return (0.03 + 1) / 2.0 - (0.03 - 1) * std::atan(10.0*(r - 0.043273273)) / M_PI; } return 0.0; }
// gamma as a function of x, y double gam(int marker, double x, double y) { if (ALIGN_MESH && marker == 1) return 0.03; if (!ALIGN_MESH && in_load(x,y)) { double cx = -0.152994121; double cy = 0.030598824; double r = sqrt(sqr(cx - x) + sqr(cy - y)); return (0.03 + 1)/2.0 - (0.03 - 1) * atan(10.0*(r - 0.043273273)) / M_PI; } return 0.0; }
double CustomMatrixForm::er(int marker, double x, double y) const { if (align_mesh && (static_cast<CustomWeakForm*>(wf))->get_marker() == marker) return 7.5; if (!align_mesh && in_load(x,y)) { double cx = -0.152994121; double cy = 0.030598824; double r = std::sqrt(sqr(cx - x) + sqr(cy - y)); return (7.5 + 1)/2.0 - (7.5 - 1) * std::atan(10.0*(r - 0.043273273)) / M_PI; } return 1.0; }
void ta_sbfs (wctx_t *ctx) { alg_global_t *sm = ctx->global; size_t next_level_size, local_next_size; do { while (lb_balance(ctx->run->shared->lb, ctx->id, in_load(sm), split_sbfs)) { raw_data_t state_data = dfs_stack_pop (sm->in_stack); if (NULL != state_data) { if (grab_waiting(ctx, state_data)) { ta_explore_state (ctx); } } } local_next_size = dfs_stack_frame_size(sm->out_stack); next_level_size = sbfs_level (ctx, local_next_size); lb_reinit (ctx->run->shared->lb, ctx->id); swap (sm->out_stack, sm->in_stack); sm->stack = sm->out_stack; } while (next_level_size > 0 && !run_is_stopped(ctx->run)); }
// gamma as a function of x, y double gam(int marker, double x, double y) { if (ALIGN_MESH && marker == 1) return 0.03; if (!ALIGN_MESH && in_load(x,y)) return 0.03; return 0.0; }
// relative permittivity as a function of x, y double er(int marker, double x, double y) { if (ALIGN_MESH && marker == 1) return 7.5; if (!ALIGN_MESH && in_load(x,y)) return 7.5; return 1.0; }