25 const int p,
const int space_dim,
const int type,
104 : H1FESpace_(&H1FESpace),
105 HCurlFESpace_(&HCurlFESpace),
115 ownsWeakDiv_(weakDiv == NULL),
116 ownsGrad_(grad == NULL)
118 ess_bdr_.SetSize(H1FESpace_->GetParMesh()->bdr_attributes.Max());
120 H1FESpace_->GetEssentialTrueDofs(ess_bdr_, ess_bdr_tdofs_);
122 int geom = H1FESpace_->GetFE(0)->GetGeomType();
130 s0_->AddDomainIntegrator(diffInteg);
135 if ( weakDiv_ == NULL )
140 weakDiv_->AddDomainIntegrator(wdivInteg);
141 weakDiv_->Assemble();
142 weakDiv_->Finalize();
170 IrrotationalProjector::InitSolver()
const
188 weakDiv_->
Mult(x,*xDiv_); *xDiv_ *= -1.0;
195 if ( pcg_ == NULL ) { this->InitSolver(); }
196 pcg_->
Mult(RHS_, Psi_);
202 grad_->
Mult(*psi_, y);
208 delete pcg_; pcg_ = NULL;
209 delete amg_; amg_ = NULL;
266 int x,
int y,
int w,
int h,
bool vec)
269 MPI_Comm comm = pmesh.
GetComm();
272 MPI_Comm_size(comm, &num_procs);
273 MPI_Comm_rank(comm, &myid);
275 bool newly_opened =
false;
276 int connection_failed;
284 sock.
open(vishost, visport);
288 sock <<
"solution\n";
294 if (myid == 0 && newly_opened)
296 sock <<
"window_title '" << title <<
"'\n"
297 <<
"window_geometry "
298 << x <<
" " << y <<
" " << w <<
" " << h <<
"\n"
300 if ( vec ) { sock <<
"vvv"; }
306 connection_failed = !sock && !newly_opened;
308 MPI_Bcast(&connection_failed, 1, MPI_INT, 0, comm);
310 while (connection_failed);
virtual void GetEssentialTrueDofs(const Array< int > &bdr_attr_is_ess, Array< int > &ess_tdof_list, int component=-1)
Class for an integration rule - an Array of IntegrationPoint.
RT_ParFESpace(ParMesh *m, const int p, const int space_dim, int vdim=1, int order=Ordering::byNODES)
const IntegrationRule & Get(int GeomType, int Order)
Returns an integration rule for given GeomType and Order.
virtual ~ParDiscreteInterpolationOperator()
L2_ParFESpace(ParMesh *m, const int p, const int space_dim, int vdim=1, int order=Ordering::byNODES)
void SaveAsOne(std::ostream &out=mfem::out)
Merge the local grid functions.
Abstract parallel finite element space.
virtual ~DivergenceFreeProjector()
const FiniteElementCollection * fec
Associated FE collection (not owned).
void SetPrintLevel(int print_lvl)
ND_ParFESpace(ParMesh *m, const int p, const int space_dim, int vdim=1, int order=Ordering::byNODES)
void AddDomainInterpolator(DiscreteInterpolator *di)
The BoomerAMG solver in hypre.
ParDiscreteCurlOperator(ParFiniteElementSpace *dfes, ParFiniteElementSpace *rfes)
virtual void Update()
Transform by the Space UpdateMatrix (e.g., on Mesh change).
void PrintAsOne(std::ostream &out=mfem::out)
void SetPrintLevel(int print_level)
void VisualizeField(socketstream &sock, const char *vishost, int visport, GridFunction &gf, const char *title, int x, int y, int w, int h, bool vec)
virtual ~IrrotationalProjector()
ParDiscreteGradOperator(ParFiniteElementSpace *dfes, ParFiniteElementSpace *rfes)
void SetMaxIter(int max_iter)
Arbitrary order H(div)-conforming Raviart-Thomas finite elements.
DivergenceFreeProjector(ParFiniteElementSpace &H1FESpace, ParFiniteElementSpace &HCurlFESpace, const int &irOrder, ParBilinearForm *s0=NULL, ParMixedBilinearForm *weakDiv=NULL, ParDiscreteGradOperator *grad=NULL)
ParDiscreteDivOperator(ParFiniteElementSpace *dfes, ParFiniteElementSpace *rfes)
void SetPreconditioner(HypreSolver &precond)
Set the hypre solver to be used as a preconditioner.
int open(const char hostname[], int port)
Arbitrary order H(curl)-conforming Nedelec finite elements.
Arbitrary order H1-conforming (continuous) finite elements.
IrrotationalProjector(ParFiniteElementSpace &H1FESpace, ParFiniteElementSpace &HCurlFESpace, const int &irOrder, ParBilinearForm *s0=NULL, ParMixedBilinearForm *weakDiv=NULL, ParDiscreteGradOperator *grad=NULL)
Class for parallel grid function.
Wrapper for hypre's ParCSR matrix class.
virtual void Mult(const Vector &x, Vector &y) const
Operator application: y=A(x).
virtual void Assemble(int skip_zeros=1)
virtual void Mult(const HypreParVector &b, HypreParVector &x) const
Solve Ax=b with hypre's PCG.
Class for parallel meshes.
IntegrationRules IntRules(0, Quadrature1D::GaussLegendre)
A global object with all integration rules (defined in intrules.cpp)
virtual void Mult(const Vector &x, Vector &y) const
Operator application: y=A(x).
Arbitrary order "L2-conforming" discontinuous finite elements.
ParFiniteElementSpace * ParFESpace() const