Compare commits

...
3 changed files with 37 additions and 0 deletions
+8
View File
@@ -59,6 +59,14 @@ void BilinearFormIntegrator::AssembleEA(const FiniteElementSpace &fes,
" is not implemented for this class.");
}
void BilinearFormIntegrator::AssembleEA(const FiniteElementSpace &fes,
DenseTensor &emat,
const bool add)
{
mfem_error ("BilinearFormIntegrator::AssembleEA(...)\n"
" is not implemented for this class.");
}
void BilinearFormIntegrator::AssembleEAInteriorFaces(const FiniteElementSpace
&fes,
Vector &ea_data_int,
+15
View File
@@ -94,6 +94,13 @@ public:
@a add is true. Otherwise, if @a add is false, we set @a emat. */
virtual void AssembleEA(const FiniteElementSpace &fes, Vector &emat,
const bool add = true);
/// Method defining element assembly.
/** The result of the element assembly is added to the @a emat DenseTensor if
@a add is true. Otherwise, if @a add is false, we set @a emat. */
virtual void AssembleEA(const FiniteElementSpace &fes, DenseTensor &emat,
const bool add = true);
/** Used with BilinearFormIntegrators that have different spaces. */
// virtual void AssembleEA(const FiniteElementSpace &trial_fes,
// const FiniteElementSpace &test_fes,
@@ -295,6 +302,7 @@ public:
DenseMatrix &elmat);
using BilinearFormIntegrator::AssemblePA;
using BilinearFormIntegrator::AssembleEA;
virtual void AssemblePA(const FiniteElementSpace& fes)
{
@@ -412,6 +420,8 @@ public:
DenseMatrix &elmat);
using BilinearFormIntegrator::AssemblePA;
using BilinearFormIntegrator::AssembleEA;
virtual void AssemblePA(const FiniteElementSpace& fes);
virtual void AssembleDiagonalPA(Vector &diag);
@@ -2154,6 +2164,7 @@ public:
Vector &flux, Vector *d_energy = NULL);
using BilinearFormIntegrator::AssemblePA;
using BilinearFormIntegrator::AssembleEA;
virtual void AssembleMF(const FiniteElementSpace &fes);
@@ -2223,6 +2234,9 @@ public:
virtual void AssembleEA(const FiniteElementSpace &fes, Vector &emat,
const bool add);
virtual void AssembleEA(const FiniteElementSpace &fes, DenseTensor &emat,
const bool add);
virtual void AssembleDiagonalPA(Vector &diag);
virtual void AssembleDiagonalMF(Vector &diag);
@@ -2283,6 +2297,7 @@ public:
DenseMatrix &);
using BilinearFormIntegrator::AssemblePA;
using BilinearFormIntegrator::AssembleEA;
virtual void AssembleMF(const FiniteElementSpace &fes);
+14
View File
@@ -280,4 +280,18 @@ void MassIntegrator::AssembleEA(const FiniteElementSpace &fes,
MFEM_ABORT("Unknown kernel.");
}
void MassIntegrator::AssembleEA(const FiniteElementSpace &fes,
DenseTensor &ea_tensor,
const bool add)
{
Vector ea_vec;
const bool own_mem = false;
ea_vec.NewMemoryAndSize(ea_tensor.GetMemory(), ea_tensor.TotalSize(), own_mem);
AssembleEA(fes, ea_vec, add);
ea_tensor.GetMemory().Sync(ea_vec.GetMemory());
}
}