12 #ifndef MFEM_DIST_SOLVER_HPP
13 #define MFEM_DIST_SOLVER_HPP
80 double rtol = 1e-7,
double atol = 1e-12,
int print_lv = 0)
81 : maxp(maxp_), newton_iter(newton_iter_),
82 newton_rel_tol(rtol), newton_abs_tol(atol)
94 const int newton_iter;
95 const double newton_rel_tol, newton_abs_tol;
115 const double norm = V.
Norml2() + 1e-12;
129 : basef(basec_), corrf(corrc_) { }
134 double u = basef.
Eval(T,ip);
135 double c = corrf.
Eval(T,ip);
136 if (u<0.0) { u*=-1.0; }
166 const Vector &elfun)
override;
195 bool ownership_=
true)
212 const Vector &elfun)
override;
232 int maxiter = 100,
double rtol = 1e-12,
233 double atol = 1e-15,
int print_lv = 0)
235 fecp(order, mesh.Dimension()),
236 fesp(&mesh, &fecp, 1),
Abstract class for all finite elements.
void trans(const Vector &u, Vector &x)
HypreParVector * NewTrueDofVector()
Class for grid function - Vector with associated FE space.
void ComputeScalarDistance(Coefficient &func, ParGridFunction &fdist)
Base class for vector Coefficients that optionally depend on time and space.
virtual void Eval(Vector &V, ElementTransformation &T, const IntegrationPoint &ip)=0
Evaluate the vector coefficient in the element described by T at the point ip, storing the result in ...
void Eval(Vector &V, ElementTransformation &T, const IntegrationPoint &ip)
Evaluate the vector coefficient in the element described by T at the point ip, storing the result in ...
double Norml2() const
Returns the l2 norm of the vector.
virtual ~DistanceSolver()
virtual void AssembleElementGrad(const FiniteElement &el, ElementTransformation &trans, const Vector &elfun, DenseMatrix &elmat) override
Assemble the local gradient matrix.
Coefficient defined by a GridFunction. This coefficient is mesh dependent.
Data type dense matrix using column-major storage.
Abstract parallel finite element space.
virtual double Eval(ElementTransformation &T, const IntegrationPoint &ip)
Evaluate the coefficient in the element described by T at the point ip.
HeatDistanceSolver(double diff_coeff)
PLapDistanceSolver(int maxp_=30, int newton_iter_=10, double rtol=1e-7, double atol=1e-12, int print_lv=0)
void ScalarDistToVector(ParGridFunction &dist_s, ParGridFunction &dist_v)
VectorCoefficient * fgrad
virtual void AssembleElementVector(const FiniteElement &el, ElementTransformation &trans, const Vector &elfun, Vector &elvect) override
Perform the local action of the NonlinearFormIntegrator.
PUMPLaplacian(Coefficient *nfunc, VectorCoefficient *nfgrad, bool ownership_=true)
The BoomerAMG solver in hypre.
virtual void SetPrintLevel(int print_lvl)
Legacy method to set the level of verbosity of the solver output.
void SetPrintLevel(int print_level)
void SetInput(Coefficient &nfunc)
void SetMaxIter(int max_it)
virtual double GetElementEnergy(const FiniteElement &el, ElementTransformation &trans, const Vector &elfun) override
Compute the local energy.
ScreenedPoisson(Coefficient &nfunc, double rh)
Wrapper for hypre's parallel vector class.
PProductCoefficient(Coefficient &basec_, Coefficient &corrc_)
void SetAbsTol(double atol)
void SetRelTol(double rtol)
Base class Coefficients that optionally depend on space and time. These are used by the BilinearFormI...
virtual void ComputeVectorDistance(Coefficient &zero_level_set, ParGridFunction &distance)
NormalizedGradCoefficient(const GridFunction &u_gf, int dim)
virtual void AssembleElementVector(const FiniteElement &el, ElementTransformation &trans, const Vector &elfun, Vector &elvect) override
Perform the local action of the NonlinearFormIntegrator.
virtual void AssembleElementGrad(const FiniteElement &el, ElementTransformation &trans, const Vector &elfun, DenseMatrix &elmat) override
Assemble the local gradient matrix.
void ComputeScalarDistance(Coefficient &zero_level_set, ParGridFunction &distance)
Class for integration point with weight.
FDualNumber< tbase > sqrt(const FDualNumber< tbase > &f)
sqrt([dual number])
virtual double GetElementEnergy(const FiniteElement &el, ElementTransformation &trans, const Vector &elfun) override
Compute the local energy.
virtual double Eval(ElementTransformation &T, const IntegrationPoint &ip)=0
Evaluate the coefficient in the element described by T at the point ip.
virtual void SetPreconditioner(Solver &pr)
This should be called before SetOperator.
Arbitrary order H1-conforming (continuous) finite elements.
double u(const Vector &xvec)
void SetPower(double pp_)
Class for parallel grid function.
void SetMaxPower(int new_pp)
Class for parallel meshes.
void Filter(ParGridFunction &func, ParGridFunction &ffield)
PDEFilter(ParMesh &mesh, double rh, int order=2, int maxiter=100, double rtol=1e-12, double atol=1e-15, int print_lv=0)
void GetGradient(ElementTransformation &tr, Vector &grad) const
double AvgElementSize(ParMesh &pmesh)
virtual void ComputeScalarDistance(Coefficient &zero_level_set, ParGridFunction &distance)=0