MFEM  v3.2
Finite element discretization library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
estimators.cpp
Go to the documentation of this file.
1 // Copyright (c) 2010, Lawrence Livermore National Security, LLC. Produced at
2 // the Lawrence Livermore National Laboratory. LLNL-CODE-443211. All Rights
3 // reserved. See file COPYRIGHT for details.
4 //
5 // This file is part of the MFEM library. For more information and source code
6 // availability see http://mfem.org.
7 //
8 // MFEM is free software; you can redistribute it and/or modify it under the
9 // terms of the GNU Lesser General Public License (as published by the Free
10 // Software Foundation) version 2.1 dated February 1999.
11 
12 #include "estimators.hpp"
13 
14 namespace mfem
15 {
16 
18 {
19  flux_space->Update(false);
21 
22  if (!anisotropic) { aniso_flags.SetSize(0); }
23  const int with_subdomains = 1;
25  anisotropic ? &aniso_flags : NULL,
26  with_subdomains);
27 
29 }
30 
31 
32 #ifdef MFEM_USE_MPI
33 
35 {
36  flux_space->Update(false);
37  smooth_flux_space->Update(false);
38 
39  // TODO: move these parameters in the class, and add Set* methods.
40  const double solver_tol = 1e-12;
41  const int solver_max_it = 200;
44  local_norm_p, solver_tol, solver_max_it);
45 
47 }
48 
49 #endif // MFEM_USE_MPI
50 
51 } // namespace mfem
Class for grid function - Vector with associated FE space.
Definition: gridfunc.hpp:27
virtual void Update(bool want_transform=true)
Definition: fespace.cpp:1421
void ComputeEstimates()
Compute the element error estimates.
Definition: estimators.cpp:34
double ZZErrorEstimator(BilinearFormIntegrator &blfi, GridFunction &u, GridFunction &flux, Vector &error_estimates, Array< int > *aniso_flags, int with_subdomains)
Definition: gridfunc.cpp:2330
ParFiniteElementSpace * flux_space
Ownership based on the flag own_flux_fes. Its Update() method is called automatically by this class w...
Definition: estimators.hpp:194
virtual void Update(bool want_transform=true)
Definition: pfespace.cpp:2155
void ComputeEstimates()
Compute the element error estimates.
Definition: estimators.cpp:17
ParGridFunction * solution
Not owned.
Definition: estimators.hpp:192
long GetSequence() const
Definition: mesh.hpp:871
Mesh * GetMesh() const
Returns the mesh.
Definition: fespace.hpp:136
GridFunction * solution
Not owned.
Definition: estimators.hpp:82
int local_norm_p
Local L_p norm to use, default is 1.
Definition: estimators.hpp:187
FiniteElementSpace * FESpace()
Definition: gridfunc.hpp:263
void SetSize(int nsize)
Change logical size of the array, keep existing entries.
Definition: array.hpp:331
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)
Definition: pgridfunc.cpp:542
ParFiniteElementSpace * smooth_flux_space
Ownership based on the flag own_flux_fes. Its Update() method is called automatically by this class w...
Definition: estimators.hpp:197
FiniteElementSpace * flux_space
Ownership based on own_flux_fes. Its Update() method is called automatically by this class when neede...
Definition: estimators.hpp:84
BilinearFormIntegrator * integ
Not owned.
Definition: estimators.hpp:191
BilinearFormIntegrator * integ
Not owned.
Definition: estimators.hpp:81