20 :
Vector(2*(fes->GetVSize()))
123 :
Vector(2*(f->GetVSize())),
133 :
Vector(2*(fes->GetVSize())),
224 return complex<double>((*lfr)(gf.
real()) - s * (*
lfi)(gf.
imag()),
228 bool SesquilinearForm::RealInteg()
235 bool SesquilinearForm::ImagInteg()
259 diag_policy = dpolicy;
349 Vector b_0(vsize); b_0 = 0.0;
352 MFEM_ASSERT(x.
Size() == 2 * vsize,
"Input GridFunction of incorrect size!");
356 MFEM_ASSERT(b.
Size() == 2 * vsize,
"Input LinearForm of incorrect size!");
369 Vector X_0(tvsize), B_0(tvsize);
382 X_r = X_0; B_r = B_0;
386 X_i = X_0; B_i = B_0;
402 else if (ImagInteg())
409 X_r = X_0; B_i = B_0;
411 b_0 = b_r; b_0 *= -1.0;
413 X_i = X_0; B_r = B_0; B_r *= -1.0;
417 MFEM_ABORT(
"Real and Imaginary part of the Sesquilinear form are empty");
452 if (!RealInteg() && !ImagInteg())
454 MFEM_ABORT(
"Both Real and Imaginary part of the Sesquilinear form are empty");
473 int tvsize = X.
Size() / 2;
496 if ( blfr ) { blfr->
Update(nfes); }
497 if ( blfi ) { blfi->
Update(nfes); }
504 :
Vector(2*(pfes->GetVSize()))
614 Vector tvi((tvd) ? &tvd[size] : tvd, size);
628 Vector tvi((tvd) ? &tvd[size] : tvd, size);
638 :
Vector(2*(pfes->GetVSize())),
646 int n = (HYPRE_AssumedPartitionCheck()) ? 2 : pfes->
GetNRanks();
649 for (
int i=0; i<=n; i++)
660 :
Vector(2*(pfes->GetVSize())),
670 int n = (HYPRE_AssumedPartitionCheck()) ? 2 : pfes->
GetNRanks();
673 for (
int i=0; i<=n; i++)
760 Vector tvi((tvd) ? &tvd[size] : tvd, size);
779 Vector tvi((tvd) ? &tvd[size] : tvd, size);
791 return complex<double>((*plfr)(gf.
real()) - s * (*
plfi)(gf.
imag()),
797 bool ParSesquilinearForm::RealInteg()
804 bool ParSesquilinearForm::ImagInteg()
916 Vector b_0(vsize); b_0 = 0.0;
922 MFEM_ASSERT(b.
Size() == 2 * vsize,
"Input LinearForm of incorrect size!");
935 Vector X_0(tvsize), B_0(tvsize);
945 X_r = X_0; B_r = B_0;
949 X_i = X_0; B_i = B_0;
962 else if (ImagInteg())
966 X_r = X_0; B_i = B_0;
968 b_0 = b_r; b_0 *= -1.0;
970 X_i = X_0; B_r = B_0; B_r *= -1.0;
974 MFEM_ABORT(
"Real and Imaginary part of the Sesquilinear form are empty");
980 if (RealInteg() && ImagInteg())
985 int n = ess_tdof_list.
Size();
986 hypre_ParCSRMatrix * Aih =
987 (hypre_ParCSRMatrix *)const_cast<HypreParMatrix&>(*Ah);
988 for (
int k=0; k<n; k++)
990 int j=ess_tdof_list[k];
991 Aih->diag->
data[Aih->diag->i[j]] = 0.0;
1041 if (!RealInteg() && !ImagInteg())
1043 MFEM_ABORT(
"Both Real and Imaginary part of the Sesquilinear form are empty");
1049 if (RealInteg() && ImagInteg())
1053 int n = ess_tdof_list.
Size();
1057 hypre_ParCSRMatrix * Aih =
1058 (hypre_ParCSRMatrix *)const_cast<HypreParMatrix&>(*Ah);
1059 for (
int k=0; k<n; k++)
1062 Aih->diag->
data[Aih->diag->i[j]] = 0.0;
1101 int tvsize = X.
Size() / 2;
1117 if ( pblfr ) { pblfr->
Update(nfes); }
1118 if ( pblfi ) { pblfi->
Update(nfes); }
1122 #endif // MFEM_USE_MPI
int Size() const
Logical size of the array.
int GetVSize() const
Return the number of vector dofs, i.e. GetNDofs() x GetVDim().
OpType * As() const
Return the Operator pointer statically cast to a specified OpType. Similar to the method Get()...
virtual void ProjectBdrCoefficientTangent(VectorCoefficient &real_coeff, VectorCoefficient &imag_coeff, Array< int > &attr)
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.
const SparseMatrix * GetConformingProlongation() const
The returned SparseMatrix is owned by the FiniteElementSpace.
virtual void ProjectBdrCoefficient(Coefficient &real_coeff, Coefficient &imag_coeff, Array< int > &attr)
virtual const Operator * GetProlongationMatrix() const
The returned Operator is owned by the FiniteElementSpace.
void SetSize(int s)
Resize the vector to size s.
Mimic the action of a complex operator using two real operators.
virtual void ProjectCoefficient(Coefficient &real_coeff, Coefficient &imag_coeff)
Pointer to an Operator of a specified type.
Operator::Type Type() const
Get the currently set operator type id.
int Size() const
Returns the size of the vector.
virtual void Mult(const Vector &x, Vector &y) const =0
Operator application: y=A(x).
Abstract parallel finite element space.
virtual void ProjectCoefficient(Coefficient &coeff)
Alternate convention for damping operators.
double * GetData() const
Return a pointer to the beginning of the Vector data.
virtual void ProjectBdrCoefficientNormal(VectorCoefficient &real_coeff, VectorCoefficient &imag_coeff, Array< int > &attr)
virtual int GetTrueVSize() const
Return the number of local vector true dofs.
void ProjectBdrCoefficientNormal(VectorCoefficient &vcoeff, Array< int > &bdr_attr)
virtual void Update()
Transform by the Space UpdateMatrix (e.g., on Mesh change).
virtual void ProjectBdrCoefficient(Coefficient &real_coeff, Coefficient &imag_coeff, Array< int > &attr)
HYPRE_Int GlobalTrueVSize() const
virtual int GetTrueVSize() const
Return the number of vector true (conforming) dofs.
FiniteElementSpace * FESpace()
Memory< T > data
Pointer to data.
Wrapper for hypre's parallel vector class.
void Distribute(const Vector *tv)
virtual void ProjectBdrCoefficientNormal(VectorCoefficient &real_coeff, VectorCoefficient &imag_coeff, Array< int > &attr)
Specialization of the ComplexOperator built from a pair of Sparse Matrices.
void ProjectBdrCoefficient(Coefficient *coeff[], VectorCoefficient *vcoeff, Array< int > &attr)
Class FiniteElementSpace - responsible for providing FEM view of the mesh, mainly managing the set of...
virtual void Mult(const Vector &x, Vector &y) const
Matrix vector multiplication.
bool OwnsOperator() const
Return true if the OperatorHandle owns the held Operator.
Base class Coefficient that may optionally depend on time.
void Clear()
Clear the OperatorHandle, deleting the held Operator (if owned), while leaving the type id unchanged...
void Distribute(const Vector *tv)
ParComplexGridFunction(ParFiniteElementSpace *pf)
virtual void Update()
Transform by the Space UpdateMatrix (e.g., on Mesh change).
virtual void ProjectBdrCoefficientTangent(VectorCoefficient &real_coeff, VectorCoefficient &imag_coeff, Array< int > &attr)
virtual void ProjectBdrCoefficientTangent(VectorCoefficient &vcoeff, Array< int > &bdr_attr)
Project the tangential components of the given VectorCoefficient on the boundary. Only boundary attri...
Specialization of the ComplexOperator built from a pair of HypreParMatrices.
Native convention for Hermitian operators.
const Operator * GetUpdateOperator()
Get the GridFunction update operator.
virtual void ProjectBdrCoefficientTangent(VectorCoefficient &vcoeff, Array< int > &bdr_attr)
Project the tangential components of the given VectorCoefficient on the boundary. Only boundary attri...
virtual void ProjectCoefficient(Coefficient &coeff)
HYPRE_Int * GetTrueDofOffsets() const
void Get(OpType *&A) const
Return the Operator pointer statically cast to a given OpType.
ID for class HypreParMatrix.
Class for parallel grid function.
void ParallelProject(Vector &tv) const
Returns the vector restricted to the true dofs.
Wrapper for hypre's ParCSR matrix class.
void Reset(OpType *A, bool own_A=true)
Reset the OperatorHandle to the given OpType pointer, A.
virtual void ProjectCoefficient(Coefficient &real_coeff, Coefficient &imag_coeff)
void ProjectBdrCoefficient(Coefficient &coeff, Array< int > &attr)
Project a Coefficient on the GridFunction, modifying only DOFs on the boundary associated with the bo...
void ParallelProject(Vector &tv) const
Returns the vector restricted to the true dofs.
ParFiniteElementSpace * ParFESpace() const