27 for (i = 0; i < vsize; i++)
35 for (i = j = 0; i < vsize; i++)
42 for (i = 0; i < nv; i++)
57 for (
int i = 0; i <
fes->
GetNE(); i++)
63 for (
int k = 0; k <
dnfi.Size(); k++)
65 energy +=
dnfi[k]->GetElementEnergy(*fe, *T, el_x);
71 MFEM_ABORT(
"TODO: add energy contribution from interior face terms");
76 MFEM_ABORT(
"TODO: add energy contribution from boundary face terms");
94 for (
int i = 0; i <
fes->
GetNE(); i++)
100 for (
int k = 0; k <
dnfi.Size(); k++)
102 dnfi[k]->AssembleElementVector(*fe, *T, el_x, el_y);
128 for (
int k = 0; k <
fnfi.Size(); k++)
130 fnfi[k]->AssembleFaceVector(*fe1, *fe2, *tr, el_x, el_y);
146 for (
int k = 0; k <
bfnfi.Size(); k++)
154 MFEM_ASSERT(bdr_marker.
Size() == bdr_attr_marker.
Size(),
155 "invalid boundary marker for boundary face integrator #"
156 << k <<
", counting from zero");
157 for (
int i = 0; i < bdr_attr_marker.
Size(); i++)
159 bdr_attr_marker[i] |= bdr_marker[i];
163 for (
int i = 0; i <
fes -> GetNBE(); i++)
166 if (bdr_attr_marker[bdr_attr-1] == 0) {
continue; }
179 for (
int k = 0; k <
bfnfi.Size(); k++)
184 bfnfi[k]->AssembleFaceVector(*fe1, *fe2, *tr, el_x, el_y);
200 const int skip_zeros = 0;
219 for (
int i = 0; i <
fes->
GetNE(); i++)
225 for (
int k = 0; k <
dnfi.Size(); k++)
227 dnfi[k]->AssembleElementGrad(*fe, *T, el_x, elmat);
254 for (
int k = 0; k <
fnfi.Size(); k++)
256 fnfi[k]->AssembleFaceGrad(*fe1, *fe2, *tr, el_x, elmat);
272 for (
int k = 0; k <
bfnfi.Size(); k++)
280 MFEM_ASSERT(bdr_marker.
Size() == bdr_attr_marker.
Size(),
281 "invalid boundary marker for boundary face integrator #"
282 << k <<
", counting from zero");
283 for (
int i = 0; i < bdr_attr_marker.
Size(); i++)
285 bdr_attr_marker[i] |= bdr_marker[i];
289 for (
int i = 0; i <
fes -> GetNBE(); i++)
292 if (bdr_attr_marker[bdr_attr-1] == 0) {
continue; }
305 for (
int k = 0; k <
bfnfi.Size(); k++)
310 bfnfi[k]->AssembleFaceGrad(*fe1, *fe2, *tr, el_x, elmat);
333 for (
int i = 0; i <
dnfi.Size(); i++) {
delete dnfi[i]; }
334 for (
int i = 0; i <
fnfi.Size(); i++) {
delete fnfi[i]; }
335 for (
int i = 0; i <
bfnfi.Size(); i++) {
delete bfnfi[i]; }
Abstract class for Finite Elements.
int Size() const
Logical size of the array.
int GetBdrAttribute(int i) const
Return the attribute of boundary element i.
virtual void Finalize(int skip_zeros=1)
Finalize the matrix initialization, switching the storage format from LIL to CSR. ...
void GetElementVDofs(int i, Array< int > &vdofs) const
Returns indexes of degrees of freedom in array dofs for i'th element.
void GetSubVector(const Array< int > &dofs, Vector &elemvect) const
virtual void GetEssentialVDofs(const Array< int > &bdr_attr_is_ess, Array< int > &ess_vdofs, int component=-1) const
void EliminateRowCol(int rc, const double sol, Vector &rhs, int d=0)
Data type dense matrix using column-major storage.
FaceElementTransformations * GetInteriorFaceTransformations(int FaceNo)
int GetNumFaces() const
Return the number of faces (3D), edges (2D) or vertices (1D).
int GetNE() const
Returns number of elements in the mesh.
int Append(const T &el)
Append element to array, resize if necessary.
Mesh * GetMesh() const
Returns the mesh.
T Max() const
Find the maximal element in the array, using the comparison operator < for class T.
FaceElementTransformations * GetBdrFaceTransformations(int BdrElemNo)
void AddElementVector(const Array< int > &dofs, const Vector &elemvect)
Add (element) subvector to the vector.
void AddSubMatrix(const Array< int > &rows, const Array< int > &cols, const DenseMatrix &subm, int skip_zeros=1)
ElementTransformation * GetElementTransformation(int i) const
Returns ElementTransformation for the i'th element.
Array< int > bdr_attributes
A list of all unique boundary attributes used by the Mesh.
void SetSize(int nsize)
Change logical size of the array, keep existing entries.
const FiniteElement * GetFE(int i) const
Returns pointer to the FiniteElement associated with i'th element.