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();
134 s0_->AddDomainIntegrator(diffInteg);
139 if ( weakDiv_ == NULL )
142 weakDiv_->AddDomainIntegrator(wdivInteg);
143 weakDiv_->Assemble();
144 weakDiv_->Finalize();
172 IrrotationalProjector::InitSolver()
const
190 weakDiv_->
Mult(x,*xDiv_); *xDiv_ *= -1.0;
197 if ( pcg_ == NULL ) { this->InitSolver(); }
198 pcg_->
Mult(RHS_, Psi_);
204 grad_->
Mult(*psi_, y);
210 delete pcg_; pcg_ = NULL;
211 delete amg_; amg_ = NULL;
268 int x,
int y,
int w,
int h,
bool vec)
271 MPI_Comm comm = pmesh.
GetComm();
274 MPI_Comm_size(comm, &num_procs);
275 MPI_Comm_rank(comm, &myid);
277 bool newly_opened =
false;
278 int connection_failed;
286 sock.
open(vishost, visport);
290 sock <<
"solution\n";
296 if (myid == 0 && newly_opened)
298 sock <<
"window_title '" << title <<
"'\n"
299 <<
"window_geometry "
300 << x <<
" " << y <<
" " << w <<
" " << h <<
"\n"
302 if ( vec ) { sock <<
"vvv"; }
308 connection_failed = !sock && !newly_opened;
310 MPI_Bcast(&connection_failed, 1, MPI_INT, 0, comm);
312 while (connection_failed);
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)
void SaveAsOne(std::ostream &out=std::cout)
Merge the local grid functions.
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)
Abstract parallel finite element space.
virtual ~DivergenceFreeProjector()
const FiniteElementCollection * fec
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)
void PrintAsOne(std::ostream &out=std::cout)
The BoomerAMG solver in hypre.
ParDiscreteCurlOperator(ParFiniteElementSpace *dfes, ParFiniteElementSpace *rfes)
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.
virtual void GetEssentialTrueDofs(const Array< int > &bdr_attr_is_ess, Array< int > &ess_tdof_list)
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