// Sets element order without updating the enumeration of dofs. For internal use. void HcurlSpace::set_element_order_internal(int id, int order) { assert_msg(mesh->get_element(id)->is_quad() || H2D_GET_V_ORDER(order) == 0, "Element #%d is triangle but vertical order is not zero", id); if (id < 0 || id >= mesh->get_max_element_id()) error("Invalid element id."); H2D_CHECK_ORDER(order); resize_tables(); edata[id].order = order; seq++; }
void Space<Scalar>::set_element_order_internal(int id, int order) { if(id < 0 || id >= mesh->get_max_element_id()) throw Hermes::Exceptions::Exception("Space<Scalar>::set_element_order_internal: Invalid element id."); resize_tables(); if(mesh->get_element(id)->is_quad() && get_type() != HERMES_L2_SPACE && H2D_GET_V_ORDER(order) == 0) order = H2D_MAKE_QUAD_ORDER(order, order); edata[id].order = order; seq = g_space_seq++; }
// just sets the element order without enumerating dof void Space::set_element_order_internal(int id, int order) { //NOTE: We need to take into account that L2 and Hcurl may use zero orders. The latter has its own version of this method, however. assert_msg(mesh->get_element(id)->is_triangle() || get_type() == 3 || H2D_GET_V_ORDER(order) != 0, "Element #%d is quad but given vertical order is zero", id); assert_msg(mesh->get_element(id)->is_quad() || H2D_GET_V_ORDER(order) == 0, "Element #%d is triangle but vertical is not zero", id); if (id < 0 || id >= mesh->get_max_element_id()) error("Invalid element id."); H2D_CHECK_ORDER(order); resize_tables(); if (mesh->get_element(id)->is_quad() && get_type() != 3 && H2D_GET_V_ORDER(order) == 0) order = H2D_MAKE_QUAD_ORDER(order, order); edata[id].order = order; seq++; }
void Space::set_element_orders(int* elem_orders_) { resize_tables(); Element* e; int counter = 0; for_all_elements(e, mesh) { H2D_CHECK_ORDER(elem_orders_[counter]); ElementData* ed = &edata[e->id]; if (e->is_triangle()) ed->order = elem_orders_[counter]; else ed->order = H2D_MAKE_QUAD_ORDER(elem_orders_[counter], elem_orders_[counter]); counter++; }
void Space<Scalar>::set_element_orders(int* elem_orders_) { resize_tables(); Element* e; int counter = 0; for_all_elements(e, mesh) { assert(elem_orders_[counter] >= 0 && elem_orders_[counter] <= shapeset->get_max_order()); ElementData* ed = &edata[e->id]; if(e->is_triangle()) ed->order = elem_orders_[counter]; else ed->order = H2D_MAKE_QUAD_ORDER(elem_orders_[counter], elem_orders_[counter]); counter++; }
void Space<Scalar>::set_uniform_order_internal(int order, int marker) { resize_tables(); int quad_order = H2D_MAKE_QUAD_ORDER(order, order); Element* e; for_all_active_elements(e, mesh) { if(marker == HERMES_ANY_INT || e->marker == marker) { ElementData* ed = &edata[e->id]; if(e->is_triangle()) ed->order = order; else ed->order = quad_order; } } seq = g_space_seq++; }