164 fe.getRefElement()->getSideNumberPtr(prism);
166 CHKERR moab.side_element(prism, 2, 3, face_side3);
167 CHKERR moab.side_element(prism, 2, 4, face_side4);
168 fe.getRefElement()->getSideNumberPtr(face_side3);
169 fe.getRefElement()->getSideNumberPtr(face_side4);
170 for (
int qq = 0; qq < 3; qq++) {
172 rval = moab.side_element(prism, 2, qq, quad);
173 if (
rval != MB_SUCCESS || quad == 0)
175 int side_number, sense, offset;
176 rval = moab.side_number(prism, quad, side_number, sense, offset);
177 if (side_number == -1 ||
rval != MB_SUCCESS)
180 .insert(boost::shared_ptr<SideNumber>(
181 new SideNumber(quad, side_number, sense, offset)));
184 for (; ee < 3; ee++) {
186 CHKERR moab.side_element(prism, 1, ee, edge);
187 boost::shared_ptr<SideNumber> side_ptr =
188 fe.getRefElement()->getSideNumberPtr(edge);
189 if (side_ptr->side_number != ee) {
191 "data inconsistency for edge %d while in FE data structure is "
193 ee, side_ptr->side_number);
195 CHKERR moab.side_element(prism, 1, 6 + ee, edge);
196 side_ptr = fe.getRefElement()->getSideNumberPtr(edge);
197 if (side_ptr->side_number != ee + 6) {
198 if (side_ptr->side_number != ee) {
200 "data inconsistency for edge %d while in FE data structure "
202 ee, side_ptr->side_number);
204 side_ptr->brother_side_number = ee + 6;
208 for (; ee < 6; ee++) {
210 rval = moab.side_element(prism, 1, ee, edge);
211 if (
rval != MB_SUCCESS || edge == 0)
213 int side_number, sense, offset;
214 rval = moab.side_number(prism, edge, side_number, sense, offset);
215 if (side_number == -1 ||
rval != MB_SUCCESS)
218 .insert(boost::shared_ptr<SideNumber>(
219 new SideNumber(edge, side_number, sense, offset)));
222 for (; nn < 3; nn++) {
224 CHKERR moab.side_element(prism, 0, nn, node);
225 boost::shared_ptr<SideNumber> side_ptr =
226 fe.getRefElement()->getSideNumberPtr(node);
227 if (side_ptr->side_number != nn) {
229 "data inconsistency for node %d while in FE datastructure is "
231 nn, side_ptr->side_number);
233 CHKERR moab.side_element(prism, 0, nn + 3, node);
234 side_ptr = fe.getRefElement()->getSideNumberPtr(node);
235 if (side_ptr->side_number != nn + 3) {
236 if (side_ptr->side_number != nn) {
238 "data inconsistency for node %d while in FE datastructure is "
240 nn, side_ptr->side_number);
242 side_ptr->brother_side_number = nn + 3;
249 switch (field.getSpace()) {
253 CHKERR moab.get_adjacencies(&prism, 1, 0,
false, nodes,
254 moab::Interface::UNION);
257 CHKERR moab.get_connectivity(&prism, 1, topo_nodes,
true);
259 CHKERR moab.get_connectivity(&prism, 1, mid_nodes,
false);
260 mid_nodes = subtract(mid_nodes, topo_nodes);
261 nodes = subtract(nodes, mid_nodes);
263 adjacency.insert(adjacency.end(), nodes.begin(), nodes.end());
265 auto siit = side_table.get<0>().lower_bound(get_id_for_min_type<MBEDGE>());
267 side_table.get<0>().upper_bound(get_id_for_max_type<MBEDGE>());
268 for (; siit != hi_siit; siit++)
269 adjacency.push_back(siit->get()->ent);
272 auto siit = side_table.get<0>().lower_bound(get_id_for_min_type<MBTRI>());
274 side_table.get<0>().upper_bound(get_id_for_max_type<MBQUAD>());
275 for (; siit != hi_siit; siit++)
276 adjacency.push_back(siit->get()->ent);
279 adjacency.push_back(prism);
282 CHKERR moab.get_entities_by_handle(field.getMeshset(), adjacency,
false);
283 for (
auto ent : adjacency) {
285 .insert(boost::shared_ptr<SideNumber>(
new SideNumber(ent, -1, 0, 0)));
290 "this field is not implemented for TRI finite element");