12 #ifndef MFEM_PGRIDFUNC
13 #define MFEM_PGRIDFUNC
15 #include "../config/config.hpp"
28 double GlobalLpNorm(
const double p,
double loc_norm, MPI_Comm comm);
199 return GlobalLpNorm(std::numeric_limits<double>::infinity(),
215 exsol, NULL, NULL, irs);
235 p, exsol, weight, v_weight, irs),
pfes->
GetComm());
240 int wcoef = 1,
int subdomain = -1);
245 virtual void Save(std::ostream &out)
const;
248 void SaveAsOne(std::ostream &out = std::cout);
260 const ParGridFunction &x,
261 ParFiniteElementSpace &smooth_flux_fes,
262 ParFiniteElementSpace &flux_fes,
263 Vector &errors,
int norm_p = 2,
double solver_tol = 1e-12,
264 int solver_max_it = 200);
268 #endif // MFEM_USE_MPI
Class for an integration rule - an Array of IntegrationPoint.
void SetSpace(ParFiniteElementSpace *f)
Class for grid function - Vector with associated FE space.
void SaveAsOne(std::ostream &out=std::cout)
Merge the local grid functions.
void ExchangeFaceNbrData()
void AddDistribute(double a, const Vector &tv)
double ComputeL2Error(Coefficient *exsol[], const IntegrationRule *irs[]=NULL) const
HypreParVector * ParallelAssemble() const
Returns a new vector assembled on the true dofs.
HypreParVector * ParallelProject() const
Returns a new vector restricted to the true dofs.
virtual ~ParGridFunction()
void ProjectDiscCoefficient(VectorCoefficient &coeff, Array< int > &dof_attr)
ParFiniteElementSpace * pfes
ParGridFunction & operator=(const HypreParVector &tv)
Short semantic for Distribute.
ParGridFunction(ParFiniteElementSpace *pf)
virtual double GetValue(int i, const IntegrationPoint &ip, int vdim=1) const
virtual void Save(std::ostream &out) const
void ProjectDiscCoefficient(VectorCoefficient &coeff)
Abstract parallel finite element space.
void ProjectCoefficient(Coefficient &coeff)
void Distribute(const Vector &tv)
double GetValue(ElementTransformation &T)
void MakeRef(ParFiniteElementSpace *f, double *v)
Make the ParGridFunction reference external data on a new ParFiniteElementSpace.
double ComputeMaxError(Coefficient &exsol, const IntegrationRule *irs[]=NULL) const
double ComputeL2Error(Coefficient &exsol, const IntegrationRule *irs[]=NULL) const
ParGridFunction & operator=(double value)
Assign constant values to the ParGridFunction data.
virtual void SetFromTrueDofs(const Vector &tv)
Set the GridFunction from the given true-dof vector.
const Vector & FaceNbrData() const
void GetTrueDofs(Vector &tv) const
Extract the true-dofs from the GridFunction. If all dofs are true, then tv will be set to point to th...
double ComputeMaxError(VectorCoefficient &exsol, const IntegrationRule *irs[]=NULL) const
double ComputeLpError(const double p, VectorCoefficient &exsol, Coefficient *weight=NULL, VectorCoefficient *v_weight=NULL, const IntegrationRule *irs[]=NULL) const
double ComputeLpError(const double p, Coefficient &exsol, Coefficient *weight=NULL, const IntegrationRule *irs[]=NULL) const
double ComputeL1Error(Coefficient &exsol, const IntegrationRule *irs[]=NULL) const
double ComputeL1Error(VectorCoefficient &exsol, const IntegrationRule *irs[]=NULL) const
ParGridFunction & operator=(const Vector &v)
Copy the data from a Vector to the ParGridFunction data.
Wrapper for hypre's parallel vector class.
double GlobalLpNorm(const double p, double loc_norm, MPI_Comm comm)
Compute a global Lp norm from the local Lp norms computed by each processor.
Base class Coefficient that may optionally depend on time.
double ComputeMaxError(Coefficient *exsol[], const IntegrationRule *irs[]=NULL) const
double L2ZZErrorEstimator(BilinearFormIntegrator &flux_integrator, const ParGridFunction &x, ParFiniteElementSpace &smooth_flux_fes, ParFiniteElementSpace &flux_fes, Vector &errors, int norm_p, double solver_tol, int solver_max_it)
void Distribute(const Vector *tv)
double ComputeL2Error(Coefficient &exsol, const IntegrationRule *irs[]=NULL) const
Class for integration point with weight.
double ComputeLpError(const double p, Coefficient &exsol, Coefficient *weight=NULL, const IntegrationRule *irs[]=NULL) const
HypreParVector * ParallelAverage() const
Returns a new vector averaged on the true dofs.
double ComputeL2Error(VectorCoefficient &exsol, const IntegrationRule *irs[]=NULL, Array< int > *elems=NULL) const
HypreParVector * GetTrueDofs() const
Returns the true dofs in a new HypreParVector.
void AddDistribute(double a, const Vector *tv)
void ProjectCoefficient(Coefficient &coeff)
double ComputeW11Error(Coefficient *exsol, VectorCoefficient *exgrad, int norm_type, Array< int > *elems=NULL, const IntegrationRule *irs[]=NULL) const
GridFunction & operator=(double value)
Redefine '=' for GridFunction = constant.
Class for parallel grid function.
Class for parallel meshes.
double ComputeL1Error(Coefficient *exsol[], const IntegrationRule *irs[]=NULL) const
ParGridFunction(ParFiniteElementSpace *pf, double *data)
Construct a ParGridFunction using previously allocated array data.
double ComputeMaxError(Coefficient &exsol, const IntegrationRule *irs[]=NULL) const
virtual void ComputeFlux(BilinearFormIntegrator &blfi, GridFunction &flux, int wcoef=1, int subdomain=-1)
ParFiniteElementSpace * ParFESpace() const