14 #include "../general/text.hpp"
15 #include "../general/forall.hpp"
16 #include "../mesh/mesh_headers.hpp"
28 template <>
void Ordering::
29 DofsToVDofs<Ordering::byNODES>(
int ndofs,
int vdim,
Array<int> &dofs)
32 int size = dofs.Size();
33 dofs.SetSize(size*vdim);
34 for (
int vd = 1; vd < vdim; vd++)
36 for (
int i = 0; i < size; i++)
38 dofs[i+size*vd] = Map<byNODES>(ndofs, vdim, dofs[i], vd);
43 template <>
void Ordering::
44 DofsToVDofs<Ordering::byVDIM>(
int ndofs,
int vdim,
Array<int> &dofs)
47 int size = dofs.Size();
48 dofs.SetSize(size*vdim);
49 for (
int vd = vdim-1; vd >= 0; vd--)
51 for (
int i = 0; i < size; i++)
53 dofs[i+size*vd] = Map<byVDIM>(ndofs, vdim, dofs[i], vd);
59 FiniteElementSpace::FiniteElementSpace()
61 ndofs(0), nvdofs(0), nedofs(0), nfdofs(0), nbdofs(0),
62 fdofs(NULL), bdofs(NULL),
63 elem_dof(NULL), bdrElem_dof(NULL),
64 NURBSext(NULL), own_ext(false),
65 cP(NULL), cR(NULL), cP_is_set(false),
74 mesh = mesh ? mesh : orig.
mesh;
75 fec = fec ? fec : orig.
fec;
109 if (
vdim == 1) {
return; }
110 if (ndofs < 0) { ndofs = this->
ndofs; }
114 Ordering::DofsToVDofs<Ordering::byNODES>(
ndofs,
vdim, dofs);
118 Ordering::DofsToVDofs<Ordering::byVDIM>(
ndofs,
vdim, dofs);
124 if (
vdim == 1) {
return; }
125 if (ndofs < 0) { ndofs = this->
ndofs; }
129 for (
int i = 0; i < dofs.
Size(); i++)
131 dofs[i] = Ordering::Map<Ordering::byNODES>(
ndofs,
vdim, dofs[i], vd);
136 for (
int i = 0; i < dofs.
Size(); i++)
138 dofs[i] = Ordering::Map<Ordering::byVDIM>(
ndofs,
vdim, dofs[i], vd);
145 if (
vdim == 1) {
return dof; }
146 if (ndofs < 0) { ndofs = this->
ndofs; }
150 return Ordering::Map<Ordering::byNODES>(
ndofs,
vdim, dof, vd);
154 return Ordering::Map<Ordering::byVDIM>(
ndofs,
vdim, dof, vd);
161 int n = vdofs.
Size(), *vdof = vdofs;
162 for (
int i = 0; i < n; i++)
165 if ((j = vdof[i]) < 0)
221 for (
int i = 0; i <
mesh ->
GetNE(); i++)
224 el_dof -> AddColumnsInRow (i, dofs.
Size());
227 for (
int i = 0; i <
mesh ->
GetNE(); i++)
230 el_dof -> AddConnections (i, (
int *)dofs, dofs.
Size());
232 el_dof -> ShiftUpI();
250 for (
int k = 0, dof_counter = 0; k < nnz; k++)
252 const int sdof = J[k];
253 const int dof = (sdof < 0) ? -1-sdof : sdof;
254 int new_dof = dof_marker[dof];
257 dof_marker[dof] = new_dof = dof_counter++;
259 J[k] = (sdof < 0) ? -1-new_dof : new_dof;
272 for (
int i = 0; i <
mesh ->
GetNE(); i++)
274 const int *dofs =
elem_dof -> GetRow(i);
275 const int n =
elem_dof -> RowSize(i);
276 for (
int j = 0; j < n; j++)
289 for (
int i = 0; i < dofs.
Size(); i++)
292 if (k < 0) { k = -1 - k; }
306 for (
int i = 0; i <
GetNBE(); i++)
314 mark_dofs(vdofs, ess_vdofs);
319 for (
int d = 0; d < dofs.
Size(); d++)
320 { dofs[d] =
DofToVDof(dofs[d], component); }
321 mark_dofs(dofs, ess_vdofs);
333 for (
int i = 0; i < bdr_verts.
Size(); i++)
338 mark_dofs(vdofs, ess_vdofs);
343 for (
int d = 0; d < dofs.
Size(); d++)
344 { dofs[d] =
DofToVDof(dofs[d], component); }
345 mark_dofs(dofs, ess_vdofs);
348 for (
int i = 0; i < bdr_edges.
Size(); i++)
353 mark_dofs(vdofs, ess_vdofs);
358 for (
int d = 0; d < dofs.
Size(); d++)
359 { dofs[d] =
DofToVDof(dofs[d], component); }
360 mark_dofs(dofs, ess_vdofs);
390 for (
int i = 0; i < marker.
Size(); i++)
392 if (marker[i]) { num_marked++; }
396 for (
int i = 0; i < marker.
Size(); i++)
398 if (marker[i]) { list.
Append(i); }
408 for (
int i = 0; i < list.
Size(); i++)
410 marker[list[i]] = mark_val;
419 else { dofs.
Copy(cdofs); }
427 else { cdofs.
Copy(dofs); }
445 if (d_vdofs.
Size() != c_vdofs.
Size())
447 mfem_error (
"FiniteElementSpace::D2C_GlobalRestrictionMatrix (...)");
451 for (j = 0; j < d_vdofs.
Size(); j++)
453 R -> Set (c_vdofs[j], d_vdofs[j], 1.0);
477 if (c_dofs.
Size() != 1)
479 "D2Const_GlobalRestrictionMatrix (...)");
482 for (j = 0; j < d_dofs.
Size(); j++)
484 R -> Set (c_dofs[0], d_dofs[j], 1.0);
507 for (
int i = 0; i <
mesh ->
GetNE(); i++)
514 if (geom != cached_geom)
516 h_fe =
this ->
GetFE (i);
517 l_fe = lfes ->
GetFE (i);
519 h_fe->
Project(*l_fe, T, loc_restr);
523 R -> SetSubMatrix (l_dofs, h_dofs, loc_restr, 1);
535 for (
int i = 0; i < slave_dofs.
Size(); i++)
537 int sdof = slave_dofs[i];
540 for (
int j = 0; j < master_dofs.
Size(); j++)
542 double coef = I(i, j);
543 if (std::abs(coef) > 1e-12)
545 int mdof = master_dofs[j];
546 if (mdof != sdof && mdof != (-1-sdof))
548 deps.
Add(sdof, mdof, coef);
563 for (
int i = 0; i < ndep; i++)
565 if (!finalized[dep[i]]) {
return false; }
589 if (!dofs.
Size()) {
return; }
594 for (
int i = 0; i < nv; i++)
597 dofs[nv+i] = edof[nv+i];
601 for (
int i = 0; i < ne; i++)
603 dofs[face_vert*nv + i] = edof[2*nv + i];
624 MFEM_VERIFY(dynamic_cast<const ParFiniteElementSpace*>(
this) == NULL,
625 "This method should not be used with a ParFiniteElementSpace!");
637 for (
int entity = 1; entity <= 2; entity++)
640 if (!list.
masters.size()) {
continue; }
648 for (
unsigned mi = 0; mi < list.
masters.size(); mi++)
653 if (!master_dofs.
Size()) {
continue; }
656 if (!fe) {
continue; }
663 default: MFEM_ABORT(
"unsupported geometry");
670 if (!slave_dofs.
Size()) {
continue; }
686 for (
int i = 0; i <
ndofs; i++)
688 if (!deps.
RowSize(i)) { n_true_dofs++; }
692 if (n_true_dofs == ndofs)
704 for (
int i = 0; i < n_true_dofs; i++)
709 cR_I[n_true_dofs] = n_true_dofs;
720 for (
int i = 0, true_dof = 0; i <
ndofs; i++)
725 cP->
Add(i, true_dof++, 1.0);
738 int n_finalized = n_true_dofs;
744 for (
int dof = 0; dof <
ndofs; dof++)
752 for (
int j = 0; j < n_dep; j++)
759 finalized[dof] =
true;
769 if (n_finalized != ndofs)
771 MFEM_ABORT(
"Error creating cP matrix.");
787 if (
vdim == 1) {
return; }
789 int height = mat.
Height();
790 int width = mat.
Width();
796 for (
int i = 0; i < height; i++)
798 mat.
GetRow(i, dofs, srow);
799 for (
int vd = 0; vd <
vdim; vd++)
868 key_face key = std::make_tuple(is_dg_space, e_ordering, type, m);
869 auto itr =
L2F.find(key);
870 if (itr !=
L2F.end())
893 for (
int i = 0; i <
E2Q_array.Size(); i++)
896 if (qi->
IntRule == &ir) {
return qi; }
907 for (
int i = 0; i <
E2Q_array.Size(); i++)
910 if (qi->
qspace == &qs) {
return qi; }
927 if (qi->
IntRule == &ir) {
return qi; }
940 if (qi->
IntRule == &ir) {
return qi; }
951 const int coarse_ndofs,
const Table &coarse_elem_dof,
962 if (elem_geoms.
Size() == 1)
964 const int coarse_ldof = localP[elem_geoms[0]].
SizeJ();
982 const int fine_ldof = localP[
geom].
SizeI();
987 for (
int vd = 0; vd <
vdim; vd++)
989 coarse_dofs.Copy(coarse_vdofs);
992 for (
int i = 0; i < fine_ldof; i++)
995 int m = (r >= 0) ? r : (-1 - r);
1000 P->
SetRow(r, coarse_vdofs, row);
1007 MFEM_ASSERT(mark.
Sum() == P->
Height(),
"Not all rows of P set.");
1020 int nmat = pmats.
SizeK();
1027 localP.
SetSize(ldof, ldof, nmat);
1028 for (
int i = 0; i < nmat; i++)
1037 const Table* old_elem_dof)
1039 MFEM_VERIFY(
GetNE() >= old_elem_dof->
Size(),
1040 "Previous mesh is not coarser.");
1045 for (
int i = 0; i < elem_geoms.Size(); i++)
1056 , old_elem_dof(old_elem_dof)
1058 MFEM_VERIFY(fespace->
GetNE() >= old_elem_dof->
Size(),
1059 "Previous mesh is not coarser.");
1061 width = old_ndofs * fespace->
GetVDim();
1066 for (
int i = 0; i < elem_geoms.Size(); i++)
1074 :
Operator(fespace->GetVSize(), coarse_fes->GetVSize()),
1075 fespace(fespace), old_elem_dof(NULL)
1079 for (
int i = 0; i < elem_geoms.Size(); i++)
1082 localP[elem_geoms[i]]);
1091 delete old_elem_dof;
1106 int old_ndofs = width /
vdim;
1108 for (
int k = 0; k < mesh->
GetNE(); k++)
1117 for (
int vd = 0; vd <
vdim; vd++)
1119 old_dofs.
Copy(old_vdofs);
1122 for (
int i = 0; i < dofs.
Size(); i++)
1124 double rsign, osign;
1125 int r = fespace->
DofToVDof(dofs[i], vd);
1131 for (
int j = 0; j < old_vdofs.
Size(); j++)
1134 value += x[o] * lP(i, j) * osign;
1136 y[r] = value * rsign;
1152 "incompatible coarse and fine FE spaces");
1160 for (
int gi = 0; gi < elem_geoms.
Size(); gi++)
1172 emb_tr.SetIdentityTransformation(geom);
1173 for (
int i = 0; i < pmats.
SizeK(); i++)
1175 emb_tr.GetPointMat() = pmats(i);
1176 emb_tr.FinalizeTransformation();
1184 Table ref_type_to_matrix;
1186 ref_type_to_matrix, ref_type_to_geom);
1187 MFEM_ASSERT(coarse_to_fine.
Size() == c_fes->
GetNE(),
"");
1189 const int total_ref_types = ref_type_to_geom.
Size();
1191 Array<int> ref_type_to_coarse_elem_offset(total_ref_types);
1192 ref_type_to_fine_elem_offset.
SetSize(total_ref_types);
1195 for (
int i = 0; i < total_ref_types; i++)
1198 ref_type_to_coarse_elem_offset[i] = num_ref_types[g];
1199 ref_type_to_fine_elem_offset[i] = num_fine_elems[g];
1201 num_fine_elems[g] += ref_type_to_matrix.
RowSize(i);
1206 if (num_ref_types[g] == 0) {
continue; }
1207 const int fine_dofs = localP[g].
SizeI();
1208 const int coarse_dofs = localP[g].
SizeJ();
1209 localPtMP[g].
SetSize(coarse_dofs, coarse_dofs, num_ref_types[g]);
1210 localR[g].
SetSize(coarse_dofs, fine_dofs, num_fine_elems[g]);
1212 for (
int i = 0; i < total_ref_types; i++)
1215 DenseMatrix &lPtMP = localPtMP[g](ref_type_to_coarse_elem_offset[i]);
1216 int lR_offset = ref_type_to_fine_elem_offset[i];
1217 const int *mi = ref_type_to_matrix.
GetRow(i);
1218 const int nm = ref_type_to_matrix.
RowSize(i);
1220 for (
int s = 0; s < nm; s++)
1229 for (
int s = 0; s < nm; s++)
1242 delete coarse_elem_dof;
1251 const int vdim = fine_fes->GetVDim();
1252 const int coarse_ndofs = height/
vdim;
1253 for (
int coarse_el = 0; coarse_el < coarse_to_fine.Size(); coarse_el++)
1255 coarse_elem_dof->GetRow(coarse_el, c_vdofs);
1256 fine_fes->DofsToVDofs(c_vdofs, coarse_ndofs);
1260 const int ref_type = coarse_to_ref_type[coarse_el];
1262 const int *fine_elems = coarse_to_fine.GetRow(coarse_el);
1263 const int num_fine_elems = coarse_to_fine.RowSize(coarse_el);
1264 const int lR_offset = ref_type_to_fine_elem_offset[ref_type];
1265 for (
int s = 0; s < num_fine_elems; s++)
1268 fine_fes->GetElementVDofs(fine_elems[s], f_vdofs);
1271 AddMult(lR, loc_x_mat, loc_y_mat);
1286 const int nmat = pmats.
SizeK();
1287 const int ldof = fe->
GetDof();
1293 localR.
SetSize(ldof, ldof, nmat);
1294 for (
int i = 0; i < nmat; i++)
1304 const Table* old_elem_dof)
1306 MFEM_VERIFY(
Nonconforming(),
"Not implemented for conforming meshes.");
1307 MFEM_VERIFY(old_ndofs,
"Missing previous (finer) space.");
1308 MFEM_VERIFY(
ndofs <= old_ndofs,
"Previous space is not finer.");
1316 for (
int i = 0; i < elem_geoms.
Size(); i++)
1324 localR[elem_geoms[0]].SizeI());
1332 MFEM_ASSERT(dtrans.
embeddings.Size() == old_elem_dof->
Size(),
"");
1335 for (
int k = 0; k < dtrans.
embeddings.Size(); k++)
1342 old_elem_dof->
GetRow(k, old_dofs);
1344 for (
int vd = 0; vd <
vdim; vd++)
1346 old_dofs.
Copy(old_vdofs);
1349 for (
int i = 0; i < lR.
Height(); i++)
1351 if (!std::isfinite(lR(i, 0))) {
continue; }
1354 int m = (r >= 0) ? r : (-1 - r);
1359 R->
SetRow(r, old_vdofs, row);
1367 MFEM_VERIFY(num_marked == R->
Height(),
1368 "internal error: not all rows of R were set.");
1387 int nmat = pmats.
SizeK();
1394 for (
int i = 0; i < nmat; i++)
1421 mfem_error(
"FiniteElementSpace::FiniteElementSpace :\n"
1422 " NURBS FE space requires NURBS mesh.");
1425 if (NURBSext == NULL)
1441 this->NURBSext = NULL;
1452 mfem_error(
"FiniteElementSpace::StealNURBSext");
1478 MFEM_VERIFY(!
NURBSext,
"internal error");
1501 bool have_face_dofs =
false;
1507 have_face_dofs =
true;
1549 int k, j, nv, ne, nf, nb, nfd, nd,
dim;
1570 for (k = 0; k < F.
Size(); k++)
1576 nd = V.
Size() * nv + E.
Size() * ne + nfd + nb;
1580 for (k = 0; k < V.
Size(); k++)
1582 for (j = 0; j < nv; j++)
1584 dofs[k*nv+j] = V[k]*nv+j;
1592 for (k = 0; k < E.
Size(); k++)
1595 for (j = 0; j < ne; j++)
1599 dofs[nv+k*ne+j] = -1 - (
nvdofs+E[k]*ne+(-1-ind[j]) );
1603 dofs[nv+k*ne+j] =
nvdofs+E[k]*ne+ind[j];
1608 ne = nv + ne * E.
Size();
1612 for (k = 0; k < F.
Size(); k++)
1617 for (j = 0; j < nf; j++)
1634 for (j = 0; j < nb; j++)
1644 if (i < 0 || !mesh->
GetNE()) {
return NULL; }
1645 MFEM_VERIFY(i < mesh->
GetNE(),
1646 "Invalid element id " << i <<
", maximum allowed " <<
mesh->
GetNE()-1);
1668 int k, j, nv, ne, nf, nd, iF, oF,
dim;
1682 nd = V.
Size() * nv + E.
Size() * ne;
1693 for (k = 0; k < V.
Size(); k++)
1695 for (j = 0; j < nv; j++)
1697 dofs[k*nv+j] = V[k]*nv+j;
1705 for (k = 0; k < E.
Size(); k++)
1708 for (j = 0; j < ne; j++)
1712 dofs[nv+k*ne+j] = -1 - (
nvdofs+E[k]*ne+(-1-ind[j]) );
1716 dofs[nv+k*ne+j] =
nvdofs+E[k]*ne+ind[j];
1724 ne = nv + ne * E.
Size();
1727 for (j = 0; j < nf; j++)
1760 nd = V.
Size() * nv + E.
Size() * ne + nf;
1764 for (k = 0; k < V.
Size(); k++)
1766 for (j = 0; j < nv; j++)
1768 dofs[k*nv+j] = V[k]*nv+j;
1775 for (k = 0; k < E.
Size(); k++)
1778 for (j = 0; j < ne; j++)
1782 dofs[nv+k*ne+j] = -1 - (
nvdofs+E[k]*ne+(-1-ind[j]) );
1786 dofs[nv+k*ne+j] =
nvdofs+E[k]*ne+ind[j];
1791 ne = nv + ne * E.
Size();
1815 for (k = 0; k < 2; k++)
1817 for (j = 0; j < nv; j++)
1819 dofs[k*nv+j] = V[k]*nv+j;
1824 for (j = 0, k =
nvdofs+i*ne; j < ne; j++, k++)
1836 for (j = 0; j < nv; j++)
1846 nb =
fec -> DofForGeometry (
mesh -> GetElementBaseGeometry (i));
1849 for (j = 0; j < nb; j++)
1861 for (j = 0, k =
nvdofs+i*ne; j < ne; j++, k++)
1954 for (
int i = 0; i <
E2Q_array.Size(); i++)
2001 for (
int i = 0; i < elem_geoms.
Size(); i++)
2004 localP[elem_geoms[i]]);
2038 if (RP_case == 0) {
return; }
2051 cR, T.
Ptr(), coarse_P,
false, owner,
false));
2065 MFEM_ABORT(
"Error in update sequence. Space needs to be updated after "
2066 "each mesh modification.");
2076 Table* old_elem_dof = NULL;
2103 old_elem_dof = NULL;
2121 false,
false,
true));
2130 delete old_elem_dof;
2136 int fes_format = 90;
2137 bool nurbs_unit_weights =
false;
2148 MFEM_VERIFY(nurbs_fec,
"invalid FE collection");
2150 const double eps = 5e-14;
2161 out << (fes_format == 90 ?
2162 "FiniteElementSpace\n" :
"MFEM FiniteElementSpace v1.0\n")
2163 <<
"FiniteElementCollection: " <<
fec->
Name() <<
'\n'
2164 <<
"VDim: " <<
vdim <<
'\n'
2165 <<
"Ordering: " <<
ordering <<
'\n';
2167 if (fes_format == 100)
2181 out <<
"NURBS_orders\n";
2188 out <<
"NURBS_periodic\n";
2193 if (!nurbs_unit_weights)
2195 out <<
"NURBS_weights\n";
2199 out <<
"End: MFEM FiniteElementSpace v1.0\n";
2206 int fes_format = 0, ord;
2212 getline(input, buff);
2214 if (buff ==
"FiniteElementSpace") { fes_format = 90; }
2215 else if (buff ==
"MFEM FiniteElementSpace v1.0") { fes_format = 100; }
2216 else { MFEM_ABORT(
"input stream is not a FiniteElementSpace!"); }
2217 getline(input, buff,
' ');
2219 getline(input, buff);
2222 getline(input, buff,
' ');
2224 getline(input, buff,
' ');
2229 if (fes_format == 90)
2233 MFEM_VERIFY(m->
NURBSext,
"NURBS FE collection requires a NURBS mesh!");
2234 const int order = nurbs_fec->
GetOrder();
2242 else if (fes_format == 100)
2247 MFEM_VERIFY(input.good(),
"error reading FiniteElementSpace v1.0");
2248 getline(input, buff);
2250 if (buff ==
"NURBS_order" || buff ==
"NURBS_orders")
2252 MFEM_VERIFY(nurbs_fec,
2253 buff <<
": NURBS FE collection is required!");
2254 MFEM_VERIFY(m->
NURBSext, buff <<
": NURBS mesh is required!");
2255 MFEM_VERIFY(!NURBSext, buff <<
": order redefinition!");
2256 if (buff ==
"NURBS_order")
2269 else if (buff ==
"NURBS_periodic")
2276 else if (buff ==
"NURBS_weights")
2278 MFEM_VERIFY(NURBSext,
"NURBS_weights: NURBS_orders have to be "
2279 "specified before NURBS_weights!");
2282 else if (buff ==
"element_orders")
2284 MFEM_VERIFY(!nurbs_fec,
"section element_orders cannot be used "
2285 "with a NURBS FE collection");
2286 MFEM_ABORT(
"element_orders: not implemented yet!");
2288 else if (buff ==
"End: MFEM FiniteElementSpace v1.0")
2294 MFEM_ABORT(
"unknown section: " << buff);
2310 element_offsets =
new int[num_elem + 1];
2315 for (
int i = 0; i < num_elem; i++)
2317 element_offsets[i] = offset;
2319 if (int_rule[geom] == NULL)
2325 element_offsets[num_elem] = size = offset;
2331 const char *msg =
"invalid input stream";
2334 in >> ident; MFEM_VERIFY(ident ==
"QuadratureSpace", msg);
2335 in >> ident; MFEM_VERIFY(ident ==
"Type:", msg);
2337 if (ident ==
"default_quadrature")
2339 in >> ident; MFEM_VERIFY(ident ==
"Order:", msg);
2344 MFEM_ABORT(
"unknown QuadratureSpace type: " << ident);
2353 out <<
"QuadratureSpace\n"
2354 <<
"Type: default_quadrature\n"
2355 <<
"Order: " <<
order <<
'\n';
2361 : dom_fes(dom_fes_), ran_fes(ran_fes_),
2363 fw_t_oper(), bw_t_oper()
2368 MFEM_VERIFY(par_dom == par_ran,
"the domain and range FE spaces must both"
2369 " be either serial or parallel");
2380 return *t_oper.
Ptr();
2390 MFEM_VERIFY(mat != NULL,
"Operator is not a SparseMatrix");
2393 t_oper.
Reset(const_cast<SparseMatrix*>(mat),
false);
2406 const int RP_case = bool(out_cR) + 2*bool(in_cP);
2410 t_oper.
Reset(const_cast<Operator*>(&oper),
false);
2423 out_cR, &oper, in_cP,
false,
false,
false));
2429 MFEM_ABORT(
"Operator::Type is not supported: " <<
oper_type);
2451 else if ((hy_mat = dynamic_cast<const HypreParMatrix *>(&oper)))
2460 MFEM_ABORT(
"unknown Operator type");
2467 false,
false,
false));
2471 MFEM_ABORT(
"Operator::Type is not supported: " <<
oper_type);
2476 return *t_oper.
Ptr();
2511 for (
int i = 0; i < elem_geoms.Size(); i++)
2514 localP[elem_geoms[i]]);
2521 MFEM_ABORT(
"Operator::Type is not supported: " <<
oper_type);
2551 MFEM_ABORT(
"unknown type of FE space");
2562 MFEM_ABORT(
"Operator::Type is not supported: " <<
oper_type);
2571 : fes_ho(fes_ho_), fes_lor(fes_lor_)
2575 "mixed meshes are not supported");
2578 if (mesh_ho->
GetNE() == 0) {
return; }
2582 ndof_lor = fe_lor->
GetDof();
2583 ndof_ho = fe_ho->
GetDof();
2585 const int nel_lor = fes_lor.
GetNE();
2586 const int nel_ho = fes_ho.
GetNE();
2588 nref = nel_lor/nel_ho;
2595 for (
int ilor=0; ilor<nel_lor; ++ilor)
2604 R.
SetSize(ndof_lor*nref, ndof_ho, nel_ho);
2606 P.
SetSize(ndof_ho, ndof_lor*nref, nel_ho);
2608 DenseMatrix Minv_lor(ndof_lor*nref, ndof_lor*nref);
2627 Vector shape_ho(ndof_ho);
2628 Vector shape_lor(ndof_lor);
2634 for (
int iho=0; iho<nel_ho; ++iho)
2636 for (
int iref=0; iref<nref; ++iref)
2639 int ilor = ho2lor.
GetRow(iho)[iref];
2642 M_lor.
CopyMN(M_lor_el, iref*ndof_lor, iref*ndof_lor);
2646 Minv_lor.
CopyMN(M_lor_el, iref*ndof_lor, iref*ndof_lor);
2674 M_mixed.
CopyMN(M_mixed_el, iref*ndof_lor, 0);
2681 RtMlorR_inv.
Mult(RtMlor, P(iho));
2688 int vdim = fes_ho.GetVDim();
2692 for (
int iho=0; iho<fes_ho.GetNE(); ++iho)
2694 fes_ho.GetElementVDofs(iho, vdofs);
2698 for (
int iref=0; iref<nref; ++iref)
2700 int ilor = ho2lor.GetRow(iho)[iref];
2701 for (
int vd=0; vd<vdim; ++vd)
2703 fes_lor.GetElementDofs(ilor, vdofs);
2704 fes_lor.DofsToVDofs(vd, vdofs);
2714 int vdim = fes_ho.GetVDim();
2718 for (
int iho=0; iho<fes_ho.GetNE(); ++iho)
2721 for (
int iref=0; iref<nref; ++iref)
2723 int ilor = ho2lor.GetRow(iho)[iref];
2724 for (
int vd=0; vd<vdim; ++vd)
2726 fes_lor.GetElementDofs(ilor, vdofs);
2727 fes_lor.DofsToVDofs(vd, vdofs);
2734 fes_ho.GetElementVDofs(iho, vdofs);
int GetNPoints() const
Returns the number of the points in the integration rule.
Abstract class for Finite Elements.
int GetOrder() const
Get the order of the NURBS collection: either a positive number, when using fixed order...
virtual ~InterpolationGridTransfer()
Arbitrary order non-uniform rational B-splines (NURBS) finite elements.
const Operator & MakeTrueOperator(FiniteElementSpace &fes_in, FiniteElementSpace &fes_out, const Operator &oper, OperatorHandle &t_oper)
Ordering::Type GetOrdering() const
Return the ordering method.
int Size() const
Logical size of the array.
void GetFaceEdges(int i, Array< int > &, Array< int > &) const
For scalar fields; preserves point values.
int RowSize(const int i) const
Returns the number of elements in row i.
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().
void GetVertexVDofs(int i, Array< int > &vdofs) const
void Add(const int i, const int j, const double a)
OpType * As() const
Return the Operator pointer statically cast to a specified OpType. Similar to the method Get()...
const Vector & GetWeights() const
void AddMultVWt(const Vector &v, const Vector &w, DenseMatrix &VWt)
VWt += v w^t.
void Load(std::istream &in, int fmt=0)
Read an Array from the stream in using format fmt. The format fmt can be:
void BuildTranspose() const
Build and store internally the transpose of this matrix which will be used in the methods AddMultTran...
int GetNDofs() const
Returns number of degrees of freedom.
int ndofs
Number of degrees of freedom. Number of unknowns is ndofs * vdim.
Class for an integration rule - an Array of IntegrationPoint.
const Array< int > & GetMaster() const
void GetElementInteriorVDofs(int i, Array< int > &vdofs) const
int DofToVDof(int dof, int vd, int ndofs=-1) const
void GetBdrElementEdges(int i, Array< int > &edges, Array< int > &cor) const
Return the indices and the orientations of all edges of bdr element i.
const SparseMatrix * GetConformingProlongation() const
The returned SparseMatrix is owned by the FiniteElementSpace.
const CoarseFineTransformations & GetDerefinementTransforms()
virtual void Update(bool want_transform=true)
void SetSize(int dim, int connections_per_row)
Set the size and the number of connections for the table.
void LoadBE(int i, const FiniteElement *BE) const
const IntegrationRule & Get(int GeomType, int Order)
Returns an integration rule for given GeomType and Order.
void GetEdgeVertices(int i, Array< int > &vert) const
Returns the indices of the vertices of edge i.
Operator that extracts Face degrees of freedom.
BilinearFormIntegrator * mass_integ
Ownership depends on own_mass_integ.
void BuildElementToDofTable() const
virtual void Project(Coefficient &coeff, ElementTransformation &Trans, Vector &dofs) const
DerefinementOperator(const FiniteElementSpace *f_fes, const FiniteElementSpace *c_fes, BilinearFormIntegrator *mass_integ)
void Prolongate(const Vector &x, Vector &y) const
FiniteElementSpace & dom_fes
Domain FE space.
const FiniteElement * GetTraceElement(int i, Geometry::Type geom_type) const
Return the trace element from element 'i' to the given 'geom_type'.
virtual void Finalize(int skip_zeros=1)
Finalize the matrix initialization, switching the storage format from LIL to CSR. ...
int GetNumGeometries(int dim) const
Return the number of geometries of the given dimension present in the mesh.
HypreParMatrix * LeftDiagMult(const SparseMatrix &D, HYPRE_Int *row_starts=NULL) const
Multiply the HypreParMatrix on the left by a block-diagonal parallel matrix D and return the result a...
void SetSize(int s)
Resize the vector to size s.
SparseMatrix * RefinementMatrix(int old_ndofs, const Table *old_elem_dof)
SparseMatrix * DerefinementMatrix(int old_ndofs, const Table *old_elem_dof)
Calculate GridFunction restriction matrix after mesh derefinement.
void GetElementVDofs(int i, Array< int > &vdofs) const
Returns indexes of degrees of freedom in array dofs for i'th element.
static int DecodeDof(int dof, double &sign)
Helper to remove encoded sign from a DOF.
int * GetRowColumns(const int row)
Return a pointer to the column indices in a row.
const T * HostRead() const
Shortcut for mfem::Read(a.GetMemory(), a.Size(), false).
SparseMatrix * RefinementMatrix_main(const int coarse_ndofs, const Table &coarse_elem_dof, const DenseTensor localP[]) const
void BooleanMult(const Array< int > &x, Array< int > &y) const
y = A * x, treating all entries as booleans (zero=false, nonzero=true).
Lists all edges/faces in the nonconforming mesh.
void Mult(const Table &A, const Table &B, Table &C)
C = A * B (as boolean matrices)
int Width() const
Get the width (size of input) of the Operator. Synonym with NumCols().
void GetElementFaces(int i, Array< int > &, Array< int > &) const
Return the indices and the orientations of all faces of element i.
Pointer to an Operator of a specified type.
Operator::Type Type() const
Get the currently set operator type id.
virtual const FiniteElement * FiniteElementForGeometry(Geometry::Type GeomType) const =0
void Copy(Array ©) const
Create a copy of the current array.
virtual ~DerefinementOperator()
void GetSubVector(const Array< int > &dofs, Vector &elemvect) const
int GetFaceOrder(int i) const
Returns the order of the i'th face finite element.
int GetOrder() const
Returns the order of the finite element. In the case of anisotropic orders, returns the maximum order...
virtual void GetEssentialVDofs(const Array< int > &bdr_attr_is_ess, Array< int > &ess_vdofs, int component=-1) const
void GetFaceVertices(int i, Array< int > &vert) const
Returns the indices of the vertices of face i.
Data type dense matrix using column-major storage.
int vdim
Vector dimension (number of unknowns per degree of freedom).
Geometry::Type Geom() const
void GetRow(int i, Array< int > &row) const
Return row i in array row (the Table must be finalized)
Operator::Type oper_type
Desired Operator::Type for the construction of all operators defined by the underlying transfer algor...
void Save(std::ostream &out, int fmt=0) const
Save the Array to the stream out using the format fmt. The format fmt can be:
int GetBdrAttribute(int i) const
void SetSize(int i, int j, int k)
virtual void GetEssentialTrueDofs(const Array< int > &bdr_attr_is_ess, Array< int > &ess_tdof_list, int component=-1)
int GetNE() const
Returns number of elements.
void OrientedPointMatrix(DenseMatrix &oriented_matrix) const
Return the point matrix oriented according to the master and slave edges.
virtual void GetLocalInterpolation(ElementTransformation &Trans, DenseMatrix &I) const
Return the local interpolation matrix I (Dof x Dof) where the fine element is the image of the base g...
void GetDegenerateFaceDofs(int index, Array< int > &dofs, Geometry::Type master_geom) const
void RebuildElementToDofTable()
Geometry::Type GetFaceBaseGeometry(int i) const
Abstract parallel finite element space.
const FiniteElement * GetFaceElement(int i) const
virtual void GetTrueTransferOperator(const FiniteElementSpace &coarse_fes, OperatorHandle &T) const
Construct and return an Operator that can be used to transfer true-dof data from coarse_fes, defined on a coarse mesh, to this FE space, defined on a refined mesh.
void GetInverseMatrix(DenseMatrix &Ainv) const
Compute and return the inverse matrix in Ainv.
FiniteElementCollection * Load(Mesh *m, std::istream &input)
Read a FiniteElementSpace from a stream. The returned FiniteElementCollection is owned by the caller...
virtual const Operator & ForwardOperator()
Return an Operator that transfers GridFunctions from the domain FE space to GridFunctions in the rang...
void Factor()
Factor the current DenseMatrix, *a.
int HasFaceDofs(Geometry::Type GeomType) const
static bool IsEnabled()
Return true if any backend other than Backend::CPU is enabled.
double * GetData() const
Returns the matrix data array.
void AddRow(const int row, const Array< int > &cols, const Vector &srow)
double * GetRowEntries(const int row)
Return a pointer to the entries in a row.
double * GetData() const
Return a pointer to the beginning of the Vector data.
const FiniteElementCollection * fec
Associated FE collection (not owned).
OperatorHandle Th
Transformation to apply to GridFunctions after space Update().
HypreParMatrix * ParMult(const HypreParMatrix *A, const HypreParMatrix *B, bool own_matrix)
Geometry::Type GetElementBaseGeometry(int i) const
int Size_of_connections() const
void GetLocalDerefinementMatrices(Geometry::Type geom, DenseTensor &localR) const
bool HasGeometry(Geometry::Type geom) const
Return true iff the given geom is encountered in the mesh. Geometries of dimensions lower than Dimens...
void skip_comment_lines(std::istream &is, const char comment_char)
void DeleteAll()
Delete whole array.
void BooleanMultTranspose(const Array< int > &x, Array< int > &y) const
y = At * x, treating all entries as booleans (zero=false, nonzero=true).
Array< int > dof_elem_array
static void MarkerToList(const Array< int > &marker, Array< int > &list)
Convert a Boolean marker array to a list containing all marked indices.
void GetFaceInteriorDofs(int i, Array< int > &dofs) const
virtual int DofForGeometry(Geometry::Type GeomType) const =0
virtual void GetFaceDofs(int i, Array< int > &dofs) const
FiniteElementSpace & ran_fes
Range FE space.
void ConvertFromConformingVDofs(const Array< int > &cdofs, Array< int > &dofs)
const IntegrationRule * IntRule
Not owned.
const Operator * GetElementRestriction(ElementDofOrdering e_ordering) const
Return an Operator that converts L-vectors to E-vectors.
virtual void Mult(const Vector &x, Vector &y) const
Matrix vector multiplication with the inverse of dense matrix.
const SparseMatrix * GetConformingRestriction() const
The returned SparseMatrix is owned by the FiniteElementSpace.
Geometry::Type GetGeomType() const
Returns the Geometry::Type of the reference element.
ID for class SparseMatrix.
const Array< int > & GetSlave() const
virtual void Mult(const Vector &x, Vector &y) const
Operator application: y=A(x).
void Load(std::istream **in, int np, int *dim)
Reads a vector from multiple files.
int GetNE() const
Returns number of elements in the mesh.
IntegrationPoint & IntPoint(int i)
Returns a reference to the i-th integration point.
void GetVertexDofs(int i, Array< int > &dofs) const
virtual const Operator & BackwardOperator()
Return an Operator that transfers GridFunctions from the range FE space back to GridFunctions in the ...
virtual void AssembleElementMatrix(const FiniteElement &el, ElementTransformation &Trans, DenseMatrix &elmat)
General product operator: x -> (A*B)(x) = A(B(x)).
ID for the base class Operator, i.e. any type.
const FiniteElement * GetEdgeElement(int i) const
virtual int GetRow(const int row, Array< int > &cols, Vector &srow) const
Extract all column indices and values from a given row.
virtual void Mult(const Vector &x, Vector &y) const
Operator application: y=A(x).
void AddMult(const DenseMatrix &b, const DenseMatrix &c, DenseMatrix &a)
Matrix matrix multiplication. A += B * C.
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().
int Append(const T &el)
Append element to array, resize if necessary.
Mesh * GetMesh() const
Returns the mesh.
Operator that extracts Face degrees of freedom.
For scalar fields; preserves volume integrals.
OperatorHandle F
Forward, coarse-to-fine, operator.
void mfem_error(const char *msg)
Function called when an error is encountered. Used by the macros MFEM_ABORT, MFEM_ASSERT, MFEM_VERIFY.
A class that performs interpolation from an E-vector to quadrature point values and/or derivatives (Q...
GridTransfer(FiniteElementSpace &dom_fes_, FiniteElementSpace &ran_fes_)
std::vector< Master > masters
SparseMatrix * cR
Conforming restriction matrix such that cR.cP=I.
void GetRow(int r, Vector &row) const
const IntegrationRule * IntRule
Not owned.
SparseMatrix * D2Const_GlobalRestrictionMatrix(FiniteElementSpace *cfes)
static const int NumVerts[NumGeom]
SparseMatrix * D2C_GlobalRestrictionMatrix(FiniteElementSpace *cfes)
void AddConnection(int r, int c)
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...
HypreParMatrix * Dof_TrueDof_Matrix() const
The true dof-to-dof interpolation matrix.
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.
void BuildConformingInterpolation() const
Calculate the cP and cR matrices for a nonconforming mesh.
NURBSExtension * StealNURBSext()
void Reserve(int capacity)
Ensures that the allocated size is at least the given size.
virtual ~RefinementOperator()
virtual const FiniteElement * TraceFiniteElementForGeometry(Geometry::Type GeomType) const
L2Projection(const FiniteElementSpace &fes_ho_, const FiniteElementSpace &fes_lor_)
static void AddDependencies(SparseMatrix &deps, Array< int > &master_dofs, Array< int > &slave_dofs, DenseMatrix &I)
Array< int > dof_ldof_array
const Array< int > & GetOrders() const
Read-only access to the orders of all knot vectors.
int GetVDim() const
Returns vector dimension.
int Size() const
Returns the number of TYPE I elements.
virtual void GetBoundaryClosure(const Array< int > &bdr_attr_is_ess, Array< int > &bdr_vertices, Array< int > &bdr_edges)
Array< QuadratureInterpolator * > E2Q_array
A class that performs interpolation from a face E-vector to quadrature point values and/or derivative...
void GetEdgeDofs(int i, Array< int > &dofs) const
Operator * Ptr() const
Access the underlying Operator pointer.
OperatorHandle L2E_nat
The element restriction operators, see GetElementRestriction().
int slaves_end
slave faces
void GetTransferOperator(const FiniteElementSpace &coarse_fes, OperatorHandle &T) const
Construct and return an Operator that can be used to transfer GridFunction data from coarse_fes...
OperatorHandle B
Backward, fine-to-coarse, operator.
void GetElementInteriorDofs(int i, Array< int > &dofs) const
void GetLocalRefinementMatrices(Geometry::Type geom, DenseTensor &localP) const
int GetOrder() const
If all orders are identical, return that number. Otherwise, return NURBSFECollection::VariableOrder.
List of mesh geometries stored as Array<Geometry::Type>.
virtual const Operator & BackwardOperator()
Return an Operator that transfers GridFunctions from the range FE space back to GridFunctions in the ...
virtual const Operator * GetFaceRestriction(ElementDofOrdering e_ordering, FaceType, L2FaceValues mul=L2FaceValues::DoubleValued) const
Return an Operator that converts L-vectors to E-vectors on each face.
void GetBdrElementFace(int i, int *, int *) const
Return the index and the orientation of the face of bdr element i. (3D)
void SetMassIntegrator(BilinearFormIntegrator *mass_integ_, bool own_mass_integ_=true)
Assign a mass integrator to be used in the construction of the backward, fine-to-coarse, transfer operator.
double Min() const
Returns the minimal element of the vector.
ElementTransformation * GetElementTransformation(int i) const
Returns ElementTransformation for the i-th element.
Type
Enumeration defining IDs for some classes derived from Operator.
virtual const int * DofOrderForOrientation(Geometry::Type GeomType, int Or) const =0
Returns an array, say p, that maps a local permuted index i to a local base index: base_i = p[i]...
RefinementOperator(const FiniteElementSpace *fespace, Table *old_elem_dof, int old_ndofs)
void LoadFE(int i, const FiniteElement *FE) const
void SetOrder(int Order) const
Set the order and the name, based on the given Order: either a positive number for fixed order...
Operator that converts FiniteElementSpace L-vectors to E-vectors.
std::vector< Slave > slaves
void Print(std::ostream &out=mfem::out, int width=8) const
Prints vector to stream out.
Nonconforming edge/face within a bigger edge/face.
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.
virtual ~FiniteElementSpace()
bool OwnsOperator() const
Return true if the OperatorHandle owns the held Operator.
SparseMatrix * H2L_GlobalRestrictionMatrix(FiniteElementSpace *lfes)
void SetSize(int nsize)
Change logical size of the array, keep existing entries.
L2Prolongation * B
Backward, fine-to-coarse, operator.
int GetOrder(int i) const
Returns the order of the i'th finite element.
void Save(std::ostream &out) const
Write the QuadratureSpace to the stream out.
void Clear()
Clear the OperatorHandle, deleting the held Operator (if owned), while leaving the type id unchanged...
Table * GetElementDofTable()
void MakeVDimMatrix(SparseMatrix &mat) const
Replicate 'mat' in the vector dimension, according to vdim ordering mode.
Table * GetBdrElementDofTable()
bool own_mass_integ
Ownership flag for mass_integ.
The ordering method used when the number of unknowns per mesh node (vector dimension) is bigger than ...
void GetEdgeInteriorVDofs(int i, Array< int > &vdofs) const
void GetEntityDofs(int entity, int index, Array< int > &dofs, Geometry::Type master_geom=Geometry::INVALID) const
Helper to get vertex, edge or face DOFs (entity=0,1,2 resp.).
Linear2DFiniteElement TriangleFE
const CoarseFineTransformations & GetRefinementTransforms()
L2Projection * F
Forward, coarse-to-fine, operator.
Operation GetLastOperation() const
Return type of last modification of the mesh.
static FiniteElementCollection * New(const char *name)
Factory method: return a newly allocated FiniteElementCollection according to the given name...
bool Nonconforming() const
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...
virtual const Operator & ForwardOperator()
Return an Operator that transfers GridFunctions from the domain FE space to GridFunctions in the rang...
void ConvertToConformingVDofs(const Array< int > &dofs, Array< int > &cdofs)
virtual const char * Name() const
Class for integration point with weight.
void SetOperatorOwner(bool own=true)
Set the ownership flag for the held Operator.
void GetElementEdges(int i, Array< int > &edges, Array< int > &cor) const
Return the indices and the orientations of all edges of element i.
Mesh * mesh
The mesh that FE space lives on (not owned).
void ReorderElementToDofTable()
Reorder the scalar DOFs based on the element ordering.
GridFunction interpolation operator applicable after mesh refinement.
double Max() const
Returns the maximal element of the vector.
static const int DimStart[MaxDim+2]
const NCList & GetNCList(int entity)
Return vertex/edge/face list (entity = 0/1/2, respectively).
Array< FaceQuadratureInterpolator * > E2BFQ_array
int GetNConformingDofs() const
void GetEdgeInteriorDofs(int i, Array< int > &dofs) const
const QuadratureInterpolator * GetQuadratureInterpolator(const IntegrationRule &ir) const
Return a QuadratureInterpolator that interpolates E-vectors to quadrature point values and/or derivat...
ElementDofOrdering
Constants describing the possible orderings of the DOFs in one element.
General triple product operator x -> A*B*C*x, with ownership of the factors.
virtual void GetLocalRestriction(ElementTransformation &Trans, DenseMatrix &R) const
Return a local restriction matrix R (Dof x Dof) mapping fine dofs to coarse dofs. ...
Array< FaceQuadratureInterpolator * > E2IFQ_array
const FiniteElement * GetFE(int i) const
Returns pointer to the FiniteElement associated with i'th element.
int index(int i, int j, int nx, int ny)
Lexicographic ordering for tensor-product FiniteElements.
int parent
Element index in the coarse mesh.
FiniteElementSpace()
Default constructor: the object is invalid until initialized using the method Load().
QuadratureSpace(Mesh *mesh_, int order_)
Create a QuadratureSpace based on the global rules from IntRules.
void Constructor(Mesh *mesh, NURBSExtension *ext, const FiniteElementCollection *fec, int vdim=1, int ordering=Ordering::byNODES)
Help function for constructors + Load().
NCMesh * ncmesh
Optional non-conforming mesh extension.
Geometry::Type GetBdrElementBaseGeometry(int i) const
void GetFaceVDofs(int i, Array< int > &vdofs) const
Returns indexes of degrees of freedom for i'th face element (2D and 3D).
void SetRow(const int row, const Array< int > &cols, const Vector &srow)
void GetEdgeVDofs(int i, Array< int > &vdofs) const
Returns indexes of degrees of freedom for i'th edge.
HYPRE_Int * GetTrueDofOffsets() const
static void ListToMarker(const Array< int > &list, int marker_size, Array< int > &marker, int mark_val=-1)
virtual void Mult(const Vector &x, Vector &y) const
Perform the L2 projection onto the LOR space.
int GetNEdges() const
Return the number of edges.
void filter_dos(std::string &line)
void MakeRef(T *, int)
Make this Array a reference to a pointer.
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.
std::tuple< bool, ElementDofOrdering, FaceType, L2FaceValues > key_face
The face restriction operators, see GetFaceRestriction().
ID for class HypreParMatrix.
void CopyMN(const DenseMatrix &A, int m, int n, int Aro, int Aco)
Copy the m x n submatrix of A at row/col offsets Aro/Aco to *this.
const Table & GetElementToDofTable() const
virtual void GetTransferMatrix(const FiniteElement &fe, ElementTransformation &Trans, DenseMatrix &I) const
Return interpolation matrix, I, which maps dofs from a coarse element, fe, to the fine dofs on this f...
static bool DofFinalizable(int dof, const Array< bool > &finalized, const SparseMatrix &deps)
Class representing the storage layout of a QuadratureFunction.
void UseExternalData(double *d, int h, int w)
Change the data array and the size of the DenseMatrix.
const FiniteElement * GetBE(int i) const
Returns pointer to the FiniteElement for the i'th boundary element.
NURBSExtension * NURBSext
void GetBdrElementVDofs(int i, Array< int > &vdofs) const
Returns indexes of degrees of freedom for i'th boundary element.
OutStream out(std::cout)
Global stream used by the library for standard output. Initially it uses the same std::streambuf as s...
Wrapper for hypre's ParCSR matrix class.
virtual const SparseMatrix * GetRestrictionMatrix() const
The returned SparseMatrix is owned by the FiniteElementSpace.
void Swap(SparseMatrix &other)
BiLinear2DFiniteElement QuadrilateralFE
Rank 3 tensor (array of matrices)
IntegrationRules IntRules(0, Quadrature1D::GaussLegendre)
A global object with all integration rules (defined in intrules.cpp)
void Save(std::ostream &out) const
Linear1DFiniteElement SegmentFE
void GetBdrElementVertices(int i, Array< int > &v) const
Returns the indices of the vertices of boundary element i.
Operator that converts L2 FiniteElementSpace L-vectors to E-vectors.
void GetElementVertices(int i, Array< int > &v) const
Returns the indices of the vertices of element i.
static void AdjustVDofs(Array< int > &vdofs)
void SetType(Operator::Type tid)
Invoke Clear() and set a new type id.
Defines the position of a fine element within a coarse element.
void Reset(OpType *A, bool own_A=true)
Reset the OperatorHandle to the given OpType pointer, A.
int matrix
Index into the DenseTensor corresponding to the parent Geometry::Type stored in CoarseFineTransformat...
Arbitrary order "L2-conforming" discontinuous finite elements.
const QuadratureSpace * qspace
Not owned.
void DofsToVDofs(Array< int > &dofs, int ndofs=-1) const
const FaceQuadratureInterpolator * GetFaceQuadratureInterpolator(const IntegrationRule &ir, FaceType type) const
Return a FaceQuadratureInterpolator that interpolates E-vectors to quadrature point values and/or der...