libMesh::DGFEMContext Class Reference

Extends FEMContext to work for DG problems. More...

#include <dg_fem_context.h>

Inheritance diagram for libMesh::DGFEMContext:

Public Types

enum  AlgebraicType {
  NONE = 0, DOFS_ONLY, CURRENT, OLD,
  OLD_DOFS_ONLY
}
 
typedef const DenseSubVector< Number > &(DiffContext::* diff_subsolution_getter) (unsigned int) const
 
typedef std::map< const NumericVector< Number > *, std::pair< DenseVector< Number >, std::vector< std::unique_ptr< DenseSubVector< Number > > > > >::iterator localized_vectors_iterator
 

Public Member Functions

 DGFEMContext (const System &sys)
 
virtual ~DGFEMContext ()
 
virtual void side_fe_reinit () libmesh_override
 
void neighbor_side_fe_reinit ()
 
const std::vector< dof_id_type > & get_neighbor_dof_indices () const
 
const std::vector< dof_id_type > & get_neighbor_dof_indices (unsigned int var) const
 
const DenseVector< Number > & get_neighbor_residual () const
 
DenseVector< Number > & get_neighbor_residual ()
 
const DenseSubVector< Number > & get_neighbor_residual (unsigned int var) const
 
DenseSubVector< Number > & get_neighbor_residual (unsigned int var)
 
const DenseMatrix< Number > & get_elem_elem_jacobian () const
 
DenseMatrix< Number > & get_elem_elem_jacobian ()
 
const DenseSubMatrix< Number > & get_elem_elem_jacobian (unsigned int var1, unsigned int var2) const
 
DenseSubMatrix< Number > & get_elem_elem_jacobian (unsigned int var1, unsigned int var2)
 
const DenseMatrix< Number > & get_elem_neighbor_jacobian () const
 
DenseMatrix< Number > & get_elem_neighbor_jacobian ()
 
const DenseSubMatrix< Number > & get_elem_neighbor_jacobian (unsigned int var1, unsigned int var2) const
 
DenseSubMatrix< Number > & get_elem_neighbor_jacobian (unsigned int var1, unsigned int var2)
 
const DenseMatrix< Number > & get_neighbor_elem_jacobian () const
 
DenseMatrix< Number > & get_neighbor_elem_jacobian ()
 
const DenseSubMatrix< Number > & get_neighbor_elem_jacobian (unsigned int var1, unsigned int var2) const
 
DenseSubMatrix< Number > & get_neighbor_elem_jacobian (unsigned int var1, unsigned int var2)
 
const DenseMatrix< Number > & get_neighbor_neighbor_jacobian () const
 
DenseMatrix< Number > & get_neighbor_neighbor_jacobian ()
 
const DenseSubMatrix< Number > & get_neighbor_neighbor_jacobian (unsigned int var1, unsigned int var2) const
 
DenseSubMatrix< Number > & get_neighbor_neighbor_jacobian (unsigned int var1, unsigned int var2)
 
void set_neighbor (const Elem &neighbor)
 
const Elemget_neighbor () const
 
bool dg_terms_are_active () const
 
template<typename OutputShape >
void get_neighbor_side_fe (unsigned int var, FEGenericBase< OutputShape > *&fe) const
 
bool has_side_boundary_id (boundary_id_type id) const
 
std::vector< boundary_id_typeside_boundary_ids () const
 
void side_boundary_ids (std::vector< boundary_id_type > &vec_to_fill) const
 
Number interior_value (unsigned int var, unsigned int qp) const
 
template<typename OutputType >
void interior_value (unsigned int var, unsigned int qp, OutputType &u) const
 
Number side_value (unsigned int var, unsigned int qp) const
 
template<typename OutputType >
void side_value (unsigned int var, unsigned int qp, OutputType &u) const
 
Number point_value (unsigned int var, const Point &p) const
 
template<typename OutputType >
void point_value (unsigned int var, const Point &p, OutputType &u, const Real tolerance=TOLERANCE) const
 
Gradient interior_gradient (unsigned int var, unsigned int qp) const
 
template<typename OutputType >
void interior_gradient (unsigned int var, unsigned int qp, OutputType &du) const
 
Gradient side_gradient (unsigned int var, unsigned int qp) const
 
template<typename OutputType >
void side_gradient (unsigned int var, unsigned int qp, OutputType &du) const
 
Gradient point_gradient (unsigned int var, const Point &p) const
 
template<typename OutputType >
void point_gradient (unsigned int var, const Point &p, OutputType &grad_u, const Real tolerance=TOLERANCE) const
 
Tensor interior_hessian (unsigned int var, unsigned int qp) const
 
template<typename OutputType >
void interior_hessian (unsigned int var, unsigned int qp, OutputType &d2u) const
 
Tensor side_hessian (unsigned int var, unsigned int qp) const
 
template<typename OutputType >
void side_hessian (unsigned int var, unsigned int qp, OutputType &d2u) const
 
Tensor point_hessian (unsigned int var, const Point &p) const
 
template<typename OutputType >
void point_hessian (unsigned int var, const Point &p, OutputType &hess_u, const Real tolerance=TOLERANCE) const
 
Number fixed_interior_value (unsigned int var, unsigned int qp) const
 
template<typename OutputType >
void fixed_interior_value (unsigned int var, unsigned int qp, OutputType &u) const
 
Number fixed_side_value (unsigned int var, unsigned int qp) const
 
template<typename OutputType >
void fixed_side_value (unsigned int var, unsigned int qp, OutputType &u) const
 
Number fixed_point_value (unsigned int var, const Point &p) const
 
template<typename OutputType >
void fixed_point_value (unsigned int var, const Point &p, OutputType &u, const Real tolerance=TOLERANCE) const
 
Gradient fixed_interior_gradient (unsigned int var, unsigned int qp) const
 
template<typename OutputType >
void fixed_interior_gradient (unsigned int var, unsigned int qp, OutputType &grad_u) const
 
Gradient fixed_side_gradient (unsigned int var, unsigned int qp) const
 
template<typename OutputType >
void fixed_side_gradient (unsigned int var, unsigned int qp, OutputType &grad_u) const
 
Gradient fixed_point_gradient (unsigned int var, const Point &p) const
 
template<typename OutputType >
void fixed_point_gradient (unsigned int var, const Point &p, OutputType &grad_u, const Real tolerance=TOLERANCE) const
 
Tensor fixed_interior_hessian (unsigned int var, unsigned int qp) const
 
template<typename OutputType >
void fixed_interior_hessian (unsigned int var, unsigned int qp, OutputType &hess_u) const
 
Tensor fixed_side_hessian (unsigned int var, unsigned int qp) const
 
template<typename OutputType >
void fixed_side_hessian (unsigned int var, unsigned int qp, OutputType &hess_u) const
 
Tensor fixed_point_hessian (unsigned int var, const Point &p) const
 
template<typename OutputType >
void fixed_point_hessian (unsigned int var, const Point &p, OutputType &hess_u, const Real tolerance=TOLERANCE) const
 
template<typename OutputShape >
void get_element_fe (unsigned int var, FEGenericBase< OutputShape > *&fe) const
 
FEBaseget_element_fe (unsigned int var) const
 
template<typename OutputShape >
void get_element_fe (unsigned int var, FEGenericBase< OutputShape > *&fe, unsigned char dim) const
 
FEBaseget_element_fe (unsigned int var, unsigned char dim) const
 
template<typename OutputShape >
void get_side_fe (unsigned int var, FEGenericBase< OutputShape > *&fe) const
 
FEBaseget_side_fe (unsigned int var) const
 
template<typename OutputShape >
void get_side_fe (unsigned int var, FEGenericBase< OutputShape > *&fe, unsigned char dim) const
 
FEBaseget_side_fe (unsigned int var, unsigned char dim) const
 
template<typename OutputShape >
void get_edge_fe (unsigned int var, FEGenericBase< OutputShape > *&fe) const
 
FEBaseget_edge_fe (unsigned int var) const
 
template<typename OutputType >
void interior_values (unsigned int var, const NumericVector< Number > &_system_vector, std::vector< OutputType > &interior_values_vector) const
 
template<typename OutputType >
void side_values (unsigned int var, const NumericVector< Number > &_system_vector, std::vector< OutputType > &side_values_vector) const
 
template<typename OutputType >
void interior_gradients (unsigned int var, const NumericVector< Number > &_system_vector, std::vector< OutputType > &interior_gradients_vector) const
 
template<typename OutputType >
void side_gradients (unsigned int var, const NumericVector< Number > &_system_vector, std::vector< OutputType > &side_gradients_vector) const
 
template<typename OutputType >
void interior_hessians (unsigned int var, const NumericVector< Number > &_system_vector, std::vector< OutputType > &d2u_vals) const
 
template<typename OutputType >
void side_hessians (unsigned int var, const NumericVector< Number > &_system_vector, std::vector< OutputType > &d2u_vals) const
 
template<typename OutputType >
void interior_rate (unsigned int var, unsigned int qp, OutputType &u) const
 
template<typename OutputType >
void side_rate (unsigned int var, unsigned int qp, OutputType &u) const
 
template<typename OutputType >
void point_rate (unsigned int var, const Point &p, OutputType &u) const
 
template<typename OutputType >
void interior_accel (unsigned int var, unsigned int qp, OutputType &u) const
 
template<typename OutputType >
void side_accel (unsigned int var, unsigned int qp, OutputType &u) const
 
template<typename OutputType >
void point_accel (unsigned int var, const Point &p, OutputType &u) const
 
template<typename OutputType >
void interior_curl (unsigned int var, unsigned int qp, OutputType &curl_u) const
 
template<typename OutputType >
void point_curl (unsigned int var, const Point &p, OutputType &curl_u, const Real tolerance=TOLERANCE) const
 
template<typename OutputType >
void interior_div (unsigned int var, unsigned int qp, OutputType &div_u) const
 
virtual void elem_reinit (Real theta) libmesh_override
 
virtual void elem_side_reinit (Real theta) libmesh_override
 
virtual void elem_edge_reinit (Real theta) libmesh_override
 
virtual void nonlocal_reinit (Real theta) libmesh_override
 
virtual void pre_fe_reinit (const System &, const Elem *e)
 
virtual void elem_fe_reinit (const std::vector< Point > *const pts=libmesh_nullptr)
 
virtual void edge_fe_reinit ()
 
const QBaseget_element_qrule () const
 
const QBaseget_element_qrule (unsigned char dim) const
 
const QBaseget_side_qrule () const
 
const QBaseget_side_qrule (unsigned char dim) const
 
const QBaseget_edge_qrule () const
 
virtual void set_mesh_system (System *sys)
 
const Systemget_mesh_system () const
 
Systemget_mesh_system ()
 
unsigned int get_mesh_x_var () const
 
void set_mesh_x_var (unsigned int x_var)
 
unsigned int get_mesh_y_var () const
 
void set_mesh_y_var (unsigned int y_var)
 
unsigned int get_mesh_z_var () const
 
void set_mesh_z_var (unsigned int z_var)
 
bool has_elem () const
 
const Elemget_elem () const
 
Elemget_elem ()
 
unsigned char get_side () const
 
unsigned char get_edge () const
 
unsigned char get_dim () const
 
unsigned char get_elem_dim () const
 
const std::set< unsigned char > & elem_dimensions () const
 
void elem_position_set (Real theta)
 
void elem_position_get ()
 
void set_algebraic_type (const AlgebraicType atype)
 
AlgebraicType algebraic_type () const
 
void set_custom_solution (const NumericVector< Number > *custom_sol)
 
template<typename OutputShape >
FEGenericBase< OutputShape > * build_new_fe (const FEGenericBase< OutputShape > *fe, const Point &p, const Real tolerance=TOLERANCE) const
 
template<>
FEGenericBase< Real > * cached_fe (const unsigned int elem_dim, const FEType fe_type) const
 
template<>
FEGenericBase< RealGradient > * cached_fe (const unsigned int elem_dim, const FEType fe_type) const
 
unsigned int n_vars () const
 
const Systemget_system () const
 
const DenseVector< Number > & get_elem_solution () const
 
DenseVector< Number > & get_elem_solution ()
 
const DenseSubVector< Number > & get_elem_solution (unsigned int var) const
 
DenseSubVector< Number > & get_elem_solution (unsigned int var)
 
const DenseVector< Number > & get_elem_solution_rate () const
 
DenseVector< Number > & get_elem_solution_rate ()
 
const DenseSubVector< Number > & get_elem_solution_rate (unsigned int var) const
 
DenseSubVector< Number > & get_elem_solution_rate (unsigned int var)
 
const DenseVector< Number > & get_elem_solution_accel () const
 
DenseVector< Number > & get_elem_solution_accel ()
 
const DenseSubVector< Number > & get_elem_solution_accel (unsigned int var) const
 
DenseSubVector< Number > & get_elem_solution_accel (unsigned int var)
 
const DenseVector< Number > & get_elem_fixed_solution () const
 
DenseVector< Number > & get_elem_fixed_solution ()
 
const DenseSubVector< Number > & get_elem_fixed_solution (unsigned int var) const
 
DenseSubVector< Number > & get_elem_fixed_solution (unsigned int var)
 
const DenseVector< Number > & get_elem_residual () const
 
DenseVector< Number > & get_elem_residual ()
 
const DenseSubVector< Number > & get_elem_residual (unsigned int var) const
 
DenseSubVector< Number > & get_elem_residual (unsigned int var)
 
const DenseMatrix< Number > & get_elem_jacobian () const
 
DenseMatrix< Number > & get_elem_jacobian ()
 
const DenseSubMatrix< Number > & get_elem_jacobian (unsigned int var1, unsigned int var2) const
 
DenseSubMatrix< Number > & get_elem_jacobian (unsigned int var1, unsigned int var2)
 
const std::vector< Number > & get_qois () const
 
std::vector< Number > & get_qois ()
 
const std::vector< DenseVector< Number > > & get_qoi_derivatives () const
 
std::vector< DenseVector< Number > > & get_qoi_derivatives ()
 
const DenseSubVector< Number > & get_qoi_derivatives (unsigned int qoi, unsigned int var) const
 
DenseSubVector< Number > & get_qoi_derivatives (unsigned int qoi, unsigned int var)
 
const std::vector< dof_id_type > & get_dof_indices () const
 
std::vector< dof_id_type > & get_dof_indices ()
 
const std::vector< dof_id_type > & get_dof_indices (unsigned int var) const
 
std::vector< dof_id_type > & get_dof_indices (unsigned int var)
 
Real get_system_time () const
 
Real get_time () const
 
void set_time (Real time_in)
 
Real get_elem_solution_derivative () const
 
Real get_elem_solution_rate_derivative () const
 
Real get_elem_solution_accel_derivative () const
 
Real get_fixed_solution_derivative () const
 
bool is_adjoint () const
 
bool & is_adjoint ()
 
void set_deltat_pointer (Real *dt)
 
Real get_deltat_value ()
 
void add_localized_vector (NumericVector< Number > &localized_vector, const System &sys)
 
DenseVector< Number > & get_localized_vector (const NumericVector< Number > &localized_vector)
 
const DenseVector< Number > & get_localized_vector (const NumericVector< Number > &localized_vector) const
 
DenseSubVector< Number > & get_localized_subvector (const NumericVector< Number > &localized_vector, unsigned int var)
 
const DenseSubVector< Number > & get_localized_subvector (const NumericVector< Number > &localized_vector, unsigned int var) const
 

Public Attributes

System_mesh_sys
 
unsigned int _mesh_x_var
 
unsigned int _mesh_y_var
 
unsigned int _mesh_z_var
 
unsigned char side
 
unsigned char edge
 
Real time
 
const Real system_time
 
Real elem_solution_derivative
 
Real elem_solution_rate_derivative
 
Real elem_solution_accel_derivative
 
Real fixed_solution_derivative
 

Protected Member Functions

template<typename OutputShape >
FEGenericBase< OutputShape > * cached_fe (const unsigned int elem_dim, const FEType fe_type) const
 
void set_elem (const Elem *e)
 
template<typename OutputType , typename FENeeded< OutputType >::value_getter fe_getter, diff_subsolution_getter subsolution_getter>
void some_value (unsigned int var, unsigned int qp, OutputType &u) const
 
template<typename OutputType , typename FENeeded< OutputType >::grad_getter fe_getter, diff_subsolution_getter subsolution_getter>
void some_gradient (unsigned int var, unsigned int qp, OutputType &u) const
 
template<typename OutputType , typename FENeeded< OutputType >::hess_getter fe_getter, diff_subsolution_getter subsolution_getter>
void some_hessian (unsigned int var, unsigned int qp, OutputType &u) const
 

Protected Attributes

AlgebraicType _atype
 
const NumericVector< Number > * _custom_solution
 
std::unique_ptr< FEGenericBase< Real > > _real_fe
 
std::unique_ptr< FEGenericBase< RealGradient > > _real_grad_fe
 
bool _real_fe_is_inf
 
bool _real_grad_fe_is_inf
 
std::vector< std::map< FEType, std::unique_ptr< FEAbstract > > > _element_fe
 
std::vector< std::map< FEType, std::unique_ptr< FEAbstract > > > _side_fe
 
std::map< FEType, std::unique_ptr< FEAbstract > > _edge_fe
 
std::vector< std::vector< FEAbstract * > > _element_fe_var
 
std::vector< std::vector< FEAbstract * > > _side_fe_var
 
std::vector< FEAbstract * > _edge_fe_var
 
const BoundaryInfo_boundary_info
 
const Elem_elem
 
unsigned char _dim
 
unsigned char _elem_dim
 
std::set< unsigned char > _elem_dims
 
std::vector< std::unique_ptr< QBase > > _element_qrule
 
std::vector< std::unique_ptr< QBase > > _side_qrule
 
std::unique_ptr< QBase_edge_qrule
 
int _extra_quadrature_order
 
std::map< const NumericVector< Number > *, std::pair< DenseVector< Number >, std::vector< std::unique_ptr< DenseSubVector< Number > > > > > _localized_vectors
 
DenseVector< Number_elem_solution
 
std::vector< std::unique_ptr< DenseSubVector< Number > > > _elem_subsolutions
 
DenseVector< Number_elem_solution_rate
 
std::vector< std::unique_ptr< DenseSubVector< Number > > > _elem_subsolution_rates
 
DenseVector< Number_elem_solution_accel
 
std::vector< std::unique_ptr< DenseSubVector< Number > > > _elem_subsolution_accels
 
DenseVector< Number_elem_fixed_solution
 
std::vector< std::unique_ptr< DenseSubVector< Number > > > _elem_fixed_subsolutions
 
DenseVector< Number_elem_residual
 
DenseMatrix< Number_elem_jacobian
 
std::vector< Number_elem_qoi
 
std::vector< DenseVector< Number > > _elem_qoi_derivative
 
std::vector< std::vector< std::unique_ptr< DenseSubVector< Number > > > > _elem_qoi_subderivatives
 
std::vector< std::unique_ptr< DenseSubVector< Number > > > _elem_subresiduals
 
std::vector< std::vector< std::unique_ptr< DenseSubMatrix< Number > > > > _elem_subjacobians
 
std::vector< dof_id_type_dof_indices
 
std::vector< std::vector< dof_id_type > > _dof_indices_var
 

Private Attributes

const Elem_neighbor
 
DenseVector< Number_neighbor_residual
 
DenseMatrix< Number_elem_elem_jacobian
 
DenseMatrix< Number_elem_neighbor_jacobian
 
DenseMatrix< Number_neighbor_elem_jacobian
 
DenseMatrix< Number_neighbor_neighbor_jacobian
 
std::vector< std::unique_ptr< DenseSubVector< Number > > > _neighbor_subresiduals
 
std::vector< std::vector< std::unique_ptr< DenseSubMatrix< Number > > > > _elem_elem_subjacobians
 
std::vector< std::vector< std::unique_ptr< DenseSubMatrix< Number > > > > _elem_neighbor_subjacobians
 
std::vector< std::vector< std::unique_ptr< DenseSubMatrix< Number > > > > _neighbor_elem_subjacobians
 
std::vector< std::vector< std::unique_ptr< DenseSubMatrix< Number > > > > _neighbor_neighbor_subjacobians
 
std::vector< dof_id_type_neighbor_dof_indices
 
std::vector< std::vector< dof_id_type > > _neighbor_dof_indices_var
 
std::map< FEType, std::unique_ptr< FEAbstract > > _neighbor_side_fe
 
std::vector< FEAbstract * > _neighbor_side_fe_var
 
bool _dg_terms_active
 

Detailed Description

Extends FEMContext to work for DG problems.

This class extends FEMContext in order to provide extra data required to perform local element residual and Jacobian assembly in the case of a discontinuous Galerkin (DG) discretization.

Author
David Knezevic
Date
2015

Definition at line 39 of file dg_fem_context.h.

Member Typedef Documentation

typedef const DenseSubVector<Number>&(DiffContext::* libMesh::FEMContext::diff_subsolution_getter) (unsigned int) const
inherited

Helper typedef to simplify refactoring

Definition at line 1030 of file fem_context.h.

typedef std::map<const NumericVector<Number> *, std::pair<DenseVector<Number>, std::vector<std::unique_ptr<DenseSubVector<Number> > > > >::iterator libMesh::DiffContext::localized_vectors_iterator
inherited

Typedef for the localized_vectors iterator

Definition at line 528 of file diff_context.h.

Member Enumeration Documentation

Enum describing what data to use when initializing algebraic structures on each element.

Enumerator
NONE 
DOFS_ONLY 
CURRENT 
OLD 
OLD_DOFS_ONLY 

Definition at line 933 of file fem_context.h.

933  { NONE = 0, // Do not reinitialize dof_indices
934  DOFS_ONLY, // Reinitialize dof_indices, not
935  // algebraic structures
936  CURRENT, // Use dof_indices, current solution
937  OLD, // Use old_dof_indices, custom solution
938  OLD_DOFS_ONLY}; // Reinitialize old_dof_indices, not

Constructor & Destructor Documentation

libMesh::DGFEMContext::DGFEMContext ( const System sys)
explicit

Constructor. Allocates some but fills no data structures.

Definition at line 29 of file dg_fem_context.C.

References libMesh::FEMContext::_dim, _elem_elem_jacobian, _elem_elem_subjacobians, _elem_neighbor_jacobian, _elem_neighbor_subjacobians, _neighbor_elem_jacobian, _neighbor_elem_subjacobians, _neighbor_neighbor_jacobian, _neighbor_neighbor_subjacobians, _neighbor_residual, _neighbor_side_fe, _neighbor_side_fe_var, _neighbor_subresiduals, libMesh::FEAbstract::build(), libmesh_nullptr, libMesh::System::n_vars(), and libMesh::System::variable_type().

30  : FEMContext(sys),
32  _neighbor_dof_indices_var(sys.n_vars()),
33  _dg_terms_active(false)
34 {
35  unsigned int nv = sys.n_vars();
36  libmesh_assert (nv);
37 
38  _neighbor_subresiduals.reserve(nv);
39  _elem_elem_subjacobians.resize(nv);
40  _elem_neighbor_subjacobians.resize(nv);
41  _neighbor_elem_subjacobians.resize(nv);
43 
44  for (unsigned int i=0; i != nv; ++i)
45  {
46  _neighbor_subresiduals.emplace_back(libmesh_make_unique<DenseSubVector<Number>>(_neighbor_residual));
47  _elem_elem_subjacobians[i].reserve(nv);
48  _elem_neighbor_subjacobians[i].reserve(nv);
49  _neighbor_elem_subjacobians[i].reserve(nv);
50  _neighbor_neighbor_subjacobians[i].reserve(nv);
51 
52  for (unsigned int j=0; j != nv; ++j)
53  {
54  _elem_elem_subjacobians[i].emplace_back(libmesh_make_unique<DenseSubMatrix<Number>>(_elem_elem_jacobian));
55  _elem_neighbor_subjacobians[i].emplace_back(libmesh_make_unique<DenseSubMatrix<Number>>(_elem_neighbor_jacobian));
56  _neighbor_elem_subjacobians[i].emplace_back(libmesh_make_unique<DenseSubMatrix<Number>>(_neighbor_elem_jacobian));
57  _neighbor_neighbor_subjacobians[i].emplace_back(libmesh_make_unique<DenseSubMatrix<Number>>(_neighbor_neighbor_jacobian));
58  }
59  }
60 
61  _neighbor_side_fe_var.resize(nv);
62  for (unsigned int i=0; i != nv; ++i)
63  {
64  FEType fe_type = sys.variable_type(i);
65 
66  if (_neighbor_side_fe[fe_type] == libmesh_nullptr)
67  _neighbor_side_fe[fe_type] = FEAbstract::build(this->_dim, fe_type);
68 
69  _neighbor_side_fe_var[i] = _neighbor_side_fe[fe_type].get();
70  }
71 }
DenseVector< Number > _neighbor_residual
DenseMatrix< Number > _elem_elem_jacobian
std::vector< std::vector< std::unique_ptr< DenseSubMatrix< Number > > > > _elem_elem_subjacobians
std::vector< std::vector< dof_id_type > > _neighbor_dof_indices_var
const class libmesh_nullptr_t libmesh_nullptr
std::vector< FEAbstract * > _neighbor_side_fe_var
DenseMatrix< Number > _neighbor_elem_jacobian
DenseMatrix< Number > _elem_neighbor_jacobian
std::vector< std::vector< std::unique_ptr< DenseSubMatrix< Number > > > > _elem_neighbor_subjacobians
unsigned char _dim
Definition: fem_context.h:1124
std::vector< std::vector< std::unique_ptr< DenseSubMatrix< Number > > > > _neighbor_elem_subjacobians
static std::unique_ptr< FEAbstract > build(const unsigned int dim, const FEType &type)
Definition: fe_abstract.C:44
DenseMatrix< Number > _neighbor_neighbor_jacobian
FEMContext(const System &sys)
Definition: fem_context.C:37
std::vector< std::unique_ptr< DenseSubVector< Number > > > _neighbor_subresiduals
std::map< FEType, std::unique_ptr< FEAbstract > > _neighbor_side_fe
std::vector< std::vector< std::unique_ptr< DenseSubMatrix< Number > > > > _neighbor_neighbor_subjacobians
libMesh::DGFEMContext::~DGFEMContext ( )
virtual

Destructor.

Definition at line 73 of file dg_fem_context.C.

74 {
75 }

