libMesh
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
libMesh::HPCoarsenTest Class Reference

This class uses the error estimate given by different types of derefinement (h coarsening or p reduction) to choose between h refining and p elevation. More...

#include <hp_coarsentest.h>

Inheritance diagram for libMesh::HPCoarsenTest:
[legend]

Public Member Functions

 HPCoarsenTest ()
 Constructor. More...
 
 HPCoarsenTest (const HPCoarsenTest &)=delete
 This class cannot be (default) copy constructed/assigned because it has unique_ptr members. More...
 
HPCoarsenTestoperator= (const HPCoarsenTest &)=delete
 
 HPCoarsenTest (HPCoarsenTest &&)=default
 Defaulted move ctor, move assignment operator, and destructor. More...
 
HPCoarsenTestoperator= (HPCoarsenTest &&)=default
 
virtual ~HPCoarsenTest ()=default
 
virtual void select_refinement (System &system) override
 This pure virtual function must be redefined in derived classes to take a mesh flagged for h refinement and potentially change the desired refinement type. More...
 

Public Attributes

Real p_weight
 Because the coarsening test seems to always choose p refinement, we're providing an option to make h refinement more likely. More...
 
std::vector< float > component_scale
 This vector can be used to "scale" certain variables in a system. More...
 

Protected Member Functions

void add_projection (const System &, const Elem *, unsigned int var)
 The helper function which adds individual fine element data to the coarse element projection. More...
 

Protected Attributes

const Elemcoarse
 The coarse element on which a solution projection is cached. More...
 
std::vector< dof_id_typedof_indices
 Global DOF indices for fine elements. More...
 
std::unique_ptr< FEBasefe
 The finite element objects for fine and coarse elements. More...
 
std::unique_ptr< FEBasefe_coarse
 
const std::vector< std::vector< Real > > * phi
 The shape functions and their derivatives. More...
 
const std::vector< std::vector< Real > > * phi_coarse
 
const std::vector< std::vector< RealGradient > > * dphi
 
const std::vector< std::vector< RealGradient > > * dphi_coarse
 
const std::vector< std::vector< RealTensor > > * d2phi
 
const std::vector< std::vector< RealTensor > > * d2phi_coarse
 
const std::vector< Real > * JxW
 Mapping jacobians. More...
 
const std::vector< Point > * xyz_values
 Quadrature locations. More...
 
std::vector< Pointcoarse_qpoints
 
std::unique_ptr< QBaseqrule
 The quadrature rule for the fine element. More...
 
DenseMatrix< NumberKe
 Linear system for projections. More...
 
DenseVector< NumberFe
 
DenseVector< NumberUc
 Coefficients for projected coarse and projected p-derefined solutions. More...
 
DenseVector< NumberUp
 

Detailed Description

This class uses the error estimate given by different types of derefinement (h coarsening or p reduction) to choose between h refining and p elevation.

Currently we assume that a set of elements has already been flagged for h refinement, and we may want to change some of those elements to be flagged for p refinement.

This code is currently experimental and will not produce optimal hp meshes without significant improvement.

Author
Roy H. Stogner
Date
2006

Definition at line 68 of file hp_coarsentest.h.

Constructor & Destructor Documentation

◆ HPCoarsenTest() [1/3]

libMesh::HPCoarsenTest::HPCoarsenTest ( )

Constructor.

Definition at line 75 of file hp_coarsentest.h.

75  : p_weight(1.0)
76  {
77  libmesh_experimental();
78  }
Real p_weight
Because the coarsening test seems to always choose p refinement, we&#39;re providing an option to make h ...

◆ HPCoarsenTest() [2/3]

libMesh::HPCoarsenTest::HPCoarsenTest ( const HPCoarsenTest )
delete

This class cannot be (default) copy constructed/assigned because it has unique_ptr members.

Explicitly deleting these functions is the best way to document this fact.

◆ HPCoarsenTest() [3/3]

libMesh::HPCoarsenTest::HPCoarsenTest ( HPCoarsenTest &&  )
default

Defaulted move ctor, move assignment operator, and destructor.

◆ ~HPCoarsenTest()

virtual libMesh::HPCoarsenTest::~HPCoarsenTest ( )
virtualdefault

Member Function Documentation

◆ add_projection()

void libMesh::HPCoarsenTest::add_projection ( const System ,
const Elem ,
unsigned int  var 
)
protected

The helper function which adds individual fine element data to the coarse element projection.

