21   : 
Vector(2*(fes->GetVSize()))
 
 
   66      gfi->
MakeRef(*
this, vsize, vsize);
 
   78      gfi->
MakeRef(*
this, vsize, vsize);
 
 
  155   : 
Vector(2*(fes->GetVSize())),
 
 
  171   : 
Vector(2*(fes->GetVSize())),
 
 
  282bool SesquilinearForm::RealInteg()
 
  289bool SesquilinearForm::ImagInteg()
 
  313   diag_policy = dpolicy;
 
 
  416   MFEM_ASSERT(x.
Size() == 2 * vsize, 
"Input GridFunction of incorrect size!");
 
  421   MFEM_ASSERT(
b.Size() == 2 * vsize, 
"Input LinearForm of incorrect size!");
 
  452      X_r = X_0; B_r = B_0;
 
  456      X_i = X_0; B_i = B_0;
 
  471   else if (ImagInteg())
 
  477      X_r = X_0; B_i = B_0;
 
  479      b_0 = b_r; b_0 *= -1.0;
 
  481      X_i = X_0; B_r = B_0; B_r *= -1.0;
 
  485      MFEM_ABORT(
"Real and Imaginary part of the Sesquilinear form are empty");
 
  488   if (RealInteg() && ImagInteg())
 
  494         const int n = ess_tdof_list.
Size();
 
  495         auto d_B_r = B_r.
Write();
 
  496         auto d_B_i = B_i.
Write();
 
  497         auto d_X_r = X_r.
Read();
 
  498         auto d_X_i = X_i.
Read();
 
  499         auto d_idx = ess_tdof_list.
Read();
 
  502            const int j = d_idx[i];
 
 
  572   if (!RealInteg() && !ImagInteg())
 
  574      MFEM_ABORT(
"Both Real and Imaginary part of the Sesquilinear form are empty");
 
  577   if (RealInteg() && ImagInteg())
 
 
  629   const int tvsize = X.
Size() / 2;
 
 
  650   if ( blfr ) { blfr->
Update(nfes); }
 
  651   if ( blfi ) { blfi->
Update(nfes); }
 
 
  658   : 
Vector(2*(pfes->GetVSize()))
 
 
  700      pgfr->
MakeRef(*
this, 0, vsize);
 
  701      pgfi->
MakeRef(*
this, vsize, vsize);
 
  712      pgfr->
MakeRef(*
this, 0, vsize);
 
  713      pgfi->
MakeRef(*
this, vsize, vsize);
 
 
  832   : 
Vector(2*(pfes->GetVSize())),
 
  846   int n = (HYPRE_AssumedPartitionCheck()) ? 2 : pfes->
GetNRanks();
 
  849   for (
int i = 0; i <= n; i++)
 
 
  861   : 
Vector(2*(pfes->GetVSize())),
 
  875   int n = (HYPRE_AssumedPartitionCheck()) ? 2 : pfes->
GetNRanks();
 
  878   for (
int i = 0; i <= n; i++)
 
 
 1025bool ParSesquilinearForm::RealInteg()
 
 1032bool ParSesquilinearForm::ImagInteg()
 
 1149   const int vsize = pfes->
GetVSize();
 
 1158   MFEM_ASSERT(x.
Size() == 2 * vsize, 
"Input GridFunction of incorrect size!");
 
 1163   MFEM_ASSERT(
b.Size() == 2 * vsize, 
"Input LinearForm of incorrect size!");
 
 1192      X_r = X_0; B_r = B_0;
 
 1196      X_i = X_0; B_i = B_0;
 
 1209   else if (ImagInteg())
 
 1213      X_r = X_0; B_i = B_0;
 
 1215      b_0 = b_r; b_0 *= -1.0;
 
 1217      X_i = X_0; B_r = B_0; B_r *= -1.0;
 
 1221      MFEM_ABORT(
"Real and Imaginary part of the Sesquilinear form are empty");
 
 1224   if (RealInteg() && ImagInteg())
 
 1227      const int n = ess_tdof_list.
Size();
 
 1228      auto d_B_r = B_r.
Write();
 
 1229      auto d_B_i = B_i.
Write();
 
 1230      auto d_X_r = X_r.
Read();
 
 1231      auto d_X_i = X_i.
Read();
 
 1232      auto d_idx = ess_tdof_list.
