Set distance to vertices on mesh.
123 auto it = field_ents->lower_bound(
124 FieldEntity::getLoBitNumberUId(field_bit_number));
125 auto hi_it = field_ents->upper_bound(
126 FieldEntity::getHiBitNumberUId(field_bit_number));
128 for(;it!=hi_it;it++) {
129 EntityType
type = it->get()->getEntType();
143 dofs[0] = cblas_dnrm2(3,
delta,1);
146 it = field_ents->lower_bound(
147 FieldEntity::getLoBitNumberUId(field_bit_number));
148 for(;it!=hi_it;it++) {
149 EntityType
type = it->get()->getEntType();
157 double coords[3*num_ndodes];
159 cblas_daxpy(3,1,&coords[3],1,coords,1);
160 cblas_dscal(3,0.5,coords,1);
166 auto conn_it0 = field_ents->find(
167 FieldEntity::getLoLocalEntityBitNumber(field_bit_number, conn[0]));
168 auto conn_it1 = field_ents->find(
169 FieldEntity::getLoLocalEntityBitNumber(field_bit_number, conn[1]));
171 if(conn_it0==field_ents->end()) {
174 if (conn_it1 == field_ents->end()) {
178 VectorAdaptor vec_conn0 = conn_it0->get()->getEntFieldData();
179 VectorAdaptor vec_conn1 = conn_it1->get()->getEntFieldData();
181 double ave_delta = 0.5*(vec_conn0[0]+vec_conn1[0]);
182 double edge_shape_function_val = 0.25;
193 dofs[0] = (cblas_dnrm2(3,
delta,1)-ave_delta)/edge_shape_function_val;
195 PetscFunctionReturn(0);