◆ operator=() [1/2]

HPCoarsenTest& libMesh::HPCoarsenTest::operator= ( const HPCoarsenTest )
delete

◆ operator=() [2/2]

HPCoarsenTest& libMesh::HPCoarsenTest::operator= ( HPCoarsenTest &&  )
default

◆ select_refinement()

virtual void libMesh::HPCoarsenTest::select_refinement ( System system)
overridevirtual

This pure virtual function must be redefined in derived classes to take a mesh flagged for h refinement and potentially change the desired refinement type.

Implements libMesh::HPSelector.

Member Data Documentation

◆ coarse

const Elem* libMesh::HPCoarsenTest::coarse
protected

The coarse element on which a solution projection is cached.

Definition at line 119 of file hp_coarsentest.h.

◆ coarse_qpoints

std::vector<Point> libMesh::HPCoarsenTest::coarse_qpoints
protected

Definition at line 147 of file hp_coarsentest.h.

◆ component_scale

std::vector<float> libMesh::HPSelector::component_scale
inherited

This vector can be used to "scale" certain variables in a system.

If the mask is not empty, the consideration given to each component's h and p error estimates will be scaled by component_scale[c].

Definition at line 82 of file hp_selector.h.

◆ d2phi

const std::vector<std::vector<RealTensor> >* libMesh::HPCoarsenTest::d2phi
protected

Definition at line 136 of file hp_coarsentest.h.

◆ d2phi_coarse

const std::vector<std::vector<RealTensor> > * libMesh::HPCoarsenTest::d2phi_coarse
protected

Definition at line 136 of file hp_coarsentest.h.

◆ dof_indices

std::vector<dof_id_type> libMesh::HPCoarsenTest::dof_indices
protected

Global DOF indices for fine elements.

Definition at line 124 of file hp_coarsentest.h.

◆ dphi

const std::vector<std::vector<RealGradient> >* libMesh::HPCoarsenTest::dphi
protected

Definition at line 135 of file hp_coarsentest.h.

◆ dphi_coarse

const std::vector<std::vector<RealGradient> > * libMesh::HPCoarsenTest::dphi_coarse
protected

Definition at line 135 of file hp_coarsentest.h.

◆ fe

std::unique_ptr<FEBase> libMesh::HPCoarsenTest::fe
protected

The finite element objects for fine and coarse elements.

Definition at line 129 of file hp_coarsentest.h.

◆ Fe

DenseVector<Number> libMesh::HPCoarsenTest::Fe
protected

Definition at line 158 of file hp_coarsentest.h.

◆ fe_coarse

std::unique_ptr<FEBase> libMesh::HPCoarsenTest::fe_coarse
protected

Definition at line 129 of file hp_coarsentest.h.

◆ JxW

const std::vector<Real>* libMesh::HPCoarsenTest::JxW
protected

Mapping jacobians.

Definition at line 141 of file hp_coarsentest.h.

◆ Ke

DenseMatrix<Number> libMesh::HPCoarsenTest::Ke
protected

Linear system for projections.

Definition at line 157 of file hp_coarsentest.h.

◆ p_weight

Real libMesh::HPCoarsenTest::p_weight

Because the coarsening test seems to always choose p refinement, we're providing an option to make h refinement more likely.

Definition at line 107 of file hp_coarsentest.h.

◆ phi

const std::vector<std::vector<Real> >* libMesh::HPCoarsenTest::phi
protected

The shape functions and their derivatives.

Definition at line 134 of file hp_coarsentest.h.

◆ phi_coarse

const std::vector<std::vector<Real> > * libMesh::HPCoarsenTest::phi_coarse
protected

Definition at line 134 of file hp_coarsentest.h.

◆ qrule

std::unique_ptr<QBase> libMesh::HPCoarsenTest::qrule
protected

The quadrature rule for the fine element.

Definition at line 152 of file hp_coarsentest.h.

◆ Uc

DenseVector<Number> libMesh::HPCoarsenTest::Uc
protected

Coefficients for projected coarse and projected p-derefined solutions.

Definition at line 163 of file hp_coarsentest.h.

◆ Up

DenseVector<Number> libMesh::HPCoarsenTest::Up
protected

Definition at line 164 of file hp_coarsentest.h.

◆ xyz_values

const std::vector<Point>* libMesh::HPCoarsenTest::xyz_values
protected

Quadrature locations.

Definition at line 146 of file hp_coarsentest.h.


The documentation for this class was generated from the following file: