12 #include "../../config/config.hpp"
27 const int p,
const int space_dim,
const int type,
83 double alpha,
double beta)
86 return mat_->
Mult( x, y, alpha, beta);
91 double alpha,
double beta)
94 return mat_->
Mult( x, y, alpha, beta);
100 double alpha,
double beta)
108 double b,
Vector &y)
const
116 double b,
Vector &y)
const
190 : H1FESpace_(&H1FESpace),
191 HCurlFESpace_(&HCurlFESpace),
201 S0_ = s0_->ParallelAssemble();
207 M1_ = m1_->ParallelAssemble();
210 amg_->SetPrintLevel(0);
213 pcg_->SetMaxIter(200);
214 pcg_->SetPrintLevel(0);
215 pcg_->SetPreconditioner(*amg_);
241 pcg_->
Mult(*xDiv_,*yPot_);
242 Grad_->
Mult(*yPot_,*gradYPot_);
243 M1_->
Mult(*gradYPot_,y);
287 HCurlFESpace_(&HCurlFESpace),
319 int x,
int y,
int w,
int h)
322 MPI_Comm comm = pmesh.
GetComm();
325 MPI_Comm_size(comm, &num_procs);
326 MPI_Comm_rank(comm, &myid);
328 bool newly_opened =
false;
329 int connection_failed;
337 sock.
open(vishost, visport);
341 sock <<
"solution\n";
347 if (myid == 0 && newly_opened)
349 sock <<
"window_title '" << title <<
"'\n"
350 <<
"window_geometry "
351 << x <<
" " << y <<
" " << w <<
" " << h <<
"\n"
352 <<
"keys maaAc" << endl;
357 connection_failed = !sock && !newly_opened;
359 MPI_Bcast(&connection_failed, 1, MPI_INT, 0, comm);
361 while (connection_failed);
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.
virtual ~ParDiscreteInterpolationOperator()
L2_ParFESpace(ParMesh *m, const int p, const int space_dim, int vdim=1, int order=Ordering::byNODES)
HYPRE_Int MultTranspose(HypreParVector &x, HypreParVector &y, double alpha=1.0, double beta=0.0)
Computes y = alpha * A^t * x + beta * y.
IrrotationalProjector(ParFiniteElementSpace &H1FESpace, ParFiniteElementSpace &HCurlFESpace, ParDiscreteInterpolationOperator &Grad)
DivergenceFreeProjector(ParFiniteElementSpace &H1FESpace, ParFiniteElementSpace &HCurlFESpace, ParDiscreteInterpolationOperator &Grad)
HYPRE_Int MultTranspose(HypreParVector &x, HypreParVector &y, double alpha=1.0, double beta=0.0)
Computes y = alpha * A^t * x + beta * y.
Abstract parallel finite element space.
virtual ~DivergenceFreeProjector()
const FiniteElementCollection * fec
HYPRE_Int Mult(HypreParVector &x, HypreParVector &y, double alpha=1.0, double beta=0.0)
Computes y = alpha * A * x + beta * y.
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.
HYPRE_Int Mult(HypreParVector &x, HypreParVector &y, double alpha=1.0, double beta=0.0)
Computes y = alpha * A * x + beta * y.
ParDiscreteCurlOperator(ParFiniteElementSpace *dfes, ParFiniteElementSpace *rfes)
void VisualizeField(socketstream &sock, const char *vishost, int visport, ParGridFunction &gf, const char *title, int x, int y, int w, int h)
void SetPrintLevel(int print_level)
HypreParMatrix * ParallelAssemble()
void createMatrix() const
virtual ~IrrotationalProjector()
ParDiscreteGradOperator(ParFiniteElementSpace *dfes, ParFiniteElementSpace *rfes)
void SetMaxIter(int max_iter)
Arbitrary order H(div)-conforming Raviart-Thomas finite elements.
HypreParMatrix * ParallelAssemble() const
Returns the matrix "assembled" on the true dofs.
Wrapper for hypre's parallel vector class.
Array< int > bdr_attributes
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.
ParDiscreteLinearOperator * pdlo_
Arbitrary order H1-conforming (continuous) finite elements.
Class for parallel grid function.
Wrapper for hypre's ParCSR matrix class.
virtual void Mult(const Vector &x, Vector &y) const
Operator application.
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.
Integrator for (Q u, v) for VectorFiniteElements.
virtual void Mult(const Vector &x, Vector &y) const
Operator application.
Arbitrary order "L2-conforming" discontinuous finite elements.
ParFiniteElementSpace * ParFESpace() const