libMesh
|
This class implements the Smoothness estimate. More...
#include <smoothness_estimator.h>
Classes | |
class | EstimateSmoothness |
Class to compute the error contribution for a range of elements. More... | |
Public Member Functions | |
SmoothnessEstimator () | |
Constructor. More... | |
SmoothnessEstimator (const SmoothnessEstimator &)=default | |
Copy/move ctor, copy/move assignment operator, and destructor are all explicitly defaulted for this class. More... | |
SmoothnessEstimator (SmoothnessEstimator &&)=default | |
SmoothnessEstimator & | operator= (const SmoothnessEstimator &)=default |
SmoothnessEstimator & | operator= (SmoothnessEstimator &&)=default |
virtual | ~SmoothnessEstimator ()=default |
virtual void | estimate_smoothness (const System &system, ErrorVector &smoothness_per_cell, const NumericVector< Number > *solution_vector=nullptr) |
This function uses the Legendre expansion of solution to estimate coefficient decay to quantify the solution smoothness on each cell. More... | |
void | extra_quadrature_order (const int extraorder) |
Increases or decreases the order of the quadrature rule used for numerical integration. More... | |
Protected Member Functions | |
void | reduce_smoothness (std::vector< ErrorVectorReal > &error_per_cell, const Parallel::Communicator &comm) |
Static Protected Member Functions | |
static std::vector< Real > | legepoly (const unsigned int dim, const Order order, const Point p, const unsigned int matsize) |
static Real | compute_slope (int N, Real Sx, Real Sy, Real Sxx, Real Sxy) |
Computes slop in a linear regression. More... | |
Protected Attributes | |
int | _extra_order |
Extra order to use for quadrature rule. More... | |
Friends | |
class | EstimateSmoothness |
This class implements the Smoothness estimate.
Definition at line 48 of file smoothness_estimator.h.
libMesh::SmoothnessEstimator::SmoothnessEstimator | ( | ) |
Constructor.
Definition at line 44 of file smoothness_estimator.C.
|
default |
Copy/move ctor, copy/move assignment operator, and destructor are all explicitly defaulted for this class.
|
default |
|
virtualdefault |
|
staticprotected |
Computes slop in a linear regression.
Definition at line 124 of file smoothness_estimator.C.
References libMesh::Real.
Referenced by libMesh::SmoothnessEstimator::EstimateSmoothness::operator()().
|
virtual |
This function uses the Legendre expansion of solution to estimate coefficient decay to quantify the solution smoothness on each cell.
The estimated smoothness is output in the vector (for time being, we use ErrorVector) For element order 1, the least square fit of log|order| vs log |coefficients| fails. This leads to pure h refinement. smoothness_per_cell
Definition at line 143 of file smoothness_estimator.C.
References libMesh::ParallelObject::comm(), EstimateSmoothness, libMesh::System::get_mesh(), mesh, libMesh::Threads::parallel_for(), reduce_smoothness(), libMesh::System::solution, and libMesh::NumericVector< T >::swap().
Referenced by main(), and libMesh::HPCoarsenTest::select_refinement().
|
inline |
Increases or decreases the order of the quadrature rule used for numerical integration.
The default extraorder
is 1, because properly integrating L2 error requires integrating the squares of terms with order p+1, and 2p+2 is 1 higher than what we default to using for reasonable mass matrix integration.
Definition at line 86 of file smoothness_estimator.h.
References _extra_order.
|
staticprotected |
Definition at line 51 of file smoothness_estimator.C.
References dim, and libMesh::Real.
Referenced by libMesh::SmoothnessEstimator::EstimateSmoothness::operator()().
|
default |
|
default |
|
protected |
Definition at line 135 of file smoothness_estimator.C.
References TIMPI::Communicator::sum().
Referenced by estimate_smoothness().
|
friend |
Definition at line 137 of file smoothness_estimator.h.
Referenced by estimate_smoothness().
|
protected |
Extra order to use for quadrature rule.
Definition at line 102 of file smoothness_estimator.h.
Referenced by extra_quadrature_order(), and libMesh::SmoothnessEstimator::EstimateSmoothness::operator()().