Member Function Documentation

void libMesh::DiffContext::add_localized_vector ( NumericVector< Number > &  localized_vector,
const System sys 
)
inherited

Adds a vector to the map of localized vectors. We can later evaluate interior_values, interior_gradients and side_values for these fields these vectors represent.

Definition at line 119 of file diff_context.C.

References libMesh::DiffContext::_localized_vectors, and libMesh::System::n_vars().

120 {
121  // Make an empty pair keyed with a reference to this _localized_vector
122  _localized_vectors[&localized_vector] = std::make_pair(DenseVector<Number>(), std::vector<std::unique_ptr<DenseSubVector<Number>>>());
123 
124  unsigned int nv = sys.n_vars();
125 
126  _localized_vectors[&localized_vector].second.reserve(nv);
127 
128  // Fill the DenseSubVector with nv copies of DenseVector
129  for (unsigned int i=0; i != nv; ++i)
130  _localized_vectors[&localized_vector].second.emplace_back(libmesh_make_unique<DenseSubVector<Number>>(_localized_vectors[&localized_vector].first));
131 }
std::map< const NumericVector< Number > *, std::pair< DenseVector< Number >, std::vector< std::unique_ptr< DenseSubVector< Number > > > > > _localized_vectors
Definition: diff_context.h:559
AlgebraicType libMesh::FEMContext::algebraic_type ( ) const
inlineinherited

Definition at line 954 of file fem_context.h.

References libMesh::FEMContext::_atype.

Referenced by libMesh::FEMContext::build_new_fe(), and libMesh::FEMContext::pre_fe_reinit().

954 { return _atype; }
AlgebraicType _atype
Definition: fem_context.h:999
template<typename OutputShape >
template FEGenericBase< RealGradient > * libMesh::FEMContext::build_new_fe ( const FEGenericBase< OutputShape > *  fe,
const Point p,
const Real  tolerance = TOLERANCE 
) const
inherited

Helper function to reduce some code duplication in the *_point_* methods.

Definition at line 1862 of file fem_context.C.

References libMesh::FEMContext::algebraic_type(), libMesh::Elem::dim(), libMesh::FEType::family, libMesh::FEMContext::get_elem(), libMesh::FEAbstract::get_fe_type(), libMesh::FEMContext::has_elem(), libMesh::FEInterface::inverse_map(), libMesh::Elem::JUST_COARSENED, libMesh::Elem::JUST_REFINED, libmesh_nullptr, libMesh::FEMContext::OLD, libMesh::FEType::order, libMesh::Elem::p_refinement_flag(), libMesh::Real, libMesh::FEAbstract::reinit(), and libMesh::SCALAR.

Referenced by libMesh::FEMContext::fixed_point_gradient(), libMesh::FEMContext::fixed_point_hessian(), libMesh::FEMContext::fixed_point_value(), libMesh::FEMContext::point_curl(), libMesh::FEMContext::point_gradient(), libMesh::FEMContext::point_hessian(), and libMesh::FEMContext::point_value().

1865 {
1866  FEType fe_type = fe->get_fe_type();
1867 
1868  // If we don't have an Elem to evaluate on, then the only functions
1869  // we can sensibly evaluate are the scalar dofs which are the same
1870  // everywhere.
1871  libmesh_assert(this->has_elem() || fe_type.family == SCALAR);
1872 
1873 #ifdef LIBMESH_ENABLE_AMR
1874  if ((algebraic_type() == OLD) &&
1875  this->has_elem())
1876  {
1877  if (this->get_elem().p_refinement_flag() == Elem::JUST_REFINED)
1878  fe_type.order = static_cast<Order>(fe_type.order - 1);
1879  else if (this->get_elem().p_refinement_flag() == Elem::JUST_COARSENED)
1880  fe_type.order = static_cast<Order>(fe_type.order + 1);
1881  }
1882 #endif // LIBMESH_ENABLE_AMR
1883 
1884  const unsigned int elem_dim = this->has_elem() ? this->get_elem().dim() : 0;
1885 
1886  FEGenericBase<OutputShape>* fe_new = cached_fe<OutputShape>(elem_dim, fe_type);
1887 
1888  // Map the physical co-ordinates to the master co-ordinates using the inverse_map from fe_interface.h
1889  // Build a vector of point co-ordinates to send to reinit
1890  Point master_point = this->has_elem() ?
1891  FEInterface::inverse_map (elem_dim,
1892  fe_type,
1893  &this->get_elem(),
1894  p,
1895  tolerance) : Point(0);
1896 
1897  std::vector<Point> coor(1, master_point);
1898 
1899  // Reinitialize the element and compute the shape function values at coor
1900  if (this->has_elem())
1901  fe_new->reinit (&this->get_elem(), &coor);
1902  else
1903  // If !this->has_elem(), then we assume we are dealing with a SCALAR variable
1904  fe_new->reinit (libmesh_nullptr, &coor);
1905 
1906  return fe_new;
1907 }
bool has_elem() const
Definition: fem_context.h:865
const class libmesh_nullptr_t libmesh_nullptr
const Elem & get_elem() const
Definition: fem_context.h:871
static Point inverse_map(const unsigned int dim, const FEType &fe_t, const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true)
Definition: fe_interface.C:547
RefinementState p_refinement_flag() const
Definition: elem.h:2522
AlgebraicType algebraic_type() const
Definition: fem_context.h:954
virtual unsigned int dim() const =0
template<typename OutputShape >
FEGenericBase<OutputShape>* libMesh::FEMContext::cached_fe ( const unsigned int  elem_dim,
const FEType  fe_type 
) const
protectedinherited
template<>
FEGenericBase<Real>* libMesh::FEMContext::cached_fe ( const unsigned int  elem_dim,
const FEType  fe_type 
) const
inherited

Definition at line 1789 of file fem_context.C.

References libMesh::FEMContext::_real_fe, libMesh::FEMContext::_real_fe_is_inf, libMesh::FEGenericBase< OutputType >::build(), libMesh::FEGenericBase< OutputType >::build_InfFE(), libMesh::FEMContext::get_elem(), libMesh::FEMContext::has_elem(), and libMesh::Elem::infinite().

1791 {
1792 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
1793  const bool fe_needs_inf =
1794  this->has_elem() && this->get_elem().infinite();
1795 #endif
1796 
1797  if (!_real_fe ||
1798  elem_dim != _real_fe->get_dim() ||
1799  fe_type != _real_fe->get_fe_type())
1800  _real_fe =
1801 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
1802  fe_needs_inf ?
1803  FEGenericBase<Real>::build_InfFE(elem_dim, fe_type) :
1804 #endif
1805  FEGenericBase<Real>::build(elem_dim, fe_type);
1806 
1807 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
1808  else if (fe_needs_inf && !_real_fe_is_inf)
1809  _real_fe =
1810  FEGenericBase<Real>::build_InfFE(elem_dim, fe_type);
1811  else if (!fe_needs_inf && _real_fe_is_inf)
1812  _real_fe =
1813  FEGenericBase<Real>::build(elem_dim, fe_type);
1814 
1815  _real_fe_is_inf =
1816  (this->has_elem() && this->get_elem().infinite());
1817 #endif
1818 
1819  return _real_fe.get();
1820 }
bool has_elem() const
Definition: fem_context.h:865
const Elem & get_elem() const
Definition: fem_context.h:871
std::unique_ptr< FEGenericBase< Real > > _real_fe
Definition: fem_context.h:1006
virtual bool infinite() const =0
static std::unique_ptr< FEGenericBase > build(const unsigned int dim, const FEType &type)
static std::unique_ptr< FEGenericBase > build_InfFE(const unsigned int dim, const FEType &type)
template<>
FEGenericBase<RealGradient>* libMesh::FEMContext::cached_fe ( const unsigned int  elem_dim,
const FEType  fe_type 
) const
inherited

Definition at line 1825 of file fem_context.C.

References libMesh::FEMContext::_real_grad_fe, libMesh::FEMContext::_real_grad_fe_is_inf, libMesh::FEGenericBase< OutputType >::build(), libMesh::FEGenericBase< OutputType >::build_InfFE(), libMesh::FEMContext::get_elem(), libMesh::FEMContext::has_elem(), and libMesh::Elem::infinite().

1827 {
1828 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
1829  const bool fe_needs_inf =
1830  this->has_elem() && this->get_elem().infinite();
1831 #endif
1832 
1833  if (!_real_grad_fe ||
1834  elem_dim != _real_grad_fe->get_dim() ||
1835  fe_type != _real_grad_fe->get_fe_type())
1836  _real_grad_fe =
1837 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
1838  fe_needs_inf ?
1839  FEGenericBase<RealGradient>::build_InfFE(elem_dim, fe_type) :
1840 #endif
1841  FEGenericBase<RealGradient>::build(elem_dim, fe_type);
1842 
1843 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
1844  else if (fe_needs_inf && !_real_grad_fe_is_inf)
1845  _real_grad_fe =
1846  FEGenericBase<RealGradient>::build_InfFE(elem_dim, fe_type);
1847  else if (!fe_needs_inf && _real_grad_fe_is_inf)
1848  _real_grad_fe =
1849  FEGenericBase<RealGradient>::build(elem_dim, fe_type);
1850 
1852  (this->has_elem() && this->get_elem().infinite());
1853 #endif
1854 
1855  return _real_grad_fe.get();
1856 }
std::unique_ptr< FEGenericBase< RealGradient > > _real_grad_fe
Definition: fem_context.h:1007
bool has_elem() const
Definition: fem_context.h:865
const Elem & get_elem() const
Definition: fem_context.h:871
virtual bool infinite() const =0
static std::unique_ptr< FEGenericBase > build(const unsigned int dim, const FEType &type)
static std::unique_ptr< FEGenericBase > build_InfFE(const unsigned int dim, const FEType &type)
bool libMesh::DGFEMContext::dg_terms_are_active ( ) const
inline

Are the DG terms active, i.e. have they been assembled?

Definition at line 232 of file dg_fem_context.h.

References _dg_terms_active, and get_neighbor_side_fe().

233  { return _dg_terms_active; }
void libMesh::FEMContext::edge_fe_reinit ( )
virtualinherited

Reinitializes edge FE objects on the current geometric element

Definition at line 1396 of file fem_context.C.

References libMesh::FEMContext::_edge_fe, libMesh::FEMContext::get_edge(), libMesh::FEMContext::get_elem(), and libMesh::FEMContext::get_elem_dim().

Referenced by libMesh::FEMContext::elem_edge_reinit(), libMesh::FEMContext::get_side_fe(), and libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::operator()().

1397 {
1398  libmesh_assert_equal_to (this->get_elem_dim(), 3);
1399 
1400  // Initialize all the interior FE objects on elem/edge.
1401  // Logging of FE::reinit is done in the FE functions
1402  std::map<FEType, std::unique_ptr<FEAbstract>>::iterator local_fe_end = _edge_fe.end();
1403  for (std::map<FEType, std::unique_ptr<FEAbstract>>::iterator i = _edge_fe.begin();
1404  i != local_fe_end; ++i)
1405  {
1406  i->second->edge_reinit(&(this->get_elem()), this->get_edge());
1407  }
1408 }
const Elem & get_elem() const
Definition: fem_context.h:871
std::map< FEType, std::unique_ptr< FEAbstract > > _edge_fe
Definition: fem_context.h:1097
unsigned char get_edge() const
Definition: fem_context.h:891
unsigned char get_elem_dim() const
Definition: fem_context.h:906
const std::set<unsigned char>& libMesh::FEMContext::elem_dimensions ( ) const
inlineinherited
void libMesh::FEMContext::elem_edge_reinit ( Real  theta)
virtualinherited

Resets the current time in the context. Additionally, reinitialize Elem and FE objects if there's a moving mesh present in the system such that the mesh is deformed to its position at $ t_{\theta} $.

Reimplemented from libMesh::DiffContext.

Definition at line 1328 of file fem_context.C.

References libMesh::FEMContext::_mesh_sys, libMesh::FEMContext::_update_time_from_system(), libMesh::FEMContext::edge_fe_reinit(), and libMesh::FEMContext::elem_position_set().

Referenced by libMesh::FEMContext::get_side_fe().

1329 {
1330  // Update the "time" variable of this context object
1331  this->_update_time_from_system(theta);
1332 
1333  // Handle a moving element if necessary
1334  if (_mesh_sys)
1335  {
1336  // FIXME - not threadsafe yet!
1337  elem_position_set(theta);
1338  edge_fe_reinit();
1339  }
1340 }
void elem_position_set(Real theta)
Definition: fem_context.h:1197
void _update_time_from_system(Real theta)
Definition: fem_context.C:1774
virtual void edge_fe_reinit()
Definition: fem_context.C:1396
void libMesh::FEMContext::elem_fe_reinit ( const std::vector< Point > *const  pts = libmesh_nullptr)
virtualinherited

Reinitializes interior FE objects on the current geometric element

Definition at line 1353 of file fem_context.C.

References libMesh::FEMContext::_element_fe, libMesh::FEMContext::get_elem(), libMesh::FEMContext::get_elem_dim(), libMesh::FEMContext::has_elem(), and libmesh_nullptr.

Referenced by libMesh::FEMContext::elem_reinit(), libMesh::FEMContext::get_side_fe(), libMesh::FEMSystem::mesh_position_set(), libMesh::FEMContext::nonlocal_reinit(), and libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::operator()().

1354 {
1355  // Initialize all the interior FE objects on elem.
1356  // Logging of FE::reinit is done in the FE functions
1357  // We only reinit the FE objects for the current element
1358  // dimension
1359  const unsigned char dim = this->get_elem_dim();
1360 
1361  libmesh_assert( !_element_fe[dim].empty() );
1362 
1363  std::map<FEType, std::unique_ptr<FEAbstract>>::iterator local_fe_end = _element_fe[dim].end();
1364  for (std::map<FEType, std::unique_ptr<FEAbstract>>::iterator i = _element_fe[dim].begin();
1365  i != local_fe_end; ++i)
1366  {
1367  if (this->has_elem())
1368  i->second->reinit(&(this->get_elem()), pts);
1369  else
1370  // If !this->has_elem(), then we assume we are dealing with a SCALAR variable
1371  i->second->reinit(libmesh_nullptr);
1372  }
1373 }
bool has_elem() const
Definition: fem_context.h:865
const class libmesh_nullptr_t libmesh_nullptr
const Elem & get_elem() const
Definition: fem_context.h:871
std::vector< std::map< FEType, std::unique_ptr< FEAbstract > > > _element_fe
Definition: fem_context.h:1095
unsigned char get_elem_dim() const
Definition: fem_context.h:906
void libMesh::FEMContext::elem_position_get ( )
inherited

Uses the geometry of elem to set the coordinate data specified by mesh_*_position configuration.

Definition at line 1412 of file fem_context.C.

References libMesh::FEMContext::_mesh_sys, libMesh::Elem::default_order(), libMesh::FEMContext::get_elem(), libMesh::FEMContext::get_elem_dim(), libMesh::DiffContext::get_elem_solution(), libMesh::FEMContext::get_element_fe(), libMesh::FEMContext::get_mesh_x_var(), libMesh::FEMContext::get_mesh_y_var(), libMesh::FEMContext::get_mesh_z_var(), libMesh::invalid_uint, libMesh::LAGRANGE, n_nodes, libMesh::Elem::n_nodes(), libMesh::n_threads(), and libMesh::Elem::point().

Referenced by libMesh::FEMContext::elem_dimensions(), and libMesh::FEMSystem::mesh_position_get().

1413 {
1414  // This is too expensive to call unless we've been asked to move the mesh
1415  libmesh_assert (_mesh_sys);
1416 
1417  // This will probably break with threading when two contexts are
1418  // operating on elements which share a node
1419  libmesh_assert_equal_to (libMesh::n_threads(), 1);
1420 
1421  // If the coordinate data is in our own system, it's already
1422  // been set up for us
1423  // if (_mesh_sys == this->number())
1424  // {
1425  unsigned int n_nodes = this->get_elem().n_nodes();
1426 
1427 #ifndef NDEBUG
1428  const unsigned char dim = this->get_elem_dim();
1429 
1430  // For simplicity we demand that mesh coordinates be stored
1431  // in a format that allows a direct copy
1432  libmesh_assert(this->get_mesh_x_var() == libMesh::invalid_uint ||
1433  (this->get_element_fe(this->get_mesh_x_var(), dim)->get_fe_type().family
1434  == LAGRANGE &&
1435  this->get_element_fe(this->get_mesh_x_var(), dim)->get_fe_type().order.get_order()
1436  == this->get_elem().default_order()));
1437  libmesh_assert(this->get_mesh_y_var() == libMesh::invalid_uint ||
1438  (this->get_element_fe(this->get_mesh_y_var(), dim)->get_fe_type().family
1439  == LAGRANGE &&
1440  this->get_element_fe(this->get_mesh_y_var(), dim)->get_fe_type().order.get_order()
1441  == this->get_elem().default_order()));
1442  libmesh_assert(this->get_mesh_z_var() == libMesh::invalid_uint ||
1443  (this->get_element_fe(this->get_mesh_z_var(), dim)->get_fe_type().family
1444  == LAGRANGE &&
1445  this->get_element_fe(this->get_mesh_z_var(), dim)->get_fe_type().order.get_order()
1446  == this->get_elem().default_order()));
1447 #endif
1448 
1449  // Get degree of freedom coefficients from point coordinates
1450  if (this->get_mesh_x_var() != libMesh::invalid_uint)
1451  for (unsigned int i=0; i != n_nodes; ++i)
1452  (this->get_elem_solution(this->get_mesh_x_var()))(i) = this->get_elem().point(i)(0);
1453 
1454  if (this->get_mesh_y_var() != libMesh::invalid_uint)
1455  for (unsigned int i=0; i != n_nodes; ++i)
1456  (this->get_elem_solution(this->get_mesh_y_var()))(i) = this->get_elem().point(i)(1);
1457 
1458  if (this->get_mesh_z_var() != libMesh::invalid_uint)
1459  for (unsigned int i=0; i != n_nodes; ++i)
1460  (this->get_elem_solution(this->get_mesh_z_var()))(i) = this->get_elem().point(i)(2);
1461  // }
1462  // FIXME - If the coordinate data is not in our own system, someone
1463  // had better get around to implementing that... - RHS
1464  // else
1465  // {
1466  // libmesh_not_implemented();
1467  // }
1468 }
unsigned int n_threads()
Definition: libmesh_base.h:125
const DenseVector< Number > & get_elem_solution() const
Definition: diff_context.h:111
const unsigned int invalid_uint
Definition: libmesh.h:184
unsigned int get_mesh_x_var() const
Definition: fem_context.h:823
void get_element_fe(unsigned int var, FEGenericBase< OutputShape > *&fe) const
Definition: fem_context.h:262
const Elem & get_elem() const
Definition: fem_context.h:871
virtual unsigned int n_nodes() const =0
const dof_id_type n_nodes
Definition: tecplot_io.C:67
virtual Order default_order() const =0
const Point & point(const unsigned int i) const
Definition: elem.h:1810
unsigned int get_mesh_z_var() const
Definition: fem_context.h:851
unsigned char get_elem_dim() const
Definition: fem_context.h:906
unsigned int get_mesh_y_var() const
Definition: fem_context.h:837
void libMesh::FEMContext::elem_position_set ( Real  theta)
inlineinherited

Uses the coordinate data specified by mesh_*_position configuration to set the geometry of elem to the value it would take after a fraction theta of a timestep.

Definition at line 1197 of file fem_context.h.

References libMesh::FEMContext::_do_elem_position_set(), and libMesh::FEMContext::_mesh_sys.

Referenced by libMesh::FEMContext::elem_dimensions(), libMesh::FEMContext::elem_edge_reinit(), libMesh::FEMContext::elem_reinit(), libMesh::FEMContext::elem_side_reinit(), and libMesh::FEMSystem::mesh_position_set().

1198 {
1199  if (_mesh_sys)
1200  this->_do_elem_position_set(theta);
1201 }
void _do_elem_position_set(Real theta)
Definition: fem_context.C:1477
void libMesh::FEMContext::elem_reinit ( Real  theta)
virtualinherited

Resets the current time in the context. Additionally, reinitialize Elem and FE objects if there's a moving mesh present in the system such that the mesh is deformed to its position at $ t_{\theta} $.

Reimplemented from libMesh::DiffContext.

Definition at line 1289 of file fem_context.C.

References libMesh::FEMContext::_mesh_sys, libMesh::FEMContext::_update_time_from_system(), libMesh::FEMContext::elem_fe_reinit(), libMesh::FEMContext::elem_position_set(), and libMesh::n_threads().

Referenced by libMesh::FEMContext::get_side_fe().

1290 {
1291  // Update the "time" variable of this context object
1292  this->_update_time_from_system(theta);
1293 
1294  // Handle a moving element if necessary.
1295  if (_mesh_sys)
1296  {
1297  // We assume that the ``default'' state
1298  // of the mesh is its final, theta=1.0
1299  // position, so we don't bother with
1300  // mesh motion in that case.
1301  if (theta != 1.0)
1302  {
1303  // FIXME - ALE is not threadsafe yet!
1304  libmesh_assert_equal_to (libMesh::n_threads(), 1);
1305 
1306  elem_position_set(theta);
1307  }
1308  elem_fe_reinit();
1309  }
1310 }
unsigned int n_threads()
Definition: libmesh_base.h:125
void elem_position_set(Real theta)
Definition: fem_context.h:1197
void _update_time_from_system(Real theta)
Definition: fem_context.C:1774
virtual void elem_fe_reinit(const std::vector< Point > *const pts=libmesh_nullptr)
Definition: fem_context.C:1353
void libMesh::FEMContext::elem_side_reinit ( Real  theta)
virtualinherited

Resets the current time in the context. Additionally, reinitialize Elem and FE objects if there's a moving mesh present in the system such that the mesh is deformed to its position at $ t_{\theta} $.

Reimplemented from libMesh::DiffContext.

Definition at line 1313 of file fem_context.C.

References libMesh::FEMContext::_mesh_sys, libMesh::FEMContext::_update_time_from_system(), libMesh::FEMContext::elem_position_set(), and libMesh::FEMContext::side_fe_reinit().

Referenced by libMesh::FEMContext::get_side_fe().

1314 {
1315  // Update the "time" variable of this context object
1316  this->_update_time_from_system(theta);
1317 
1318  // Handle a moving element if necessary
1319  if (_mesh_sys)
1320  {
1321  // FIXME - not threadsafe yet!
1322  elem_position_set(theta);
1323  side_fe_reinit();
1324  }
1325 }
void elem_position_set(Real theta)
Definition: fem_context.h:1197
virtual void side_fe_reinit()
Definition: fem_context.C:1376
void _update_time_from_system(Real theta)
Definition: fem_context.C:1774
Gradient libMesh::FEMContext::fixed_interior_gradient ( unsigned int  var,
unsigned int  qp 
) const
inherited
Returns
The gradient of the fixed_solution variable var at the quadrature point qp on the current element interior.
Note
This API is currently present for backward compatibility.

Definition at line 967 of file fem_context.C.

Referenced by libMesh::FEMContext::get_side_fe().

968 {
969  Gradient du;
970 
971  this->fixed_interior_gradient( var, qp, du );
972 
973  return du;
974 }
NumberVectorValue Gradient
Gradient fixed_interior_gradient(unsigned int var, unsigned int qp) const
Definition: fem_context.C:967
template<typename OutputType >
void libMesh::FEMContext::fixed_interior_gradient ( unsigned int  var,
unsigned int  qp,
OutputType &  grad_u 
) const
inherited
Returns
The gradient of the fixed_solution variable var at the quadrature point qp on the current element interior.
Note
This is the preferred API.

Definition at line 978 of file fem_context.C.

References libMesh::DiffContext::get_elem_fixed_solution(), libMesh::FEMContext::get_element_fe(), and libMesh::FEMContext::some_gradient().

980 {
981  this->some_gradient
982  <OutputType,
984  <typename TensorTools::MakeReal
985  <typename TensorTools::DecrementRank
986  <OutputType>::type>::type>,
988  (var, qp, du);
989 }
const DenseVector< Number > & get_elem_fixed_solution() const
Definition: diff_context.h:215
void get_element_fe(unsigned int var, FEGenericBase< OutputShape > *&fe) const
Definition: fem_context.h:262
void some_gradient(unsigned int var, unsigned int qp, OutputType &u) const
Definition: fem_context.C:234
Tensor libMesh::FEMContext::fixed_interior_hessian ( unsigned int  var,
unsigned int  qp 
) const
inherited
Returns
The hessian of the fixed_solution variable var at the quadrature point qp on the current element interior.
Note
This API is currently present for backward compatibility.

Definition at line 994 of file fem_context.C.

Referenced by libMesh::FEMContext::get_side_fe().

995 {
996  Tensor d2u;
997 
998  this->fixed_interior_hessian( var, qp, d2u );
999 
1000  return d2u;
1001 }
NumberTensorValue Tensor
Tensor fixed_interior_hessian(unsigned int var, unsigned int qp) const
Definition: fem_context.C:994
template<typename OutputType >
void libMesh::FEMContext::fixed_interior_hessian ( unsigned int  var,
unsigned int  qp,
OutputType &  hess_u 
) const
inherited
Returns
The hessian of the fixed_solution variable var at the quadrature point qp on the current element interior.
Note
This is the preferred API.

Definition at line 1005 of file fem_context.C.

References libMesh::DiffContext::get_elem_fixed_solution(), libMesh::FEMContext::get_element_fe(), and libMesh::FEMContext::some_hessian().

1007 {
1008  this->some_hessian<OutputType,
1010  <typename TensorTools::MakeReal
1011  <typename TensorTools::DecrementRank
1012  <typename TensorTools::DecrementRank
1013  <OutputType>::type>::type>::type>,
1014  &DiffContext::get_elem_fixed_solution>(var, qp, d2u);
1015 }
const DenseVector< Number > & get_elem_fixed_solution() const
Definition: diff_context.h:215
void get_element_fe(unsigned int var, FEGenericBase< OutputShape > *&fe) const
Definition: fem_context.h:262
void some_hessian(unsigned int var, unsigned int qp, OutputType &u) const
Definition: fem_context.C:267
Number libMesh::FEMContext::fixed_interior_value ( unsigned int  var,
unsigned int  qp 
) const
inherited
Returns
The value of the fixed_solution variable var at the quadrature point qp on the current element interior.
Note
This API is currently present for backward compatibility.

