15 #include "../mesh/nurbs.hpp"
16 #include "../general/text.hpp"
40 istream::int_type next_char = input.peek();
46 if (buff ==
"NURBS_patches")
49 "NURBS_patches requires NURBS FE space");
54 MFEM_ABORT(
"unknown section: " << buff);
88 int g_nddofs = g_ndofs - (g_nvdofs + g_nedofs + g_nfdofs);
90 vi = ei = fi = di = 0;
91 for (
int i = 0; i < num_pieces; i++)
98 int l_nddofs = l_ndofs - (l_nvdofs + l_nedofs + l_nfdofs);
99 const double *l_data = gf_array[i]->
GetData();
100 double *g_data =
data;
103 for (
int d = 0; d < vdim; d++)
105 memcpy(g_data+vi, l_data, l_nvdofs*
sizeof(
double));
108 memcpy(g_data+ei, l_data, l_nedofs*
sizeof(
double));
111 memcpy(g_data+fi, l_data, l_nfdofs*
sizeof(
double));
114 memcpy(g_data+di, l_data, l_nddofs*
sizeof(
double));
121 memcpy(g_data+vdim*vi, l_data, vdim*l_nvdofs*
sizeof(
double));
122 l_data += vdim*l_nvdofs;
123 g_data += vdim*g_nvdofs;
124 memcpy(g_data+vdim*ei, l_data, vdim*l_nedofs*
sizeof(
double));
125 l_data += vdim*l_nedofs;
126 g_data += vdim*g_nedofs;
127 memcpy(g_data+vdim*fi, l_data, vdim*l_nfdofs*
sizeof(
double));
128 l_data += vdim*l_nfdofs;
129 g_data += vdim*g_nfdofs;
130 memcpy(g_data+vdim*di, l_data, vdim*l_nddofs*
sizeof(
double));
131 l_data += vdim*l_nddofs;
132 g_data += vdim*g_nddofs;
160 MFEM_ABORT(
"Error in update sequence. GridFunction needs to be updated "
161 "right after the space is updated.");
169 old_data.
Swap(*
this);
172 T->
Mult(old_data, *
this);
253 int nfe = ufes->
GetNE();
261 for (
int i = 0; i < nfe; i++)
263 if (subdomain >= 0 && ufes->
GetAttribute(i) != subdomain)
275 *ffes->
GetFE(i), fl, wcoef);
280 for (
int j = 0; j < fdofs.
Size(); j++)
296 for (
int i = 0; i < count.Size(); i++)
298 if (count[i] != 0) { flux(i) /= count[i]; }
329 tv.
MakeRef(const_cast<GridFunction &>(*
this), 0,
size);
362 int dof = FElem->
GetDof();
372 "invalid FE map type");
374 for (k = 0; k < n; k++)
377 nval[k] = shape * ((
const double *)loc_data + dof * vdim);
384 for (k = 0; k < n; k++)
388 nval[k] = loc_data * (&vshape(0,vdim));
405 return (DofVal * LocVec);
412 int dof = FElem->
GetDof();
420 "invalid FE map type");
425 for (
int k = 0; k < vdim; k++)
427 val(k) = shape * ((
const double *)loc_data + dof * k);
453 "invalid FE map type");
454 int dof = FElem->
GetDof();
455 Vector DofVal(dof), loc_data(dof);
457 for (
int k = 0; k < n; k++)
460 vals(k) = DofVal * loc_data;
488 "invalid FE map type");
490 int dof = FElem->
GetDof();
491 Vector DofLap(dof), loc_data(dof);
493 for (
int k = 0; k < n; k++)
498 laps(k) = DofLap * loc_data;
528 int size = (dim*(dim+1))/2;
531 "invalid FE map type");
533 int dof = FElem->
GetDof();
541 for (
int k = 0; k < n; k++)
547 for (
int i = 0; i <
size; i++)
549 for (
int d = 0; d < dof; d++)
551 hess(k,i) += DofHes(d,i) * loc_data[d];
625 int dof = FElem->
GetDof();
634 "invalid FE map type");
638 for (
int j = 0; j < nip; j++)
642 for (
int k = 0; k < vdim; k++)
644 vals(k,j) = shape * ((
const double *)loc_data + dof * k);
654 for (
int j = 0; j < nip; j++)
723 Vector shape, loc_values, orig_loc_values;
724 int i, j, d, ne, dof, odof, vdim;
728 for (i = 0; i < ne; i++)
737 loc_values.
SetSize(dof * vdim);
740 for (j = 0; j < dof; j++)
744 for (d = 0; d < vdim; d++)
746 loc_values(d*dof+j) =
747 shape * ((
const double *)orig_loc_values + d * odof) ;
760 Vector shape, loc_values, orig_loc_values;
761 int i, j, d, nbe, dof, odof, vdim;
765 for (i = 0; i < nbe; i++)
774 loc_values.
SetSize(dof * vdim);
777 for (j = 0; j < dof; j++)
781 for (d = 0; d < vdim; d++)
783 loc_values(d*dof+j) =
784 shape * ((
const double *)orig_loc_values + d * odof);
798 int d, j, k, n, sdim, dof, ind;
805 int *dofs = &vdofs[comp*dof];
811 for (k = 0; k < n; k++)
816 for (d = 0; d < sdim; d++)
819 for (j = 0; j < dof; j++)
820 if ( (ind=dofs[j]) >= 0 )
822 a += vshape(j, d) *
data[ind];
826 a -= vshape(j, d) *
data[-1-ind];
843 double *temp =
new double[
size];
846 for (j = 0; j < ndofs; j++)
847 for (i = 0; i < vdim; i++)
849 temp[j+i*ndofs] =
data[k++];
852 for (i = 0; i <
size; i++)
880 val(vertices[k]) += vals(k, comp);
881 overlap[vertices[k]]++;
885 for (i = 0; i < overlap.Size(); i++)
887 val(i) /= overlap[i];
895 int d, i, k, ind, dof, sdim;
904 for (i = 0; i < new_fes->
GetNE(); i++)
911 for (d = 0; d < sdim; d++)
913 for (k = 0; k < dof; k++)
915 if ( (ind=new_vdofs[dof*d+k]) < 0 )
917 ind = -1-ind, vals(k, d) = - vals(k, d);
919 vec_field(ind) += vals(k, d);
925 for (i = 0; i < overlap.Size(); i++)
927 vec_field(i) /= overlap[i];
939 int i, j, k,
dim, dof, der_dof, ind;
942 for (i = 0; i < overlap.Size(); i++)
949 for (i = 0; i < der_fes->
GetNE(); i++)
958 der_dof = der_fe->
GetDof();
964 for (j = 0; j < dof; j++)
965 loc_func(j) = ( (ind=vdofs[comp*dof+j]) >= 0 ) ?
967 for (k = 0; k < der_dof; k++)
975 for (j = 0; j <
dim; j++)
977 a += inv_jac(j, der_comp) * pt_grad(j);
979 der(der_dofs[k]) +=
a;
980 overlap[der_dofs[k]]++;
984 for (i = 0; i < overlap.Size(); i++)
986 der(i) /= overlap[i];
1007 MultAtB(loc_data_mat, dshape, gh);
1018 "invalid FE map type");
1023 for (
int i = 0; i < Jinv.
Width(); i++)
1025 for (
int j = 0; j < Jinv.
Height(); j++)
1027 div_v += grad_hat(i, j) * Jinv(j, i);
1039 div_v = (loc_data * divshape) / tr.
Weight();
1051 "invalid FE map type");
1056 Mult(grad_hat, Jinv, grad);
1057 MFEM_ASSERT(grad.Height() == grad.Width(),
"");
1058 if (grad.Height() == 3)
1061 curl(0) = grad(2,1) - grad(1,2);
1062 curl(1) = grad(0,2) - grad(2,0);
1063 curl(2) = grad(1,0) - grad(0,1);
1065 else if (grad.Height() == 2)
1068 curl(0) = grad(1,0) - grad(0,1);
1080 curl.
SetSize(curl_shape.Width());
1081 if (curl_shape.Width() == 3)
1084 curl_shape.MultTranspose(loc_data, curl_hat);
1089 curl_shape.MultTranspose(loc_data, curl);
1130 dshape.MultTranspose(lval, gh);
1142 "invalid FE map type");
1147 Mult(grad_hat, Jinv, grad);
1155 Vector loc_avgs, loc_this;
1160 for (
int i = 0; i <
fes->
GetNE(); i++)
1165 avgs.FESpace()->GetElementDofs(i, te_dofs);
1168 loc_mass.
Mult(loc_this, loc_avgs);
1169 avgs.AddElementVector(te_dofs, loc_avgs);
1171 loc_mass.
Mult(loc_this, loc_avgs);
1172 int_psi.AddElementVector(te_dofs, loc_avgs);
1174 for (
int i = 0; i < avgs.Size(); i++)
1176 avgs(i) /= int_psi(i);
1186 if (!mesh->
GetNE()) {
return; }
1197 MFEM_VERIFY(vdim == src.
fes->
GetVDim(),
"incompatible vector dimensions!");
1202 for (
int i = 0; i < mesh->
GetNE(); i++)
1209 dest_lvec.SetSize(vdim*P.
Height());
1215 for (
int vd = 0; vd < vdim; vd++)
1230 Vector vals, new_vals(size);
1233 MFEM_ASSERT(weights.
Size() ==
size,
"Different # of weights and dofs.");
1234 MFEM_ASSERT(_lo.
Size() ==
size,
"Different # of lower bounds and dofs.");
1235 MFEM_ASSERT(_hi.
Size() ==
size,
"Different # of upper bounds and dofs.");
1238 double tol = 1.e-12;
1246 slbqp.
Mult(vals, new_vals);
1252 double _min,
double _max)
1257 Vector vals, new_vals(size);
1260 double max_val = vals.
Max();
1261 double min_val = vals.
Min();
1263 if (max_val <= _min)
1270 if (_min <= min_val && max_val <= _max)
1275 Vector minv(size), maxv(size);
1276 minv = (_min > min_val) ? _min : min_val;
1277 maxv = (_max < max_val) ? _max : max_val;
1296 for (j = 0; j < vertices.
Size(); j++)
1298 nval(vertices[j]) += values[j];
1299 overlap[vertices[j]]++;
1302 for (i = 0; i < overlap.Size(); i++)
1304 nval(i) /= overlap[i];
1322 for (
int i = 0; i <
fes->
GetNE(); i++)
1330 for (
int j = 0; j < vdofs.
Size(); j++)
1334 MFEM_VERIFY(vals[j] != 0.0,
1335 "Coefficient has zeros, harmonic avg is undefined!");
1336 (*this)(vdofs[j]) += 1.0 / vals[j];
1340 (*this)(vdofs[j]) += vals[j];
1342 else { MFEM_ABORT(
"Not implemented"); }
1344 zones_per_vdof[vdofs[j]]++;
1363 for (
int i = 0; i <
fes->
GetNE(); i++)
1371 for (
int j = 0; j < vdofs.
Size(); j++)
1388 MFEM_VERIFY(vals[j] != 0.0,
1389 "Coefficient has zeros, harmonic avg is undefined!");
1390 (*this)(ldof) += isign / vals[j];
1394 (*this)(ldof) += isign*vals[j];
1397 else { MFEM_ABORT(
"Not implemented"); }
1399 zones_per_vdof[ldof]++;
1408 int i, j, fdof, d, ind, vdim;
1432 for (j = 0; j < fdof; j++)
1436 if (vcoeff) { vcoeff->
Eval(vc, *transf, ip); }
1437 for (d = 0; d < vdim; d++)
1439 if (!vcoeff && !coeff[d]) {
continue; }
1441 val = vcoeff ? vc(d) : coeff[d]->
Eval(*transf, ip);
1442 if ( (ind = vdofs[fdof*d+j]) < 0 )
1444 val = -val, ind = -1-ind;
1446 if (++values_counter[ind] == 1)
1452 (*this)(ind) += val;
1475 for (i = 0; i < bdr_edges.
Size(); i++)
1477 int edge = bdr_edges[i];
1479 if (vdofs.
Size() == 0) {
continue; }
1487 for (d = 0; d < vdim; d++)
1489 if (!coeff[d]) {
continue; }
1491 fe->
Project(*coeff[d], *transf, vals);
1492 for (
int k = 0; k < vals.
Size(); k++)
1494 ind = vdofs[d*vals.
Size()+k];
1495 if (++values_counter[ind] == 1)
1497 (*this)(ind) = vals(k);
1501 (*this)(ind) += vals(k);
1509 fe->
Project(*vcoeff, *transf, vals);
1510 for (
int k = 0; k < vals.
Size(); k++)
1513 if (++values_counter[ind] == 1)
1515 (*this)(ind) = vals(k);
1519 (*this)(ind) += vals(k);
1530 for (
int i = 0; i < dofs.
Size(); i++)
1533 double val = vals(i);
1534 if (k < 0) { k = -1 - k; val = -val; }
1535 if (++values_counter[k] == 1)
1570 fe->
Project(vcoeff, *T, lvec);
1571 accumulate_dofs(dofs, lvec, *
this, values_counter);
1581 for (
int i = 0; i < bdr_edges.
Size(); i++)
1583 int edge = bdr_edges[i];
1585 if (dofs.
Size() == 0) {
continue; }
1591 fe->
Project(vcoeff, *T, lvec);
1592 accumulate_dofs(dofs, lvec, *
this, values_counter);
1602 for (
int i = 0; i <
size; i++)
1604 const int nz = zones_per_vdof[i];
1605 if (nz) { (*this)(i) /= nz; }
1610 for (
int i = 0; i <
size; i++)
1612 const int nz = zones_per_vdof[i];
1613 if (nz) { (*this)(i) = nz/(*
this)(i); }
1618 MFEM_ABORT(
"invalud AvgType");
1633 const double *center = delta_coeff.
Center();
1634 const double *vert = mesh->
GetVertex(0);
1635 double min_dist, dist;
1639 min_dist =
Distance(center, vert, dim);
1640 for (
int i = 0; i < mesh->
GetNV(); i++)
1643 dist =
Distance(center, vert, dim);
1644 if (dist < min_dist)
1654 if (min_dist >= delta_coeff.
Tol())
1663 Vector vals, loc_mass_vals;
1664 for (
int i = 0; i < mesh->
GetNE(); i++)
1667 for (
int j = 0; j < vertices.
Size(); j++)
1668 if (vertices[j] == v_idx)
1678 loc_mass.Mult(vals, loc_mass_vals);
1679 integral += loc_mass_vals.
Sum();
1689 if (delta_c == NULL)
1694 for (
int i = 0; i <
fes->
GetNE(); i++)
1708 (*this) *= (delta_c->
Scale() / integral);
1719 for (
int i = 0; i < dofs.
Size(); i++)
1732 (*this)(vdof) = coeff.
Eval(*T, ip);
1760 for (
int i = 0; i < dofs.
Size(); i++)
1772 vcoeff.
Eval(val, *T, ip);
1776 (*this)(vdof) = val(vd);
1783 int i, j, fdof, d, ind, vdim;
1797 for (j = 0; j < fdof; j++)
1801 for (d = 0; d < vdim; d++)
1803 if (!coeff[d]) {
continue; }
1805 val = coeff[d]->
Eval(*transf, ip);
1806 if ( (ind = vdofs[fdof*d+j]) < 0 )
1808 val = -val, ind = -1-ind;
1828 for (
int i = 0; i <
fes->
GetNE(); i++)
1837 for (
int j = 0; j < vdofs.
Size(); j++)
1839 if (attr > dof_attr[vdofs[j]])
1841 (*this)(vdofs[j]) = vals[j];
1842 dof_attr[vdofs[j]] = attr;
1883 for (
int i = 0; i < values_counter.
Size(); i++)
1885 MFEM_ASSERT(
bool(values_counter[i]) ==
bool(ess_vdofs_marker[i]),
1900 for (
int i = 0; i < values_counter.
Size(); i++)
1902 MFEM_ASSERT(
bool(values_counter[i]) ==
bool(ess_vdofs_marker[i]),
1918 Vector vc(dim), nor(dim), lvec, shape;
1938 vcoeff.
Eval(vc, *T, ip);
1941 lvec.
Add(ip.
weight * (vc * nor), shape);
1953 Vector vc(dim), nor(dim), lvec;
1969 vcoeff.
Eval(vc, *T, ip);
1971 lvec(j) = (vc * nor);
1988 for (
int i = 0; i < values_counter.
Size(); i++)
1990 MFEM_ASSERT(
bool(values_counter[i]) ==
bool(ess_vdofs_marker[i]),
1999 double error = 0.0,
a;
2004 int fdof, d, i, intorder, j, k;
2030 for (k = 0; k < fdof; k++)
2031 if (vdofs[fdof*d+k] >= 0)
2033 a += (*this)(vdofs[fdof*d+k]) * shape(k);
2037 a -= (*this)(-1-vdofs[fdof*d+k]) * shape(k);
2040 a -= exsol[d]->
Eval(*transf, ip);
2048 return -sqrt(-error);
2063 for (
int i = 0; i <
fes->
GetNE(); i++)
2065 if (elems != NULL && (*elems)[i] == 0) {
continue; }
2067 int intorder = 2*fe->
GetOrder() + 1;
2079 exsol.
Eval(exact_vals, *T, *ir);
2082 vals.
Norm2(loc_errs);
2087 error += ip.
weight * T->
Weight() * (loc_errs(j) * loc_errs(j));
2093 return -sqrt(-error);
2100 Coefficient *ell_coeff,
double Nu,
int norm_type)
const
2103 int i, fdof,
dim, intorder, j, k;
2108 Vector e_grad, a_grad, shape, el_dofs, err_val, ell_coeff_val;
2121 for (i = 0; i < mesh->
GetNE(); i++)
2132 for (k = 0; k < fdof; k++)
2135 el_dofs(k) = (*this)(vdofs[k]);
2139 el_dofs(k) = - (*this)(-1-vdofs[k]);
2146 exgrad->
Eval(e_grad, *transf, ip);
2148 Mult(dshape, Jinv, dshapet);
2152 ell_coeff->
Eval(*transf, ip) *
2161 int i1 = face_elem_transf->
Elem1No;
2162 int i2 = face_elem_transf->
Elem2No;
2169 intorder = 2 * intorder;
2175 transf = face_elem_transf->
Elem1;
2181 for (k = 0; k < fdof; k++)
2184 el_dofs(k) = (*this)(vdofs[k]);
2188 el_dofs(k) = - (*this)(-1-vdofs[k]);
2195 ell_coeff_val(j) = ell_coeff->
Eval(*transf, eip);
2196 err_val(j) = exsol->
Eval(*transf, eip) - (shape * el_dofs);
2202 transf = face_elem_transf->
Elem2;
2208 for (k = 0; k < fdof; k++)
2211 el_dofs(k) = (*this)(vdofs[k]);
2215 el_dofs(k) = - (*this)(-1-vdofs[k]);
2222 ell_coeff_val(j) += ell_coeff->
Eval(*transf, eip);
2223 ell_coeff_val(j) *= 0.5;
2224 err_val(j) -= (exsol->
Eval(*transf, eip) - (shape * el_dofs));
2228 transf = face_elem_transf->
Face;
2233 error += (ip.
weight * Nu * ell_coeff_val(j) *
2234 pow(transf->
Weight(), 1.0-1.0/(dim-1)) *
2235 err_val(j) * err_val(j));
2241 return -sqrt(-error);
2249 double error = 0.0,
a;
2254 int fdof, d, i, intorder, j, k;
2281 for (k = 0; k < fdof; k++)
2282 if (vdofs[fdof*d+k] >= 0)
2284 a += (*this)(vdofs[fdof*d+k]) * shape(k);
2288 a -= (*this)(-1-vdofs[fdof*d+k]) * shape(k);
2290 a -= exsol[d]->
Eval(*transf, ip);
2308 int i, fdof,
dim, intorder, j, k;
2312 Vector e_grad, a_grad, shape, el_dofs, err_val, ell_coeff_val;
2315 double a, error = 0.0;
2324 for (i = 0; i < mesh->
GetNE(); i++)
2326 if (elems != NULL && (*elems)[i] == 0) {
continue; }
2343 for (k = 0; k < fdof; k++)
2346 el_dofs(k) = (*this)(vdofs[k]);
2350 el_dofs(k) = -(*this)(-1-vdofs[k]);
2357 a = (el_dofs * shape) - (exsol->
Eval(*transf, ip));
2363 for (i = 0; i < mesh->
GetNE(); i++)
2365 if (elems != NULL && (*elems)[i] == 0) {
continue; }
2383 for (k = 0; k < fdof; k++)
2386 el_dofs(k) = (*this)(vdofs[k]);
2390 el_dofs(k) = -(*this)(-1-vdofs[k]);
2397 exgrad->
Eval(e_grad, *transf, ip);
2399 Mult(dshape, Jinv, dshapet);
2418 for (
int i = 0; i <
fes->
GetNE(); i++)
2428 int intorder = 2*fe->
GetOrder() + 1;
2437 double err = fabs(vals(j) - exsol.
Eval(*T, ip));
2443 err *= weight->
Eval(*T, ip);
2451 err *= weight->
Eval(*T, ip);
2453 error = std::max(error, err);
2463 error = -pow(-error, 1./p);
2467 error = pow(error, 1./p);
2484 for (
int i = 0; i <
fes->
GetNE(); i++)
2494 int intorder = 2*fe->
GetOrder() + 1;
2503 double err = fabs(vals(j) - exsol.
Eval(*T, ip));
2509 err *= weight->
Eval(*T, ip);
2517 err *= weight->
Eval(*T, ip);
2519 error[i] = std::max(error[i], err);
2527 error[i] = -pow(-error[i], 1./p);
2531 error[i] = pow(error[i], 1./p);
2548 for (
int i = 0; i <
fes->
GetNE(); i++)
2558 int intorder = 2*fe->
GetOrder() + 1;
2563 exsol.
Eval(exact_vals, *T, *ir);
2570 vals.
Norm2(loc_errs);
2574 v_weight->
Eval(exact_vals, *T, *ir);
2577 for (
int j = 0; j < vals.
Width(); j++)
2580 for (
int d = 0; d < vals.
Height(); d++)
2582 err += vals(d,j)*exact_vals(d,j);
2584 loc_errs(j) = fabs(err);
2591 double err = loc_errs(j);
2597 err *= weight->
Eval(*T, ip);
2605 err *= weight->
Eval(*T, ip);
2607 error = std::max(error, err);
2617 error = -pow(-error, 1./p);
2621 error = pow(error, 1./p);
2641 for (
int i = 0; i <
fes->
GetNE(); i++)
2651 int intorder = 2*fe->
GetOrder() + 1;
2656 exsol.
Eval(exact_vals, *T, *ir);
2663 vals.
Norm2(loc_errs);
2667 v_weight->
Eval(exact_vals, *T, *ir);
2670 for (
int j = 0; j < vals.
Width(); j++)
2673 for (
int d = 0; d < vals.
Height(); d++)
2675 err += vals(d,j)*exact_vals(d,j);
2677 loc_errs(j) = fabs(err);
2684 double err = loc_errs(j);
2690 err *= weight->
Eval(*T, ip);
2698 err *= weight->
Eval(*T, ip);
2700 error[i] = std::max(error[i], err);
2708 error[i] = -pow(-error[i], 1./p);
2712 error[i] = pow(error[i], 1./p);
2739 out <<
"NURBS_patches\n";
2768 out <<
"SCALARS " << field_name <<
" double 1\n"
2769 <<
"LOOKUP_TABLE default\n";
2770 for (
int i = 0; i < mesh->
GetNE(); i++)
2777 for (
int j = 0; j < val.
Size(); j++)
2779 out << val(j) <<
'\n';
2783 else if ( (vec_dim == 2 || vec_dim == 3) && mesh->
SpaceDimension() > 1)
2786 out <<
"VECTORS " << field_name <<
" double\n";
2787 for (
int i = 0; i < mesh->
GetNE(); i++)
2794 for (
int j = 0; j < vval.
Width(); j++)
2796 out << vval(0, j) <<
' ' << vval(1, j) <<
' ';
2812 for (
int vd = 0; vd < vec_dim; vd++)
2814 out <<
"SCALARS " << field_name << vd <<
" double 1\n"
2815 <<
"LOOKUP_TABLE default\n";
2816 for (
int i = 0; i < mesh->
GetNE(); i++)
2823 for (
int j = 0; j < val.
Size(); j++)
2825 out << val(j) <<
'\n';
2836 double v1[3] = { p2[0] - p1[0], p2[1] - p1[1], p2[2] - p1[2] };
2837 double v2[3] = { p3[0] - p1[0], p3[1] - p1[1], p3[2] - p1[2] };
2838 double n[] = { v1[1] * v2[2] - v1[2] * v2[1],
2839 v1[2] * v2[0] - v1[0] * v2[2],
2840 v1[0] * v2[1] - v1[1] * v2[0]
2842 double rl = 1.0 / sqrt(n[0] * n[0] + n[1] * n[1] + n[2] * n[2]);
2843 n[0] *= rl; n[1] *= rl; n[2] *= rl;
2845 out <<
" facet normal " << n[0] <<
' ' << n[1] <<
' ' << n[2]
2847 <<
"\n vertex " << p1[0] <<
' ' << p1[1] <<
' ' << p1[2]
2848 <<
"\n vertex " << p2[0] <<
' ' << p2[1] <<
' ' << p2[2]
2849 <<
"\n vertex " << p3[0] <<
' ' << p3[1] <<
' ' << p3[2]
2850 <<
"\n endloop\n endfacet\n";
2866 double pts[4][3], bbox[3][2];
2868 out <<
"solid GridFunction\n";
2870 bbox[0][0] = bbox[0][1] = bbox[1][0] = bbox[1][1] =
2871 bbox[2][0] = bbox[2][1] = 0.0;
2872 for (i = 0; i < mesh->
GetNE(); i++)
2879 for (k = 0; k < RG.
Size()/n; k++)
2881 for (j = 0; j < n; j++)
2884 pts[j][0] = pointmat(0,l);
2885 pts[j][1] = pointmat(1,l);
2886 pts[j][2] = values(l);
2902 bbox[0][0] = pointmat(0,0);
2903 bbox[0][1] = pointmat(0,0);
2904 bbox[1][0] = pointmat(1,0);
2905 bbox[1][1] = pointmat(1,0);
2906 bbox[2][0] = values(0);
2907 bbox[2][1] = values(0);
2910 for (j = 0; j < values.
Size(); j++)
2912 if (bbox[0][0] > pointmat(0,j))
2914 bbox[0][0] = pointmat(0,j);
2916 if (bbox[0][1] < pointmat(0,j))
2918 bbox[0][1] = pointmat(0,j);
2920 if (bbox[1][0] > pointmat(1,j))
2922 bbox[1][0] = pointmat(1,j);
2924 if (bbox[1][1] < pointmat(1,j))
2926 bbox[1][1] = pointmat(1,j);
2928 if (bbox[2][0] > values(j))
2930 bbox[2][0] = values(j);
2932 if (bbox[2][1] < values(j))
2934 bbox[2][1] = values(j);
2939 mfem::out <<
"[xmin,xmax] = [" << bbox[0][0] <<
',' << bbox[0][1] <<
"]\n"
2940 <<
"[ymin,ymax] = [" << bbox[1][0] <<
',' << bbox[1][1] <<
"]\n"
2941 <<
"[zmin,zmax] = [" << bbox[2][0] <<
',' << bbox[2][1] <<
']'
2944 out <<
"endsolid GridFunction" << endl;
2956 const char *msg =
"invalid input stream";
2962 in >> ident; MFEM_VERIFY(ident ==
"VDim:", msg);
2989 out <<
"VDim: " <<
vdim <<
'\n'
3006 int with_subdomains,
3014 int nfe = ufes->
GetNE();
3018 Vector ul, fl, fla, d_xyz;
3028 if (with_subdomains)
3033 double total_error = 0.0;
3034 for (
int s = 1; s <= nsd; s++)
3037 u.
ComputeFlux(blfi, flux, with_coeff, (with_subdomains ? s : -1));
3039 for (
int i = 0; i < nfe; i++)
3041 if (with_subdomains && ufes->
GetAttribute(i) != s) {
continue; }
3051 *ffes->
GetFE(i), fl, with_coeff);
3056 (aniso_flags ? &d_xyz : NULL));
3058 error_estimates(i) = std::sqrt(err);
3064 for (
int k = 0; k <
dim; k++)
3069 double thresh = 0.15 * 3.0/
dim;
3071 for (
int k = 0; k <
dim; k++)
3073 if (d_xyz[k] / sum > thresh) { flag |= (1 << k); }
3076 (*aniso_flags)[i] = flag;
3081 return std::sqrt(total_error);
3104 for (
int j = 0; j < nip; j++)
3121 norm = std::max(norm, err);
3130 norm = -pow(-norm, 1./p);
3134 norm = pow(norm, 1./p);
3148 return sol_in.
Eval(*T_in, ip);
3159 string cname = name;
3160 if (cname ==
"Linear")
3164 else if (cname ==
"Quadratic")
3168 else if (cname ==
"Cubic")
3172 else if (!strncmp(name,
"H1_", 3))
3176 else if (!strncmp(name,
"H1Pos_", 6))
3181 else if (!strncmp(name,
"L2_T", 4))
3185 else if (!strncmp(name,
"L2_", 3))
3191 mfem::err <<
"Extrude1DGridFunction : unknown FE collection : "
int GetNPoints() const
Returns the number of the points in the integration rule.
void SaveSTLTri(std::ostream &out, double p1[], double p2[], double p3[])
Abstract class for Finite Elements.
std::ostream & operator<<(std::ostream &out, const Mesh &mesh)
Ordering::Type GetOrdering() const
Return the ordering method.
int Size() const
Logical size of the array.
For scalar fields; preserves point values.
void SetSubVector(const Array< int > &dofs, const double value)
Set the entries listed in dofs to the given value.
int GetVSize() const
Return the number of vector dofs, i.e. GetNDofs() x GetVDim().
double * HostReadWrite()
Shortcut for mfem::ReadWrite(vec.GetMemory(), vec.Size(), false).
int GetDim() const
Returns the reference space dimension for the finite element.
int GetAttribute(int i) const
int GetNDofs() const
Returns number of degrees of freedom.
Class for an integration rule - an Array of IntegrationPoint.
void GetElementAverages(GridFunction &avgs) const
const double * GetVertex(int i) const
Return pointer to vertex i's coordinates.
void NewDataAndSize(double *d, int s)
Set the Vector data and size, deleting the old data, if owned.
Class for grid function - Vector with associated FE space.
int DofToVDof(int dof, int vd, int ndofs=-1) const
const SparseMatrix * GetConformingProlongation() const
The returned SparseMatrix is owned by the FiniteElementSpace.
virtual void CalcVShape(const IntegrationPoint &ip, DenseMatrix &shape) const
Evaluate the values of all shape functions of a vector finite element in reference space at the given...
Class used for extruding scalar GridFunctions.
void SumFluxAndCount(BilinearFormIntegrator &blfi, GridFunction &flux, Array< int > &counts, bool wcoef, int subdomain)
void GetElementVertices(int i, Array< int > &vertices) const
Returns the vertices of element i.
const IntegrationRule & Get(int GeomType, int Order)
Returns an integration rule for given GeomType and Order.
void MergeGridFunctions(GridFunction *gf_array[], int num_pieces, GridFunction &merged)
virtual double ComputeL2Error(Coefficient &exsol, const IntegrationRule *irs[]=NULL) const
void ProjectDeltaCoefficient(DeltaCoefficient &delta_coeff, double &integral)
virtual void CalcPhysHessian(ElementTransformation &Trans, DenseMatrix &Hessian) const
Evaluate the Hessian of all shape functions of a scalar finite element in reference space at the give...
virtual void Project(Coefficient &coeff, ElementTransformation &Trans, Vector &dofs) const
virtual void Eval(Vector &V, ElementTransformation &T, const IntegrationPoint &ip)=0
Evaluate the vector coefficient in the element described by T at the point ip, storing the result in ...
void GetVectorValue(int i, const IntegrationPoint &ip, Vector &val) const
int GetNumGeometries(int dim) const
Return the number of geometries of the given dimension present in the mesh.
void SetSize(int s)
Resize the vector to size s.
void GetElementVDofs(int i, Array< int > &vdofs) const
Returns indexes of degrees of freedom in array dofs for i'th element.
virtual void CalcPhysLaplacian(ElementTransformation &Trans, Vector &Laplacian) const
Evaluate the Laplacian of all shape functions of a scalar finite element in reference space at the gi...
GridFunction * Extrude1DGridFunction(Mesh *mesh, Mesh *mesh2d, GridFunction *sol, const int ny)
Extrude a scalar 1D GridFunction, after extruding the mesh with Extrude1D.
void MakeOwner(FiniteElementCollection *_fec)
Make the GridFunction the owner of fec and fes.
double Scale()
Return the scale set by SetScale() multiplied by the time-dependent function specified by SetFunction...
void ProjectDiscCoefficient(VectorCoefficient &coeff, Array< int > &dof_attr)
bool own_qspace
QuadratureSpace ownership flag.
void Mult(const Table &A, const Table &B, Table &C)
C = A * B (as boolean matrices)
int GetSize() const
Return the total number of quadrature points.
int Width() const
Get the width (size of input) of the Operator. Synonym with NumCols().
double Norml2() const
Returns the l2 norm of the vector.
void UseDevice(bool use_dev) const
Enable execution of Vector operations using the mfem::Device.
virtual const FiniteElement * FiniteElementForGeometry(Geometry::Type GeomType) const =0
void GetSubVector(const Array< int > &dofs, Vector &elemvect) const
int GetOrder() const
Returns the order of the finite element. In the case of anisotropic orders, returns the maximum order...
Coefficient defined by a GridFunction. This coefficient is mesh dependent.
virtual void GetEssentialVDofs(const Array< int > &bdr_attr_is_ess, Array< int > &ess_vdofs, int component=-1) const
Piecewise-(bi)linear continuous finite elements.
Data type dense matrix using column-major storage.
Delta function coefficient.
void ImposeBounds(int i, const Vector &weights, const Vector &_lo, const Vector &_hi)
int Size() const
Returns the size of the vector.
int GetBdrAttribute(int i) const
int GetNE() const
Returns number of elements.
double Tol()
See SetTol() for description of the tolerance parameter.
virtual void Mult(const Vector &x, Vector &y) const =0
Operator application: y=A(x).
void AccumulateAndCountBdrTangentValues(VectorCoefficient &vcoeff, Array< int > &bdr_attr, Array< int > &values_counter)
int vdim
Vector dimension.
void GetVectorGradientHat(ElementTransformation &T, DenseMatrix &gh) const
int GetNV() const
Returns number of vertices in the mesh.
FiniteElementCollection * Load(Mesh *m, std::istream &input)
Read a FiniteElementSpace from a stream. The returned FiniteElementCollection is owned by the caller...
void ComputeMeans(AvgType type, Array< int > &zones_per_vdof)
double * GetData() const
Return a pointer to the beginning of the Vector data.
void CalcOrtho(const DenseMatrix &J, Vector &n)
void GetNodalValues(int i, Array< double > &nval, int vdim=1) const
Returns the values in the vertices of i'th element for dimension vdim.
FaceElementTransformations * GetFaceElementTransformations(int FaceNo, int mask=31)
Geometry::Type GetElementBaseGeometry(int i) const
const IntegrationRule * GetVertices(int GeomType)
Return an IntegrationRule consisting of all vertices of the given Geometry::Type, GeomType...
Memory< double > & GetMemory()
Return a reference to the Memory object used by the Vector.
void skip_comment_lines(std::istream &is, const char comment_char)
void GetEdgeTransformation(int i, IsoparametricTransformation *EdTr)
void GetVectorFieldNodalValues(Vector &val, int comp) const
Vector & operator=(const double *v)
Copy Size() entries from v.
virtual void Save(std::ostream &out) const
Save the GridFunction to an output stream.
Geometry::Type GetGeomType() const
Returns the Geometry::Type of the reference element.
void Load(std::istream **in, int np, int *dim)
Reads a vector from multiple files.
Piecewise-(bi)cubic continuous finite elements.
int GetNE() const
Returns number of elements in the mesh.
virtual double Eval(ElementTransformation &T, const IntegrationPoint &ip)
Evaluate the coefficient in the element described by T at the point ip.
IntegrationPoint & IntPoint(int i)
Returns a reference to the i-th integration point.
void GetDerivative(int comp, int der_comp, GridFunction &der)
void MultTranspose(const double *x, double *y) const
Multiply a vector with the transpose matrix.
void ProjectBdrCoefficientNormal(VectorCoefficient &vcoeff, Array< int > &bdr_attr)
void SetLinearConstraint(const Vector &_w, double _a)
const FiniteElement * GetEdgeElement(int i) const
void SetPrintLevel(int print_lvl)
void GetHessians(int i, const IntegrationRule &ir, DenseMatrix &hess, int vdim=1) const
bool UseDevice() const
Return the device flag of the Memory object used by the Vector.
int GetNBE() const
Returns number of boundary elements in the mesh.
int Height() const
Get the height (size of output) of the Operator. Synonym with NumRows().
void Swap(Vector &other)
Swap the contents of two Vectors.
Mesh * GetMesh() const
Returns the mesh.
void GetVectorFieldValues(int i, const IntegrationRule &ir, DenseMatrix &vals, DenseMatrix &tr, int comp=0) const
void PrintSolution(const GridFunction &sol, std::ostream &out) const
Coefficient * Weight()
See SetWeight() for description of the weight Coefficient.
virtual double ComputeH1Error(Coefficient *exsol, VectorCoefficient *exgrad, Coefficient *ell_coef, double Nu, int norm_type) const
void MakeTRef(FiniteElementSpace *f, double *tv)
Associate a new FiniteElementSpace and new true-dof data with the GridFunction.
void SetMaxIter(int max_it)
virtual void CalcShape(const IntegrationPoint &ip, Vector &shape) const =0
Evaluate the values of all shape functions of a scalar finite element in reference space at the given...
void Norm2(double *v) const
Take the 2-norm of the columns of A and store in v.
T Max() const
Find the maximal element in the array, using the comparison operator < for class T.
virtual const Operator * GetProlongationMatrix() const
The returned Operator is owned by the FiniteElementSpace.
virtual void GetElementDofs(int i, Array< int > &dofs) const
Returns indexes of degrees of freedom in array dofs for i'th element.
int GetElementForDof(int i) const
QuadratureFunction()
Create an empty QuadratureFunction.
const IntegrationRule & GetNodes() const
GeometryRefiner GlobGeometryRefiner
ElementTransformation * GetBdrElementTransformation(int i) const
Returns ElementTransformation for the i-th boundary element.
void AccumulateAndCountZones(Coefficient &coeff, AvgType type, Array< int > &zones_per_vdof)
Accumulates (depending on type) the values of coeff at all shared vdofs and counts in how many zones ...
virtual void MakeRef(FiniteElementSpace *f, double *v)
Make the GridFunction reference external data on a new FiniteElementSpace.
void GetLaplacians(int i, const IntegrationRule &ir, Vector &laps, int vdim=1) const
void GetTrueDofs(Vector &tv) const
Extract the true-dofs from the GridFunction. If all dofs are true, then tv will be set to point to th...
virtual int GetTrueVSize() const
Return the number of vector true (conforming) dofs.
RefinedGeometry * Refine(Geometry::Type Geom, int Times, int ETimes=1)
void GetValues(int i, const IntegrationRule &ir, Vector &vals, int vdim=1) const
int GetVDim()
Returns dimension of the vector.
int GetVDim() const
Returns vector dimension.
A class for non-conforming AMR on higher-order hexahedral, prismatic, quadrilateral or triangular mes...
void LoadSolution(std::istream &input, GridFunction &sol) const
FiniteElementSpace * FESpace()
GridFunction & operator=(const GridFunction &rhs)
Copy assignment. Only the data of the base class Vector is copied.
virtual void GetBoundaryClosure(const Array< int > &bdr_attr_is_ess, Array< int > &bdr_vertices, Array< int > &bdr_edges)
void AddElementVector(const Array< int > &dofs, const Vector &elemvect)
Add (element) subvector to the vector.
virtual double ComputeLpError(const double p, Coefficient &exsol, Coefficient *weight=NULL, const IntegrationRule *irs[]=NULL) const
void GetEdgeDofs(int i, Array< int > &dofs) const
QuadratureFunction & operator=(double value)
Redefine '=' for QuadratureFunction = constant.
void CalcInverse(const DenseMatrix &a, DenseMatrix &inva)
int SpaceDimension() const
double Min() const
Returns the minimal element of the vector.
ElementTransformation * GetElementTransformation(int i) const
Returns ElementTransformation for the i-th element.
double Norml1() const
Returns the l_1 norm of the vector.
bool FaceIsInterior(int FaceNo) const
Return true if the given face is interior.
void SetAbsTol(double atol)
void SetRelTol(double rtol)
const NURBSExtension * GetNURBSext() const
double Distance(const double *x, const double *y, const int n)
void Print(std::ostream &out=mfem::out, int width=8) const
Prints vector to stream out.
Class FiniteElementSpace - responsible for providing FEM view of the mesh, mainly managing the set of...
int GetDof() const
Returns the number of degrees of freedom in the finite element.
OutStream err(std::cerr)
Global stream used by the library for standard error output. Initially it uses the same std::streambu...
int GetLocalDofForDof(int i) const
virtual void Mult(const Vector &x, Vector &y) const
Matrix vector multiplication.
Base class Coefficient that may optionally depend on time.
FiniteElementSpace * fes
FE space on which the grid function lives. Owned if fec is not NULL.
void ProjectGridFunction(const GridFunction &src)
Project the src GridFunction to this GridFunction, both of which must be on the same mesh...
QuadratureSpace * qspace
Associated QuadratureSpace.
void SetSize(int nsize)
Change logical size of the array, keep existing entries.
virtual double ComputeMaxError(Coefficient &exsol, const IntegrationRule *irs[]=NULL) const
int NumBdr(int GeomType)
Return the number of boundary "faces" of a given Geometry::Type.
void GetColumnReference(int c, Vector &col)
virtual void CalcDivShape(const IntegrationPoint &ip, Vector &divshape) const
Evaluate the divergence of all shape functions of a vector finite element in reference space at the g...
void Save(std::ostream &out) const
Write the QuadratureSpace to the stream out.
FiniteElementCollection * fec
Used when the grid function is read from a file. It can also be set explicitly, see MakeOwner()...
void GetVectorGradient(ElementTransformation &tr, DenseMatrix &grad) const
double GetDivergence(ElementTransformation &tr) const
virtual void Update()
Transform by the Space UpdateMatrix (e.g., on Mesh change).
double ComputeElementLpDistance(double p, int i, GridFunction &gf1, GridFunction &gf2)
Compute the Lp distance between two grid functions on the given element.
int GetFaceVectorValues(int i, int side, const IntegrationRule &ir, DenseMatrix &vals, DenseMatrix &tr) const
static FiniteElementCollection * New(const char *name)
Factory method: return a newly allocated FiniteElementCollection according to the given name...
void SetBounds(const Vector &_lo, const Vector &_hi)
bool Nonconforming() const
double ZZErrorEstimator(BilinearFormIntegrator &blfi, GridFunction &u, GridFunction &flux, Vector &error_estimates, Array< int > *aniso_flags, int with_subdomains, bool with_coeff)
virtual void GetBdrElementDofs(int i, Array< int > &dofs) const
Returns indexes of degrees of freedom for i'th boundary element.
NURBSExtension * NURBSext
Optional NURBS mesh extension.
int GetNV() const
Returns number of vertices. Vertices are only at the corners of elements, where you would expect them...
int GetNVDofs() const
Number of all scalar vertex dofs.
virtual void CalcCurlShape(const IntegrationPoint &ip, DenseMatrix &curl_shape) const
Evaluate the curl of all shape functions of a vector finite element in reference space at the given p...
virtual const char * Name() const
Vector & Add(const double a, const Vector &Va)
(*this) += a * Va
Class for integration point with weight.
void SaveSTL(std::ostream &out, int TimesToRefine=1)
void GetElementTransformation(int i, IsoparametricTransformation *ElTr)
double Max() const
Returns the maximal element of the vector.
virtual void AssembleElementMatrix2(const FiniteElement &trial_fe, const FiniteElement &test_fe, ElementTransformation &Trans, DenseMatrix &elmat)
void NewMemoryAndSize(const Memory< double > &mem, int s, bool own_mem)
Reset the Vector to use the given external Memory mem and size s.
int GetFaceValues(int i, int side, const IntegrationRule &ir, Vector &vals, DenseMatrix &tr, int vdim=1) const
virtual void ComputeElementLpErrors(const double p, Coefficient &exsol, GridFunction &error, Coefficient *weight=NULL, const IntegrationRule *irs[]=NULL) const
const FiniteElement * GetFE(int i) const
Returns pointer to the FiniteElement associated with i'th element.
const Operator * GetUpdateOperator()
Get the GridFunction update operator.
void GetGradients(ElementTransformation &tr, const IntegrationRule &ir, DenseMatrix &grad) const
virtual void ProjectBdrCoefficientTangent(VectorCoefficient &vcoeff, Array< int > &bdr_attr)
Project the tangential components of the given VectorCoefficient on the boundary. Only boundary attri...
void GetVectorValues(ElementTransformation &T, const IntegrationRule &ir, DenseMatrix &vals) const
double infinity()
Define a shortcut for std::numeric_limits<double>::infinity()
virtual void Mult(const Vector &xt, Vector &x) const
virtual void ProjectCoefficient(Coefficient &coeff)
Piecewise-(bi)quadratic continuous finite elements.
virtual void SetSpace(FiniteElementSpace *f)
Associate a new FiniteElementSpace with the GridFunction.
void ReorderByNodes()
For a vector grid function, makes sure that the ordering is byNODES.
NCMesh * ncmesh
Optional non-conforming mesh extension.
double * HostWrite()
Shortcut for mfem::Write(vec.GetMemory(), vec.Size(), false).
virtual double ComputeW11Error(Coefficient *exsol, VectorCoefficient *exgrad, int norm_type, Array< int > *elems=NULL, const IntegrationRule *irs[]=NULL) const
virtual double Eval(ElementTransformation &T, const IntegrationPoint &ip)=0
Evaluate the coefficient in the element described by T at the point ip.
void GetEdgeVDofs(int i, Array< int > &vdofs) const
Returns indexes of degrees of freedom for i'th edge.
void filter_dos(std::string &line)
int GetNFaces() const
Return the number of faces in a 3D mesh.
void MultAtB(const DenseMatrix &A, const DenseMatrix &B, DenseMatrix &AtB)
Multiply the transpose of a matrix A with a matrix B: At*B.
void GetCurl(ElementTransformation &tr, Vector &curl) const
const FiniteElementCollection * FEColl() const
void Mult(const double *x, double *y) const
Matrix vector multiplication.
void MakeRef(Vector &base, int offset, int size)
Reset the Vector to be a reference to a sub-vector of base.
virtual void ComputeFlux(BilinearFormIntegrator &blfi, GridFunction &flux, bool wcoef=true, int subdomain=-1)
Arbitrary order H1-conforming (continuous) finite elements.
void pts(int iphi, int t, double x[])
Class representing the storage layout of a QuadratureFunction.
const FiniteElement * GetBE(int i) const
Returns pointer to the FiniteElement for the i'th boundary element.
void GetBdrElementVDofs(int i, Array< int > &vdofs) const
Returns indexes of degrees of freedom for i'th boundary element.
void SetSize(int s)
Change the size of the DenseMatrix to s x s.
OutStream out(std::cout)
Global stream used by the library for standard output. Initially it uses the same std::streambuf as s...
virtual const SparseMatrix * GetRestrictionMatrix() const
The returned SparseMatrix is owned by the FiniteElementSpace.
long GetSequence() const
Return update counter (see Mesh::sequence)
virtual void SetFromTrueDofs(const Vector &tv)
Set the GridFunction from the given true-dof vector.
virtual void CalcDShape(const IntegrationPoint &ip, DenseMatrix &dshape) const =0
Evaluate the gradients of all shape functions of a scalar finite element in reference space at the gi...
IntegrationRules IntRules(0, Quadrature1D::GaussLegendre)
A global object with all integration rules (defined in intrules.cpp)
void Save(std::ostream &out) const
double Sum() const
Return the sum of the vector entries.
Class representing a function through its values (scalar or vector) at quadrature points...
void GetValuesFrom(const GridFunction &orig_func)
int GetNFDofs() const
Number of all scalar face-interior dofs.
int GetNEDofs() const
Number of all scalar edge-interior dofs.
void GetElementVertices(int i, Array< int > &v) const
Returns the indices of the vertices of element i.
void GetBdrValuesFrom(const GridFunction &orig_func)
static void AdjustVDofs(Array< int > &vdofs)
Array< int > attributes
A list of all unique element attributes used by the Mesh.
virtual void ProjectDelta(int vertex, Vector &dofs) const
void AccumulateAndCountBdrValues(Coefficient *coeff[], VectorCoefficient *vcoeff, Array< int > &attr, Array< int > &values_counter)
void Save(std::ostream &out) const
Write the QuadratureFunction to the stream out.
void SaveVTK(std::ostream &out, const std::string &field_name, int ref)
void ProjectBdrCoefficient(Coefficient &coeff, Array< int > &attr)
Project a Coefficient on the GridFunction, modifying only DOFs on the boundary associated with the bo...
virtual double GetValue(int i, const IntegrationPoint &ip, int vdim=1) const
void GetGradient(ElementTransformation &tr, Vector &grad) const
Arbitrary order "L2-conforming" discontinuous finite elements.
void ProjectVectorFieldOn(GridFunction &vec_field, int comp=0)
void DofsToVDofs(Array< int > &dofs, int ndofs=-1) const