Read();
 
 1235         const int j = d_idx[i];
 
 1236         d_B_r[j] = d_X_r[j];
 
 1237         d_B_i[j] = d_X_i[j];
 
 1245         hypre_ParCSRMatrix *Aih = *Ah;
 
 1247         const int *d_ess_tdof_list =
 
 1249         HYPRE_Int *d_diag_i = Aih->diag->i;
 
 1250         real_t *d_diag_data = Aih->diag->data;
 
 1253            const int j = d_ess_tdof_list[k];
 
 1254            d_diag_data[d_diag_i[j]] = 0.0;
 
 
 1320   if (!RealInteg() && !ImagInteg())
 
 1322      MFEM_ABORT(
"Both Real and Imaginary part of the Sesquilinear form are empty");
 
 1325   if (RealInteg() && ImagInteg())
 
 1331         int n = ess_tdof_list.
Size();
 
 1334         hypre_ParCSRMatrix * Aih = *Ah;
 
 1335         for (
int k = 0; k < n; k++)
 
 1337            int j = ess_tdof_list[k];
 
 1338            Aih->diag->
data[Aih->diag->i[j]] = 0.0;
 
 
 1383   const int vsize  = pfes->
GetVSize();
 
 1384   const int tvsize = X.
Size() / 2;
 
 
 1405   if ( pblfr ) { pblfr->
Update(nfes); }
 
 1406   if ( pblfi ) { pblfi->
Update(nfes); }
 
 
Memory< T > & GetMemory()
Return a reference to the Memory object used by the Array.
int Size() const
Return the logical size of the array.
Memory< T > data
Pointer to data.
const T * Read(bool on_dev=true) const
Shortcut for mfem::Read(a.GetMemory(), a.Size(), on_dev).
Base class Coefficients that optionally depend on space and time. These are used by the BilinearFormI...
virtual void ProjectBdrCoefficientTangent(VectorCoefficient &real_coeff, VectorCoefficient &imag_coeff, Array< int > &attr)
virtual void ProjectBdrCoefficient(Coefficient &real_coeff, Coefficient &imag_coeff, Array< int > &attr)
virtual void ProjectCoefficient(Coefficient &real_coeff, Coefficient &imag_coeff)
virtual void ProjectBdrCoefficientNormal(VectorCoefficient &real_coeff, VectorCoefficient &imag_coeff, Array< int > &attr)
ComplexGridFunction(FiniteElementSpace *f)
Construct a ComplexGridFunction associated with the FiniteElementSpace *f.
Specialization of the ComplexOperator built from a pair of HypreParMatrices.
Mimic the action of a complex operator using two real operators.
@ HERMITIAN
Native convention for Hermitian operators.
@ BLOCK_SYMMETRIC
Alternate convention for damping operators.
Specialization of the ComplexOperator built from a pair of Sparse Matrices.
Square Operator for imposing essential boundary conditions using only the action, Mult(),...
Class FiniteElementSpace - responsible for providing FEM view of the mesh, mainly managing the set of...
virtual int GetTrueVSize() const
Return the number of vector true (conforming) dofs.
const SparseMatrix * GetConformingProlongation() const
int GetVSize() const
Return the number of vector dofs, i.e. GetNDofs() x GetVDim().
const Operator * GetUpdateOperator()
Get the GridFunction update operator.
Class for grid function - Vector with associated FE space.
virtual void Update()
Transform by the Space UpdateMatrix (e.g., on Mesh change).
virtual void MakeRef(FiniteElementSpace *f, real_t *v)
Make the GridFunction reference external data on a new FiniteElementSpace.
virtual void ProjectBdrCoefficientTangent(VectorCoefficient &vcoeff, const Array< int > &bdr_attr)
Project the tangential components of the given VectorCoefficient on the boundary. Only boundary attri...
FiniteElementSpace * FESpace()
virtual void ProjectCoefficient(Coefficient &coeff)
Project coeff Coefficient to this GridFunction. The projection computation depends on the choice of t...
void ProjectBdrCoefficientNormal(VectorCoefficient &vcoeff, const Array< int > &bdr_attr)
void ProjectBdrCoefficient(Coefficient &coeff, const Array< int > &attr)
Project a Coefficient on the GridFunction, modifying only DOFs on the boundary associated with the bo...
Wrapper for hypre's ParCSR matrix class.
void HypreReadWrite()
Update the internal hypre_ParCSRMatrix object, A, to be in hypre memory space.
Wrapper for hypre's parallel vector class.
Pointer to an Operator of a specified type.
OpType * As() const
Return the Operator pointer statically cast to a specified OpType. Similar to the method Get().
bool OwnsOperator() const
Return true if the OperatorHandle owns the held Operator.
void SetOperatorOwner(bool own=true)
Set the ownership flag for the held Operator.
Operator * Ptr() const
Access the underlying Operator pointer.
void Clear()
Clear the OperatorHandle, deleting the held Operator (if owned), while leaving the type id unchanged.
void Reset(OpType *A, bool own_A=true)
Reset the OperatorHandle to the given OpType pointer, A.
OpType * Is() const
Return the Operator pointer dynamically cast to a specified OpType.
Operator::Type Type() const
Get the currently set operator type id.
void Get(OpType *&A) const
Return the Operator pointer statically cast to a given OpType.
virtual void Mult(const Vector &x, Vector &y) const =0
Operator application: y=A(x).
DiagonalPolicy
Defines operator diagonal policy upon elimination of rows and/or columns.
@ DIAG_ZERO
Set the diagonal value to zero.
@ MFEM_SPARSEMAT
ID for class SparseMatrix.
@ Hypre_ParCSR
ID for class HypreParMatrix.
virtual void ProjectBdrCoefficient(Coefficient &real_coeff, Coefficient &imag_coeff, Array< int > &attr)
void ParallelProject(Vector &tv) const
Returns the vector restricted to the true dofs.
ParComplexGridFunction(ParFiniteElementSpace *pf)
Construct a ParComplexGridFunction associated with the ParFiniteElementSpace *pf.
virtual void ProjectBdrCoefficientNormal(VectorCoefficient &real_coeff, VectorCoefficient &imag_coeff, Array< int > &attr)
void Distribute(const Vector *tv)
virtual void ProjectBdrCoefficientTangent(VectorCoefficient &real_coeff, VectorCoefficient &imag_coeff, Array< int > &attr)
virtual void ProjectCoefficient(Coefficient &real_coeff, Coefficient &imag_coeff)
Abstract parallel finite element space.
HYPRE_BigInt * GetTrueDofOffsets() const
HYPRE_BigInt GlobalTrueVSize() const
int GetTrueVSize() const override
Return the number of local vector true dofs.
const Operator * GetProlongationMatrix() const override
Class for parallel grid function.
void ProjectBdrCoefficient(Coefficient *coeff[], VectorCoefficient *vcoeff, const Array< int > &attr)
ParFiniteElementSpace * ParFESpace() const
void MakeRef(FiniteElementSpace *f, real_t *v) override
Make the ParGridFunction reference external data on a new FiniteElementSpace.
void ProjectCoefficient(Coefficient &coeff) override
Project coeff Coefficient to this GridFunction. The projection computation depends on the choice of t...
void ParallelProject(Vector &tv) const
Returns the vector restricted to the true dofs.
void Update() override
Transform by the Space UpdateMatrix (e.g., on Mesh change).
void Distribute(const Vector *tv)
void ProjectBdrCoefficientTangent(VectorCoefficient &vcoeff, const Array< int > &bdr_attr) override
Project the tangential components of the given VectorCoefficient on the boundary. Only boundary attri...
void Mult(const Vector &x, Vector &y) const override
Matrix vector multiplication.
Base class for vector Coefficients that optionally depend on time and space.
virtual const real_t * Read(bool on_dev=true) const
Shortcut for mfem::Read(vec.GetMemory(), vec.Size(), on_dev).
void SyncAliasMemory(const Vector &v) const
Update the alias memory location of the vector to match v.
void SyncMemory(const Vector &v) const
Update the memory location of the vector to match v.
virtual bool UseDevice() const
Return the device flag of the Memory object used by the Vector.
int Size() const
Returns the size of the vector.
virtual void UseDevice(bool use_dev) const
Enable execution of Vector operations using the mfem::Device.
void SetSize(int s)
Resize the vector to size s.
Vector & operator=(const real_t *v)
Copy Size() entries from v.
virtual real_t * Write(bool on_dev=true)
Shortcut for mfem::Write(vec.GetMemory(), vec.Size(), on_dev).
void MakeRef(Vector &base, int offset, int size)
Reset the Vector to be a reference to a sub-vector of base.
MemoryClass GetHypreForallMemoryClass()
void hypre_forall(int N, lambda &&body)
std::function< real_t(const Vector &)> f(real_t mass_coeff)
void forall(int N, lambda &&body)