Definition at line 944 of file fem_context.C.

Referenced by libMesh::FEMContext::get_side_fe().

945 {
946  Number u = 0.;
947 
948  this->fixed_interior_value( var, qp, u );
949 
950  return u;
951 }
Number fixed_interior_value(unsigned int var, unsigned int qp) const
Definition: fem_context.C:944
template<typename OutputType >
void libMesh::FEMContext::fixed_interior_value ( unsigned int  var,
unsigned int  qp,
OutputType &  u 
) const
inherited
Returns
The value of the fixed_solution variable var at the quadrature point qp on the current element interior.
Note
This is the preferred API.

Definition at line 956 of file fem_context.C.

References libMesh::DiffContext::get_elem_fixed_solution(), libMesh::FEMContext::get_element_fe(), and libMesh::FEMContext::some_value().

958 {
959  this->some_value<OutputType,
963 }
void some_value(unsigned int var, unsigned int qp, OutputType &u) const
Definition: fem_context.C:205
const DenseVector< Number > & get_elem_fixed_solution() const
Definition: diff_context.h:215
void get_element_fe(unsigned int var, FEGenericBase< OutputShape > *&fe) const
Definition: fem_context.h:262
Gradient libMesh::FEMContext::fixed_point_gradient ( unsigned int  var,
const Point p 
) const
inherited
Returns
The gradient of the fixed_solution variable var at the physical point p on the current element.
Note
This API is currently present for backward compatibility.

Definition at line 1140 of file fem_context.C.

Referenced by libMesh::FEMContext::get_side_fe().

1141 {
1142  Gradient grad_u;
1143 
1144  this->fixed_point_gradient( var, p, grad_u );
1145 
1146  return grad_u;
1147 }
Gradient fixed_point_gradient(unsigned int var, const Point &p) const
Definition: fem_context.C:1140
NumberVectorValue Gradient
template<typename OutputType >
void libMesh::FEMContext::fixed_point_gradient ( unsigned int  var,
const Point p,
OutputType &  grad_u,
const Real  tolerance = TOLERANCE 
) const
inherited
Returns
The gradient of the fixed_solution variable var at the physical point p on the current element.
Note
This is the preferred API.

Allows evaluation of points within a relative tolerance outside the element.

Definition at line 1152 of file fem_context.C.

References libMesh::DiffContext::_elem_fixed_subsolutions, libMesh::FEMContext::build_new_fe(), libMesh::DiffContext::get_dof_indices(), libMesh::FEMContext::get_elem_dim(), libMesh::DiffContext::get_elem_fixed_solution(), and libmesh_nullptr.

1156 {
1157  typedef typename TensorTools::MakeReal
1159  OutputShape;
1160 
1161  // Get local-to-global dof index lookup
1162  const unsigned int n_dofs = cast_int<unsigned int>
1163  (this->get_dof_indices(var).size());
1164 
1165  // Get current local coefficients
1166  libmesh_assert_greater (_elem_fixed_subsolutions.size(), var);
1167  const DenseSubVector<Number> & coef = this->get_elem_fixed_solution(var);
1168 
1169  // Get finite element object
1170  FEGenericBase<OutputShape> * fe = libmesh_nullptr;
1171  this->get_element_fe<OutputShape>( var, fe, this->get_elem_dim() );
1172 
1173  // Build a FE for calculating u(p)
1174  FEGenericBase<OutputShape> * fe_new =
1175  this->build_new_fe( fe, p, tolerance );
1176 
1177  // Get the values of the shape function derivatives
1178  const std::vector<std::vector<typename FEGenericBase<OutputShape>::OutputGradient>> & dphi = fe_new->get_dphi();
1179 
1180  grad_u = 0.0;
1181 
1182  for (unsigned int l=0; l != n_dofs; l++)
1183  grad_u.add_scaled(dphi[l][0], coef(l));
1184 
1185  return;
1186 }
const std::vector< dof_id_type > & get_dof_indices() const
Definition: diff_context.h:367
const DenseVector< Number > & get_elem_fixed_solution() const
Definition: diff_context.h:215
const class libmesh_nullptr_t libmesh_nullptr
FEGenericBase< OutputShape > * build_new_fe(const FEGenericBase< OutputShape > *fe, const Point &p, const Real tolerance=TOLERANCE) const
Definition: fem_context.C:1862
std::vector< std::unique_ptr< DenseSubVector< Number > > > _elem_fixed_subsolutions
Definition: diff_context.h:588
unsigned char get_elem_dim() const
Definition: fem_context.h:906
Tensor libMesh::FEMContext::fixed_point_hessian ( unsigned int  var,
const Point p 
) const
inherited
Returns
The hessian of the fixed_solution variable var at the physical point p on the current element.
Note
This API is currently present for backward compatibility.

Definition at line 1191 of file fem_context.C.

Referenced by libMesh::FEMContext::get_side_fe().

1192 {
1193  Tensor hess_u;
1194 
1195  this->fixed_point_hessian( var, p, hess_u );
1196 
1197  return hess_u;
1198 }
Tensor fixed_point_hessian(unsigned int var, const Point &p) const
Definition: fem_context.C:1191
NumberTensorValue Tensor
template<typename OutputType >
void libMesh::FEMContext::fixed_point_hessian ( unsigned int  var,
const Point p,
OutputType &  hess_u,
const Real  tolerance = TOLERANCE 
) const
inherited
Returns
The hessian of the fixed_solution variable var at the physical point p on the current element.
Note
This is the preferred API.

Allows evaluation of points within a relative tolerance outside the element.

Definition at line 1203 of file fem_context.C.

References libMesh::DiffContext::_elem_fixed_subsolutions, libMesh::FEMContext::build_new_fe(), libMesh::DiffContext::get_dof_indices(), libMesh::FEMContext::get_elem_dim(), libMesh::DiffContext::get_elem_fixed_solution(), and libmesh_nullptr.

1207 {
1208  typedef typename TensorTools::DecrementRank<OutputType>::type Rank1Decrement;
1209  typedef typename TensorTools::DecrementRank<Rank1Decrement>::type Rank2Decrement;
1210  typedef typename TensorTools::MakeReal<Rank2Decrement>::type OutputShape;
1211 
1212  // Get local-to-global dof index lookup
1213  const unsigned int n_dofs = cast_int<unsigned int>
1214  (this->get_dof_indices(var).size());
1215 
1216  // Get current local coefficients
1217  libmesh_assert_greater (_elem_fixed_subsolutions.size(), var);
1218  const DenseSubVector<Number> & coef = this->get_elem_fixed_solution(var);
1219 
1220  // Get finite element object
1221  FEGenericBase<OutputShape> * fe = libmesh_nullptr;
1222  this->get_element_fe<OutputShape>( var, fe, this->get_elem_dim() );
1223 
1224  // Build a FE for calculating u(p)
1225  FEGenericBase<OutputShape> * fe_new =
1226  this->build_new_fe( fe, p, tolerance );
1227 
1228  // Get the values of the shape function derivatives
1229  const std::vector<std::vector<typename FEGenericBase<OutputShape>::OutputTensor>> & d2phi = fe_new->get_d2phi();
1230 
1231  hess_u = 0.0;
1232 
1233  for (unsigned int l=0; l != n_dofs; l++)
1234  hess_u.add_scaled(d2phi[l][0], coef(l));
1235 
1236  return;
1237 }
const std::vector< dof_id_type > & get_dof_indices() const
Definition: diff_context.h:367
const DenseVector< Number > & get_elem_fixed_solution() const
Definition: diff_context.h:215
const class libmesh_nullptr_t libmesh_nullptr
FEGenericBase< OutputShape > * build_new_fe(const FEGenericBase< OutputShape > *fe, const Point &p, const Real tolerance=TOLERANCE) const
Definition: fem_context.C:1862
std::vector< std::unique_ptr< DenseSubVector< Number > > > _elem_fixed_subsolutions
Definition: diff_context.h:588
unsigned char get_elem_dim() const
Definition: fem_context.h:906
Number libMesh::FEMContext::fixed_point_value ( unsigned int  var,
const Point p 
) const
inherited
Returns
The value of the fixed_solution variable var at the physical point p on the current element.
Note
This API is currently present for backward compatibility.

Definition at line 1094 of file fem_context.C.

Referenced by libMesh::FEMContext::get_side_fe().

1095 {
1096  Number u = 0.;
1097 
1098  this->fixed_point_value( var, p, u );
1099 
1100  return u;
1101 }
Number fixed_point_value(unsigned int var, const Point &p) const
Definition: fem_context.C:1094
template<typename OutputType >
void libMesh::FEMContext::fixed_point_value ( unsigned int  var,
const Point p,
OutputType &  u,
const Real  tolerance = TOLERANCE 
) const
inherited
Returns
The value of the fixed_solution variable var at the physical point p on the current element.
Note
This is the preferred API.

Allows evaluation of points within a relative tolerance outside the element.

Definition at line 1104 of file fem_context.C.

References libMesh::DiffContext::_elem_fixed_subsolutions, libMesh::FEMContext::build_new_fe(), libMesh::DiffContext::get_dof_indices(), libMesh::FEMContext::get_elem_dim(), libMesh::DiffContext::get_elem_fixed_solution(), and libmesh_nullptr.

1108 {
1109  typedef typename TensorTools::MakeReal<OutputType>::type OutputShape;
1110 
1111  // Get local-to-global dof index lookup
1112  const unsigned int n_dofs = cast_int<unsigned int>
1113  (this->get_dof_indices(var).size());
1114 
1115  // Get current local coefficients
1116  libmesh_assert_greater (_elem_fixed_subsolutions.size(), var);
1117  const DenseSubVector<Number> & coef = this->get_elem_fixed_solution(var);
1118 
1119  // Get finite element object
1120  FEGenericBase<OutputShape> * fe = libmesh_nullptr;
1121  this->get_element_fe<OutputShape>( var, fe, this->get_elem_dim() );
1122 
1123  // Build a FE for calculating u(p)
1124  FEGenericBase<OutputShape> * fe_new =
1125  this->build_new_fe( fe, p, tolerance );
1126 
1127  // Get the values of the shape function derivatives
1128  const std::vector<std::vector<OutputShape>> & phi = fe_new->get_phi();
1129 
1130  u = 0.;
1131 
1132  for (unsigned int l=0; l != n_dofs; l++)
1133  u += phi[l][0] * coef(l);
1134 
1135  return;
1136 }
const std::vector< dof_id_type > & get_dof_indices() const
Definition: diff_context.h:367
const DenseVector< Number > & get_elem_fixed_solution() const
Definition: diff_context.h:215
const class libmesh_nullptr_t libmesh_nullptr
FEGenericBase< OutputShape > * build_new_fe(const FEGenericBase< OutputShape > *fe, const Point &p, const Real tolerance=TOLERANCE) const
Definition: fem_context.C:1862
std::vector< std::unique_ptr< DenseSubVector< Number > > > _elem_fixed_subsolutions
Definition: diff_context.h:588
unsigned char get_elem_dim() const
Definition: fem_context.h:906
Gradient libMesh::FEMContext::fixed_side_gradient ( unsigned int  var,
unsigned int  qp 
) const
inherited
Returns
The gradient of the fixed_solution variable var at the quadrature point qp on the current element side.
Note
This API is currently present for backward compatibility.

Definition at line 1044 of file fem_context.C.

Referenced by libMesh::FEMContext::get_side_fe().

1045 {
1046  Gradient du;
1047 
1048  this->fixed_side_gradient( var, qp, du );
1049 
1050  return du;
1051 }
NumberVectorValue Gradient
Gradient fixed_side_gradient(unsigned int var, unsigned int qp) const
Definition: fem_context.C:1044
template<typename OutputType >
void libMesh::FEMContext::fixed_side_gradient ( unsigned int  var,
unsigned int  qp,
OutputType &  grad_u 
) const
inherited
Returns
The gradient of the fixed_solution variable var at the quadrature point qp on the current element side.
Note
This is the preferred API.

Definition at line 1055 of file fem_context.C.

References libMesh::DiffContext::get_elem_fixed_solution(), libMesh::FEMContext::get_side_fe(), and libMesh::FEMContext::some_gradient().

1057 {
1058  this->some_gradient<OutputType,
1060  <typename TensorTools::MakeReal
1061  <typename TensorTools::DecrementRank
1062  <OutputType>::type>::type>,
1063  &DiffContext::get_elem_fixed_solution>(var, qp, du);
1064 }
const DenseVector< Number > & get_elem_fixed_solution() const
Definition: diff_context.h:215
void some_gradient(unsigned int var, unsigned int qp, OutputType &u) const
Definition: fem_context.C:234
void get_side_fe(unsigned int var, FEGenericBase< OutputShape > *&fe) const
Definition: fem_context.h:299
Tensor libMesh::FEMContext::fixed_side_hessian ( unsigned int  var,
unsigned int  qp 
) const
inherited
Returns
The hessian of the fixed_solution variable var at the quadrature point qp on the current element side.
Note
This API is currently present for backward compatibility.

Definition at line 1069 of file fem_context.C.

Referenced by libMesh::FEMContext::get_side_fe().

1070 {
1071  Tensor d2u;
1072 
1073  this->fixed_side_hessian( var, qp, d2u );
1074 
1075  return d2u;
1076 }
Tensor fixed_side_hessian(unsigned int var, unsigned int qp) const
Definition: fem_context.C:1069
NumberTensorValue Tensor
template<typename OutputType >
void libMesh::FEMContext::fixed_side_hessian ( unsigned int  var,
unsigned int  qp,
OutputType &  hess_u 
) const
inherited
Returns
The hessian of the fixed_solution variable var at the quadrature point qp on the current element side.
Note
This is the preferred API.

Definition at line 1079 of file fem_context.C.

References libMesh::DiffContext::get_elem_fixed_solution(), libMesh::FEMContext::get_side_fe(), and libMesh::FEMContext::some_hessian().

1081 {
1082  this->some_hessian<OutputType,
1084  <typename TensorTools::MakeReal
1085  <typename TensorTools::DecrementRank
1086  <typename TensorTools::DecrementRank
1087  <OutputType>::type>::type>::type>,
1088  &DiffContext::get_elem_fixed_solution>(var, qp, d2u);
1089 }
const DenseVector< Number > & get_elem_fixed_solution() const
Definition: diff_context.h:215
void some_hessian(unsigned int var, unsigned int qp, OutputType &u) const
Definition: fem_context.C:267
void get_side_fe(unsigned int var, FEGenericBase< OutputShape > *&fe) const
Definition: fem_context.h:299
Number libMesh::FEMContext::fixed_side_value ( unsigned int  var,
unsigned int  qp 
) const
inherited
Returns
The value of the fixed_solution variable var at the quadrature point qp on the current element side.
Note
This API is currently present for backward compatibility.

Definition at line 1020 of file fem_context.C.

Referenced by libMesh::FEMContext::get_side_fe().

1021 {
1022  Number u = 0.;
1023 
1024  this->fixed_side_value( var, qp, u );
1025 
1026  return u;
1027 }
Number fixed_side_value(unsigned int var, unsigned int qp) const
Definition: fem_context.C:1020
template<typename OutputType >
void libMesh::FEMContext::fixed_side_value ( unsigned int  var,
unsigned int  qp,
OutputType &  u 
) const
inherited
Returns
The value of the fixed_solution variable var at the quadrature point qp on the current element side.
Note
This is the preferred API.

Definition at line 1031 of file fem_context.C.

References libMesh::DiffContext::get_elem_fixed_solution(), libMesh::FEMContext::get_side_fe(), and libMesh::FEMContext::some_value().

1033 {
1034  this->some_value
1035  <OutputType,
1039  (var, qp, u);
1040 }
void some_value(unsigned int var, unsigned int qp, OutputType &u) const
Definition: fem_context.C:205
const DenseVector< Number > & get_elem_fixed_solution() const
Definition: diff_context.h:215
void get_side_fe(unsigned int var, FEGenericBase< OutputShape > *&fe) const
Definition: fem_context.h:299
Real libMesh::DiffContext::get_deltat_value ( )
inherited
Returns
The value currently pointed to by this class's _deltat member

Definition at line 111 of file diff_context.C.

References libMesh::DiffContext::_deltat.

Referenced by libMesh::FEMContext::_update_time_from_system().

112 {
113  libmesh_assert(_deltat);
114 
115  return *_deltat;
116 }
unsigned char libMesh::FEMContext::get_dim ( ) const
inlineinherited

Accessor for cached mesh dimension. This is the largest dimension of the elements in the mesh. For the dimension of this->_elem, use get_elem_dim();

Definition at line 899 of file fem_context.h.

References libMesh::FEMContext::_dim.

Referenced by libMesh::FEMContext::get_element_fe(), libMesh::FEMContext::get_side_fe(), and neighbor_side_fe_reinit().

900  { return this->_dim; }
unsigned char _dim
Definition: fem_context.h:1124
const std::vector<dof_id_type>& libMesh::DiffContext::get_dof_indices ( ) const
inlineinherited

Accessor for element dof indices

Definition at line 367 of file diff_context.h.

References libMesh::DiffContext::_dof_indices.

Referenced by libMesh::EulerSolver::_general_residual(), libMesh::Euler2Solver::_general_residual(), libMesh::NewmarkSolver::_general_residual(), libMesh::FirstOrderUnsteadySolver::compute_second_order_eqns(), libMesh::FEMContext::fixed_point_gradient(), libMesh::FEMContext::fixed_point_hessian(), libMesh::FEMContext::fixed_point_value(), libMesh::VectorSetAction< Val >::insert(), libMesh::MatrixFillAction< ValIn, ValOut >::insert(), libMesh::FEMContext::interior_curl(), libMesh::FEMContext::interior_div(), libMesh::FEMContext::interior_gradients(), libMesh::FEMContext::interior_hessians(), libMesh::FEMContext::interior_values(), libMesh::FEMSystem::mesh_position_get(), neighbor_side_fe_reinit(), libMesh::FEMSystem::numerical_jacobian(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::operator()(), libMesh::FEMContext::point_curl(), libMesh::FEMContext::point_gradient(), libMesh::FEMContext::point_hessian(), libMesh::FEMContext::point_value(), libMesh::FEMContext::pre_fe_reinit(), libMesh::FEMContext::side_gradient(), libMesh::FEMContext::side_gradients(), libMesh::FEMContext::side_hessians(), libMesh::FEMContext::side_values(), libMesh::FEMContext::some_gradient(), libMesh::FEMContext::some_hessian(), and libMesh::FEMContext::some_value().

368  { return _dof_indices; }
std::vector< dof_id_type > _dof_indices
Definition: diff_context.h:621
std::vector<dof_id_type>& libMesh::DiffContext::get_dof_indices ( )
inlineinherited

Non-const accessor for element dof indices

Definition at line 373 of file diff_context.h.

References libMesh::DiffContext::_dof_indices.

374  { return _dof_indices; }
std::vector< dof_id_type > _dof_indices
Definition: diff_context.h:621
const std::vector<dof_id_type>& libMesh::DiffContext::get_dof_indices ( unsigned int  var) const
inlineinherited

Accessor for element dof indices of a particular variable corresponding to the index argument.

Definition at line 380 of file diff_context.h.

References libMesh::DiffContext::_dof_indices_var.

381  {
382  libmesh_assert_greater(_dof_indices_var.size(), var);
383  return _dof_indices_var[var];
384  }
std::vector< std::vector< dof_id_type > > _dof_indices_var
Definition: diff_context.h:622
std::vector<dof_id_type>& libMesh::DiffContext::get_dof_indices ( unsigned int  var)
inlineinherited

Accessor for element dof indices of a particular variable corresponding to the index argument.

Definition at line 390 of file diff_context.h.

References libMesh::DiffContext::_dof_indices_var.

391  {
392  libmesh_assert_greater(_dof_indices_var.size(), var);
393  return _dof_indices_var[var];
394  }
std::vector< std::vector< dof_id_type > > _dof_indices_var
Definition: diff_context.h:622
unsigned char libMesh::FEMContext::get_edge ( ) const
inlineinherited

Accessor for current edge of Elem object

Definition at line 891 of file fem_context.h.

References libMesh::FEMContext::edge.

Referenced by libMesh::FEMContext::edge_fe_reinit().

892  { return edge; }
unsigned char edge
Definition: fem_context.h:984
template<typename OutputShape >
void libMesh::FEMContext::get_edge_fe ( unsigned int  var,
FEGenericBase< OutputShape > *&  fe 
) const
inlineinherited

Accessor for edge (3D only!) finite element object for variable var.

Definition at line 1241 of file fem_context.h.

References libMesh::FEMContext::_edge_fe_var.

Referenced by libMesh::FEMContext::get_side_fe(), and libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::operator()().

1242 {
1243  libmesh_assert_less ( var, _edge_fe_var.size() );
1244  fe = cast_ptr<FEGenericBase<OutputShape> *>( _edge_fe_var[var] );
1245 }
std::vector< FEAbstract * > _edge_fe_var
Definition: fem_context.h:1108
FEBase * libMesh::FEMContext::get_edge_fe ( unsigned int  var) const
inlineinherited

Accessor for edge (3D only!) finite element object for scalar-valued variable var.

Definition at line 1248 of file fem_context.h.

References libMesh::FEMContext::_edge_fe_var.

1249 {
1250  libmesh_assert_less ( var, _edge_fe_var.size() );
1251  return cast_ptr<FEBase *>( _edge_fe_var[var] );
1252 }
std::vector< FEAbstract * > _edge_fe_var
Definition: fem_context.h:1108
const QBase& libMesh::FEMContext::get_edge_qrule ( ) const
inlineinherited

Accessor for element edge quadrature rule.

Definition at line 794 of file fem_context.h.

References libMesh::FEMContext::_edge_qrule.

795  { return *(this->_edge_qrule); }
std::unique_ptr< QBase > _edge_qrule
Definition: fem_context.h:1160
Elem& libMesh::FEMContext::get_elem ( )
inlineinherited

Accessor for current Elem object

Definition at line 878 of file fem_context.h.

References libMesh::FEMContext::_elem.

879  { libmesh_assert(this->_elem);
880  return *(const_cast<Elem *>(this->_elem)); }
const Elem * _elem
Definition: fem_context.h:1119
const DenseMatrix<Number>& libMesh::DGFEMContext::get_elem_elem_jacobian ( ) const
inline

Const accessor for element-element Jacobian.

Definition at line 110 of file dg_fem_context.h.

References _elem_elem_jacobian.

111  { return _elem_elem_jacobian; }
DenseMatrix< Number > _elem_elem_jacobian
DenseMatrix<Number>& libMesh::DGFEMContext::get_elem_elem_jacobian ( )
inline

Non-const accessor for element-element Jacobian.

Definition at line 116 of file dg_fem_context.h.

References _elem_elem_jacobian.

117  { return _elem_elem_jacobian; }
DenseMatrix< Number > _elem_elem_jacobian
const DenseSubMatrix<Number>& libMesh::DGFEMContext::get_elem_elem_jacobian ( unsigned int  var1,
unsigned int  var2 
) const
inline

Const accessor for element-element Jacobian of particular variables corresponding to the variable index arguments.

Definition at line 123 of file dg_fem_context.h.

References _elem_elem_subjacobians.

124  { return *(_elem_elem_subjacobians[var1][var2]); }
std::vector< std::vector< std::unique_ptr< DenseSubMatrix< Number > > > > _elem_elem_subjacobians
DenseSubMatrix<Number>& libMesh::DGFEMContext::get_elem_elem_jacobian ( unsigned int  var1,
unsigned int  var2 
)
inline

Non-const accessor for element-element Jacobian of particular variables corresponding to the variable index arguments.

Definition at line 130 of file dg_fem_context.h.

References _elem_elem_subjacobians.

131  { return *(_elem_elem_subjacobians[var1][var2]); }
std::vector< std::vector< std::unique_ptr< DenseSubMatrix< Number > > > > _elem_elem_subjacobians
DenseVector<Number>& libMesh::DiffContext::get_elem_fixed_solution ( )
inlineinherited

Non-const accessor for element fixed solution.

Definition at line 221 of file diff_context.h.

References libMesh::DiffContext::_elem_fixed_solution.

222  { return _elem_fixed_solution; }
DenseVector< Number > _elem_fixed_solution
Definition: diff_context.h:587
const DenseSubVector<Number>& libMesh::DiffContext::get_elem_fixed_solution ( unsigned int  var) const
inlineinherited

Accessor for element fixed solution of a particular variable corresponding to the variable index argument.

Definition at line 228 of file diff_context.h.

References libMesh::DiffContext::_elem_fixed_subsolutions.

229  {
230  libmesh_assert_greater(_elem_fixed_subsolutions.size(), var);
231  libmesh_assert(_elem_fixed_subsolutions[var]);
232  return *(_elem_fixed_subsolutions[var]);
233  }
std::vector< std::unique_ptr< DenseSubVector< Number > > > _elem_fixed_subsolutions
Definition: diff_context.h:588
DenseSubVector<Number>& libMesh::DiffContext::get_elem_fixed_solution ( unsigned int  var)
inlineinherited

Accessor for element fixed solution of a particular variable corresponding to the variable index argument.

Definition at line 239 of file diff_context.h.

References libMesh::DiffContext::_elem_fixed_subsolutions.

240  {
241  libmesh_assert_greater(_elem_fixed_subsolutions.size(), var);
242  libmesh_assert(_elem_fixed_subsolutions[var]);
243  return *(_elem_fixed_subsolutions[var]);
244  }
std::vector< std::unique_ptr< DenseSubVector< Number > > > _elem_fixed_subsolutions
Definition: diff_context.h:588
DenseMatrix<Number>& libMesh::DiffContext::get_elem_jacobian ( )
inlineinherited

Non-const accessor for element Jacobian.

Definition at line 289 of file diff_context.h.

References libMesh::DiffContext::_elem_jacobian.

290  { return _elem_jacobian; }
DenseMatrix< Number > _elem_jacobian
Definition: diff_context.h:599
const DenseSubMatrix<Number>& libMesh::DiffContext::get_elem_jacobian ( unsigned int  var1,
unsigned int  var2 
) const
inlineinherited

Const accessor for element Jacobian of particular variables corresponding to the variable index arguments.

Definition at line 296 of file diff_context.h.

References libMesh::DiffContext::_elem_subjacobians.

297  {
298  libmesh_assert_greater(_elem_subjacobians.size(), var1);
299  libmesh_assert_greater(_elem_subjacobians[var1].size(), var2);
300  libmesh_assert(_elem_subjacobians[var1][var2]);
301  return *(_elem_subjacobians[var1][var2]);
302  }
std::vector< std::vector< std::unique_ptr< DenseSubMatrix< Number > > > > _elem_subjacobians
Definition: diff_context.h:616
DenseSubMatrix<Number>& libMesh::DiffContext::get_elem_jacobian ( unsigned int  var1,
unsigned int  var2 
)
inlineinherited

Non-const accessor for element Jacobian of particular variables corresponding to the variable index arguments.

Definition at line 308 of file diff_context.h.

References libMesh::DiffContext::_elem_subjacobians.

309  {
310  libmesh_assert_greater(_elem_subjacobians.size(), var1);
311  libmesh_assert_greater(_elem_subjacobians[var1].size(), var2);
312  libmesh_assert(_elem_subjacobians[var1][var2]);
313  return *(_elem_subjacobians[var1][var2]);
314  }
std::vector< std::vector< std::unique_ptr< DenseSubMatrix< Number > > > > _elem_subjacobians
Definition: diff_context.h:616
const DenseMatrix<Number>& libMesh::DGFEMContext::get_elem_neighbor_jacobian ( ) const
inline

Const accessor for element-neighbor Jacobian.

Definition at line 136 of file dg_fem_context.h.

References _elem_neighbor_jacobian.

137  { return _elem_neighbor_jacobian; }
DenseMatrix< Number > _elem_neighbor_jacobian
DenseMatrix<Number>& libMesh::DGFEMContext::get_elem_neighbor_jacobian ( )
inline

Non-const accessor for element -neighborJacobian.

Definition at line 142 of file dg_fem_context.h.

References _elem_neighbor_jacobian.

143  { return _elem_neighbor_jacobian; }
DenseMatrix< Number > _elem_neighbor_jacobian
const DenseSubMatrix<Number>& libMesh::DGFEMContext::get_elem_neighbor_jacobian ( unsigned int  var1,
unsigned int  var2 
) const
inline

Const accessor for element-neighbor Jacobian of particular variables corresponding to the variable index arguments.

Definition at line 149 of file dg_fem_context.h.

References _elem_neighbor_subjacobians.

150  { return *(_elem_neighbor_subjacobians[var1][var2]); }
std::vector< std::vector< std::unique_ptr< DenseSubMatrix< Number > > > > _elem_neighbor_subjacobians
DenseSubMatrix<Number>& libMesh::DGFEMContext::get_elem_neighbor_jacobian ( unsigned int  var1,
unsigned int  var2 
)
inline

Non-const accessor for element-neighbor Jacobian of particular variables corresponding to the variable index arguments.

Definition at line 156 of file dg_fem_context.h.

References _elem_neighbor_subjacobians.

157  { return *(_elem_neighbor_subjacobians[var1][var2]); }
std::vector< std::vector< std::unique_ptr< DenseSubMatrix< Number > > > > _elem_neighbor_subjacobians
const DenseVector<Number>& libMesh::DiffContext::get_elem_residual ( ) const
inlineinherited
DenseVector<Number>& libMesh::DiffContext::get_elem_residual ( )
inlineinherited

Non-const accessor for element residual.

Definition at line 255 of file diff_context.h.

References libMesh::DiffContext::_elem_residual.

256  { return _elem_residual; }
DenseVector< Number > _elem_residual
Definition: diff_context.h:593
const DenseSubVector<Number>& libMesh::DiffContext::get_elem_residual ( unsigned int  var) const
inlineinherited

Const accessor for element residual of a particular variable corresponding to the variable index argument.

Definition at line 262 of file diff_context.h.

References libMesh::DiffContext::_elem_subresiduals.

263  {
264  libmesh_assert_greater(_elem_subresiduals.size(), var);
265  libmesh_assert(_elem_subresiduals[var]);
266  return *(_elem_subresiduals[var]);
267  }
std::vector< std::unique_ptr< DenseSubVector< Number > > > _elem_subresiduals
Definition: diff_context.h:615
DenseSubVector<Number>& libMesh::DiffContext::get_elem_residual ( unsigned int  var)
inlineinherited

Non-const accessor for element residual of a particular variable corresponding to the variable index argument.

Definition at line 273 of file diff_context.h.

References libMesh::DiffContext::_elem_subresiduals.

274  {
275  libmesh_assert_greater(_elem_subresiduals.size(), var);
276  libmesh_assert(_elem_subresiduals[var]);
277  return *(_elem_subresiduals[var]);
278  }
std::vector< std::unique_ptr< DenseSubVector< Number > > > _elem_subresiduals
Definition: diff_context.h:615
DenseVector<Number>& libMesh::DiffContext::get_elem_solution ( )
inlineinherited

Non-const accessor for element solution.

Definition at line 117 of file diff_context.h.

References libMesh::DiffContext::_elem_solution.

118  { return _elem_solution; }
DenseVector< Number > _elem_solution
Definition: diff_context.h:565
const DenseSubVector<Number>& libMesh::DiffContext::get_elem_solution ( unsigned int  var) const
inlineinherited

Accessor for element solution of a particular variable corresponding to the variable index argument.

Definition at line 124 of file diff_context.h.

References libMesh::DiffContext::_elem_subsolutions.

125  {
126  libmesh_assert_greater(_elem_subsolutions.size(), var);
127  libmesh_assert(_elem_subsolutions[var]);
128  return *(_elem_subsolutions[var]);
129  }
std::vector< std::unique_ptr< DenseSubVector< Number > > > _elem_subsolutions
Definition: diff_context.h:566
DenseSubVector<Number>& libMesh::DiffContext::get_elem_solution ( unsigned int  var)
inlineinherited

Accessor for element solution of a particular variable corresponding to the variable index argument.

Definition at line 135 of file diff_context.h.

References libMesh::DiffContext::_elem_subsolutions.

136  {
137  libmesh_assert_greater(_elem_subsolutions.size(), var);
138  libmesh_assert(_elem_subsolutions[var]);
139  return *(_elem_subsolutions[var]);
140  }
std::vector< std::unique_ptr< DenseSubVector< Number > > > _elem_subsolutions
Definition: diff_context.h:566
const DenseVector<Number>& libMesh::DiffContext::get_elem_solution_accel ( ) const
inlineinherited
DenseVector<Number>& libMesh::DiffContext::get_elem_solution_accel ( )
inlineinherited

Non-const accessor for element solution accel of change w.r.t. time.

Definition at line 187 of file diff_context.h.

References libMesh::DiffContext::_elem_solution_accel.

188  { return _elem_solution_accel; }
DenseVector< Number > _elem_solution_accel
Definition: diff_context.h:579
const DenseSubVector<Number>& libMesh::DiffContext::get_elem_solution_accel ( unsigned int  var) const
inlineinherited

Accessor for element solution accel for a particular variable corresponding to the variable index argument.

Definition at line 194 of file diff_context.h.

References libMesh::DiffContext::_elem_subsolution_accels.

195  {
196  libmesh_assert_greater(_elem_subsolution_accels.size(), var);
197  libmesh_assert(_elem_subsolution_accels[var]);
198  return *(_elem_subsolution_accels[var]);
199  }
std::vector< std::unique_ptr< DenseSubVector< Number > > > _elem_subsolution_accels
Definition: diff_context.h:580
DenseSubVector<Number>& libMesh::DiffContext::get_elem_solution_accel ( unsigned int  var)
inlineinherited

Accessor for element solution accel for a particular variable corresponding to the variable index argument.

Definition at line 205 of file diff_context.h.

References libMesh::DiffContext::_elem_subsolution_accels.

206  {
207  libmesh_assert_greater(_elem_subsolution_accels.size(), var);
208  libmesh_assert(_elem_subsolution_accels[var]);
209  return *(_elem_subsolution_accels[var]);
210  }
std::vector< std::unique_ptr< DenseSubVector< Number > > > _elem_subsolution_accels
Definition: diff_context.h:580
Real libMesh::DiffContext::get_elem_solution_accel_derivative ( ) const
inlineinherited

The derivative of the current elem_solution_accel w.r.t. the unknown solution. Corresponding Jacobian contributions should be multiplied by this amount, or may be skipped if get_elem_solution_accel_derivative() is 0.

Definition at line 438 of file diff_context.h.

References libMesh::DiffContext::elem_solution_accel_derivative.

Real elem_solution_accel_derivative
Definition: diff_context.h:498
Real libMesh::DiffContext::get_elem_solution_derivative ( ) const
inlineinherited

The derivative of the current elem_solution w.r.t. the unknown solution. Corresponding Jacobian contributions should be multiplied by this amount, or may be skipped if get_elem_solution_derivative() is 0.

Definition at line 420 of file diff_context.h.

References libMesh::DiffContext::elem_solution_derivative.

Referenced by libMesh::FirstOrderUnsteadySolver::compute_second_order_eqns().

421  { return elem_solution_derivative; }
DenseVector<Number>& libMesh::DiffContext::get_elem_solution_rate ( )
inlineinherited

Non-const accessor for element solution rate of change w.r.t. time.

Definition at line 152 of file diff_context.h.

References libMesh::DiffContext::_elem_solution_rate.

153  { return _elem_solution_rate; }
DenseVector< Number > _elem_solution_rate
Definition: diff_context.h:572
const DenseSubVector<Number>& libMesh::DiffContext::get_elem_solution_rate ( unsigned int  var) const
inlineinherited

Accessor for element solution rate for a particular variable corresponding to the variable index argument.

Definition at line 159 of file diff_context.h.

References libMesh::DiffContext::_elem_subsolution_rates.

160  {
161  libmesh_assert_greater(_elem_subsolution_rates.size(), var);
162  libmesh_assert(_elem_subsolution_rates[var]);
163  return *(_elem_subsolution_rates[var]);
164  }
std::vector< std::unique_ptr< DenseSubVector< Number > > > _elem_subsolution_rates
Definition: diff_context.h:573
DenseSubVector<Number>& libMesh::DiffContext::get_elem_solution_rate ( unsigned int  var)
inlineinherited

Accessor for element solution rate for a particular variable corresponding to the variable index argument.

Definition at line 170 of file diff_context.h.

References libMesh::DiffContext::_elem_subsolution_rates.

171  {
172  libmesh_assert_greater(_elem_subsolution_rates.size(), var);
173  libmesh_assert(_elem_subsolution_rates[var]);
174  return *(_elem_subsolution_rates[var]);
175  }
std::vector< std::unique_ptr< DenseSubVector< Number > > > _elem_subsolution_rates
Definition: diff_context.h:573
Real libMesh::DiffContext::get_elem_solution_rate_derivative ( ) const
inlineinherited

The derivative of the current elem_solution_rate w.r.t. the unknown solution. Corresponding Jacobian contributions should be multiplied by this amount, or may be skipped if get_elem_solution_rate_derivative() is 0.

Definition at line 429 of file diff_context.h.

References libMesh::DiffContext::elem_solution_rate_derivative.

Referenced by libMesh::FirstOrderUnsteadySolver::compute_second_order_eqns(), and libMesh::FirstOrderUnsteadySolver::prepare_accel().

Real elem_solution_rate_derivative
Definition: diff_context.h:491
template<typename OutputShape >
void libMesh::FEMContext::get_element_fe ( unsigned int  var,
FEGenericBase< OutputShape > *&  fe 
) const
inlineinherited

Accessor for interior finite element object for variable var for the largest dimension in the mesh. We default to the largest mesh dim because this method may be called before the Elem * is set in the FEMContext, e.g. in FEMSystem::init_context (or a subclass). If you have lower dimensional elements in the mesh and need to query for those FE objects, use the alternative get_element_fe method.

Definition at line 262 of file fem_context.h.

References libMesh::FEMContext::get_dim().

Referenced by libMesh::FEMContext::_do_elem_position_set(), libMesh::FirstOrderUnsteadySolver::compute_second_order_eqns(), libMesh::FEMContext::elem_position_get(), libMesh::FEMContext::fixed_interior_gradient(), libMesh::FEMContext::fixed_interior_hessian(), libMesh::FEMContext::fixed_interior_value(), libMesh::FEMContext::get_element_fe(), libMesh::ParsedFEMFunction< Output >::init_context(), libMesh::FEMSystem::init_context(), libMesh::FEMContext::interior_accel(), libMesh::FEMContext::interior_gradient(), libMesh::FEMContext::interior_hessian(), libMesh::FEMContext::interior_rate(), and libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::operator()().

263  { this->get_element_fe<OutputShape>(var,fe,this->get_dim()); }
unsigned char get_dim() const
Definition: fem_context.h:899
FEBase* libMesh::FEMContext::get_element_fe ( unsigned int  var) const
inlineinherited

Accessor for interior finite element object for scalar-valued variable var for the largest dimension in the mesh. We default to the largest mesh dim because this method may be called before the Elem * is set in the FEMContext, e.g. in FEMSystem::init_context (or a subclass). If you have lower dimensional elements in the mesh and need to query for those FE objects, use the alternative get_element_fe method.

Definition at line 273 of file fem_context.h.

References libMesh::FEMContext::get_dim(), and libMesh::FEMContext::get_element_fe().

274  { return this->get_element_fe(var,this->get_dim()); }
void get_element_fe(unsigned int var, FEGenericBase< OutputShape > *&fe) const
Definition: fem_context.h:262
unsigned char get_dim() const
Definition: fem_context.h:899
template<typename OutputShape >
void libMesh::FEMContext::get_element_fe ( unsigned int  var,
FEGenericBase< OutputShape > *&  fe,
unsigned char  dim 
) const
inlineinherited

Accessor for interior finite element object for variable var for dimension dim.

Definition at line 1205 of file fem_context.h.

References libMesh::FEMContext::_element_fe_var.

1207 {
1208  libmesh_assert( !_element_fe_var[dim].empty() );
1209  libmesh_assert_less ( var, (_element_fe_var[dim].size() ) );
1210  fe = cast_ptr<FEGenericBase<OutputShape> *>( (_element_fe_var[dim][var] ) );
1211 }
std::vector< std::vector< FEAbstract * > > _element_fe_var
Definition: fem_context.h:1106
FEBase * libMesh::FEMContext::get_element_fe ( unsigned int  var,
unsigned char  dim 
) const
inlineinherited

Accessor for interior finite element object for scalar-valued variable var for dimension dim.

Definition at line 1214 of file fem_context.h.

References libMesh::FEMContext::_element_fe_var.

1215 {
1216  libmesh_assert( !_element_fe_var[dim].empty() );
1217  libmesh_assert_less ( var, (_element_fe_var[dim].size() ) );
1218  return cast_ptr<FEBase *>( (_element_fe_var[dim][var] ) );
1219 }
std::vector< std::vector< FEAbstract * > > _element_fe_var
Definition: fem_context.h:1106
const QBase& libMesh::FEMContext::get_element_qrule ( ) const
inlineinherited

Accessor for element interior quadrature rule for the dimension of the current _elem.

Definition at line 765 of file fem_context.h.

References libMesh::FEMContext::get_elem_dim().

Referenced by libMesh::FirstOrderUnsteadySolver::compute_second_order_eqns().

766  { return this->get_element_qrule(this->get_elem_dim()); }
const QBase & get_element_qrule() const
Definition: fem_context.h:765
unsigned char get_elem_dim() const
Definition: fem_context.h:906
const QBase& libMesh::FEMContext::get_element_qrule ( unsigned char  dim) const
inlineinherited

Accessor for element interior quadrature rule.

Definition at line 778 of file fem_context.h.

References libMesh::FEMContext::_element_qrule.

779  { libmesh_assert(_element_qrule[dim]);
780  return *(this->_element_qrule[dim]); }
std::vector< std::unique_ptr< QBase > > _element_qrule
Definition: fem_context.h:1143
Real libMesh::DiffContext::get_fixed_solution_derivative ( ) const
inlineinherited

The derivative of the current fixed_elem_solution w.r.t. the unknown solution. Corresponding Jacobian contributions should be multiplied by this amount, or may be skipped if get_fixed_elem_solution_derivative() is 0.

Definition at line 447 of file diff_context.h.

References libMesh::DiffContext::fixed_solution_derivative.

448  { return fixed_solution_derivative; }
DenseSubVector< Number > & libMesh::DiffContext::get_localized_subvector ( const NumericVector< Number > &  localized_vector,
unsigned int  var 
)
inherited

Return a reference to DenseSubVector localization of localized_vector at variable var contained in the _localized_vectors map

Definition at line 148 of file diff_context.C.

References libMesh::DiffContext::_localized_vectors.

Referenced by libMesh::FEMContext::interior_gradients(), libMesh::FEMContext::interior_hessians(), libMesh::FEMContext::interior_values(), libMesh::FEMContext::side_gradients(), libMesh::FEMContext::side_hessians(), and libMesh::FEMContext::side_values().

149 {
150  return *_localized_vectors[&localized_vector].second[var];
151 }
std::map< const NumericVector< Number > *, std::pair< DenseVector< Number >, std::vector< std::unique_ptr< DenseSubVector< Number > > > > > _localized_vectors
Definition: diff_context.h:559
const DenseSubVector< Number > & libMesh::DiffContext::get_localized_subvector ( const NumericVector< Number > &  localized_vector,
unsigned int  var 
) const
inherited

const accessible version of get_localized_subvector function

Definition at line 154 of file diff_context.C.

References libMesh::DiffContext::_localized_vectors.

155 {
156  auto localized_vectors_it = _localized_vectors.find(&localized_vector);
157  libmesh_assert(localized_vectors_it != _localized_vectors.end());
158  return *localized_vectors_it->second.second[var];
159 }
std::map< const NumericVector< Number > *, std::pair< DenseVector< Number >, std::vector< std::unique_ptr< DenseSubVector< Number > > > > > _localized_vectors
Definition: diff_context.h:559
DenseVector< Number > & libMesh::DiffContext::get_localized_vector ( const NumericVector< Number > &  localized_vector)
inherited

Return a reference to DenseVector localization of localized_vector contained in the _localized_vectors map

Definition at line 134 of file diff_context.C.

References libMesh::DiffContext::_localized_vectors.

135 {
136  return _localized_vectors[&localized_vector].first;
137 }
std::map< const NumericVector< Number > *, std::pair< DenseVector< Number >, std::vector< std::unique_ptr< DenseSubVector< Number > > > > > _localized_vectors
Definition: diff_context.h:559
const DenseVector< Number > & libMesh::DiffContext::get_localized_vector ( const NumericVector< Number > &  localized_vector) const
inherited

const accessible version of get_localized_vector function

Definition at line 140 of file diff_context.C.

References libMesh::DiffContext::_localized_vectors.

141 {
142  auto localized_vectors_it = _localized_vectors.find(&localized_vector);
143  libmesh_assert(localized_vectors_it != _localized_vectors.end());
144  return localized_vectors_it->second.first;
145 }
std::map< const NumericVector< Number > *, std::pair< DenseVector< Number >, std::vector< std::unique_ptr< DenseSubVector< Number > > > > > _localized_vectors
Definition: diff_context.h:559
const System* libMesh::FEMContext::get_mesh_system ( ) const
inlineinherited

Accessor for moving mesh System

Definition at line 811 of file fem_context.h.

References libMesh::FEMContext::_mesh_sys.

812  { return this->_mesh_sys; }
System* libMesh::FEMContext::get_mesh_system ( )
inlineinherited

Accessor for moving mesh System

Definition at line 817 of file fem_context.h.

References libMesh::FEMContext::_mesh_sys.

818  { return this->_mesh_sys; }
unsigned int libMesh::FEMContext::get_mesh_x_var ( ) const
inlineinherited

Accessor for x-variable of moving mesh System

Definition at line 823 of file fem_context.h.

References libMesh::FEMContext::_mesh_x_var.

Referenced by libMesh::FEMContext::_do_elem_position_set(), and libMesh::FEMContext::elem_position_get().

824  { return _mesh_x_var; }
unsigned int _mesh_x_var
Definition: fem_context.h:974
unsigned int libMesh::FEMContext::get_mesh_y_var ( ) const
inlineinherited

Accessor for y-variable of moving mesh System

Definition at line 837 of file fem_context.h.

References libMesh::FEMContext::_mesh_y_var.

Referenced by libMesh::FEMContext::_do_elem_position_set(), and libMesh::FEMContext::elem_position_get().

838  { return _mesh_y_var; }
unsigned int _mesh_y_var
Definition: fem_context.h:974
unsigned int libMesh::FEMContext::get_mesh_z_var ( ) const
inlineinherited

Accessor for z-variable of moving mesh System

Definition at line 851 of file fem_context.h.

References libMesh::FEMContext::_mesh_z_var.

Referenced by libMesh::FEMContext::_do_elem_position_set(), and libMesh::FEMContext::elem_position_get().

852  { return _mesh_z_var; }
unsigned int _mesh_z_var
Definition: fem_context.h:974
const Elem& libMesh::DGFEMContext::get_neighbor ( ) const
inline

Accessor for current neighbor Elem object for assembling DG terms.

Definition at line 226 of file dg_fem_context.h.

References _neighbor.

Referenced by neighbor_side_fe_reinit().

227  { return *_neighbor; }
const std::vector<dof_id_type>& libMesh::DGFEMContext::get_neighbor_dof_indices ( ) const
inline

Accessor for neighbor dof indices

Definition at line 71 of file dg_fem_context.h.

References _neighbor_dof_indices.

72  { return _neighbor_dof_indices; }
std::vector< dof_id_type > _neighbor_dof_indices
const std::vector<dof_id_type>& libMesh::DGFEMContext::get_neighbor_dof_indices ( unsigned int  var) const
inline

Accessor for element dof indices of a particular variable corresponding to the index argument.

Definition at line 78 of file dg_fem_context.h.

References _neighbor_dof_indices_var.

79  { return _neighbor_dof_indices_var[var]; }
std::vector< std::vector< dof_id_type > > _neighbor_dof_indices_var
const DenseMatrix<Number>& libMesh::DGFEMContext::get_neighbor_elem_jacobian ( ) const
inline

Const accessor for element-neighbor Jacobian.

Definition at line 162 of file dg_fem_context.h.

References _neighbor_elem_jacobian.

163  { return _neighbor_elem_jacobian; }
DenseMatrix< Number > _neighbor_elem_jacobian
DenseMatrix<Number>& libMesh::DGFEMContext::get_neighbor_elem_jacobian ( )
inline

Non-const accessor for element Jacobian.

Definition at line 168 of file dg_fem_context.h.

References _neighbor_elem_jacobian.

169  { return _neighbor_elem_jacobian; }
DenseMatrix< Number > _neighbor_elem_jacobian
const DenseSubMatrix<Number>& libMesh::DGFEMContext::get_neighbor_elem_jacobian ( unsigned int  var1,
unsigned int  var2 
) const
inline

Const accessor for neighbor-element Jacobian of particular variables corresponding to the variable index arguments.

Definition at line 175 of file dg_fem_context.h.

References _neighbor_elem_subjacobians.

176  { return *(_neighbor_elem_subjacobians[var1][var2]); }
std::vector< std::vector< std::unique_ptr< DenseSubMatrix< Number > > > > _neighbor_elem_subjacobians
DenseSubMatrix<Number>& libMesh::DGFEMContext::get_neighbor_elem_jacobian ( unsigned int  var1,
unsigned int  var2 
)
inline

Non-const accessor for neighbor-element Jacobian of particular variables corresponding to the variable index arguments.

Definition at line 182 of file dg_fem_context.h.

References _neighbor_elem_subjacobians.

183  { return *(_neighbor_elem_subjacobians[var1][var2]); }
std::vector< std::vector< std::unique_ptr< DenseSubMatrix< Number > > > > _neighbor_elem_subjacobians
const DenseMatrix<Number>& libMesh::DGFEMContext::get_neighbor_neighbor_jacobian ( ) const
inline

Const accessor for element-neighbor Jacobian.

Definition at line 188 of file dg_fem_context.h.

References _neighbor_neighbor_jacobian.

189  { return _neighbor_neighbor_jacobian; }
DenseMatrix< Number > _neighbor_neighbor_jacobian
DenseMatrix<Number>& libMesh::DGFEMContext::get_neighbor_neighbor_jacobian ( )
inline

Non-const accessor for element Jacobian.

Definition at line 194 of file dg_fem_context.h.

References _neighbor_neighbor_jacobian.

195  { return _neighbor_neighbor_jacobian; }
DenseMatrix< Number > _neighbor_neighbor_jacobian
const DenseSubMatrix<Number>& libMesh::DGFEMContext::get_neighbor_neighbor_jacobian ( unsigned int  var1,
unsigned int  var2 
) const
inline

Const accessor for neighbor-neighbor Jacobian of particular variables corresponding to the variable index arguments.

Definition at line 201 of file dg_fem_context.h.

References _neighbor_neighbor_subjacobians.

202  { return *(_neighbor_neighbor_subjacobians[var1][var2]); }
std::vector< std::vector< std::unique_ptr< DenseSubMatrix< Number > > > > _neighbor_neighbor_subjacobians
DenseSubMatrix<Number>& libMesh::DGFEMContext::get_neighbor_neighbor_jacobian ( unsigned int  var1,
unsigned int  var2 
)
inline

Non-const accessor for neighbor-neighbor Jacobian of particular variables corresponding to the variable index arguments.

Definition at line 208 of file dg_fem_context.h.

References _neighbor_neighbor_subjacobians.

209  { return *(_neighbor_neighbor_subjacobians[var1][var2]); }
std::vector< std::vector< std::unique_ptr< DenseSubMatrix< Number > > > > _neighbor_neighbor_subjacobians
const DenseVector<Number>& libMesh::DGFEMContext::get_neighbor_residual ( ) const
inline

Const accessor for neighbor residual.

Definition at line 84 of file dg_fem_context.h.

References _neighbor_residual.

85  { return _neighbor_residual; }
DenseVector< Number > _neighbor_residual
DenseVector<Number>& libMesh::DGFEMContext::get_neighbor_residual ( )
inline

Non-const accessor for neighbor residual.

Definition at line 90 of file dg_fem_context.h.

References _neighbor_residual.

91  { return _neighbor_residual; }
DenseVector< Number > _neighbor_residual
const DenseSubVector<Number>& libMesh::DGFEMContext::get_neighbor_residual ( unsigned int  var) const
inline

Const accessor for neighbor residual of a particular variable corresponding to the variable index argument.

Definition at line 97 of file dg_fem_context.h.

References _neighbor_subresiduals.

98  { return *(_neighbor_subresiduals[var]); }
std::vector< std::unique_ptr< DenseSubVector< Number > > > _neighbor_subresiduals
DenseSubVector<Number>& libMesh::DGFEMContext::get_neighbor_residual ( unsigned int  var)
inline

Non-const accessor for neighbor residual of a particular variable corresponding to the variable index argument.

Definition at line 104 of file dg_fem_context.h.

References _neighbor_subresiduals.

105  { return *(_neighbor_subresiduals[var]); }
std::vector< std::unique_ptr< DenseSubVector< Number > > > _neighbor_subresiduals
template<typename OutputShape >
void libMesh::DGFEMContext::get_neighbor_side_fe ( unsigned int  var,
FEGenericBase< OutputShape > *&  fe 
) const
inline

Accessor for neighbor edge/face (2D/3D) finite element object for variable var.

Definition at line 301 of file dg_fem_context.h.

References _neighbor_side_fe_var.

Referenced by dg_terms_are_active().

302 {
303  libmesh_assert_less ( var, _neighbor_side_fe_var.size() );
304  fe = cast_ptr<FEGenericBase<OutputShape> *>( _neighbor_side_fe_var[var] );
305 }
std::vector< FEAbstract * > _neighbor_side_fe_var
const std::vector<DenseVector<Number> >& libMesh::DiffContext::get_qoi_derivatives ( ) const
inlineinherited

Const accessor for QoI derivatives.

Definition at line 331 of file diff_context.h.

References libMesh::DiffContext::_elem_qoi_derivative.

Referenced by libMesh::FEMContext::pre_fe_reinit().

332  { return _elem_qoi_derivative; }
std::vector< DenseVector< Number > > _elem_qoi_derivative
Definition: diff_context.h:609
std::vector<DenseVector<Number> >& libMesh::DiffContext::get_qoi_derivatives ( )
inlineinherited

Non-const accessor for QoI derivatives.

Definition at line 337 of file diff_context.h.

References libMesh::DiffContext::_elem_qoi_derivative.

338  { return _elem_qoi_derivative; }
std::vector< DenseVector< Number > > _elem_qoi_derivative
Definition: diff_context.h:609
const DenseSubVector<Number>& libMesh::DiffContext::get_qoi_derivatives ( unsigned int  qoi,
unsigned int  var 
) const
inlineinherited

Const accessor for QoI derivative of a particular qoi and variable corresponding to the index arguments.

Definition at line 344 of file diff_context.h.

References libMesh::DiffContext::_elem_qoi_subderivatives.

345  {
346  libmesh_assert_greater(_elem_qoi_subderivatives.size(), qoi);
347  libmesh_assert_greater(_elem_qoi_subderivatives[qoi].size(), var);
348  libmesh_assert(_elem_qoi_subderivatives[qoi][var]);
349  return *(_elem_qoi_subderivatives[qoi][var]);
350  }
std::vector< std::vector< std::unique_ptr< DenseSubVector< Number > > > > _elem_qoi_subderivatives
Definition: diff_context.h:610
DenseSubVector<Number>& libMesh::DiffContext::get_qoi_derivatives ( unsigned int  qoi,
unsigned int  var 
)
inlineinherited

Non-const accessor for QoI derivative of a particular qoi and variable corresponding to the index arguments.

Definition at line 356 of file diff_context.h.

References libMesh::DiffContext::_elem_qoi_subderivatives.

357  {
358  libmesh_assert_greater(_elem_qoi_subderivatives.size(), qoi);
359  libmesh_assert_greater(_elem_qoi_subderivatives[qoi].size(), var);
360  libmesh_assert(_elem_qoi_subderivatives[qoi][var]);
361  return *(_elem_qoi_subderivatives[qoi][var]);
362  }
std::vector< std::vector< std::unique_ptr< DenseSubVector< Number > > > > _elem_qoi_subderivatives
Definition: diff_context.h:610
const std::vector<Number>& libMesh::DiffContext::get_qois ( ) const
inlineinherited

Const accessor for QoI vector.

Definition at line 319 of file diff_context.h.

References libMesh::DiffContext::_elem_qoi.

320  { return _elem_qoi; }
std::vector< Number > _elem_qoi
Definition: diff_context.h:604
std::vector<Number>& libMesh::DiffContext::get_qois ( )
inlineinherited

Non-const accessor for QoI vector.

Definition at line 325 of file diff_context.h.

References libMesh::DiffContext::_elem_qoi.

326  { return _elem_qoi; }
std::vector< Number > _elem_qoi
Definition: diff_context.h:604
unsigned char libMesh::FEMContext::get_side ( ) const
inlineinherited

Accessor for current side of Elem object

Definition at line 885 of file fem_context.h.

References libMesh::FEMContext::side.

Referenced by libMesh::FEMContext::side_fe_reinit().

886  { return side; }
unsigned char side
Definition: fem_context.h:979
template<typename OutputShape >
void libMesh::FEMContext::get_side_fe ( unsigned int  var,
FEGenericBase< OutputShape > *&  fe 
) const
inlineinherited

Accessor for edge/face (2D/3D) finite element object for variable var for the largest dimension in the mesh. We default to the largest mesh dim because this method may be called before the Elem * is set in the FEMContext, e.g. in FEMSystem::init_context (or a subclass). If you have lower dimensional elements in the mesh and need to query for those FE objects, use the alternative get_side_fe method.

Definition at line 299 of file fem_context.h.

References libMesh::FEMContext::get_dim().

Referenced by libMesh::ParsedFEMFunction< Output >::eval_args(), libMesh::FEMContext::fixed_side_gradient(), libMesh::FEMContext::fixed_side_hessian(), libMesh::FEMContext::fixed_side_value(), libMesh::FEMContext::get_side_fe(), libMesh::ParsedFEMFunction< Output >::init_context(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::operator()(), libMesh::FEMContext::side_accel(), libMesh::FEMContext::side_hessian(), and libMesh::FEMContext::side_rate().

300  { this->get_side_fe<OutputShape>(var,fe,this->get_dim()); }
unsigned char get_dim() const
Definition: fem_context.h:899
FEBase* libMesh::FEMContext::get_side_fe ( unsigned int  var) const
inlineinherited

Accessor for side finite element object for scalar-valued variable var for the largest dimension in the mesh. We default to the largest mesh dim because this method may be called before the Elem * is set in the FEMContext, e.g. in FEMSystem::init_context (or a subclass). If you have lower dimensional elements in the mesh and need to query for those FE objects, use the alternative get_side_fe method.

Definition at line 310 of file fem_context.h.

References libMesh::FEMContext::edge_fe_reinit(), libMesh::FEMContext::elem_edge_reinit(), libMesh::FEMContext::elem_fe_reinit(), libMesh::FEMContext::elem_reinit(), libMesh::FEMContext::elem_side_reinit(), libMesh::FEMContext::fixed_interior_gradient(), libMesh::FEMContext::fixed_interior_hessian(), libMesh::FEMContext::fixed_interior_value(), libMesh::FEMContext::fixed_point_gradient(), libMesh::FEMContext::fixed_point_hessian(), libMesh::FEMContext::fixed_point_value(), libMesh::FEMContext::fixed_side_gradient(), libMesh::FEMContext::fixed_side_hessian(), libMesh::FEMContext::fixed_side_value(), libMesh::FEMContext::get_dim(), libMesh::FEMContext::get_edge_fe(), libMesh::FEMContext::get_side_fe(), libMesh::FEMContext::interior_accel(), libMesh::FEMContext::interior_curl(), libMesh::FEMContext::interior_div(), libMesh::FEMContext::interior_gradient(), libMesh::FEMContext::interior_gradients(), libMesh::FEMContext::interior_hessian(), libMesh::FEMContext::interior_hessians(), libMesh::FEMContext::interior_rate(), libMesh::FEMContext::interior_value(), libMesh::FEMContext::interior_values(), libmesh_nullptr, libMesh::FEMContext::nonlocal_reinit(), libMesh::FEMContext::point_accel(), libMesh::FEMContext::point_curl(), libMesh::FEMContext::point_gradient(), libMesh::FEMContext::point_hessian(), libMesh::FEMContext::point_rate(), libMesh::FEMContext::point_value(), libMesh::FEMContext::pre_fe_reinit(), libMesh::Real, libMesh::FEMContext::side_accel(), libMesh::FEMContext::side_fe_reinit(), libMesh::FEMContext::side_gradient(), libMesh::FEMContext::side_gradients(), libMesh::FEMContext::side_hessian(), libMesh::FEMContext::side_hessians(), libMesh::FEMContext::side_rate(), libMesh::FEMContext::side_value(), libMesh::FEMContext::side_values(), and libMesh::TOLERANCE.

311  { return this->get_side_fe(var,this->get_dim()); }
unsigned char get_dim() const
Definition: fem_context.h:899
void get_side_fe(unsigned int var, FEGenericBase< OutputShape > *&fe) const
Definition: fem_context.h:299
template<typename OutputShape >
void libMesh::FEMContext::get_side_fe ( unsigned int  var,
FEGenericBase< OutputShape > *&  fe,
unsigned char  dim 
) const
inlineinherited

Accessor for edge/face (2D/3D) finite element object for variable var for dimension dim.

Definition at line 1223 of file fem_context.h.

References libMesh::FEMContext::_side_fe_var.

1225 {
1226  libmesh_assert( !_side_fe_var[dim].empty() );
1227  libmesh_assert_less ( var, (_side_fe_var[dim].size() ) );
1228  fe = cast_ptr<FEGenericBase<OutputShape> *>( (_side_fe_var[dim][var] ) );
1229 }
std::vector< std::vector< FEAbstract * > > _side_fe_var
Definition: fem_context.h:1107
FEBase * libMesh::FEMContext::get_side_fe ( unsigned int  var,
unsigned char  dim 
) const
inlineinherited

Accessor for side finite element object for scalar-valued variable var for dimension dim.

Definition at line 1232 of file fem_context.h.

References libMesh::FEMContext::_side_fe_var.

1233 {
1234  libmesh_assert( !_side_fe_var[dim].empty() );
1235  libmesh_assert_less ( var, (_side_fe_var[dim].size() ) );
1236  return cast_ptr<FEBase *>( (_side_fe_var[dim][var] ) );
1237 }
std::vector< std::vector< FEAbstract * > > _side_fe_var
Definition: fem_context.h:1107
const QBase& libMesh::FEMContext::get_side_qrule ( ) const
inlineinherited

Accessor for element side quadrature rule for the dimension of the current _elem.

Definition at line 772 of file fem_context.h.

References libMesh::FEMContext::get_elem_dim().

773  { return this->get_side_qrule(this->get_elem_dim()); }
const QBase & get_side_qrule() const
Definition: fem_context.h:772
unsigned char get_elem_dim() const
Definition: fem_context.h:906
const QBase& libMesh::FEMContext::get_side_qrule ( unsigned char  dim) const
inlineinherited

Accessor for element side quadrature rule.

Definition at line 785 of file fem_context.h.

References libMesh::FEMContext::_side_qrule.

786  {
787  libmesh_assert(_side_qrule[dim]);
788  return *(this->_side_qrule[dim]);
789  }
std::vector< std::unique_ptr< QBase > > _side_qrule
Definition: fem_context.h:1151
const System& libMesh::DiffContext::get_system ( ) const
inlineinherited

Accessor for associated system.

Definition at line 105 of file diff_context.h.

References libMesh::DiffContext::_system.

Referenced by libMesh::FirstOrderUnsteadySolver::compute_second_order_eqns(), and neighbor_side_fe_reinit().

106  { return _system; }
const System & _system
Definition: diff_context.h:642
Real libMesh::DiffContext::get_system_time ( ) const
inlineinherited

Accessor for the time variable stored in the system class.

Definition at line 399 of file diff_context.h.

References libMesh::DiffContext::system_time.

Referenced by libMesh::FEMContext::_update_time_from_system().

400  { return system_time; }
const Real system_time
Definition: diff_context.h:478
Real libMesh::DiffContext::get_time ( ) const
inlineinherited

Accessor for the time for which the current nonlinear_solution is defined.

Definition at line 405 of file diff_context.h.

References libMesh::DiffContext::time.

406  { return time; }
bool libMesh::FEMContext::has_elem ( ) const
inlineinherited

Test for current Elem object

Definition at line 865 of file fem_context.h.

References libMesh::FEMContext::_elem, and libmesh_nullptr.

Referenced by libMesh::FEMContext::build_new_fe(), libMesh::FEMContext::cached_fe(), libMesh::FEMContext::elem_fe_reinit(), and libMesh::FEMContext::pre_fe_reinit().

866  { return (this->_elem != libmesh_nullptr); }
const class libmesh_nullptr_t libmesh_nullptr
const Elem * _elem
Definition: fem_context.h:1119
bool libMesh::FEMContext::has_side_boundary_id ( boundary_id_type  id) const
inherited

Reports if the boundary id is found on the current side

Definition at line 180 of file fem_context.C.

References libMesh::FEMContext::_boundary_info, libMesh::FEMContext::get_elem(), libMesh::BoundaryInfo::has_boundary_id(), and libMesh::FEMContext::side.

181 {
182  return _boundary_info.has_boundary_id(&(this->get_elem()), side, id);
183 }
const Elem & get_elem() const
Definition: fem_context.h:871
const BoundaryInfo & _boundary_info
Definition: fem_context.h:1114
unsigned char side
Definition: fem_context.h:979
bool has_boundary_id(const Node *const node, const boundary_id_type id) const
template<typename OutputType >
template void libMesh::FEMContext::interior_accel< Gradient > ( unsigned int  var,
unsigned int  qp,
OutputType &  u 
) const
inherited
Returns
The second time derivative (acceleration) of the solution variable var at the quadrature point qp on the current element interior.

Definition at line 1266 of file fem_context.C.

References libMesh::DiffContext::get_elem_solution_accel(), libMesh::FEMContext::get_element_fe(), and libMesh::FEMContext::some_value().

Referenced by libMesh::FEMContext::get_side_fe().

1268 {
1269  this->some_value<OutputType,
1273 }
const DenseVector< Number > & get_elem_solution_accel() const
Definition: diff_context.h:180
void some_value(unsigned int var, unsigned int qp, OutputType &u) const
Definition: fem_context.C:205
void get_element_fe(unsigned int var, FEGenericBase< OutputShape > *&fe) const
Definition: fem_context.h:262
template<typename OutputType >
template void libMesh::FEMContext::interior_curl< Gradient > ( unsigned int  var,
unsigned int  qp,
OutputType &  curl_u 
) const
inherited
Returns
The curl of the solution variable var at the physical point p on the current element.

Definition at line 483 of file fem_context.C.

References libMesh::DiffContext::_elem_subsolutions, libMesh::DiffContext::get_dof_indices(), libMesh::FEMContext::get_elem_dim(), libMesh::DiffContext::get_elem_solution(), and libmesh_nullptr.

Referenced by libMesh::FEMContext::get_side_fe().

485 {
486  typedef typename TensorTools::MakeReal<OutputType>::type OutputShape;
487 
488  // Get local-to-global dof index lookup
489  const unsigned int n_dofs = cast_int<unsigned int>
490  (this->get_dof_indices(var).size());
491 
492  // Get current local coefficients
493  libmesh_assert_greater (this->_elem_subsolutions.size(), var);
494  const DenseSubVector<Number> & coef = this->get_elem_solution(var);
495 
496  // Get finite element object
497  FEGenericBase<OutputShape> * fe = libmesh_nullptr;
498  this->get_element_fe<OutputShape>( var, fe, this->get_elem_dim() );
499 
500  // Get shape function values at quadrature point
501  const std::vector<std::vector<typename FEGenericBase<OutputShape>::OutputShape>> & curl_phi = fe->get_curl_phi();
502 
503  // Accumulate solution curl
504  curl_u = 0.;
505 
506  for (unsigned int l=0; l != n_dofs; l++)
507  curl_u.add_scaled(curl_phi[l][qp], coef(l));
508 
509  return;
510 }
const DenseVector< Number > & get_elem_solution() const
Definition: diff_context.h:111
const std::vector< dof_id_type > & get_dof_indices() const
Definition: diff_context.h:367
const class libmesh_nullptr_t libmesh_nullptr
std::vector< std::unique_ptr< DenseSubVector< Number > > > _elem_subsolutions
Definition: diff_context.h:566
unsigned char get_elem_dim() const
Definition: fem_context.h:906
template<typename OutputType >
template void libMesh::FEMContext::interior_div< Number > ( unsigned int  var,
unsigned int  qp,
OutputType &  div_u 
) const
inherited
Returns
The divergence of the solution variable var at the physical point p on the current element.

Definition at line 514 of file fem_context.C.

References libMesh::DiffContext::_elem_subsolutions, libMesh::DiffContext::get_dof_indices(), libMesh::FEMContext::get_elem_dim(), libMesh::DiffContext::get_elem_solution(), and libmesh_nullptr.

Referenced by libMesh::FEMContext::get_side_fe().

516 {
517  typedef typename
518  TensorTools::IncrementRank
519  <typename TensorTools::MakeReal<OutputType>::type>::type OutputShape;
520 
521  // Get local-to-global dof index lookup
522  const unsigned int n_dofs = cast_int<unsigned int>
523  (this->get_dof_indices(var).size());
524 
525  // Get current local coefficients
526  libmesh_assert_greater (this->_elem_subsolutions.size(), var);
527  const DenseSubVector<Number> & coef = this->get_elem_solution(var);
528 
529  // Get finite element object
530  FEGenericBase<OutputShape> * fe = libmesh_nullptr;
531  this->get_element_fe<OutputShape>( var, fe, this->get_elem_dim() );
532 
533  // Get shape function values at quadrature point
534  const std::vector<std::vector<typename FEGenericBase<OutputShape>::OutputDivergence>> & div_phi = fe->get_div_phi();
535 
536  // Accumulate solution curl
537  div_u = 0.;
538 
539  for (unsigned int l=0; l != n_dofs; l++)
540  div_u += div_phi[l][qp] * coef(l);
541 
542  return;
543 }
const DenseVector< Number > & get_elem_solution() const
Definition: diff_context.h:111
const std::vector< dof_id_type > & get_dof_indices() const
Definition: diff_context.h:367
const class libmesh_nullptr_t libmesh_nullptr
std::vector< std::unique_ptr< DenseSubVector< Number > > > _elem_subsolutions
Definition: diff_context.h:566
unsigned char get_elem_dim() const
Definition: fem_context.h:906
Gradient libMesh::FEMContext::interior_gradient ( unsigned int  var,
unsigned int  qp 
) const
inherited
Returns
The gradient of the solution variable var at the quadrature point qp on the current element interior.
Note
This API is currently present for backward compatibility.

Definition at line 352 of file fem_context.C.

Referenced by libMesh::FEMContext::get_side_fe().

354 {
355  Gradient du;
356 
357  this->interior_gradient( var, qp, du );
358 
359  return du;
360 }
NumberVectorValue Gradient
Gradient interior_gradient(unsigned int var, unsigned int qp) const
Definition: fem_context.C:352
template<typename OutputType >
void libMesh::FEMContext::interior_gradient ( unsigned int  var,
unsigned int  qp,
OutputType &  du 
) const
inherited
Returns
The gradient of the solution variable var at the quadrature point qp on the current element interior.
Note
This is the preferred API.

Definition at line 365 of file fem_context.C.

References libMesh::DiffContext::get_elem_solution(), libMesh::FEMContext::get_element_fe(), and libMesh::FEMContext::some_gradient().

368 {
369  this->some_gradient<OutputType,
370  &FEMContext::get_element_fe<typename TensorTools::MakeReal
371  <typename TensorTools::DecrementRank
372  <OutputType>::type>::type>,
373  &DiffContext::get_elem_solution>(var, qp, du);
374 }
const DenseVector< Number > & get_elem_solution() const
Definition: diff_context.h:111
void get_element_fe(unsigned int var, FEGenericBase< OutputShape > *&fe) const
Definition: fem_context.h:262
void some_gradient(unsigned int var, unsigned int qp, OutputType &u) const
Definition: fem_context.C:234
template<typename OutputType >
template void libMesh::FEMContext::interior_gradients< Tensor > ( unsigned int  var,
const NumericVector< Number > &  _system_vector,
std::vector< OutputType > &  interior_gradients_vector 
) const
inherited

Fills a vector with the gradient of the solution variable var at all the quadrature points in the current element interior.

Note
This is the preferred API.

Definition at line 379 of file fem_context.C.

References libMesh::DiffContext::get_dof_indices(), libMesh::FEMContext::get_elem_dim(), libMesh::DiffContext::get_localized_subvector(), and libmesh_nullptr.

Referenced by libMesh::FEMContext::get_side_fe().

382 {
383  typedef typename TensorTools::MakeReal
385  OutputShape;
386 
387  // Get local-to-global dof index lookup
388  const unsigned int n_dofs = cast_int<unsigned int>
389  (this->get_dof_indices(var).size());
390 
391  // Get current local coefficients
392  const DenseSubVector<Number> & coef = get_localized_subvector(_system_vector, var);
393 
394  // Get finite element object
395  FEGenericBase<OutputShape> * fe = libmesh_nullptr;
396  this->get_element_fe<OutputShape>( var, fe, this->get_elem_dim() );
397 
398  // Get shape function values at quadrature point
399  const std::vector<std::vector<typename FEGenericBase<OutputShape>::OutputGradient>> & dphi = fe->get_dphi();
400 
401  // Loop over all the q_points in this finite element
402  for (std::size_t qp=0; qp != du_vals.size(); qp++)
403  {
404  OutputType & du = du_vals[qp];
405 
406  // Compute the gradient at this q_point
407  du = 0;
408 
409  for (unsigned int l=0; l != n_dofs; l++)
410  du.add_scaled(dphi[l][qp], coef(l));
411  }
412 
413  return;
414 }
const std::vector< dof_id_type > & get_dof_indices() const
Definition: diff_context.h:367
const class libmesh_nullptr_t libmesh_nullptr
DenseSubVector< Number > & get_localized_subvector(const NumericVector< Number > &localized_vector, unsigned int var)
Definition: diff_context.C:148
unsigned char get_elem_dim() const
Definition: fem_context.h:906
Tensor libMesh::FEMContext::interior_hessian ( unsigned int  var,
unsigned int  qp 
) const
inherited
Returns
The hessian of the solution variable var at the quadrature point qp on the current element interior.
Note
This API is currently present for backward compatibility.

Definition at line 417 of file fem_context.C.

Referenced by libMesh::FEMContext::get_side_fe().

418 {
419  Tensor d2u;
420 
421  this->interior_hessian( var, qp, d2u );
422 
423  return d2u;
424 }
Tensor interior_hessian(unsigned int var, unsigned int qp) const
Definition: fem_context.C:417
NumberTensorValue Tensor
template<typename OutputType >
void libMesh::FEMContext::interior_hessian ( unsigned int  var,
unsigned int  qp,
OutputType &  d2u 
) const
inherited
Returns
The hessian of the solution variable var at the quadrature point qp on the current element interior.
Note
This is the preferred API.

Definition at line 427 of file fem_context.C.

References libMesh::DiffContext::get_elem_solution(), libMesh::FEMContext::get_element_fe(), and libMesh::FEMContext::some_hessian().

429 {
430  this->some_hessian<OutputType,
432  <typename TensorTools::MakeReal
433  <typename TensorTools::DecrementRank
434  <typename TensorTools::DecrementRank
435  <OutputType>::type>::type>::type>,
436  &DiffContext::get_elem_solution>(var, qp, d2u);
437 }
const DenseVector< Number > & get_elem_solution() const
Definition: diff_context.h:111
void get_element_fe(unsigned int var, FEGenericBase< OutputShape > *&fe) const
Definition: fem_context.h:262
void some_hessian(unsigned int var, unsigned int qp, OutputType &u) const
Definition: fem_context.C:267
template<typename OutputType >
template void libMesh::FEMContext::interior_hessians< Tensor > ( unsigned int  var,
const NumericVector< Number > &  _system_vector,
std::vector< OutputType > &  d2u_vals 
) const
inherited

Fills a vector of hessians of the _system_vector at the all the quadrature points in the current element interior. This is the preferred API.

Definition at line 441 of file fem_context.C.

References libMesh::DiffContext::get_dof_indices(), libMesh::FEMContext::get_elem_dim(), libMesh::DiffContext::get_localized_subvector(), and libmesh_nullptr.

Referenced by libMesh::FEMContext::get_side_fe().

444 {
445  typedef typename TensorTools::DecrementRank<OutputType>::type Rank1Decrement;
446  typedef typename TensorTools::DecrementRank<Rank1Decrement>::type Rank2Decrement;
447  typedef typename TensorTools::MakeReal<Rank2Decrement>::type OutputShape;
448 
449  // Get local-to-global dof index lookup
450  const unsigned int n_dofs = cast_int<unsigned int>
451  (this->get_dof_indices(var).size());
452 
453  // Get current local coefficients
454  const DenseSubVector<Number> & coef = get_localized_subvector(_system_vector, var);
455 
456  // Get finite element object
457  FEGenericBase<OutputShape> * fe = libmesh_nullptr;
458  this->get_element_fe<OutputShape>( var, fe, this->get_elem_dim() );
459 
460  // Get shape function values at quadrature point
461  const std::vector<std::vector<typename FEGenericBase<OutputShape>::OutputTensor>> & d2phi = fe->get_d2phi();
462 
463  // Loop over all the q_points in this finite element
464  for (std::size_t qp=0; qp != d2u_vals.size(); qp++)
465  {
466  OutputType & d2u = d2u_vals[qp];
467 
468  // Compute the gradient at this q_point
469  d2u = 0;
470 
471  for (unsigned int l=0; l != n_dofs; l++)
472  d2u.add_scaled(d2phi[l][qp], coef(l));
473  }
474 
475  return;
476 }
const std::vector< dof_id_type > & get_dof_indices() const
Definition: diff_context.h:367
const class libmesh_nullptr_t libmesh_nullptr
DenseSubVector< Number > & get_localized_subvector(const NumericVector< Number > &localized_vector, unsigned int var)
Definition: diff_context.C:148
unsigned char get_elem_dim() const
Definition: fem_context.h:906
template<typename OutputType >
template void libMesh::FEMContext::interior_rate< Gradient > ( unsigned int  var,
unsigned int  qp,
OutputType &  u 
) const
inherited
Returns
The time derivative (rate) of the solution variable var at the quadrature point qp on the current element interior.

Definition at line 1244 of file fem_context.C.

References libMesh::DiffContext::get_elem_solution_rate(), libMesh::FEMContext::get_element_fe(), and libMesh::FEMContext::some_value().

Referenced by libMesh::FirstOrderUnsteadySolver::compute_second_order_eqns(), and libMesh::FEMContext::get_side_fe().

1246 {
1247  this->some_value<OutputType,
1251 }
void some_value(unsigned int var, unsigned int qp, OutputType &u) const
Definition: fem_context.C:205
void get_element_fe(unsigned int var, FEGenericBase< OutputShape > *&fe) const
Definition: fem_context.h:262
const DenseVector< Number > & get_elem_solution_rate() const
Definition: diff_context.h:145
Number libMesh::FEMContext::interior_value ( unsigned int  var,
unsigned int  qp 
) const
inherited
Returns
The value of the solution variable var at the quadrature point qp on the current element interior.
Note
This API is currently present for backward compatibility.

Definition at line 297 of file fem_context.C.

Referenced by libMesh::FirstOrderUnsteadySolver::compute_second_order_eqns(), and libMesh::FEMContext::get_side_fe().

298 {
299  Number u;
300 
301  this->interior_value( var, qp, u );
302 
303  return u;
304 }
Number interior_value(unsigned int var, unsigned int qp) const
Definition: fem_context.C:297
template<typename OutputType >
void libMesh::FEMContext::interior_value ( unsigned int  var,
unsigned int  qp,
OutputType &  u 
) const
inherited
Returns
The value of the solution variable var at the quadrature point qp on the current element interior.
Note
This is the preferred API.

Definition at line 307 of file fem_context.C.

References libMesh::DiffContext::get_elem_solution(), and libMesh::FEMContext::some_value().

309 {
310  this->some_value<OutputType,
311  &FEMContext::get_element_fe<typename TensorTools::MakeReal<OutputType>::type>,
312  &DiffContext::get_elem_solution>(var, qp, u);
313 }
const DenseVector< Number > & get_elem_solution() const
Definition: diff_context.h:111
void some_value(unsigned int var, unsigned int qp, OutputType &u) const
Definition: fem_context.C:205
template<typename OutputType >
template void libMesh::FEMContext::interior_values< Gradient > ( unsigned int  var,
const NumericVector< Number > &  _system_vector,
std::vector< OutputType > &  interior_values_vector 
) const
inherited

Fills a vector of values of the _system_vector at the all the quadrature points in the current element interior.

Definition at line 317 of file fem_context.C.

References libMesh::DiffContext::get_dof_indices(), libMesh::FEMContext::get_elem_dim(), libMesh::DiffContext::get_localized_subvector(), and libmesh_nullptr.

Referenced by libMesh::FEMContext::get_side_fe().

320 {
321  typedef typename TensorTools::MakeReal<OutputType>::type OutputShape;
322 
323  // Get local-to-global dof index lookup
324  const unsigned int n_dofs = cast_int<unsigned int>
325  (this->get_dof_indices(var).size());
326 
327  // Get current local coefficients
328  const DenseSubVector<Number> & coef = get_localized_subvector(_system_vector, var);
329 
330  // Get the finite element object
331  FEGenericBase<OutputShape> * fe = libmesh_nullptr;
332  this->get_element_fe<OutputShape>( var, fe, this->get_elem_dim() );
333 
334  // Get shape function values at quadrature point
335  const std::vector<std::vector<OutputShape>> & phi = fe->get_phi();
336 
337  // Loop over all the q_points on this element
338  for (std::size_t qp=0; qp != u_vals.size(); qp++)
339  {
340  OutputType & u = u_vals[qp];
341 
342  // Compute the value at this q_point
343  u = 0.;
344 
345  for (unsigned int l=0; l != n_dofs; l++)
346  u += phi[l][qp] * coef(l);
347  }
348 
349  return;
350 }
const std::vector< dof_id_type > & get_dof_indices() const
Definition: diff_context.h:367
const class libmesh_nullptr_t libmesh_nullptr
DenseSubVector< Number > & get_localized_subvector(const NumericVector< Number > &localized_vector, unsigned int var)
Definition: diff_context.C:148
unsigned char get_elem_dim() const
Definition: fem_context.h:906
bool libMesh::DiffContext::is_adjoint ( ) const
inlineinherited

Accessor for querying whether we need to do a primal or adjoint solve

Definition at line 454 of file diff_context.h.

References libMesh::DiffContext::_is_adjoint.

Referenced by libMesh::FEMSystem::build_context().

455  { return _is_adjoint; }
bool& libMesh::DiffContext::is_adjoint ( )
inlineinherited

Accessor for setting whether we need to do a primal or adjoint solve

Definition at line 461 of file diff_context.h.

References libMesh::DiffContext::_is_adjoint.

462  { return _is_adjoint; }
unsigned int libMesh::DiffContext::n_vars ( ) const
inlineinherited
void libMesh::DGFEMContext::neighbor_side_fe_reinit ( )

Initialize neighbor side data needed to assemble DG terms. The neighbor element is determined by the current value of get_neighbor().

Definition at line 86 of file dg_fem_context.C.

References _dg_terms_active, _elem_elem_jacobian, _elem_elem_subjacobians, _elem_neighbor_jacobian, _elem_neighbor_subjacobians, _neighbor_dof_indices, _neighbor_dof_indices_var, _neighbor_elem_jacobian, _neighbor_elem_subjacobians, _neighbor_neighbor_jacobian, _neighbor_neighbor_subjacobians, _neighbor_residual, _neighbor_side_fe, _neighbor_subresiduals, libMesh::FEMContext::_side_fe, libMesh::DofMap::dof_indices(), libMesh::FEMContext::get_dim(), libMesh::DiffContext::get_dof_indices(), libMesh::System::get_dof_map(), get_neighbor(), libMesh::DiffContext::get_system(), libMesh::FEAbstract::get_xyz(), libMesh::FEInterface::inverse_map(), libMesh::System::n_vars(), libMesh::DenseVector< T >::resize(), and libMesh::DenseMatrix< T >::resize().

87 {
88  // Call this *after* side_fe_reinit
89 
90  // Initialize all the neighbor side FE objects based on inverse mapping
91  // the quadrature points on the current side
92  std::vector<Point> qface_side_points;
93  std::vector<Point> qface_neighbor_points;
94  std::map<FEType, std::unique_ptr<FEAbstract>>::iterator local_fe_end = _neighbor_side_fe.end();
95  for (std::map<FEType, std::unique_ptr<FEAbstract>>::iterator i = _neighbor_side_fe.begin();
96  i != local_fe_end; ++i)
97  {
98  FEType neighbor_side_fe_type = i->first;
99  FEAbstract * side_fe = _side_fe[this->get_dim()][neighbor_side_fe_type].get();
100  qface_side_points = side_fe->get_xyz();
101 
103  neighbor_side_fe_type,
104  &get_neighbor(),
105  qface_side_points,
106  qface_neighbor_points);
107 
108  i->second->reinit(&get_neighbor(), &qface_neighbor_points);
109  }
110 
111  // Set boolean flag to indicate that the DG terms are active on this element
112  _dg_terms_active = true;
113 
114  // Also, initialize data required for DG assembly on the current side,
115  // analogously to FEMContext::pre_fe_reinit
116 
117  // Initialize the per-element data for elem.
119 
120  const unsigned int n_dofs = cast_int<unsigned int>
121  (this->get_dof_indices().size());
122  const unsigned int n_neighbor_dofs = cast_int<unsigned int>
123  (_neighbor_dof_indices.size());
124 
125  // These resize calls also zero out the residual and jacobian
126  _neighbor_residual.resize(n_neighbor_dofs);
127  _elem_elem_jacobian.resize(n_dofs, n_dofs);
128  _elem_neighbor_jacobian.resize(n_dofs, n_neighbor_dofs);
129  _neighbor_elem_jacobian.resize(n_neighbor_dofs, n_dofs);
130  _neighbor_neighbor_jacobian.resize(n_neighbor_dofs, n_neighbor_dofs);
131 
132  // Initialize the per-variable data for elem.
133  {
134  unsigned int sub_dofs = 0;
135  for (unsigned int i=0; i != get_system().n_vars(); ++i)
136  {
138 
139  const unsigned int n_dofs_var = cast_int<unsigned int>
140  (_neighbor_dof_indices_var[i].size());
141 
142  _neighbor_subresiduals[i]->reposition
143  (sub_dofs, n_dofs_var);
144 
145  for (unsigned int j=0; j != i; ++j)
146  {
147  const unsigned int n_dofs_var_j =
148  cast_int<unsigned int>
149  (this->get_dof_indices(j).size());
150 
151  _elem_elem_subjacobians[i][j]->reposition
152  (sub_dofs, _neighbor_subresiduals[j]->i_off(),
153  n_dofs_var, n_dofs_var_j);
154  _elem_elem_subjacobians[j][i]->reposition
155  (_neighbor_subresiduals[j]->i_off(), sub_dofs,
156  n_dofs_var_j, n_dofs_var);
157 
158  _elem_neighbor_subjacobians[i][j]->reposition
159  (sub_dofs, _neighbor_subresiduals[j]->i_off(),
160  n_dofs_var, n_dofs_var_j);
161  _elem_neighbor_subjacobians[j][i]->reposition
162  (_neighbor_subresiduals[j]->i_off(), sub_dofs,
163  n_dofs_var_j, n_dofs_var);
164 
165  _neighbor_elem_subjacobians[i][j]->reposition
166  (sub_dofs, _neighbor_subresiduals[j]->i_off(),
167  n_dofs_var, n_dofs_var_j);
168  _neighbor_elem_subjacobians[j][i]->reposition
169  (_neighbor_subresiduals[j]->i_off(), sub_dofs,
170  n_dofs_var_j, n_dofs_var);
171 
172  _neighbor_neighbor_subjacobians[i][j]->reposition
173  (sub_dofs, _neighbor_subresiduals[j]->i_off(),
174  n_dofs_var, n_dofs_var_j);
175  _neighbor_neighbor_subjacobians[j][i]->reposition
176  (_neighbor_subresiduals[j]->i_off(), sub_dofs,
177  n_dofs_var_j, n_dofs_var);
178  }
179  _elem_elem_subjacobians[i][i]->reposition
180  (sub_dofs, sub_dofs,
181  n_dofs_var,
182  n_dofs_var);
183  _elem_neighbor_subjacobians[i][i]->reposition
184  (sub_dofs, sub_dofs,
185  n_dofs_var,
186  n_dofs_var);
187  _neighbor_elem_subjacobians[i][i]->reposition
188  (sub_dofs, sub_dofs,
189  n_dofs_var,
190  n_dofs_var);
191  _neighbor_neighbor_subjacobians[i][i]->reposition
192  (sub_dofs, sub_dofs,
193  n_dofs_var,
194  n_dofs_var);
195  sub_dofs += n_dofs_var;
196  }
197  libmesh_assert_equal_to (sub_dofs, n_dofs);
198  }
199 
200 }
std::vector< dof_id_type > _neighbor_dof_indices
DenseVector< Number > _neighbor_residual
DenseMatrix< Number > _elem_elem_jacobian
std::vector< std::vector< std::unique_ptr< DenseSubMatrix< Number > > > > _elem_elem_subjacobians
void resize(const unsigned int n)
Definition: dense_vector.h:350
std::vector< std::vector< dof_id_type > > _neighbor_dof_indices_var
const std::vector< dof_id_type > & get_dof_indices() const
Definition: diff_context.h:367
const Elem & get_neighbor() const
unsigned char get_dim() const
Definition: fem_context.h:899
const DofMap & get_dof_map() const
Definition: system.h:2030
DenseMatrix< Number > _neighbor_elem_jacobian
static Point inverse_map(const unsigned int dim, const FEType &fe_t, const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true)
Definition: fe_interface.C:547
DenseMatrix< Number > _elem_neighbor_jacobian
const System & get_system() const
Definition: diff_context.h:105
std::vector< std::vector< std::unique_ptr< DenseSubMatrix< Number > > > > _elem_neighbor_subjacobians
std::vector< std::map< FEType, std::unique_ptr< FEAbstract > > > _side_fe
Definition: fem_context.h:1096
std::vector< std::vector< std::unique_ptr< DenseSubMatrix< Number > > > > _neighbor_elem_subjacobians
DenseMatrix< Number > _neighbor_neighbor_jacobian
void resize(const unsigned int new_m, const unsigned int new_n)
Definition: dense_matrix.h:776
unsigned int n_vars() const
Definition: system.h:2086
std::vector< std::unique_ptr< DenseSubVector< Number > > > _neighbor_subresiduals
std::map< FEType, std::unique_ptr< FEAbstract > > _neighbor_side_fe
std::vector< std::vector< std::unique_ptr< DenseSubMatrix< Number > > > > _neighbor_neighbor_subjacobians
void dof_indices(const Elem *const elem, std::vector< dof_id_type > &di) const
Definition: dof_map.C:1924
void libMesh::FEMContext::nonlocal_reinit ( Real  theta)
virtualinherited

Gives derived classes the opportunity to reinitialize data needed for nonlocal calculations at a new point within a timestep

Reimplemented from libMesh::DiffContext.

Definition at line 1343 of file fem_context.C.

References libMesh::FEMContext::_update_time_from_system(), and libMesh::FEMContext::elem_fe_reinit().

Referenced by libMesh::FEMContext::get_side_fe().

1344 {
1345  // Update the "time" variable of this context object
1346  this->_update_time_from_system(theta);
1347 
1348  // We can reuse the Elem FE safely here.
1349  elem_fe_reinit();
1350 }
void _update_time_from_system(Real theta)
Definition: fem_context.C:1774
virtual void elem_fe_reinit(const std::vector< Point > *const pts=libmesh_nullptr)
Definition: fem_context.C:1353
template<typename OutputType >
void libMesh::FEMContext::point_accel ( unsigned int  var,
const Point p,
OutputType &  u 
) const
inherited
Returns
The second time derivative (acceleration) of the solution variable var at the physical point p on the current element.

Referenced by libMesh::FEMContext::get_side_fe().

template<typename OutputType >
template void libMesh::FEMContext::point_curl< Gradient > ( unsigned int  var,
const Point p,
OutputType &  curl_u,
const Real  tolerance = TOLERANCE 
) const
inherited
Returns
The curl of the solution variable var at the physical point p on the current element.

Allows evaluation of points within a relative tolerance outside the element.

Definition at line 908 of file fem_context.C.

References libMesh::DiffContext::_elem_subsolutions, libMesh::FEMContext::build_new_fe(), libMesh::DiffContext::get_dof_indices(), libMesh::FEMContext::get_elem_dim(), libMesh::DiffContext::get_elem_solution(), and libmesh_nullptr.

Referenced by libMesh::FEMContext::get_side_fe().

912 {
913  typedef typename TensorTools::MakeReal<OutputType>::type OutputShape;
914 
915  // Get local-to-global dof index lookup
916  const unsigned int n_dofs = cast_int<unsigned int>
917  (this->get_dof_indices(var).size());
918 
919  // Get current local coefficients
920  libmesh_assert_greater (this->_elem_subsolutions.size(), var);
921  const DenseSubVector<Number> & coef = this->get_elem_solution(var);
922 
923  // Get finite element object
924  FEGenericBase<OutputShape> * fe = libmesh_nullptr;
925  this->get_element_fe<OutputShape>( var, fe, this->get_elem_dim() );
926 
927  // Build a FE for calculating u(p)
928  FEGenericBase<OutputShape> * fe_new =
929  this->build_new_fe( fe, p, tolerance );
930 
931  // Get the values of the shape function derivatives
932  const std::vector<std::vector<typename FEGenericBase<OutputShape>::OutputShape>> & curl_phi = fe_new->get_curl_phi();
933 
934  curl_u = 0.0;
935 
936  for (unsigned int l=0; l != n_dofs; l++)
937  curl_u.add_scaled(curl_phi[l][0], coef(l));
938 
939  return;
940 }
const DenseVector< Number > & get_elem_solution() const
Definition: diff_context.h:111
const std::vector< dof_id_type > & get_dof_indices() const
Definition: diff_context.h:367
const class libmesh_nullptr_t libmesh_nullptr
std::vector< std::unique_ptr< DenseSubVector< Number > > > _elem_subsolutions
Definition: diff_context.h:566
FEGenericBase< OutputShape > * build_new_fe(const FEGenericBase< OutputShape > *fe, const Point &p, const Real tolerance=TOLERANCE) const
Definition: fem_context.C:1862
unsigned char get_elem_dim() const
Definition: fem_context.h:906
Gradient libMesh::FEMContext::point_gradient ( unsigned int  var,
const Point p 
) const
inherited
Returns
The gradient of the solution variable var at the physical point p on the current element.
Note
This API is currently present for backward compatibility.

Definition at line 805 of file fem_context.C.

Referenced by libMesh::ParsedFEMFunction< Output >::eval_args(), and libMesh::FEMContext::get_side_fe().

806 {
807  Gradient grad_u;
808 
809  this->point_gradient( var, p, grad_u );
810 
811  return grad_u;
812 }
NumberVectorValue Gradient
Gradient point_gradient(unsigned int var, const Point &p) const
Definition: fem_context.C:805
template<typename OutputType >
void libMesh::FEMContext::point_gradient ( unsigned int  var,
const Point p,
OutputType &  grad_u,
const Real  tolerance = TOLERANCE 
) const
inherited
Returns
The gradient of the solution variable var at the physical point p on the current element.
Note
This is the preferred API.

Allows evaluation of points within a relative tolerance outside the element.

Definition at line 817 of file fem_context.C.

References libMesh::DiffContext::_elem_subsolutions, libMesh::FEMContext::build_new_fe(), libMesh::DiffContext::get_dof_indices(), libMesh::FEMContext::get_elem_dim(), libMesh::DiffContext::get_elem_solution(), and libmesh_nullptr.

821 {
822  typedef typename TensorTools::MakeReal
824  OutputShape;
825 
826  // Get local-to-global dof index lookup
827  const unsigned int n_dofs = cast_int<unsigned int>
828  (this->get_dof_indices(var).size());
829 
830  // Get current local coefficients
831  libmesh_assert_greater (this->_elem_subsolutions.size(), var);
832  const DenseSubVector<Number> & coef = this->get_elem_solution(var);
833 
834  // Get finite element object
835  FEGenericBase<OutputShape> * fe = libmesh_nullptr;
836  this->get_element_fe<OutputShape>( var, fe, this->get_elem_dim() );
837 
838  // Build a FE for calculating u(p)
839  FEGenericBase<OutputShape> * fe_new =
840  this->build_new_fe( fe, p, tolerance );
841 
842  // Get the values of the shape function derivatives
843  const std::vector<std::vector<typename FEGenericBase<OutputShape>::OutputGradient>> & dphi = fe_new->get_dphi();
844 
845  grad_u = 0.0;
846 
847  for (unsigned int l=0; l != n_dofs; l++)
848  grad_u.add_scaled(dphi[l][0], coef(l));
849 
850  return;
851 }
const DenseVector< Number > & get_elem_solution() const
Definition: diff_context.h:111
const std::vector< dof_id_type > & get_dof_indices() const
Definition: diff_context.h:367
const class libmesh_nullptr_t libmesh_nullptr
std::vector< std::unique_ptr< DenseSubVector< Number > > > _elem_subsolutions
Definition: diff_context.h:566
FEGenericBase< OutputShape > * build_new_fe(const FEGenericBase< OutputShape > *fe, const Point &p, const Real tolerance=TOLERANCE) const
Definition: fem_context.C:1862
unsigned char get_elem_dim() const
Definition: fem_context.h:906
Tensor libMesh::FEMContext::point_hessian ( unsigned int  var,
const Point p 
) const
inherited
Returns
The hessian of the solution variable var at the physical point p on the current element.
Note
This API currently present for backward compatibility.

Definition at line 857 of file fem_context.C.

Referenced by libMesh::ParsedFEMFunction< Output >::eval_args(), and libMesh::FEMContext::get_side_fe().

858 {
859  Tensor hess_u;
860 
861  this->point_hessian( var, p, hess_u );
862 
863  return hess_u;
864 }
Tensor point_hessian(unsigned int var, const Point &p) const
Definition: fem_context.C:857
NumberTensorValue Tensor
template<typename OutputType >
void libMesh::FEMContext::point_hessian ( unsigned int  var,
const Point p,
OutputType &  hess_u,
const Real  tolerance = TOLERANCE 
) const
inherited
Returns
The hessian of the solution variable var at the physical point p on the current element.
Note
This is the preferred API.

Allows evaluation of points within a relative tolerance outside the element.

Definition at line 868 of file fem_context.C.

References libMesh::DiffContext::_elem_subsolutions, libMesh::FEMContext::build_new_fe(), libMesh::DiffContext::get_dof_indices(), libMesh::FEMContext::get_elem_dim(), libMesh::DiffContext::get_elem_solution(), and libmesh_nullptr.

872 {
873  typedef typename TensorTools::DecrementRank<OutputType>::type Rank1Decrement;
874  typedef typename TensorTools::DecrementRank<Rank1Decrement>::type Rank2Decrement;
875  typedef typename TensorTools::MakeReal<Rank2Decrement>::type OutputShape;
876 
877  // Get local-to-global dof index lookup
878  const unsigned int n_dofs = cast_int<unsigned int>
879  (this->get_dof_indices(var).size());
880 
881  // Get current local coefficients
882  libmesh_assert_greater (this->_elem_subsolutions.size(), var);
883  const DenseSubVector<Number> & coef = this->get_elem_solution(var);
884 
885  // Get finite element object
886  FEGenericBase<OutputShape> * fe = libmesh_nullptr;
887  this->get_element_fe<OutputShape>( var, fe, this->get_elem_dim() );
888 
889  // Build a FE for calculating u(p)
890  FEGenericBase<OutputShape> * fe_new =
891  this->build_new_fe( fe, p, tolerance );
892 
893  // Get the values of the shape function derivatives
894  const std::vector<std::vector<typename FEGenericBase<OutputShape>::OutputTensor>> & d2phi = fe_new->get_d2phi();
895 
896  hess_u = 0.0;
897 
898  for (unsigned int l=0; l != n_dofs; l++)
899  hess_u.add_scaled(d2phi[l][0], coef(l));
900 
901  return;
902 }
const DenseVector< Number > & get_elem_solution() const
Definition: diff_context.h:111
const std::vector< dof_id_type > & get_dof_indices() const
Definition: diff_context.h:367
const class libmesh_nullptr_t libmesh_nullptr
std::vector< std::unique_ptr< DenseSubVector< Number > > > _elem_subsolutions
Definition: diff_context.h:566
FEGenericBase< OutputShape > * build_new_fe(const FEGenericBase< OutputShape > *fe, const Point &p, const Real tolerance=TOLERANCE) const
Definition: fem_context.C:1862
unsigned char get_elem_dim() const
Definition: fem_context.h:906
template<typename OutputType >
void libMesh::FEMContext::point_rate ( unsigned int  var,
const Point p,
OutputType &  u 
) const
inherited
Returns
The time derivative (rate) of the solution variable var at the physical point p on the current element.

Referenced by libMesh::FEMContext::get_side_fe().

Number libMesh::FEMContext::point_value ( unsigned int  var,
const Point p 
) const
inherited
Returns
The value of the solution variable var at the physical point p on the current element.
Note
This API is currently present for backward compatibility.

Definition at line 759 of file fem_context.C.

Referenced by libMesh::ParsedFEMFunction< Output >::eval_args(), and libMesh::FEMContext::get_side_fe().

760 {
761  Number u = 0.;
762 
763  this->point_value( var, p, u );
764 
765  return u;
766 }
Number point_value(unsigned int var, const Point &p) const
Definition: fem_context.C:759
template<typename OutputType >
void libMesh::FEMContext::point_value ( unsigned int  var,
const Point p,
OutputType &  u,
const Real  tolerance = TOLERANCE 
) const
inherited
Returns
The value of the solution variable var at the physical point p on the current element.
Note
This is the preferred API.

Allows evaluation of points within a relative tolerance outside the element.

Definition at line 769 of file fem_context.C.

References libMesh::DiffContext::_elem_subsolutions, libMesh::FEMContext::build_new_fe(), libMesh::DiffContext::get_dof_indices(), libMesh::FEMContext::get_elem_dim(), libMesh::DiffContext::get_elem_solution(), and libmesh_nullptr.

773 {
774  typedef typename TensorTools::MakeReal<OutputType>::type OutputShape;
775 
776  // Get local-to-global dof index lookup
777  const unsigned int n_dofs = cast_int<unsigned int>
778  (this->get_dof_indices(var).size());
779 
780  // Get current local coefficients
781  libmesh_assert_greater (this->_elem_subsolutions.size(), var);
782  const DenseSubVector<Number> & coef = this->get_elem_solution(var);
783 
784  // Get finite element object
785  FEGenericBase<OutputShape> * fe = libmesh_nullptr;
786  this->get_element_fe<OutputShape>( var, fe, this->get_elem_dim() );
787 
788  // Build a FE for calculating u(p)
789  FEGenericBase<OutputShape> * fe_new =
790  this->build_new_fe( fe, p, tolerance );
791 
792  // Get the values of the shape function derivatives
793  const std::vector<std::vector<OutputShape>> & phi = fe_new->get_phi();
794 
795  u = 0.;
796 
797  for (unsigned int l=0; l != n_dofs; l++)
798  u += phi[l][0] * coef(l);
799 
800  return;
801 }
const DenseVector< Number > & get_elem_solution() const
Definition: diff_context.h:111
const std::vector< dof_id_type > & get_dof_indices() const
Definition: diff_context.h:367
const class libmesh_nullptr_t libmesh_nullptr
std::vector< std::unique_ptr< DenseSubVector< Number > > > _elem_subsolutions
Definition: diff_context.h:566
FEGenericBase< OutputShape > * build_new_fe(const FEGenericBase< OutputShape > *fe, const Point &p, const Real tolerance=TOLERANCE) const
Definition: fem_context.C:1862
unsigned char get_elem_dim() const
Definition: fem_context.h:906
void libMesh::FEMContext::pre_fe_reinit ( const System sys,
const Elem e 
)
virtualinherited

Reinitializes local data vectors/matrices on the current geometric element

Definition at line 1553 of file fem_context.C.

References libMesh::FEMContext::_custom_solution, libMesh::DiffContext::_elem_qoi_subderivatives, libMesh::DiffContext::_localized_vectors, libMesh::FEMContext::algebraic_type(), libMesh::FEMContext::CURRENT, libMesh::System::current_local_solution, libMesh::DofMap::dof_indices(), libMesh::FEMContext::DOFS_ONLY, libMesh::NumericVector< T >::get(), libMesh::DiffContext::get_dof_indices(), libMesh::System::get_dof_map(), libMesh::FEMContext::get_elem(), libMesh::DiffContext::get_elem_fixed_solution(), libMesh::DiffContext::get_elem_jacobian(), libMesh::DiffContext::get_elem_residual(), libMesh::DiffContext::get_elem_solution(), libMesh::DiffContext::get_elem_solution_accel(), libMesh::DiffContext::get_elem_solution_rate(), libMesh::DiffContext::get_qoi_derivatives(), libMesh::DifferentiablePhysics::get_second_order_vars(), libMesh::DifferentiableSystem::get_time_solver(), libMesh::DenseVector< T >::get_values(), libMesh::FEMContext::has_elem(), libMesh::TimeSolver::is_steady(), libmesh_nullptr, libMesh::System::n_vars(), libMesh::FEMContext::NONE, libMesh::FEMContext::OLD, libMesh::DofMap::old_dof_indices(), libMesh::FEMContext::OLD_DOFS_ONLY, libMesh::System::qoi, libMesh::DenseVector< T >::resize(), libMesh::DenseMatrix< T >::resize(), libMesh::FEMContext::set_elem(), libMesh::UnsteadySolver::time_order(), and libMesh::System::use_fixed_solution.

Referenced by libMesh::FEMSystem::assembly(), libMesh::FEMContext::get_side_fe(), libMesh::FEMSystem::mesh_position_get(), libMesh::FEMSystem::mesh_position_set(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::operator()(), libMesh::WeightedPatchRecoveryErrorEstimator::EstimateError::operator()(), and libMesh::System::project_vector().

1554 {
1555  this->set_elem(e);
1556 
1557  if (algebraic_type() == CURRENT ||
1559  {
1560  // Initialize the per-element data for elem.
1561  if (this->has_elem())
1562  sys.get_dof_map().dof_indices (&(this->get_elem()), this->get_dof_indices());
1563  else
1564  // If !this->has_elem(), then we assume we are dealing with a SCALAR variable
1565  sys.get_dof_map().dof_indices
1566  (static_cast<Elem*>(libmesh_nullptr), this->get_dof_indices());
1567  }
1568 #ifdef LIBMESH_ENABLE_AMR
1569  else if (algebraic_type() == OLD ||
1571  {
1572  // Initialize the per-element data for elem.
1573  if (this->has_elem())
1574  sys.get_dof_map().old_dof_indices (&(this->get_elem()), this->get_dof_indices());
1575  else
1576  // If !this->has_elem(), then we assume we are dealing with a SCALAR variable
1577  sys.get_dof_map().old_dof_indices
1578  (static_cast<Elem*>(libmesh_nullptr), this->get_dof_indices());
1579  }
1580 #endif // LIBMESH_ENABLE_AMR
1581 
1582  const unsigned int n_dofs = cast_int<unsigned int>
1583  (this->get_dof_indices().size());
1584  const std::size_t n_qoi = sys.qoi.size();
1585 
1586  if (this->algebraic_type() != NONE &&
1587  this->algebraic_type() != DOFS_ONLY &&
1588  this->algebraic_type() != OLD_DOFS_ONLY)
1589  {
1590  // This also resizes elem_solution
1592  sys.current_local_solution->get(this->get_dof_indices(), this->get_elem_solution().get_values());
1593  else
1594  _custom_solution->get(this->get_dof_indices(), this->get_elem_solution().get_values());
1595 
1596  if (sys.use_fixed_solution)
1597  this->get_elem_fixed_solution().resize(n_dofs);
1598 
1599  // Only make space for these if we're using DiffSystem
1600  // This is assuming *only* DiffSystem is using elem_solution_rate/accel
1601  const DifferentiableSystem * diff_system = dynamic_cast<const DifferentiableSystem *>(&sys);
1602  if (diff_system)
1603  {
1604  // Now, we only need these if the solver is unsteady
1605  if (!diff_system->get_time_solver().is_steady())
1606  {
1607  this->get_elem_solution_rate().resize(n_dofs);
1608 
1609  // We only need accel space if the TimeSolver is second order
1610  const UnsteadySolver & time_solver = cast_ref<const UnsteadySolver &>(diff_system->get_time_solver());
1611 
1612  if (time_solver.time_order() >= 2 || !diff_system->get_second_order_vars().empty())
1613  this->get_elem_solution_accel().resize(n_dofs);
1614  }
1615  }
1616 
1617  if (algebraic_type() != OLD)
1618  {
1619  // These resize calls also zero out the residual and jacobian
1620  this->get_elem_residual().resize(n_dofs);
1621  this->get_elem_jacobian().resize(n_dofs, n_dofs);
1622 
1623  this->get_qoi_derivatives().resize(n_qoi);
1624  this->_elem_qoi_subderivatives.resize(n_qoi);
1625  for (std::size_t q=0; q != n_qoi; ++q)
1626  (this->get_qoi_derivatives())[q].resize(n_dofs);
1627  }
1628  }
1629 
1630  // Initialize the per-variable data for elem.
1631  {
1632  unsigned int sub_dofs = 0;
1633  for (unsigned int i=0; i != sys.n_vars(); ++i)
1634  {
1635  if (algebraic_type() == CURRENT ||
1637  {
1638  if (this->has_elem())
1639  sys.get_dof_map().dof_indices (&(this->get_elem()), this->get_dof_indices(i), i);
1640  else
1641  // If !this->has_elem(), then we assume we are dealing with a SCALAR variable
1642  sys.get_dof_map().dof_indices
1643  (static_cast<Elem*>(libmesh_nullptr), this->get_dof_indices(i), i);
1644  }
1645 #ifdef LIBMESH_ENABLE_AMR
1646  else if (algebraic_type() == OLD ||
1648  {
1649  if (this->has_elem())
1650  sys.get_dof_map().old_dof_indices (&(this->get_elem()), this->get_dof_indices(i), i);
1651  else
1652  // If !this->has_elem(), then we assume we are dealing with a SCALAR variable
1653  sys.get_dof_map().old_dof_indices
1654  (static_cast<Elem*>(libmesh_nullptr), this->get_dof_indices(i), i);
1655  }
1656 #endif // LIBMESH_ENABLE_AMR
1657 
1658  if (this->algebraic_type() != NONE &&
1659  this->algebraic_type() != DOFS_ONLY &&
1660  this->algebraic_type() != OLD_DOFS_ONLY)
1661  {
1662  const unsigned int n_dofs_var = cast_int<unsigned int>
1663  (this->get_dof_indices(i).size());
1664 
1665  this->get_elem_solution(i).reposition
1666  (sub_dofs, n_dofs_var);
1667 
1668  // Only make space for these if we're using DiffSystem
1669  // This is assuming *only* DiffSystem is using elem_solution_rate/accel
1670  const DifferentiableSystem * diff_system = dynamic_cast<const DifferentiableSystem *>(&sys);
1671  if (diff_system)
1672  {
1673  // Now, we only need these if the solver is unsteady
1674  if (!diff_system->get_time_solver().is_steady())
1675  {
1676  this->get_elem_solution_rate(i).reposition
1677  (sub_dofs, n_dofs_var);
1678 
1679  // We only need accel space if the TimeSolver is second order
1680  const UnsteadySolver & time_solver = cast_ref<const UnsteadySolver &>(diff_system->get_time_solver());
1681 
1682  if (time_solver.time_order() >= 2 || !diff_system->get_second_order_vars().empty())
1683  this->get_elem_solution_accel(i).reposition
1684  (sub_dofs, n_dofs_var);
1685  }
1686  }
1687 
1688  if (sys.use_fixed_solution)
1689  this->get_elem_fixed_solution(i).reposition
1690  (sub_dofs, n_dofs_var);
1691 
1692  if (algebraic_type() != OLD)
1693  {
1694  this->get_elem_residual(i).reposition
1695  (sub_dofs, n_dofs_var);
1696 
1697  for (std::size_t q=0; q != n_qoi; ++q)
1698  this->get_qoi_derivatives(q,i).reposition
1699  (sub_dofs, n_dofs_var);
1700 
1701  for (unsigned int j=0; j != i; ++j)
1702  {
1703  const unsigned int n_dofs_var_j =
1704  cast_int<unsigned int>
1705  (this->get_dof_indices(j).size());
1706 
1707  this->get_elem_jacobian(i,j).reposition
1708  (sub_dofs, this->get_elem_residual(j).i_off(),
1709  n_dofs_var, n_dofs_var_j);
1710  this->get_elem_jacobian(j,i).reposition
1711  (this->get_elem_residual(j).i_off(), sub_dofs,
1712  n_dofs_var_j, n_dofs_var);
1713  }
1714  this->get_elem_jacobian(i,i).reposition
1715  (sub_dofs, sub_dofs,
1716  n_dofs_var,
1717  n_dofs_var);
1718  }
1719 
1720  sub_dofs += n_dofs_var;
1721  }
1722  }
1723 
1724  if (this->algebraic_type() != NONE &&
1725  this->algebraic_type() != DOFS_ONLY &&
1726  this->algebraic_type() != OLD &&
1727  this->algebraic_type() != OLD_DOFS_ONLY)
1728  libmesh_assert_equal_to (sub_dofs, n_dofs);
1729  }
1730 
1731  // Now do the localization for the user requested vectors
1732  if (this->algebraic_type() != NONE &&
1733  this->algebraic_type() != DOFS_ONLY &&
1734  this->algebraic_type() != OLD_DOFS_ONLY)
1735  {
1736  DiffContext::localized_vectors_iterator localized_vec_it = this->_localized_vectors.begin();
1737  const DiffContext::localized_vectors_iterator localized_vec_end = this->_localized_vectors.end();
1738 
1739  for (; localized_vec_it != localized_vec_end; ++localized_vec_it)
1740  {
1741  const NumericVector<Number> & current_localized_vector = *localized_vec_it->first;
1742  DenseVector<Number> & target_vector = localized_vec_it->second.first;
1743 
1744  current_localized_vector.get(this->get_dof_indices(), target_vector.get_values());
1745 
1746  // Initialize the per-variable data for elem.
1747  unsigned int sub_dofs = 0;
1748  for (unsigned int i=0; i != sys.n_vars(); ++i)
1749  {
1750  const unsigned int n_dofs_var = cast_int<unsigned int>
1751  (this->get_dof_indices(i).size());
1752 
1753  // This is redundant with earlier initialization, isn't it? - RHS
1754  // sys.get_dof_map().dof_indices (&(this->get_elem()), this->get_dof_indices(i), i);
1755 
1756  localized_vec_it->second.second[i]->reposition
1757  (sub_dofs, n_dofs_var);
1758 
1759  sub_dofs += n_dofs_var;
1760  }
1761  libmesh_assert_equal_to (sub_dofs, n_dofs);
1762  }
1763  }
1764 }
const DenseVector< Number > & get_elem_solution() const
Definition: diff_context.h:111
const NumericVector< Number > * _custom_solution
Definition: fem_context.h:1004
void set_elem(const Elem *e)
Definition: fem_context.C:1766
bool has_elem() const
Definition: fem_context.h:865
const DenseVector< Number > & get_elem_solution_accel() const
Definition: diff_context.h:180
void resize(const unsigned int n)
Definition: dense_vector.h:350
const std::vector< dof_id_type > & get_dof_indices() const
Definition: diff_context.h:367
const DenseVector< Number > & get_elem_fixed_solution() const
Definition: diff_context.h:215
std::vector< std::vector< std::unique_ptr< DenseSubVector< Number > > > > _elem_qoi_subderivatives
Definition: diff_context.h:610
const class libmesh_nullptr_t libmesh_nullptr
const DenseVector< Number > & get_elem_residual() const
Definition: diff_context.h:249
const Elem & get_elem() const
Definition: fem_context.h:871
const DenseMatrix< Number > & get_elem_jacobian() const
Definition: diff_context.h:283
std::map< const NumericVector< Number > *, std::pair< DenseVector< Number >, std::vector< std::unique_ptr< DenseSubVector< Number > > > > > _localized_vectors
Definition: diff_context.h:559
const std::vector< DenseVector< Number > > & get_qoi_derivatives() const
Definition: diff_context.h:331
const DenseVector< Number > & get_elem_solution_rate() const
Definition: diff_context.h:145
AlgebraicType algebraic_type() const
Definition: fem_context.h:954
virtual void get(const std::vector< numeric_index_type > &index, T *values) const
void resize(const unsigned int new_m, const unsigned int new_n)
Definition: dense_matrix.h:776
std::map< const NumericVector< Number > *, std::pair< DenseVector< Number >, std::vector< std::unique_ptr< DenseSubVector< Number > > > > >::iterator localized_vectors_iterator
Definition: diff_context.h:528
void libMesh::FEMContext::set_algebraic_type ( const AlgebraicType  atype)
inlineinherited

Setting which determines whether to initialize algebraic structures (elem_*) on each element and set their values from current_local_solution. Algebraic initialization may be disabled for efficiency in cases where FEMContext is only used as a convenient container of FE objects.

Definition at line 948 of file fem_context.h.

References libMesh::FEMContext::_atype.

Referenced by libMesh::OldSolutionBase< Output, point_output >::init_context().

949  { _atype = atype; }
AlgebraicType _atype
Definition: fem_context.h:999
void libMesh::FEMContext::set_custom_solution ( const NumericVector< Number > *  custom_sol)
inlineinherited

Set a NumericVector to be used in place of current_local_solution for calculating elem_solution. Set to NULL to restore the current_local_solution behavior. Advanced DifferentiableSystem specific capabilities will only be enabled in the current_local_solution case.

Definition at line 963 of file fem_context.h.

References libMesh::FEMContext::_custom_solution.

964  { _custom_solution = custom_sol; }
const NumericVector< Number > * _custom_solution
Definition: fem_context.h:1004
void libMesh::DiffContext::set_deltat_pointer ( Real dt)
inherited

Points the _deltat member of this class at a timestep value stored in the creating System, for example DiffSystem::deltat

Definition at line 103 of file diff_context.C.

References libMesh::DiffContext::_deltat.

Referenced by libMesh::FEMSystem::build_context(), libMesh::DifferentiableSystem::build_context(), and libMesh::FEMSystem::init_context().

104 {
105  // We may actually want to be able to set this pointer to NULL, so
106  // don't report an error for that.
107  _deltat = dt;
108 }
void libMesh::FEMContext::set_elem ( const Elem e)
protectedinherited

Helper function to promote accessor usage

Definition at line 1766 of file fem_context.C.

References libMesh::FEMContext::_elem, libMesh::FEMContext::_elem_dim, and libMesh::Elem::dim().

Referenced by libMesh::FEMContext::pre_fe_reinit().

1767 {
1768  this->_elem = e;
1769 
1770  // If e is NULL, we assume it's SCALAR and set _elem_dim to 0.
1771  this->_elem_dim = this->_elem ? this->_elem->dim() : 0;
1772 }
unsigned char _elem_dim
Definition: fem_context.h:1129
virtual unsigned int dim() const =0
const Elem * _elem
Definition: fem_context.h:1119
virtual void libMesh::FEMContext::set_mesh_system ( System sys)
inlinevirtualinherited

Tells the FEMContext that system sys contains the isoparametric Lagrangian variables which correspond to the coordinates of mesh nodes, in problems where the mesh itself is expected to move in time.

This should be set automatically if the FEMPhysics requires it.

Definition at line 805 of file fem_context.h.

References libMesh::FEMContext::_mesh_sys.

Referenced by libMesh::FEMSystem::build_context().

806  { this->_mesh_sys = sys; }
void libMesh::FEMContext::set_mesh_x_var ( unsigned int  x_var)
inlineinherited

Accessor for x-variable of moving mesh System

This should be set automatically if the FEMPhysics requires it.

Definition at line 831 of file fem_context.h.

References libMesh::FEMContext::_mesh_x_var.

Referenced by libMesh::FEMSystem::build_context().

832  { _mesh_x_var = x_var; }
unsigned int _mesh_x_var
Definition: fem_context.h:974
void libMesh::FEMContext::set_mesh_y_var ( unsigned int  y_var)
inlineinherited

Accessor for y-variable of moving mesh System

This should be set automatically if the FEMPhysics requires it.

Definition at line 845 of file fem_context.h.

References libMesh::FEMContext::_mesh_y_var.

Referenced by libMesh::FEMSystem::build_context().

846  { _mesh_y_var = y_var; }
unsigned int _mesh_y_var
Definition: fem_context.h:974
void libMesh::FEMContext::set_mesh_z_var ( unsigned int  z_var)
inlineinherited

Accessor for z-variable of moving mesh System

This should be set automatically if the FEMPhysics requires it.

Definition at line 859 of file fem_context.h.

References libMesh::FEMContext::_mesh_z_var.

Referenced by libMesh::FEMSystem::build_context().

860  { _mesh_z_var = z_var; }
unsigned int _mesh_z_var
Definition: fem_context.h:974
void libMesh::DGFEMContext::set_neighbor ( const Elem neighbor)
inline

Set the neighbor element which we will use to assemble DG terms.

Note
We do not assume that this element is get_elem().neighbor(side) because we also need to be able to handle the special case of DG terms on "cracks" in a mesh to model certain types of interface conditions. In this case, we need to be able to specify the neighbor element manually. Also, this should give us more flexibility to handle non-conforming meshes.

Definition at line 220 of file dg_fem_context.h.

References _neighbor.

221  { _neighbor = &neighbor; }
void libMesh::DiffContext::set_time ( Real  time_in)
inlineinherited

Set the time for which the current nonlinear_solution is defined.

Definition at line 411 of file diff_context.h.

References libMesh::DiffContext::time.

Referenced by libMesh::FEMContext::_update_time_from_system().

412  { time = time_in; }
template<typename OutputType >
template void libMesh::FEMContext::side_accel< Gradient > ( unsigned int  var,
unsigned int  qp,
OutputType &  u 
) const
inherited
Returns
The second time derivative (acceleration) of the solution variable var at the quadrature point qp on the current element side.

Definition at line 1278 of file fem_context.C.

References libMesh::DiffContext::get_elem_solution_accel(), libMesh::FEMContext::get_side_fe(), and libMesh::FEMContext::some_value().

Referenced by libMesh::FEMContext::get_side_fe().

1280 {
1281  this->some_value<OutputType,
1285 }
const DenseVector< Number > & get_elem_solution_accel() const
Definition: diff_context.h:180
void some_value(unsigned int var, unsigned int qp, OutputType &u) const
Definition: fem_context.C:205
void get_side_fe(unsigned int var, FEGenericBase< OutputShape > *&fe) const
Definition: fem_context.h:299
std::vector< boundary_id_type > libMesh::FEMContext::side_boundary_ids ( ) const
inherited

Lists the boundary ids found on the current side

Deprecated:
Instead, use the version that takes a reference to a std::set.

Definition at line 187 of file fem_context.C.

References libMesh::FEMContext::_boundary_info, libMesh::BoundaryInfo::boundary_ids(), libMesh::FEMContext::get_elem(), and libMesh::FEMContext::side.

188 {
189  libmesh_deprecated();
190  return _boundary_info.boundary_ids(&(this->get_elem()), side);
191 }
const Elem & get_elem() const
Definition: fem_context.h:871
std::vector< boundary_id_type > boundary_ids(const Node *node) const
const BoundaryInfo & _boundary_info
Definition: fem_context.h:1114
unsigned char side
Definition: fem_context.h:979
void libMesh::FEMContext::side_boundary_ids ( std::vector< boundary_id_type > &  vec_to_fill) const
inherited

As above, but fills in the std::set provided by the user.

Definition at line 195 of file fem_context.C.

References libMesh::FEMContext::_boundary_info, libMesh::BoundaryInfo::boundary_ids(), libMesh::FEMContext::get_elem(), and libMesh::FEMContext::side.

196 {
197  _boundary_info.boundary_ids(&(this->get_elem()), side, vec_to_fill);
198 }
const Elem & get_elem() const
Definition: fem_context.h:871
std::vector< boundary_id_type > boundary_ids(const Node *node) const
const BoundaryInfo & _boundary_info
Definition: fem_context.h:1114
unsigned char side
Definition: fem_context.h:979
void libMesh::DGFEMContext::side_fe_reinit ( )
virtual

Override side_fe_reinit to set a boolean flag so that by default DG terms are assumed to be inactive. DG terms are only active if neighbor_side_fe_reinit is called.

Reimplemented from libMesh::FEMContext.

Definition at line 77 of file dg_fem_context.C.

References _dg_terms_active, and libMesh::FEMContext::side_fe_reinit().

78 {
80 
81  // By default we assume that the DG terms are inactive
82  // They are only active if neighbor_side_fe_reinit is called
83  _dg_terms_active = false;
84 }
virtual void side_fe_reinit()
Definition: fem_context.C:1376
Gradient libMesh::FEMContext::side_gradient ( unsigned int  var,
unsigned int  qp 
) const
inherited
Returns
The gradient of the solution variable var at the quadrature point qp on the current element side.
Note
This API is currently present for backward compatibility.

Definition at line 604 of file fem_context.C.

Referenced by libMesh::FEMContext::get_side_fe().

605 {
606  Gradient du;
607 
608  this->side_gradient( var, qp, du );
609 
610  return du;
611 }
NumberVectorValue Gradient
Gradient side_gradient(unsigned int var, unsigned int qp) const
Definition: fem_context.C:604
template<typename OutputType >
void libMesh::FEMContext::side_gradient ( unsigned int  var,
unsigned int  qp,
OutputType &  du 
) const
inherited
Returns
The gradient of the solution variable var at the quadrature point qp on the current element side.
Note
This is the preferred API.

Definition at line 615 of file fem_context.C.

References libMesh::DiffContext::_elem_subsolutions, libMesh::DiffContext::get_dof_indices(), libMesh::FEMContext::get_elem_dim(), libMesh::DiffContext::get_elem_solution(), and libmesh_nullptr.

617 {
618  typedef typename TensorTools::MakeReal
620  OutputShape;
621 
622  // Get local-to-global dof index lookup
623  const unsigned int n_dofs = cast_int<unsigned int>
624  (this->get_dof_indices(var).size());
625 
626  // Get current local coefficients
627  libmesh_assert_greater (this->_elem_subsolutions.size(), var);
628  const DenseSubVector<Number> & coef = this->get_elem_solution(var);
629 
630  // Get finite element object
631  FEGenericBase<OutputShape> * the_side_fe = libmesh_nullptr;
632  this->get_side_fe<OutputShape>( var, the_side_fe, this->get_elem_dim() );
633 
634  // Get shape function values at quadrature point
635  const std::vector<std::vector<typename FEGenericBase<OutputShape>::OutputGradient>> & dphi = the_side_fe->get_dphi();
636 
637  // Accumulate solution derivatives
638  du = 0.;
639 
640  for (unsigned int l=0; l != n_dofs; l++)
641  du.add_scaled(dphi[l][qp], coef(l));
642 
643  return;
644 }
const DenseVector< Number > & get_elem_solution() const
Definition: diff_context.h:111
const std::vector< dof_id_type > & get_dof_indices() const
Definition: diff_context.h:367
const class libmesh_nullptr_t libmesh_nullptr
std::vector< std::unique_ptr< DenseSubVector< Number > > > _elem_subsolutions
Definition: diff_context.h:566
unsigned char get_elem_dim() const
Definition: fem_context.h:906
template<typename OutputType >
template void libMesh::FEMContext::side_gradients< Tensor > ( unsigned int  var,
const NumericVector< Number > &  _system_vector,
std::vector< OutputType > &  side_gradients_vector 
) const
inherited

Fills a vector with the gradient of the solution variable var at all the quadrature points on the current element side.

Note
This is the preferred API.

Definition at line 649 of file fem_context.C.

References libMesh::DiffContext::get_dof_indices(), libMesh::FEMContext::get_elem_dim(), libMesh::DiffContext::get_localized_subvector(), and libmesh_nullptr.

Referenced by libMesh::FEMContext::get_side_fe().

652 {
653  typedef typename TensorTools::MakeReal
655  OutputShape;
656 
657  // Get local-to-global dof index lookup
658  const unsigned int n_dofs = cast_int<unsigned int>
659  (this->get_dof_indices(var).size());
660 
661  // Get current local coefficients
662  const DenseSubVector<Number> & coef = get_localized_subvector(_system_vector, var);
663 
664  // Get finite element object
665  FEGenericBase<OutputShape> * the_side_fe = libmesh_nullptr;
666  this->get_side_fe<OutputShape>( var, the_side_fe, this->get_elem_dim() );
667 
668  // Get shape function values at quadrature point
669  const std::vector<std::vector<typename FEGenericBase<OutputShape>::OutputGradient>> & dphi = the_side_fe->get_dphi();
670 
671  // Loop over all the q_points in this finite element
672  for (std::size_t qp=0; qp != du_vals.size(); qp++)
673  {
674  OutputType & du = du_vals[qp];
675 
676  du = 0;
677 
678  // Compute the gradient at this q_point
679  for (unsigned int l=0; l != n_dofs; l++)
680  du.add_scaled(dphi[l][qp], coef(l));
681  }
682 
683  return;
684 }
const std::vector< dof_id_type > & get_dof_indices() const
Definition: diff_context.h:367
const class libmesh_nullptr_t libmesh_nullptr
DenseSubVector< Number > & get_localized_subvector(const NumericVector< Number > &localized_vector, unsigned int var)
Definition: diff_context.C:148
unsigned char get_elem_dim() const
Definition: fem_context.h:906
Tensor libMesh::FEMContext::side_hessian ( unsigned int  var,
unsigned int  qp 
) const
inherited
Returns
The hessian of the solution variable var at the quadrature point qp on the current element side.
Note
This API is currently present for backward compatibility.

Definition at line 687 of file fem_context.C.

Referenced by libMesh::FEMContext::get_side_fe().

689 {
690  Tensor d2u;
691 
692  this->side_hessian( var, qp, d2u );
693 
694  return d2u;
695 }
NumberTensorValue Tensor
Tensor side_hessian(unsigned int var, unsigned int qp) const
Definition: fem_context.C:687
template<typename OutputType >
void libMesh::FEMContext::side_hessian ( unsigned int  var,
unsigned int  qp,
OutputType &  d2u 
) const
inherited
Returns
The hessian of the solution variable var at the quadrature point qp on the current element side.
Note
This is the preferred API.

Definition at line 700 of file fem_context.C.

References libMesh::DiffContext::get_elem_solution(), libMesh::FEMContext::get_side_fe(), and libMesh::FEMContext::some_hessian().

703 {
704  this->some_hessian<OutputType,
706  <typename TensorTools::MakeReal
707  <typename TensorTools::DecrementRank
708  <typename TensorTools::DecrementRank
709  <OutputType>::type>::type>::type>,
710  &DiffContext::get_elem_solution>(var, qp, d2u);
711 }
const DenseVector< Number > & get_elem_solution() const
Definition: diff_context.h:111
void some_hessian(unsigned int var, unsigned int qp, OutputType &u) const
Definition: fem_context.C:267
void get_side_fe(unsigned int var, FEGenericBase< OutputShape > *&fe) const
Definition: fem_context.h:299
template<typename OutputType >
template void libMesh::FEMContext::side_hessians< Tensor > ( unsigned int  var,
const NumericVector< Number > &  _system_vector,
std::vector< OutputType > &  d2u_vals 
) const
inherited

Fills a vector of hessians of the _system_vector at the all the quadrature points on the current element side. This is the preferred API.

Definition at line 716 of file fem_context.C.

References libMesh::DiffContext::get_dof_indices(), libMesh::FEMContext::get_elem_dim(), libMesh::DiffContext::get_localized_subvector(), and libmesh_nullptr.

Referenced by libMesh::FEMContext::get_side_fe().

719 {
720  typedef typename TensorTools::DecrementRank<OutputType>::type Rank1Decrement;
721  typedef typename TensorTools::DecrementRank<Rank1Decrement>::type Rank2Decrement;
722  typedef typename TensorTools::MakeReal<Rank2Decrement>::type OutputShape;
723 
724  // Get local-to-global dof index lookup
725  const unsigned int n_dofs = cast_int<unsigned int>
726  (this->get_dof_indices(var).size());
727 
728  // Get current local coefficients
729  const DenseSubVector<Number> & coef = get_localized_subvector(_system_vector, var);
730 
731  // Get finite element object
732  FEGenericBase<OutputShape> * the_side_fe = libmesh_nullptr;
733  this->get_side_fe<OutputShape>( var, the_side_fe, this->get_elem_dim() );
734 
735  // Get shape function values at quadrature point
736  const std::vector<std::vector<typename FEGenericBase<OutputShape>::OutputTensor>> & d2phi = the_side_fe->get_d2phi();
737 
738  // Loop over all the q_points in this finite element
739  for (std::size_t qp=0; qp != d2u_vals.size(); qp++)
740  {
741  OutputType & d2u = d2u_vals[qp];
742 
743  // Compute the gradient at this q_point
744  d2u = 0;
745 
746  for (unsigned int l=0; l != n_dofs; l++)
747  d2u.add_scaled(d2phi[l][qp], coef(l));
748  }
749 
750  return;
751 }
const std::vector< dof_id_type > & get_dof_indices() const
Definition: diff_context.h:367
const class libmesh_nullptr_t libmesh_nullptr
DenseSubVector< Number > & get_localized_subvector(const NumericVector< Number > &localized_vector, unsigned int var)
Definition: diff_context.C:148
unsigned char get_elem_dim() const
Definition: fem_context.h:906
template<typename OutputType >
template void libMesh::FEMContext::side_rate< Gradient > ( unsigned int  var,
unsigned int  qp,
OutputType &  u 
) const
inherited
Returns
The time derivative (rate) of the solution variable var at the quadrature point qp on the current element side.

Definition at line 1256 of file fem_context.C.

References libMesh::DiffContext::get_elem_solution_rate(), libMesh::FEMContext::get_side_fe(), and libMesh::FEMContext::some_value().

Referenced by libMesh::FEMContext::get_side_fe().

1258 {
1259  this->some_value<OutputType,
1263 }
void some_value(unsigned int var, unsigned int qp, OutputType &u) const
Definition: fem_context.C:205
const DenseVector< Number > & get_elem_solution_rate() const
Definition: diff_context.h:145
void get_side_fe(unsigned int var, FEGenericBase< OutputShape > *&fe) const
Definition: fem_context.h:299
Number libMesh::FEMContext::side_value ( unsigned int  var,
unsigned int  qp 
) const
inherited
Returns
The value of the solution variable var at the quadrature point qp on the current element side.
Note
This API currently is present for backward compatibility.

Definition at line 546 of file fem_context.C.

Referenced by libMesh::FEMContext::get_side_fe().

548 {
549  Number u = 0.;
550 
551  this->side_value( var, qp, u );
552 
553  return u;
554 }
Number side_value(unsigned int var, unsigned int qp) const
Definition: fem_context.C:546
template<typename OutputType >
void libMesh::FEMContext::side_value ( unsigned int  var,
unsigned int  qp,
OutputType &  u 
) const
inherited
Returns
The value of the solution variable var at the quadrature point qp on the current element side.
Note
This is the preferred API.

Definition at line 558 of file fem_context.C.

References libMesh::DiffContext::get_elem_solution(), and libMesh::FEMContext::some_value().

561 {
562  this->some_value<OutputType,
563  &FEMContext::get_side_fe<typename TensorTools::MakeReal<OutputType>::type>,
564  &DiffContext::get_elem_solution>(var, qp, u);
565 }
const DenseVector< Number > & get_elem_solution() const
Definition: diff_context.h:111
void some_value(unsigned int var, unsigned int qp, OutputType &u) const
Definition: fem_context.C:205
template<typename OutputType >
template void libMesh::FEMContext::side_values< Gradient > ( unsigned int  var,
const NumericVector< Number > &  _system_vector,
std::vector< OutputType > &  side_values_vector 
) const
inherited

Fills a vector of values of the _system_vector at the all the quadrature points on the current element side.

Definition at line 569 of file fem_context.C.

References libMesh::DiffContext::get_dof_indices(), libMesh::FEMContext::get_elem_dim(), libMesh::DiffContext::get_localized_subvector(), and libmesh_nullptr.

Referenced by libMesh::FEMContext::get_side_fe().

572 {
573  typedef typename TensorTools::MakeReal<OutputType>::type OutputShape;
574 
575  // Get local-to-global dof index lookup
576  const unsigned int n_dofs = cast_int<unsigned int>
577  (this->get_dof_indices(var).size());
578 
579  // Get current local coefficients
580  const DenseSubVector<Number> & coef = get_localized_subvector(_system_vector, var);
581 
582  // Get the finite element object
583  FEGenericBase<OutputShape> * the_side_fe = libmesh_nullptr;
584  this->get_side_fe<OutputShape>( var, the_side_fe, this->get_elem_dim() );
585 
586  // Get shape function values at quadrature point
587  const std::vector<std::vector<OutputShape>> & phi = the_side_fe->get_phi();
588 
589  // Loop over all the q_points on this element
590  for (std::size_t qp=0; qp != u_vals.size(); qp++)
591  {
592  OutputType & u = u_vals[qp];
593 
594  // Compute the value at this q_point
595  u = 0.;
596 
597  for (unsigned int l=0; l != n_dofs; l++)
598  u += phi[l][qp] * coef(l);
599  }
600 
601  return;
602 }
const std::vector< dof_id_type > & get_dof_indices() const
Definition: diff_context.h:367
const class libmesh_nullptr_t libmesh_nullptr
DenseSubVector< Number > & get_localized_subvector(const NumericVector< Number > &localized_vector, unsigned int var)
Definition: diff_context.C:148
unsigned char get_elem_dim() const
Definition: fem_context.h:906
template<typename OutputType , typename FEMContext::FENeeded< OutputType >::grad_getter fe_getter, FEMContext::diff_subsolution_getter subsolution_getter>
void libMesh::FEMContext::some_gradient ( unsigned int  var,
unsigned int  qp,
OutputType &  u 
) const
protectedinherited

Helper function to reduce some code duplication in the *interior_gradient methods.

Definition at line 234 of file fem_context.C.

References libMesh::DiffContext::get_dof_indices(), libMesh::FEGenericBase< OutputType >::get_dphi(), libMesh::FEMContext::get_elem_dim(), and libmesh_nullptr.

Referenced by libMesh::FEMContext::fixed_interior_gradient(), libMesh::FEMContext::fixed_side_gradient(), and libMesh::FEMContext::interior_gradient().

235 {
236  // Get local-to-global dof index lookup
237  const unsigned int n_dofs = cast_int<unsigned int>
238  (this->get_dof_indices(var).size());
239 
240  // Get current local coefficients
241  const DenseSubVector<Number> & coef = (this->*subsolution_getter)(var);
242 
243  // Get finite element object
245  (this->*fe_getter)( var, fe, this->get_elem_dim() );
246 
247  // Get shape function values at quadrature point
248  const std::vector<std::vector
250  & dphi = fe->get_dphi();
251 
252  // Accumulate solution derivatives
253  du = 0;
254 
255  for (unsigned int l=0; l != n_dofs; l++)
256  du.add_scaled(dphi[l][qp], coef(l));
257 
258  return;
259 }
const std::vector< dof_id_type > & get_dof_indices() const
Definition: diff_context.h:367
const class libmesh_nullptr_t libmesh_nullptr
TensorTools::IncrementRank< OutputShape >::type OutputGradient
Definition: fe_base.h:121
FEGenericBase< grad_shape > grad_base
Definition: fem_context.h:1050
unsigned char get_elem_dim() const
Definition: fem_context.h:906
template<typename OutputType , typename FEMContext::FENeeded< OutputType >::hess_getter fe_getter, FEMContext::diff_subsolution_getter subsolution_getter>
void libMesh::FEMContext::some_hessian ( unsigned int  var,
unsigned int  qp,
OutputType &  u 
) const
protectedinherited

Helper function to reduce some code duplication in the *interior_hessian methods.

Definition at line 267 of file fem_context.C.

References libMesh::FEGenericBase< OutputType >::get_d2phi(), libMesh::DiffContext::get_dof_indices(), libMesh::FEMContext::get_elem_dim(), and libmesh_nullptr.

Referenced by libMesh::FEMContext::fixed_interior_hessian(), libMesh::FEMContext::fixed_side_hessian(), libMesh::FEMContext::interior_hessian(), and libMesh::FEMContext::side_hessian().

268 {
269  // Get local-to-global dof index lookup
270  const unsigned int n_dofs = cast_int<unsigned int>
271  (this->get_dof_indices(var).size());
272 
273  // Get current local coefficients
274  const DenseSubVector<Number> & coef = (this->*subsolution_getter)(var);
275 
276  // Get finite element object
278  (this->*fe_getter)( var, fe, this->get_elem_dim() );
279 
280  // Get shape function values at quadrature point
281  const std::vector<std::vector
283  & d2phi = fe->get_d2phi();
284 
285  // Accumulate solution second derivatives
286  d2u = 0.0;
287 
288  for (unsigned int l=0; l != n_dofs; l++)
289  d2u.add_scaled(d2phi[l][qp], coef(l));
290 
291  return;
292 }
const std::vector< dof_id_type > & get_dof_indices() const
Definition: diff_context.h:367
const class libmesh_nullptr_t libmesh_nullptr
FEGenericBase< hess_shape > hess_base
Definition: fem_context.h:1055
TensorTools::IncrementRank< OutputGradient >::type OutputTensor
Definition: fe_base.h:122
unsigned char get_elem_dim() const
Definition: fem_context.h:906
template<typename OutputType , typename FEMContext::FENeeded< OutputType >::value_getter fe_getter, FEMContext::diff_subsolution_getter subsolution_getter>
void libMesh::FEMContext::some_value ( unsigned int  var,
unsigned int  qp,
OutputType &  u 
) const
protectedinherited

Helper function to reduce some code duplication in the *interior_value methods.

Definition at line 205 of file fem_context.C.

References libMesh::DiffContext::get_dof_indices(), libMesh::FEMContext::get_elem_dim(), libMesh::FEGenericBase< OutputType >::get_phi(), and libmesh_nullptr.

Referenced by libMesh::FEMContext::fixed_interior_value(), libMesh::FEMContext::fixed_side_value(), libMesh::FEMContext::interior_accel(), libMesh::FEMContext::interior_rate(), libMesh::FEMContext::interior_value(), libMesh::FEMContext::side_accel(), libMesh::FEMContext::side_rate(), and libMesh::FEMContext::side_value().

206 {
207  // Get local-to-global dof index lookup
208  const unsigned int n_dofs = cast_int<unsigned int>
209  (this->get_dof_indices(var).size());
210 
211  // Get current local coefficients
212  const DenseSubVector<Number> & coef = (this->*subsolution_getter)(var);
213 
214  // Get finite element object
216  (this->*fe_getter)( var, fe, this->get_elem_dim() );
217 
218  // Get shape function values at quadrature point
219  const std::vector<std::vector
220  <typename FENeeded<OutputType>::value_shape>> & phi = fe->get_phi();
221 
222  // Accumulate solution value
223  u = 0.;
224 
225  for (unsigned int l=0; l != n_dofs; l++)
226  u += phi[l][qp] * coef(l);
227 }
TensorTools::MakeReal< OutputType >::type value_shape
Definition: fem_context.h:1044
FEGenericBase< value_shape > value_base
Definition: fem_context.h:1045
const std::vector< dof_id_type > & get_dof_indices() const
Definition: diff_context.h:367
const class libmesh_nullptr_t libmesh_nullptr
unsigned char get_elem_dim() const
Definition: fem_context.h:906

Member Data Documentation

AlgebraicType libMesh::FEMContext::_atype
protectedinherited

Keep track of what type of algebra reinitialization is to be done

Definition at line 999 of file fem_context.h.

Referenced by libMesh::FEMContext::algebraic_type(), and libMesh::FEMContext::set_algebraic_type().

const BoundaryInfo& libMesh::FEMContext::_boundary_info
protectedinherited

Saved reference to BoundaryInfo on the mesh for this System. Used to answer boundary id requests.

Definition at line 1114 of file fem_context.h.

Referenced by libMesh::FEMContext::has_side_boundary_id(), and libMesh::FEMContext::side_boundary_ids().

const NumericVector<Number>* libMesh::FEMContext::_custom_solution
protectedinherited

Data with which to do algebra reinitialization

Definition at line 1004 of file fem_context.h.

Referenced by libMesh::FEMContext::pre_fe_reinit(), and libMesh::FEMContext::set_custom_solution().

bool libMesh::DGFEMContext::_dg_terms_active
private

Boolean flag to indicate whether or not the DG terms have been assembled and should be used in the global matrix assembly.

Definition at line 296 of file dg_fem_context.h.

Referenced by dg_terms_are_active(), neighbor_side_fe_reinit(), and side_fe_reinit().

unsigned char libMesh::FEMContext::_dim
protectedinherited

Cached dimension of largest dimension element in this mesh

Definition at line 1124 of file fem_context.h.

Referenced by DGFEMContext(), and libMesh::FEMContext::get_dim().

std::vector<dof_id_type> libMesh::DiffContext::_dof_indices
protectedinherited

Global Degree of freedom index lists

Definition at line 621 of file diff_context.h.

Referenced by libMesh::DiffContext::get_dof_indices().

std::vector<std::vector<dof_id_type> > libMesh::DiffContext::_dof_indices_var
protectedinherited
std::map<FEType, std::unique_ptr<FEAbstract> > libMesh::FEMContext::_edge_fe
protectedinherited
std::vector<FEAbstract *> libMesh::FEMContext::_edge_fe_var
protectedinherited
std::unique_ptr<QBase> libMesh::FEMContext::_edge_qrule
protectedinherited

Quadrature rules for element edges. If the FEM context is told to prepare for edge integration on 3D elements, it will try to find a quadrature rule that correctly integrates all variables. Because edge rules only apply to 3D elements, we don't need to worry about multiple dimensions

Definition at line 1160 of file fem_context.h.

Referenced by libMesh::FEMContext::get_edge_qrule(), and libMesh::FEMContext::init_internal_data().

const Elem* libMesh::FEMContext::_elem
protectedinherited

Current element for element_* to examine

Definition at line 1119 of file fem_context.h.

Referenced by libMesh::FEMContext::get_elem(), libMesh::FEMContext::has_elem(), and libMesh::FEMContext::set_elem().

unsigned char libMesh::FEMContext::_elem_dim
protectedinherited

Cached dimension of this->_elem.

Definition at line 1129 of file fem_context.h.

Referenced by libMesh::FEMContext::get_elem_dim(), and libMesh::FEMContext::set_elem().

std::set<unsigned char> libMesh::FEMContext::_elem_dims
protectedinherited

Cached dimensions of elements in the mesh, plus dimension 0 if SCALAR variables are in use.

Definition at line 1135 of file fem_context.h.

Referenced by libMesh::FEMContext::elem_dimensions(), and libMesh::FEMContext::init_internal_data().

DenseMatrix<Number> libMesh::DGFEMContext::_elem_elem_jacobian
private

The DG Jacobian terms. Trial and test functions come from either element or neighbor.

Definition at line 257 of file dg_fem_context.h.

Referenced by DGFEMContext(), get_elem_elem_jacobian(), and neighbor_side_fe_reinit().

std::vector<std::vector<std::unique_ptr<DenseSubMatrix<Number> > > > libMesh::DGFEMContext::_elem_elem_subjacobians
private

Definition at line 266 of file dg_fem_context.h.

Referenced by DGFEMContext(), get_elem_elem_jacobian(), and neighbor_side_fe_reinit().

DenseVector<Number> libMesh::DiffContext::_elem_fixed_solution
protectedinherited

Element by element components of nonlinear_solution at a fixed point in a timestep, for optional use by e.g. stabilized methods

Definition at line 587 of file diff_context.h.

Referenced by libMesh::DiffContext::DiffContext(), and libMesh::DiffContext::get_elem_fixed_solution().

DenseMatrix<Number> libMesh::DiffContext::_elem_jacobian
protectedinherited

Element jacobian: derivatives of elem_residual with respect to elem_solution

Definition at line 599 of file diff_context.h.

Referenced by libMesh::DiffContext::DiffContext(), and libMesh::DiffContext::get_elem_jacobian().

DenseMatrix<Number> libMesh::DGFEMContext::_elem_neighbor_jacobian
private
std::vector<std::vector<std::unique_ptr<DenseSubMatrix<Number> > > > libMesh::DGFEMContext::_elem_neighbor_subjacobians
private
std::vector<Number> libMesh::DiffContext::_elem_qoi
protectedinherited

Element quantity of interest contributions

Definition at line 604 of file diff_context.h.

Referenced by libMesh::DiffContext::DiffContext(), and libMesh::DiffContext::get_qois().

std::vector<DenseVector<Number> > libMesh::DiffContext::_elem_qoi_derivative
protectedinherited

Element quantity of interest derivative contributions

Definition at line 609 of file diff_context.h.

Referenced by libMesh::DiffContext::DiffContext(), and libMesh::DiffContext::get_qoi_derivatives().

std::vector<std::vector<std::unique_ptr<DenseSubVector<Number> > > > libMesh::DiffContext::_elem_qoi_subderivatives
protectedinherited
DenseVector<Number> libMesh::DiffContext::_elem_residual
protectedinherited

Element residual vector

Definition at line 593 of file diff_context.h.

Referenced by libMesh::DiffContext::DiffContext(), and libMesh::DiffContext::get_elem_residual().

DenseVector<Number> libMesh::DiffContext::_elem_solution
protectedinherited

Element by element components of nonlinear_solution as adjusted by a time_solver

Definition at line 565 of file diff_context.h.

Referenced by libMesh::DiffContext::DiffContext(), and libMesh::DiffContext::get_elem_solution().

DenseVector<Number> libMesh::DiffContext::_elem_solution_accel
protectedinherited

Element by element components of du/dt as adjusted by a time_solver

Definition at line 579 of file diff_context.h.

Referenced by libMesh::DiffContext::DiffContext(), and libMesh::DiffContext::get_elem_solution_accel().

DenseVector<Number> libMesh::DiffContext::_elem_solution_rate
protectedinherited

Element by element components of du/dt as adjusted by a time_solver

Definition at line 572 of file diff_context.h.

Referenced by libMesh::DiffContext::DiffContext(), and libMesh::DiffContext::get_elem_solution_rate().

std::vector<std::vector<std::unique_ptr<DenseSubMatrix<Number> > > > libMesh::DiffContext::_elem_subjacobians
protectedinherited
std::vector<std::unique_ptr<DenseSubVector<Number> > > libMesh::DiffContext::_elem_subresiduals
protectedinherited

Element residual subvectors and Jacobian submatrices

Definition at line 615 of file diff_context.h.

Referenced by libMesh::DiffContext::DiffContext(), and libMesh::DiffContext::get_elem_residual().

std::vector<std::unique_ptr<DenseSubVector<Number> > > libMesh::DiffContext::_elem_subsolution_accels
protectedinherited
std::vector<std::unique_ptr<DenseSubVector<Number> > > libMesh::DiffContext::_elem_subsolution_rates
protectedinherited
std::vector<std::map<FEType, std::unique_ptr<FEAbstract> > > libMesh::FEMContext::_element_fe
protectedinherited

Finite element objects for each variable's interior, sides and edges. We store FE objects for each element dimension present in the mesh, except for edge_fe which only applies to 3D elements.

Definition at line 1095 of file fem_context.h.

Referenced by libMesh::FEMContext::elem_fe_reinit(), and libMesh::FEMContext::init_internal_data().

std::vector<std::vector<FEAbstract *> > libMesh::FEMContext::_element_fe_var
protectedinherited

Pointers to the same finite element objects, but indexed by variable number. We store FE objects for each element dimension present in the mesh, except for edge_fe_var which only applies for 3D elements.

Definition at line 1106 of file fem_context.h.

Referenced by libMesh::FEMContext::get_element_fe(), and libMesh::FEMContext::init_internal_data().

std::vector<std::unique_ptr<QBase> > libMesh::FEMContext::_element_qrule
protectedinherited

Quadrature rule for element interior. The FEM context will try to find a quadrature rule that correctly integrates all variables. We prepare quadrature rules for each element dimension in the mesh.

Definition at line 1143 of file fem_context.h.

Referenced by libMesh::FEMContext::get_element_qrule(), and libMesh::FEMContext::init_internal_data().

int libMesh::FEMContext::_extra_quadrature_order
protectedinherited

The extra quadrature order for this context.

Definition at line 1165 of file fem_context.h.

Referenced by libMesh::FEMContext::init_internal_data().

std::map<const NumericVector<Number> *, std::pair<DenseVector<Number>, std::vector<std::unique_ptr<DenseSubVector<Number> > > > > libMesh::DiffContext::_localized_vectors
protectedinherited

Contains pointers to vectors the user has asked to be localized, keyed with pairs of element localized versions of that vector and per variable views

Definition at line 559 of file diff_context.h.

Referenced by libMesh::DiffContext::add_localized_vector(), libMesh::DiffContext::get_localized_subvector(), libMesh::DiffContext::get_localized_vector(), and libMesh::FEMContext::pre_fe_reinit().

unsigned int libMesh::FEMContext::_mesh_x_var
inherited

Variables from which to acquire moving mesh information

Definition at line 974 of file fem_context.h.

Referenced by libMesh::FEMContext::get_mesh_x_var(), and libMesh::FEMContext::set_mesh_x_var().

unsigned int libMesh::FEMContext::_mesh_y_var
inherited
unsigned int libMesh::FEMContext::_mesh_z_var
inherited
const Elem* libMesh::DGFEMContext::_neighbor
private

Current neighbor element for assembling DG terms.

Definition at line 246 of file dg_fem_context.h.

Referenced by get_neighbor(), and set_neighbor().

std::vector<dof_id_type> libMesh::DGFEMContext::_neighbor_dof_indices
private

Global Degree of freedom index lists for the neighbor element

Definition at line 274 of file dg_fem_context.h.

Referenced by get_neighbor_dof_indices(), and neighbor_side_fe_reinit().

std::vector<std::vector<dof_id_type> > libMesh::DGFEMContext::_neighbor_dof_indices_var
private

Definition at line 275 of file dg_fem_context.h.

Referenced by get_neighbor_dof_indices(), and neighbor_side_fe_reinit().

DenseMatrix<Number> libMesh::DGFEMContext::_neighbor_elem_jacobian
private
std::vector<std::vector<std::unique_ptr<DenseSubMatrix<Number> > > > libMesh::DGFEMContext::_neighbor_elem_subjacobians
private
DenseMatrix<Number> libMesh::DGFEMContext::_neighbor_neighbor_jacobian
private
std::vector<std::vector<std::unique_ptr<DenseSubMatrix<Number> > > > libMesh::DGFEMContext::_neighbor_neighbor_subjacobians
private
DenseVector<Number> libMesh::DGFEMContext::_neighbor_residual
private

Residual vector of the neighbor component.

Definition at line 251 of file dg_fem_context.h.

Referenced by DGFEMContext(), get_neighbor_residual(), and neighbor_side_fe_reinit().

std::map<FEType, std::unique_ptr<FEAbstract> > libMesh::DGFEMContext::_neighbor_side_fe
private

Finite element objects for each variable's sides on the neighbor element. We do not need FE objects for neighbor element interior since we just need to handle DG interface terms here.

Definition at line 284 of file dg_fem_context.h.

Referenced by DGFEMContext(), and neighbor_side_fe_reinit().

std::vector<FEAbstract *> libMesh::DGFEMContext::_neighbor_side_fe_var
private

Pointers to the same finite element objects on the neighbor element, but indexed by variable number

Definition at line 290 of file dg_fem_context.h.

Referenced by DGFEMContext(), and get_neighbor_side_fe().

std::vector<std::unique_ptr<DenseSubVector<Number> > > libMesh::DGFEMContext::_neighbor_subresiduals
private

Element residual subvectors and Jacobian submat