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 }
 
typedef const DenseSubVector< Number > &(DiffContext::* diff_subsolution_getter) (unsigned int) const
 
typedef std::map< const NumericVector< Number > *, std::pair< DenseVector< Number >, std::vector< 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)
 
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 >
UniquePtr< FEGenericBase< OutputShape > > build_new_fe (const FEGenericBase< OutputShape > *fe, const Point &p, const Real tolerance=TOLERANCE) 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::vector< std::map< FEType, FEAbstract * > > _element_fe
 
std::vector< std::map< FEType, FEAbstract * > > _side_fe
 
std::map< FEType, 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< QBase * > _element_qrule
 
std::vector< QBase * > _side_qrule
 
UniquePtr< QBase_edge_qrule
 
int _extra_quadrature_order
 
std::map< const NumericVector< Number > *, std::pair< DenseVector< Number >, std::vector< DenseSubVector< Number > * > > > _localized_vectors
 
DenseVector< Number_elem_solution
 
std::vector< DenseSubVector< Number > * > _elem_subsolutions
 
DenseVector< Number_elem_solution_rate
 
std::vector< DenseSubVector< Number > * > _elem_subsolution_rates
 
DenseVector< Number_elem_solution_accel
 
std::vector< DenseSubVector< Number > * > _elem_subsolution_accels
 
DenseVector< Number_elem_fixed_solution
 
std::vector< 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< DenseSubVector< Number > * > > _elem_qoi_subderivatives
 
std::vector< DenseSubVector< Number > * > _elem_subresiduals
 
std::vector< std::vector< 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< DenseSubVector< Number > * > _neighbor_subresiduals
 
std::vector< std::vector< DenseSubMatrix< Number > * > > _elem_elem_subjacobians
 
std::vector< std::vector< DenseSubMatrix< Number > * > > _elem_neighbor_subjacobians
 
std::vector< std::vector< DenseSubMatrix< Number > * > > _neighbor_elem_subjacobians
 
std::vector< std::vector< 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, 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 1014 of file fem_context.h.

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

Typedef for the localized_vectors iterator

Definition at line 527 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 

Definition at line 931 of file fem_context.h.

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

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::libmesh_assert(), libmesh_nullptr, libMesh::System::n_vars(), and libMesh::System::variable_type().

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

Destructor.

Definition at line 79 of file dg_fem_context.C.

References _elem_elem_subjacobians, _elem_neighbor_subjacobians, _neighbor_elem_subjacobians, _neighbor_neighbor_subjacobians, _neighbor_side_fe, and _neighbor_subresiduals.

80 {
81 
82  for (std::size_t i=0; i != _neighbor_subresiduals.size(); ++i)
83  {
84  delete _neighbor_subresiduals[i];
85 
86  for (std::size_t j=0; j != _elem_elem_subjacobians[i].size(); ++j)
87  {
88  delete _elem_elem_subjacobians[i][j];
89  delete _elem_neighbor_subjacobians[i][j];
90  delete _neighbor_elem_subjacobians[i][j];
92  }
93  }
94 
95  // Delete the FE objects
96  for (std::map<FEType, FEAbstract *>::iterator i = _neighbor_side_fe.begin();
97  i != _neighbor_side_fe.end(); ++i)
98  delete i->second;
99  _neighbor_side_fe.clear();
100 }
std::map< FEType, FEAbstract * > _neighbor_side_fe
std::vector< std::vector< DenseSubMatrix< Number > * > > _elem_elem_subjacobians
std::vector< std::vector< DenseSubMatrix< Number > * > > _neighbor_neighbor_subjacobians
std::vector< std::vector< DenseSubMatrix< Number > * > > _elem_neighbor_subjacobians
std::vector< std::vector< DenseSubMatrix< Number > * > > _neighbor_elem_subjacobians
std::vector< DenseSubVector< Number > * > _neighbor_subresiduals

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 154 of file diff_context.C.

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

155 {
156  // Make an empty pair keyed with a reference to this _localized_vector
157  _localized_vectors[&localized_vector] = std::make_pair(DenseVector<Number>(), std::vector<DenseSubVector<Number> *>());
158 
159  unsigned int nv = sys.n_vars();
160 
161  _localized_vectors[&localized_vector].second.reserve(nv);
162 
163  // Fill the DenseSubVector with nv copies of DenseVector
164  for (unsigned int i=0; i != nv; ++i)
165  _localized_vectors[&localized_vector].second.push_back(new DenseSubVector<Number>(_localized_vectors[&localized_vector].first));
166 }
std::map< const NumericVector< Number > *, std::pair< DenseVector< Number >, std::vector< DenseSubVector< Number > * > > > _localized_vectors
Definition: diff_context.h:558
ImplicitSystem & sys
unsigned int n_vars() const
Definition: system.h:2084
AlgebraicType libMesh::FEMContext::algebraic_type ( ) const
inlineinherited

Definition at line 950 of file fem_context.h.

References libMesh::FEMContext::_atype.

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

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

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

Definition at line 1809 of file fem_context.C.

References libMesh::FEMContext::algebraic_type(), libMesh::FEGenericBase< OutputType >::build(), libMesh::Elem::dim(), libMesh::FEType::family, libMesh::FEMContext::get_elem(), libMesh::FEAbstract::get_fe_type(), libMesh::FEMContext::has_elem(), libMesh::Elem::infinite(), libMesh::FEInterface::inverse_map(), libMesh::Elem::JUST_COARSENED, libMesh::Elem::JUST_REFINED, libMesh::libmesh_assert(), 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().

1812 {
1813  FEType fe_type = fe->get_fe_type();
1814 
1815  // If we don't have an Elem to evaluate on, then the only functions
1816  // we can sensibly evaluate are the scalar dofs which are the same
1817  // everywhere.
1818  libmesh_assert(this->has_elem() || fe_type.family == SCALAR);
1819 
1820 #ifdef LIBMESH_ENABLE_AMR
1821  if ((algebraic_type() == OLD) &&
1822  this->has_elem())
1823  {
1824  if (this->get_elem().p_refinement_flag() == Elem::JUST_REFINED)
1825  fe_type.order = static_cast<Order>(fe_type.order - 1);
1826  else if (this->get_elem().p_refinement_flag() == Elem::JUST_COARSENED)
1827  fe_type.order = static_cast<Order>(fe_type.order + 1);
1828  }
1829 #endif // LIBMESH_ENABLE_AMR
1830 
1831  const unsigned int elem_dim = this->has_elem() ? this->get_elem().dim() : 0;
1832 
1833  FEGenericBase<OutputShape>* fe_new =
1834 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
1835  (this->has_elem() && this->get_elem().infinite()) ?
1836  FEGenericBase<OutputShape>::build_InfFE(elem_dim, fe_type).release() :
1837 #endif
1838  FEGenericBase<OutputShape>::build(elem_dim, fe_type).release();
1839 
1840  // Map the physical co-ordinates to the master co-ordinates using the inverse_map from fe_interface.h
1841  // Build a vector of point co-ordinates to send to reinit
1842  Point master_point = this->has_elem() ?
1843  FEInterface::inverse_map (elem_dim,
1844  fe_type,
1845  &this->get_elem(),
1846  p,
1847  tolerance) : Point(0);
1848 
1849  std::vector<Point> coor(1, master_point);
1850 
1851  // Reinitialize the element and compute the shape function values at coor
1852  if (this->has_elem())
1853  fe_new->reinit (&this->get_elem(), &coor);
1854  else
1855  // If !this->has_elem(), then we assume we are dealing with a SCALAR variable
1856  fe_new->reinit (libmesh_nullptr, &coor);
1857 
1858  return UniquePtr<FEGenericBase<OutputShape> >(fe_new);
1859 }
bool has_elem() const
Definition: fem_context.h:863
const class libmesh_nullptr_t libmesh_nullptr
const Elem & get_elem() const
Definition: fem_context.h:869
libmesh_assert(j)
virtual bool infinite() const =0
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:556
RefinementState p_refinement_flag() const
Definition: elem.h:2320
static UniquePtr< FEGenericBase > build_InfFE(const unsigned int dim, const FEType &type)
AlgebraicType algebraic_type() const
Definition: fem_context.h:950
virtual unsigned int dim() const =0
static UniquePtr< FEGenericBase > build(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 1423 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()().

1424 {
1425  libmesh_assert_equal_to (this->get_elem_dim(), 3);
1426 
1427  // Initialize all the interior FE objects on elem/edge.
1428  // Logging of FE::reinit is done in the FE functions
1429  std::map<FEType, FEAbstract *>::iterator local_fe_end = _edge_fe.end();
1430  for (std::map<FEType, FEAbstract *>::iterator i = _edge_fe.begin();
1431  i != local_fe_end; ++i)
1432  {
1433  i->second->edge_reinit(&(this->get_elem()), this->get_edge());
1434  }
1435 }
const Elem & get_elem() const
Definition: fem_context.h:869
std::map< FEType, FEAbstract * > _edge_fe
Definition: fem_context.h:1081
unsigned char get_edge() const
Definition: fem_context.h:889
unsigned char get_elem_dim() const
Definition: fem_context.h:904
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 1355 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().

1356 {
1357  // Update the "time" variable of this context object
1358  this->_update_time_from_system(theta);
1359 
1360  // Handle a moving element if necessary
1361  if (_mesh_sys)
1362  {
1363  // FIXME - not threadsafe yet!
1364  elem_position_set(theta);
1365  edge_fe_reinit();
1366  }
1367 }
void elem_position_set(Real theta)
Definition: fem_context.h:1181
void _update_time_from_system(Real theta)
Definition: fem_context.C:1794
virtual void edge_fe_reinit()
Definition: fem_context.C:1423
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 1380 of file fem_context.C.

References libMesh::FEMContext::_element_fe, libMesh::FEMContext::get_elem(), libMesh::FEMContext::get_elem_dim(), libMesh::FEMContext::has_elem(), libMesh::libmesh_assert(), 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()().

1381 {
1382  // Initialize all the interior FE objects on elem.
1383  // Logging of FE::reinit is done in the FE functions
1384  // We only reinit the FE objects for the current element
1385  // dimension
1386  const unsigned char dim = this->get_elem_dim();
1387 
1388  libmesh_assert( !_element_fe[dim].empty() );
1389 
1390  std::map<FEType, FEAbstract *>::iterator local_fe_end = _element_fe[dim].end();
1391  for (std::map<FEType, FEAbstract *>::iterator i = _element_fe[dim].begin();
1392  i != local_fe_end; ++i)
1393  {
1394  if (this->has_elem())
1395  i->second->reinit(&(this->get_elem()), pts);
1396  else
1397  // If !this->has_elem(), then we assume we are dealing with a SCALAR variable
1398  i->second->reinit(libmesh_nullptr);
1399  }
1400 }
bool has_elem() const
Definition: fem_context.h:863
const class libmesh_nullptr_t libmesh_nullptr
const Elem & get_elem() const
Definition: fem_context.h:869
libmesh_assert(j)
std::vector< std::map< FEType, FEAbstract * > > _element_fe
Definition: fem_context.h:1079
unsigned char get_elem_dim() const
Definition: fem_context.h:904
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 1439 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, libMesh::libmesh_assert(), 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().

1440 {
1441  // This is too expensive to call unless we've been asked to move the mesh
1443 
1444  // This will probably break with threading when two contexts are
1445  // operating on elements which share a node
1446  libmesh_assert_equal_to (libMesh::n_threads(), 1);
1447 
1448  // If the coordinate data is in our own system, it's already
1449  // been set up for us
1450  // if (_mesh_sys == this->number())
1451  // {
1452  unsigned int n_nodes = this->get_elem().n_nodes();
1453 
1454 #ifndef NDEBUG
1455  const unsigned char dim = this->get_elem_dim();
1456 
1457  // For simplicity we demand that mesh coordinates be stored
1458  // in a format that allows a direct copy
1460  (this->get_element_fe(this->get_mesh_x_var(), dim)->get_fe_type().family
1461  == LAGRANGE &&
1462  this->get_element_fe(this->get_mesh_x_var(), dim)->get_fe_type().order.get_order()
1463  == this->get_elem().default_order()));
1465  (this->get_element_fe(this->get_mesh_y_var(), dim)->get_fe_type().family
1466  == LAGRANGE &&
1467  this->get_element_fe(this->get_mesh_y_var(), dim)->get_fe_type().order.get_order()
1468  == this->get_elem().default_order()));
1470  (this->get_element_fe(this->get_mesh_z_var(), dim)->get_fe_type().family
1471  == LAGRANGE &&
1472  this->get_element_fe(this->get_mesh_z_var(), dim)->get_fe_type().order.get_order()
1473  == this->get_elem().default_order()));
1474 #endif
1475 
1476  // Get degree of freedom coefficients from point coordinates
1477  if (this->get_mesh_x_var() != libMesh::invalid_uint)
1478  for (unsigned int i=0; i != n_nodes; ++i)
1479  (this->get_elem_solution(this->get_mesh_x_var()))(i) = this->get_elem().point(i)(0);
1480 
1481  if (this->get_mesh_y_var() != libMesh::invalid_uint)
1482  for (unsigned int i=0; i != n_nodes; ++i)
1483  (this->get_elem_solution(this->get_mesh_y_var()))(i) = this->get_elem().point(i)(1);
1484 
1485  if (this->get_mesh_z_var() != libMesh::invalid_uint)
1486  for (unsigned int i=0; i != n_nodes; ++i)
1487  (this->get_elem_solution(this->get_mesh_z_var()))(i) = this->get_elem().point(i)(2);
1488  // }
1489  // FIXME - If the coordinate data is not in our own system, someone
1490  // had better get around to implementing that... - RHS
1491  // else
1492  // {
1493  // libmesh_not_implemented();
1494  // }
1495 }
unsigned int n_threads()
Definition: libmesh_base.h:125
const DenseVector< Number > & get_elem_solution() const
Definition: diff_context.h:110
const unsigned int invalid_uint
Definition: libmesh.h:184
unsigned int get_mesh_x_var() const
Definition: fem_context.h:821
void get_element_fe(unsigned int var, FEGenericBase< OutputShape > *&fe) const
Definition: fem_context.h:260
const Elem & get_elem() const
Definition: fem_context.h:869
libmesh_assert(j)
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:1667
unsigned int get_mesh_z_var() const
Definition: fem_context.h:849
unsigned char get_elem_dim() const
Definition: fem_context.h:904
unsigned int get_mesh_y_var() const
Definition: fem_context.h:835
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 1181 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().

1182 {
1183  if (_mesh_sys)
1184  this->_do_elem_position_set(theta);
1185 }
void _do_elem_position_set(Real theta)
Definition: fem_context.C:1504
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 1316 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().

1317 {
1318  // Update the "time" variable of this context object
1319  this->_update_time_from_system(theta);
1320 
1321  // Handle a moving element if necessary.
1322  if (_mesh_sys)
1323  {
1324  // We assume that the ``default'' state
1325  // of the mesh is its final, theta=1.0
1326  // position, so we don't bother with
1327  // mesh motion in that case.
1328  if (theta != 1.0)
1329  {
1330  // FIXME - ALE is not threadsafe yet!
1331  libmesh_assert_equal_to (libMesh::n_threads(), 1);
1332 
1333  elem_position_set(theta);
1334  }
1335  elem_fe_reinit();
1336  }
1337 }
unsigned int n_threads()
Definition: libmesh_base.h:125
void elem_position_set(Real theta)
Definition: fem_context.h:1181
void _update_time_from_system(Real theta)
Definition: fem_context.C:1794
virtual void elem_fe_reinit(const std::vector< Point > *const pts=libmesh_nullptr)
Definition: fem_context.C:1380
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 1340 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().

1341 {
1342  // Update the "time" variable of this context object
1343  this->_update_time_from_system(theta);
1344 
1345  // Handle a moving element if necessary
1346  if (_mesh_sys)
1347  {
1348  // FIXME - not threadsafe yet!
1349  elem_position_set(theta);
1350  side_fe_reinit();
1351  }
1352 }
void elem_position_set(Real theta)
Definition: fem_context.h:1181
virtual void side_fe_reinit()
Definition: fem_context.C:1403
void _update_time_from_system(Real theta)
Definition: fem_context.C:1794
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 994 of file fem_context.C.

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

995 {
996  Gradient du;
997 
998  this->fixed_interior_gradient( var, qp, du );
999 
1000  return du;
1001 }
NumberVectorValue Gradient
Gradient fixed_interior_gradient(unsigned int var, unsigned int qp) const
Definition: fem_context.C:994
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 1005 of file fem_context.C.

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

1007 {
1008  this->some_gradient
1009  <OutputType,
1011  <typename TensorTools::MakeReal
1012  <typename TensorTools::DecrementRank
1013  <OutputType>::type>::type>,
1015  (var, qp, du);
1016 }
const DenseVector< Number > & get_elem_fixed_solution() const
Definition: diff_context.h:214
void get_element_fe(unsigned int var, FEGenericBase< OutputShape > *&fe) const
Definition: fem_context.h:260
void some_gradient(unsigned int var, unsigned int qp, OutputType &u) const
Definition: fem_context.C:261
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 1021 of file fem_context.C.

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

1022 {
1023  Tensor d2u;
1024 
1025  this->fixed_interior_hessian( var, qp, d2u );
1026 
1027  return d2u;
1028 }
NumberTensorValue Tensor
Tensor fixed_interior_hessian(unsigned int var, unsigned int qp) const
Definition: fem_context.C:1021
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 1032 of file fem_context.C.

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

1034 {
1035  this->some_hessian<OutputType,
1037  <typename TensorTools::MakeReal
1038  <typename TensorTools::DecrementRank
1039  <typename TensorTools::DecrementRank
1040  <OutputType>::type>::type>::type>,
1041  &DiffContext::get_elem_fixed_solution>(var, qp, d2u);
1042 }
const DenseVector< Number > & get_elem_fixed_solution() const
Definition: diff_context.h:214
void get_element_fe(unsigned int var, FEGenericBase< OutputShape > *&fe) const
Definition: fem_context.h:260
void some_hessian(unsigned int var, unsigned int qp, OutputType &u) const
Definition: fem_context.C:294
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 971 of file fem_context.C.

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

972 {
973  Number u = 0.;
974 
975  this->fixed_interior_value( var, qp, u );
976 
977  return u;
978 }
Number fixed_interior_value(unsigned int var, unsigned int qp) const
Definition: fem_context.C:971
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 983 of file fem_context.C.

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

985 {
986  this->some_value<OutputType,
990 }
void some_value(unsigned int var, unsigned int qp, OutputType &u) const
Definition: fem_context.C:232
const DenseVector< Number > & get_elem_fixed_solution() const
Definition: diff_context.h:214
void get_element_fe(unsigned int var, FEGenericBase< OutputShape > *&fe) const
Definition: fem_context.h:260
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 1167 of file fem_context.C.

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

1168 {
1169  Gradient grad_u;
1170 
1171  this->fixed_point_gradient( var, p, grad_u );
1172 
1173  return grad_u;
1174 }
Gradient fixed_point_gradient(unsigned int var, const Point &p) const
Definition: fem_context.C:1167
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 1179 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.

1183 {
1184  typedef typename TensorTools::MakeReal
1186  OutputShape;
1187 
1188  // Get local-to-global dof index lookup
1189  const unsigned int n_dofs = cast_int<unsigned int>
1190  (this->get_dof_indices(var).size());
1191 
1192  // Get current local coefficients
1193  libmesh_assert_greater (_elem_fixed_subsolutions.size(), var);
1194  const DenseSubVector<Number> & coef = this->get_elem_fixed_solution(var);
1195 
1196  // Get finite element object
1197  FEGenericBase<OutputShape> * fe = libmesh_nullptr;
1198  this->get_element_fe<OutputShape>( var, fe, this->get_elem_dim() );
1199 
1200  // Build a FE for calculating u(p)
1201  UniquePtr<FEGenericBase<OutputShape> > fe_new =
1202  this->build_new_fe( fe, p, tolerance );
1203 
1204  // Get the values of the shape function derivatives
1205  const std::vector<std::vector<typename FEGenericBase<OutputShape>::OutputGradient> > & dphi = fe_new->get_dphi();
1206 
1207  grad_u = 0.0;
1208 
1209  for (unsigned int l=0; l != n_dofs; l++)
1210  grad_u.add_scaled(dphi[l][0], coef(l));
1211 
1212  return;
1213 }
UniquePtr< FEGenericBase< OutputShape > > build_new_fe(const FEGenericBase< OutputShape > *fe, const Point &p, const Real tolerance=TOLERANCE) const
Definition: fem_context.C:1809
const std::vector< dof_id_type > & get_dof_indices() const
Definition: diff_context.h:366
const DenseVector< Number > & get_elem_fixed_solution() const
Definition: diff_context.h:214
const class libmesh_nullptr_t libmesh_nullptr
std::vector< DenseSubVector< Number > * > _elem_fixed_subsolutions
Definition: diff_context.h:587
unsigned char get_elem_dim() const
Definition: fem_context.h:904
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 1218 of file fem_context.C.

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

1219 {
1220  Tensor hess_u;
1221 
1222  this->fixed_point_hessian( var, p, hess_u );
1223 
1224  return hess_u;
1225 }
Tensor fixed_point_hessian(unsigned int var, const Point &p) const
Definition: fem_context.C:1218
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 1230 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.

1234 {
1235  typedef typename TensorTools::DecrementRank<OutputType>::type Rank1Decrement;
1236  typedef typename TensorTools::DecrementRank<Rank1Decrement>::type Rank2Decrement;
1237  typedef typename TensorTools::MakeReal<Rank2Decrement>::type OutputShape;
1238 
1239  // Get local-to-global dof index lookup
1240  const unsigned int n_dofs = cast_int<unsigned int>
1241  (this->get_dof_indices(var).size());
1242 
1243  // Get current local coefficients
1244  libmesh_assert_greater (_elem_fixed_subsolutions.size(), var);
1245  const DenseSubVector<Number> & coef = this->get_elem_fixed_solution(var);
1246 
1247  // Get finite element object
1248  FEGenericBase<OutputShape> * fe = libmesh_nullptr;
1249  this->get_element_fe<OutputShape>( var, fe, this->get_elem_dim() );
1250 
1251  // Build a FE for calculating u(p)
1252  UniquePtr<FEGenericBase<OutputShape> > fe_new =
1253  this->build_new_fe( fe, p, tolerance );
1254 
1255  // Get the values of the shape function derivatives
1256  const std::vector<std::vector<typename FEGenericBase<OutputShape>::OutputTensor> > & d2phi = fe_new->get_d2phi();
1257 
1258  hess_u = 0.0;
1259 
1260  for (unsigned int l=0; l != n_dofs; l++)
1261  hess_u.add_scaled(d2phi[l][0], coef(l));
1262 
1263  return;
1264 }
UniquePtr< FEGenericBase< OutputShape > > build_new_fe(const FEGenericBase< OutputShape > *fe, const Point &p, const Real tolerance=TOLERANCE) const
Definition: fem_context.C:1809
const std::vector< dof_id_type > & get_dof_indices() const
Definition: diff_context.h:366
const DenseVector< Number > & get_elem_fixed_solution() const
Definition: diff_context.h:214
const class libmesh_nullptr_t libmesh_nullptr
std::vector< DenseSubVector< Number > * > _elem_fixed_subsolutions
Definition: diff_context.h:587
unsigned char get_elem_dim() const
Definition: fem_context.h:904
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 1121 of file fem_context.C.

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

1122 {
1123  Number u = 0.;
1124 
1125  this->fixed_point_value( var, p, u );
1126 
1127  return u;
1128 }
Number fixed_point_value(unsigned int var, const Point &p) const
Definition: fem_context.C:1121
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 1131 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.

1135 {
1136  typedef typename TensorTools::MakeReal<OutputType>::type OutputShape;
1137 
1138  // Get local-to-global dof index lookup
1139  const unsigned int n_dofs = cast_int<unsigned int>
1140  (this->get_dof_indices(var).size());
1141 
1142  // Get current local coefficients
1143  libmesh_assert_greater (_elem_fixed_subsolutions.size(), var);
1144  const DenseSubVector<Number> & coef = this->get_elem_fixed_solution(var);
1145 
1146  // Get finite element object
1147  FEGenericBase<OutputShape> * fe = libmesh_nullptr;
1148  this->get_element_fe<OutputShape>( var, fe, this->get_elem_dim() );
1149 
1150  // Build a FE for calculating u(p)
1151  UniquePtr<FEGenericBase<OutputShape> > fe_new =
1152  this->build_new_fe( fe, p, tolerance );
1153 
1154  // Get the values of the shape function derivatives
1155  const std::vector<std::vector<OutputShape> > & phi = fe_new->get_phi();
1156 
1157  u = 0.;
1158 
1159  for (unsigned int l=0; l != n_dofs; l++)
1160  u += phi[l][0] * coef(l);
1161 
1162  return;
1163 }
UniquePtr< FEGenericBase< OutputShape > > build_new_fe(const FEGenericBase< OutputShape > *fe, const Point &p, const Real tolerance=TOLERANCE) const
Definition: fem_context.C:1809
const std::vector< dof_id_type > & get_dof_indices() const
Definition: diff_context.h:366
const DenseVector< Number > & get_elem_fixed_solution() const
Definition: diff_context.h:214
const class libmesh_nullptr_t libmesh_nullptr
std::vector< DenseSubVector< Number > * > _elem_fixed_subsolutions
Definition: diff_context.h:587
unsigned char get_elem_dim() const
Definition: fem_context.h:904
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 1071 of file fem_context.C.

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

1072 {
1073  Gradient du;
1074 
1075  this->fixed_side_gradient( var, qp, du );
1076 
1077  return du;
1078 }
NumberVectorValue Gradient
Gradient fixed_side_gradient(unsigned int var, unsigned int qp) const
Definition: fem_context.C:1071
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 1082 of file fem_context.C.

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

1084 {
1085  this->some_gradient<OutputType,
1087  <typename TensorTools::MakeReal
1088  <typename TensorTools::DecrementRank
1089  <OutputType>::type>::type>,
1090  &DiffContext::get_elem_fixed_solution>(var, qp, du);
1091 }
const DenseVector< Number > & get_elem_fixed_solution() const
Definition: diff_context.h:214
void some_gradient(unsigned int var, unsigned int qp, OutputType &u) const
Definition: fem_context.C:261
void get_side_fe(unsigned int var, FEGenericBase< OutputShape > *&fe) const
Definition: fem_context.h:297
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 1096 of file fem_context.C.

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

1097 {
1098  Tensor d2u;
1099 
1100  this->fixed_side_hessian( var, qp, d2u );
1101 
1102  return d2u;
1103 }
Tensor fixed_side_hessian(unsigned int var, unsigned int qp) const
Definition: fem_context.C:1096
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 1106 of file fem_context.C.

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

1108 {
1109  this->some_hessian<OutputType,
1111  <typename TensorTools::MakeReal
1112  <typename TensorTools::DecrementRank
1113  <typename TensorTools::DecrementRank
1114  <OutputType>::type>::type>::type>,
1115  &DiffContext::get_elem_fixed_solution>(var, qp, d2u);
1116 }
const DenseVector< Number > & get_elem_fixed_solution() const
Definition: diff_context.h:214
void some_hessian(unsigned int var, unsigned int qp, OutputType &u) const
Definition: fem_context.C:294
void get_side_fe(unsigned int var, FEGenericBase< OutputShape > *&fe) const
Definition: fem_context.h:297
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 1047 of file fem_context.C.

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

1048 {
1049  Number u = 0.;
1050 
1051  this->fixed_side_value( var, qp, u );
1052 
1053  return u;
1054 }
Number fixed_side_value(unsigned int var, unsigned int qp) const
Definition: fem_context.C:1047
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 1058 of file fem_context.C.

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

1060 {
1061  this->some_value
1062  <OutputType,
1066  (var, qp, u);
1067 }
void some_value(unsigned int var, unsigned int qp, OutputType &u) const
Definition: fem_context.C:232
const DenseVector< Number > & get_elem_fixed_solution() const
Definition: diff_context.h:214
void get_side_fe(unsigned int var, FEGenericBase< OutputShape > *&fe) const
Definition: fem_context.h:297
Real libMesh::DiffContext::get_deltat_value ( )
inherited
Returns
The value currently pointed to by this class's _deltat member

Definition at line 146 of file diff_context.C.

References libMesh::DiffContext::_deltat, and libMesh::libmesh_assert().

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

147 {
149 
150  return *_deltat;
151 }
libmesh_assert(j)
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 897 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().

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

Non-const accessor for element dof indices

Definition at line 372 of file diff_context.h.

References libMesh::DiffContext::_dof_indices.

373  { return _dof_indices; }
std::vector< dof_id_type > _dof_indices
Definition: diff_context.h:620
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 379 of file diff_context.h.

References libMesh::DiffContext::_dof_indices_var.

380  {
381  libmesh_assert_greater(_dof_indices_var.size(), var);
382  return _dof_indices_var[var];
383  }
std::vector< std::vector< dof_id_type > > _dof_indices_var
Definition: diff_context.h:621
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 389 of file diff_context.h.

References libMesh::DiffContext::_dof_indices_var.

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

Accessor for current edge of Elem object

Definition at line 889 of file fem_context.h.

References libMesh::FEMContext::edge.

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

890  { return edge; }
unsigned char edge
Definition: fem_context.h:980
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 1225 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()().

1226 {
1227  libmesh_assert_less ( var, _edge_fe_var.size() );
1228  fe = cast_ptr<FEGenericBase<OutputShape> *>( _edge_fe_var[var] );
1229 }
std::vector< FEAbstract * > _edge_fe_var
Definition: fem_context.h:1092
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 1232 of file fem_context.h.

References libMesh::FEMContext::_edge_fe_var.

1233 {
1234  libmesh_assert_less ( var, _edge_fe_var.size() );
1235  return cast_ptr<FEBase *>( _edge_fe_var[var] );
1236 }
std::vector< FEAbstract * > _edge_fe_var
Definition: fem_context.h:1092
const QBase& libMesh::FEMContext::get_edge_qrule ( ) const
inlineinherited

Accessor for element edge quadrature rule.

Definition at line 792 of file fem_context.h.

References libMesh::FEMContext::_edge_qrule.

793  { return *(this->_edge_qrule); }
UniquePtr< QBase > _edge_qrule
Definition: fem_context.h:1144
Elem& libMesh::FEMContext::get_elem ( )
inlineinherited

Accessor for current Elem object

Definition at line 876 of file fem_context.h.

References libMesh::FEMContext::_elem, and libMesh::libmesh_assert().

877  { libmesh_assert(this->_elem);
878  return *(const_cast<Elem *>(this->_elem)); }
libmesh_assert(j)
const Elem * _elem
Definition: fem_context.h:1103
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< 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< DenseSubMatrix< Number > * > > _elem_elem_subjacobians
DenseVector<Number>& libMesh::DiffContext::get_elem_fixed_solution ( )
inlineinherited

Non-const accessor for element fixed solution.

Definition at line 220 of file diff_context.h.

References libMesh::DiffContext::_elem_fixed_solution.

221  { return _elem_fixed_solution; }
DenseVector< Number > _elem_fixed_solution
Definition: diff_context.h:586
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 227 of file diff_context.h.

References libMesh::DiffContext::_elem_fixed_subsolutions, and libMesh::libmesh_assert().

228  {
229  libmesh_assert_greater(_elem_fixed_subsolutions.size(), var);
231  return *(_elem_fixed_subsolutions[var]);
232  }
libmesh_assert(j)
std::vector< DenseSubVector< Number > * > _elem_fixed_subsolutions
Definition: diff_context.h:587
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 238 of file diff_context.h.

References libMesh::DiffContext::_elem_fixed_subsolutions, and libMesh::libmesh_assert().

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

Non-const accessor for element Jacobian.

Definition at line 288 of file diff_context.h.

References libMesh::DiffContext::_elem_jacobian.

289  { return _elem_jacobian; }
DenseMatrix< Number > _elem_jacobian
Definition: diff_context.h:598
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 295 of file diff_context.h.

References libMesh::DiffContext::_elem_subjacobians, and libMesh::libmesh_assert().

296  {
297  libmesh_assert_greater(_elem_subjacobians.size(), var1);
298  libmesh_assert_greater(_elem_subjacobians[var1].size(), var2);
299  libmesh_assert(_elem_subjacobians[var1][var2]);
300  return *(_elem_subjacobians[var1][var2]);
301  }
std::vector< std::vector< DenseSubMatrix< Number > * > > _elem_subjacobians
Definition: diff_context.h:615
libmesh_assert(j)
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 307 of file diff_context.h.

References libMesh::DiffContext::_elem_subjacobians, and libMesh::libmesh_assert().

308  {
309  libmesh_assert_greater(_elem_subjacobians.size(), var1);
310  libmesh_assert_greater(_elem_subjacobians[var1].size(), var2);
311  libmesh_assert(_elem_subjacobians[var1][var2]);
312  return *(_elem_subjacobians[var1][var2]);
313  }
std::vector< std::vector< DenseSubMatrix< Number > * > > _elem_subjacobians
Definition: diff_context.h:615
libmesh_assert(j)
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< 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< 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 254 of file diff_context.h.

References libMesh::DiffContext::_elem_residual.

255  { return _elem_residual; }
DenseVector< Number > _elem_residual
Definition: diff_context.h:592
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 261 of file diff_context.h.

References libMesh::DiffContext::_elem_subresiduals, and libMesh::libmesh_assert().

262  {
263  libmesh_assert_greater(_elem_subresiduals.size(), var);
265  return *(_elem_subresiduals[var]);
266  }
std::vector< DenseSubVector< Number > * > _elem_subresiduals
Definition: diff_context.h:614
libmesh_assert(j)
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 272 of file diff_context.h.

References libMesh::DiffContext::_elem_subresiduals, and libMesh::libmesh_assert().

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

Non-const accessor for element solution.

Definition at line 116 of file diff_context.h.

References libMesh::DiffContext::_elem_solution.

117  { return _elem_solution; }
DenseVector< Number > _elem_solution
Definition: diff_context.h:564
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 123 of file diff_context.h.

References libMesh::DiffContext::_elem_subsolutions, and libMesh::libmesh_assert().

124  {
125  libmesh_assert_greater(_elem_subsolutions.size(), var);
127  return *(_elem_subsolutions[var]);
128  }
libmesh_assert(j)
std::vector< DenseSubVector< Number > * > _elem_subsolutions
Definition: diff_context.h:565
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 134 of file diff_context.h.

References libMesh::DiffContext::_elem_subsolutions, and libMesh::libmesh_assert().

135  {
136  libmesh_assert_greater(_elem_subsolutions.size(), var);
138  return *(_elem_subsolutions[var]);
139  }
libmesh_assert(j)
std::vector< DenseSubVector< Number > * > _elem_subsolutions
Definition: diff_context.h:565
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 186 of file diff_context.h.

References libMesh::DiffContext::_elem_solution_accel.

187  { return _elem_solution_accel; }
DenseVector< Number > _elem_solution_accel
Definition: diff_context.h:578
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 193 of file diff_context.h.

References libMesh::DiffContext::_elem_subsolution_accels, and libMesh::libmesh_assert().

194  {
195  libmesh_assert_greater(_elem_subsolution_accels.size(), var);
197  return *(_elem_subsolution_accels[var]);
198  }
std::vector< DenseSubVector< Number > * > _elem_subsolution_accels
Definition: diff_context.h:579
libmesh_assert(j)
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 204 of file diff_context.h.

References libMesh::DiffContext::_elem_subsolution_accels, and libMesh::libmesh_assert().

205  {
206  libmesh_assert_greater(_elem_subsolution_accels.size(), var);
208  return *(_elem_subsolution_accels[var]);
209  }
std::vector< DenseSubVector< Number > * > _elem_subsolution_accels
Definition: diff_context.h:579
libmesh_assert(j)
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 437 of file diff_context.h.

References libMesh::DiffContext::elem_solution_accel_derivative.

Real elem_solution_accel_derivative
Definition: diff_context.h:497
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 419 of file diff_context.h.

References libMesh::DiffContext::elem_solution_derivative.

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

420  { 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 151 of file diff_context.h.

References libMesh::DiffContext::_elem_solution_rate.

152  { return _elem_solution_rate; }
DenseVector< Number > _elem_solution_rate
Definition: diff_context.h:571
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 158 of file diff_context.h.

References libMesh::DiffContext::_elem_subsolution_rates, and libMesh::libmesh_assert().

159  {
160  libmesh_assert_greater(_elem_subsolution_rates.size(), var);
162  return *(_elem_subsolution_rates[var]);
163  }
std::vector< DenseSubVector< Number > * > _elem_subsolution_rates
Definition: diff_context.h:572
libmesh_assert(j)
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 169 of file diff_context.h.

References libMesh::DiffContext::_elem_subsolution_rates, and libMesh::libmesh_assert().

170  {
171  libmesh_assert_greater(_elem_subsolution_rates.size(), var);
173  return *(_elem_subsolution_rates[var]);
174  }
std::vector< DenseSubVector< Number > * > _elem_subsolution_rates
Definition: diff_context.h:572
libmesh_assert(j)
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 428 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:490
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 260 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()().

261  { this->get_element_fe<OutputShape>(var,fe,this->get_dim()); }
unsigned char get_dim() const
Definition: fem_context.h:897
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 271 of file fem_context.h.

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

272  { return this->get_element_fe(var,this->get_dim()); }
void get_element_fe(unsigned int var, FEGenericBase< OutputShape > *&fe) const
Definition: fem_context.h:260
unsigned char get_dim() const
Definition: fem_context.h:897
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 1189 of file fem_context.h.

References libMesh::FEMContext::_element_fe_var, and libMesh::libmesh_assert().

1191 {
1192  libmesh_assert( !_element_fe_var[dim].empty() );
1193  libmesh_assert_less ( var, (_element_fe_var[dim].size() ) );
1194  fe = cast_ptr<FEGenericBase<OutputShape> *>( (_element_fe_var[dim][var] ) );
1195 }
libmesh_assert(j)
std::vector< std::vector< FEAbstract * > > _element_fe_var
Definition: fem_context.h:1090
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 1198 of file fem_context.h.

References libMesh::FEMContext::_element_fe_var, and libMesh::libmesh_assert().

1199 {
1200  libmesh_assert( !_element_fe_var[dim].empty() );
1201  libmesh_assert_less ( var, (_element_fe_var[dim].size() ) );
1202  return cast_ptr<FEBase *>( (_element_fe_var[dim][var] ) );
1203 }
libmesh_assert(j)
std::vector< std::vector< FEAbstract * > > _element_fe_var
Definition: fem_context.h:1090
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 763 of file fem_context.h.

References libMesh::FEMContext::get_elem_dim().

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

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

Accessor for element interior quadrature rule.

Definition at line 776 of file fem_context.h.

References libMesh::FEMContext::_element_qrule, and libMesh::libmesh_assert().

778  return *(this->_element_qrule[dim]); }
libmesh_assert(j)
std::vector< QBase * > _element_qrule
Definition: fem_context.h:1127
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 446 of file diff_context.h.

References libMesh::DiffContext::fixed_solution_derivative.

447  { 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 184 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().

185 {
186  return *_localized_vectors[&localized_vector].second[var];
187 }
std::map< const NumericVector< Number > *, std::pair< DenseVector< Number >, std::vector< DenseSubVector< Number > * > > > _localized_vectors
Definition: diff_context.h:558
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 190 of file diff_context.C.

References libMesh::DiffContext::_localized_vectors, and libMesh::libmesh_assert().

191 {
192  std::map<const NumericVector<Number> *, std::pair<DenseVector<Number>, std::vector<DenseSubVector<Number> *> > >::const_iterator
193  localized_vectors_it = _localized_vectors.find(&localized_vector);
194  libmesh_assert(localized_vectors_it != _localized_vectors.end());
195  return *localized_vectors_it->second.second[var];
196 }
std::map< const NumericVector< Number > *, std::pair< DenseVector< Number >, std::vector< DenseSubVector< Number > * > > > _localized_vectors
Definition: diff_context.h:558
libmesh_assert(j)
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 169 of file diff_context.C.

References libMesh::DiffContext::_localized_vectors.

170 {
171  return _localized_vectors[&localized_vector].first;
172 }
std::map< const NumericVector< Number > *, std::pair< DenseVector< Number >, std::vector< DenseSubVector< Number > * > > > _localized_vectors
Definition: diff_context.h:558
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 175 of file diff_context.C.

References libMesh::DiffContext::_localized_vectors, and libMesh::libmesh_assert().

176 {
177  std::map<const NumericVector<Number> *, std::pair<DenseVector<Number>, std::vector<DenseSubVector<Number> *> > >::const_iterator
178  localized_vectors_it = _localized_vectors.find(&localized_vector);
179  libmesh_assert(localized_vectors_it != _localized_vectors.end());
180  return localized_vectors_it->second.first;
181 }
std::map< const NumericVector< Number > *, std::pair< DenseVector< Number >, std::vector< DenseSubVector< Number > * > > > _localized_vectors
Definition: diff_context.h:558
libmesh_assert(j)
const System* libMesh::FEMContext::get_mesh_system ( ) const
inlineinherited

Accessor for moving mesh System

Definition at line 809 of file fem_context.h.

References libMesh::FEMContext::_mesh_sys.

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

Accessor for moving mesh System

Definition at line 815 of file fem_context.h.

References libMesh::FEMContext::_mesh_sys.

816  { 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 821 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().

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

Accessor for y-variable of moving mesh System

Definition at line 835 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().

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

Accessor for z-variable of moving mesh System

Definition at line 849 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().

850  { return _mesh_z_var; }
unsigned int _mesh_z_var
Definition: fem_context.h:970
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< 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< 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< 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< 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< 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< 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 330 of file diff_context.h.

References libMesh::DiffContext::_elem_qoi_derivative.

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

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

Non-const accessor for QoI derivatives.

Definition at line 336 of file diff_context.h.

References libMesh::DiffContext::_elem_qoi_derivative.

337  { return _elem_qoi_derivative; }
std::vector< DenseVector< Number > > _elem_qoi_derivative
Definition: diff_context.h:608
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 343 of file diff_context.h.

References libMesh::DiffContext::_elem_qoi_subderivatives, and libMesh::libmesh_assert().

344  {
345  libmesh_assert_greater(_elem_qoi_subderivatives.size(), qoi);
346  libmesh_assert_greater(_elem_qoi_subderivatives[qoi].size(), var);
348  return *(_elem_qoi_subderivatives[qoi][var]);
349  }
std::vector< std::vector< DenseSubVector< Number > * > > _elem_qoi_subderivatives
Definition: diff_context.h:609
libmesh_assert(j)
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 355 of file diff_context.h.

References libMesh::DiffContext::_elem_qoi_subderivatives, and libMesh::libmesh_assert().

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

Const accessor for QoI vector.

Definition at line 318 of file diff_context.h.

References libMesh::DiffContext::_elem_qoi.

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

Non-const accessor for QoI vector.

Definition at line 324 of file diff_context.h.

References libMesh::DiffContext::_elem_qoi.

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

Accessor for current side of Elem object

Definition at line 883 of file fem_context.h.

References libMesh::FEMContext::side.

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

884  { return side; }
unsigned char side
Definition: fem_context.h:975
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 297 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().

298  { this->get_side_fe<OutputShape>(var,fe,this->get_dim()); }
unsigned char get_dim() const
Definition: fem_context.h:897
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 308 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.

309  { return this->get_side_fe(var,this->get_dim()); }
unsigned char get_dim() const
Definition: fem_context.h:897
void get_side_fe(unsigned int var, FEGenericBase< OutputShape > *&fe) const
Definition: fem_context.h:297
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 1207 of file fem_context.h.

References libMesh::FEMContext::_side_fe_var, and libMesh::libmesh_assert().

1209 {
1210  libmesh_assert( !_side_fe_var[dim].empty() );
1211  libmesh_assert_less ( var, (_side_fe_var[dim].size() ) );
1212  fe = cast_ptr<FEGenericBase<OutputShape> *>( (_side_fe_var[dim][var] ) );
1213 }
libmesh_assert(j)
std::vector< std::vector< FEAbstract * > > _side_fe_var
Definition: fem_context.h:1091
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 1216 of file fem_context.h.

References libMesh::FEMContext::_side_fe_var, and libMesh::libmesh_assert().

1217 {
1218  libmesh_assert( !_side_fe_var[dim].empty() );
1219  libmesh_assert_less ( var, (_side_fe_var[dim].size() ) );
1220  return cast_ptr<FEBase *>( (_side_fe_var[dim][var] ) );
1221 }
libmesh_assert(j)
std::vector< std::vector< FEAbstract * > > _side_fe_var
Definition: fem_context.h:1091
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 770 of file fem_context.h.

References libMesh::FEMContext::get_elem_dim().

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

Accessor for element side quadrature rule.

Definition at line 783 of file fem_context.h.

References libMesh::FEMContext::_side_qrule, and libMesh::libmesh_assert().

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

Accessor for associated system.

Definition at line 104 of file diff_context.h.

References libMesh::DiffContext::_system.

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

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

Accessor for the time variable stored in the system class.

Definition at line 398 of file diff_context.h.

References libMesh::DiffContext::system_time.

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

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

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

Definition at line 404 of file diff_context.h.

References libMesh::DiffContext::time.

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

Test for current Elem object

Definition at line 863 of file fem_context.h.

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

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

864  { return (this->_elem != libmesh_nullptr); }
const class libmesh_nullptr_t libmesh_nullptr
const Elem * _elem
Definition: fem_context.h:1103
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 209 of file fem_context.C.

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

210 {
211  return _boundary_info.has_boundary_id(&(this->get_elem()), side, id);
212 }
const Elem & get_elem() const
Definition: fem_context.h:869
const BoundaryInfo & _boundary_info
Definition: fem_context.h:1098
unsigned char side
Definition: fem_context.h:975
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 1293 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().

1295 {
1296  this->some_value<OutputType,
1300 }
const DenseVector< Number > & get_elem_solution_accel() const
Definition: diff_context.h:179
void some_value(unsigned int var, unsigned int qp, OutputType &u) const
Definition: fem_context.C:232
void get_element_fe(unsigned int var, FEGenericBase< OutputShape > *&fe) const
Definition: fem_context.h:260
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 510 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().

512 {
513  typedef typename TensorTools::MakeReal<OutputType>::type OutputShape;
514 
515  // Get local-to-global dof index lookup
516  const unsigned int n_dofs = cast_int<unsigned int>
517  (this->get_dof_indices(var).size());
518 
519  // Get current local coefficients
520  libmesh_assert_greater (this->_elem_subsolutions.size(), var);
521  const DenseSubVector<Number> & coef = this->get_elem_solution(var);
522 
523  // Get finite element object
524  FEGenericBase<OutputShape> * fe = libmesh_nullptr;
525  this->get_element_fe<OutputShape>( var, fe, this->get_elem_dim() );
526 
527  // Get shape function values at quadrature point
528  const std::vector<std::vector<typename FEGenericBase<OutputShape>::OutputShape> > & curl_phi = fe->get_curl_phi();
529 
530  // Accumulate solution curl
531  curl_u = 0.;
532 
533  for (unsigned int l=0; l != n_dofs; l++)
534  curl_u.add_scaled(curl_phi[l][qp], coef(l));
535 
536  return;
537 }
const DenseVector< Number > & get_elem_solution() const
Definition: diff_context.h:110
const std::vector< dof_id_type > & get_dof_indices() const
Definition: diff_context.h:366
const class libmesh_nullptr_t libmesh_nullptr
std::vector< DenseSubVector< Number > * > _elem_subsolutions
Definition: diff_context.h:565
unsigned char get_elem_dim() const
Definition: fem_context.h:904
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 541 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().

543 {
544  typedef typename
545  TensorTools::IncrementRank
546  <typename TensorTools::MakeReal<OutputType>::type>::type OutputShape;
547 
548  // Get local-to-global dof index lookup
549  const unsigned int n_dofs = cast_int<unsigned int>
550  (this->get_dof_indices(var).size());
551 
552  // Get current local coefficients
553  libmesh_assert_greater (this->_elem_subsolutions.size(), var);
554  const DenseSubVector<Number> & coef = this->get_elem_solution(var);
555 
556  // Get finite element object
557  FEGenericBase<OutputShape> * fe = libmesh_nullptr;
558  this->get_element_fe<OutputShape>( var, fe, this->get_elem_dim() );
559 
560  // Get shape function values at quadrature point
561  const std::vector<std::vector<typename FEGenericBase<OutputShape>::OutputDivergence> > & div_phi = fe->get_div_phi();
562 
563  // Accumulate solution curl
564  div_u = 0.;
565 
566  for (unsigned int l=0; l != n_dofs; l++)
567  div_u += div_phi[l][qp] * coef(l);
568 
569  return;
570 }
const DenseVector< Number > & get_elem_solution() const
Definition: diff_context.h:110
const std::vector< dof_id_type > & get_dof_indices() const
Definition: diff_context.h:366
const class libmesh_nullptr_t libmesh_nullptr
std::vector< DenseSubVector< Number > * > _elem_subsolutions
Definition: diff_context.h:565
unsigned char get_elem_dim() const
Definition: fem_context.h:904
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 379 of file fem_context.C.

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

381 {
382  Gradient du;
383 
384  this->interior_gradient( var, qp, du );
385 
386  return du;
387 }
NumberVectorValue Gradient
Gradient interior_gradient(unsigned int var, unsigned int qp) const
Definition: fem_context.C:379
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 392 of file fem_context.C.

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

395 {
396  this->some_gradient<OutputType,
397  &FEMContext::get_element_fe<typename TensorTools::MakeReal
398  <typename TensorTools::DecrementRank
399  <OutputType>::type>::type>,
400  &DiffContext::get_elem_solution>(var, qp, du);
401 }
const DenseVector< Number > & get_elem_solution() const
Definition: diff_context.h:110
void get_element_fe(unsigned int var, FEGenericBase< OutputShape > *&fe) const
Definition: fem_context.h:260
void some_gradient(unsigned int var, unsigned int qp, OutputType &u) const
Definition: fem_context.C:261
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 406 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().

409 {
410  typedef typename TensorTools::MakeReal
412  OutputShape;
413 
414  // Get local-to-global dof index lookup
415  const unsigned int n_dofs = cast_int<unsigned int>
416  (this->get_dof_indices(var).size());
417 
418  // Get current local coefficients
419  const DenseSubVector<Number> & coef = get_localized_subvector(_system_vector, var);
420 
421  // Get finite element object
422  FEGenericBase<OutputShape> * fe = libmesh_nullptr;
423  this->get_element_fe<OutputShape>( var, fe, this->get_elem_dim() );
424 
425  // Get shape function values at quadrature point
426  const std::vector<std::vector<typename FEGenericBase<OutputShape>::OutputGradient> > & dphi = fe->get_dphi();
427 
428  // Loop over all the q_points in this finite element
429  for (std::size_t qp=0; qp != du_vals.size(); qp++)
430  {
431  OutputType & du = du_vals[qp];
432 
433  // Compute the gradient at this q_point
434  du = 0;
435 
436  for (unsigned int l=0; l != n_dofs; l++)
437  du.add_scaled(dphi[l][qp], coef(l));
438  }
439 
440  return;
441 }
const std::vector< dof_id_type > & get_dof_indices() const
Definition: diff_context.h:366
const class libmesh_nullptr_t libmesh_nullptr
DenseSubVector< Number > & get_localized_subvector(const NumericVector< Number > &localized_vector, unsigned int var)
Definition: diff_context.C:184
unsigned char get_elem_dim() const
Definition: fem_context.h:904
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 444 of file fem_context.C.

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

445 {
446  Tensor d2u;
447 
448  this->interior_hessian( var, qp, d2u );
449 
450  return d2u;
451 }
Tensor interior_hessian(unsigned int var, unsigned int qp) const
Definition: fem_context.C:444
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 454 of file fem_context.C.

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

456 {
457  this->some_hessian<OutputType,
459  <typename TensorTools::MakeReal
460  <typename TensorTools::DecrementRank
461  <typename TensorTools::DecrementRank
462  <OutputType>::type>::type>::type>,
463  &DiffContext::get_elem_solution>(var, qp, d2u);
464 }
const DenseVector< Number > & get_elem_solution() const
Definition: diff_context.h:110
void get_element_fe(unsigned int var, FEGenericBase< OutputShape > *&fe) const
Definition: fem_context.h:260
void some_hessian(unsigned int var, unsigned int qp, OutputType &u) const
Definition: fem_context.C:294
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 468 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().

471 {
472  typedef typename TensorTools::DecrementRank<OutputType>::type Rank1Decrement;
473  typedef typename TensorTools::DecrementRank<Rank1Decrement>::type Rank2Decrement;
474  typedef typename TensorTools::MakeReal<Rank2Decrement>::type OutputShape;
475 
476  // Get local-to-global dof index lookup
477  const unsigned int n_dofs = cast_int<unsigned int>
478  (this->get_dof_indices(var).size());
479 
480  // Get current local coefficients
481  const DenseSubVector<Number> & coef = get_localized_subvector(_system_vector, var);
482 
483  // Get finite element object
484  FEGenericBase<OutputShape> * fe = libmesh_nullptr;
485  this->get_element_fe<OutputShape>( var, fe, this->get_elem_dim() );
486 
487  // Get shape function values at quadrature point
488  const std::vector<std::vector<typename FEGenericBase<OutputShape>::OutputTensor> > & d2phi = fe->get_d2phi();
489 
490  // Loop over all the q_points in this finite element
491  for (std::size_t qp=0; qp != d2u_vals.size(); qp++)
492  {
493  OutputType & d2u = d2u_vals[qp];
494 
495  // Compute the gradient at this q_point
496  d2u = 0;
497 
498  for (unsigned int l=0; l != n_dofs; l++)
499  d2u.add_scaled(d2phi[l][qp], coef(l));
500  }
501 
502  return;
503 }
const std::vector< dof_id_type > & get_dof_indices() const
Definition: diff_context.h:366
const class libmesh_nullptr_t libmesh_nullptr
DenseSubVector< Number > & get_localized_subvector(const NumericVector< Number > &localized_vector, unsigned int var)
Definition: diff_context.C:184
unsigned char get_elem_dim() const
Definition: fem_context.h:904
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 1271 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().

1273 {
1274  this->some_value<OutputType,
1278 }
void some_value(unsigned int var, unsigned int qp, OutputType &u) const
Definition: fem_context.C:232
void get_element_fe(unsigned int var, FEGenericBase< OutputShape > *&fe) const
Definition: fem_context.h:260
const DenseVector< Number > & get_elem_solution_rate() const
Definition: diff_context.h:144
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 324 of file fem_context.C.

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

325 {
326  Number u;
327 
328  this->interior_value( var, qp, u );
329 
330  return u;
331 }
Number interior_value(unsigned int var, unsigned int qp) const
Definition: fem_context.C:324
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 334 of file fem_context.C.

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

336 {
337  this->some_value<OutputType,
338  &FEMContext::get_element_fe<typename TensorTools::MakeReal<OutputType>::type>,
339  &DiffContext::get_elem_solution>(var, qp, u);
340 }
const DenseVector< Number > & get_elem_solution() const
Definition: diff_context.h:110
void some_value(unsigned int var, unsigned int qp, OutputType &u) const
Definition: fem_context.C:232
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 344 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().

347 {
348  typedef typename TensorTools::MakeReal<OutputType>::type OutputShape;
349 
350  // Get local-to-global dof index lookup
351  const unsigned int n_dofs = cast_int<unsigned int>
352  (this->get_dof_indices(var).size());
353 
354  // Get current local coefficients
355  const DenseSubVector<Number> & coef = get_localized_subvector(_system_vector, var);
356 
357  // Get the finite element object
358  FEGenericBase<OutputShape> * fe = libmesh_nullptr;
359  this->get_element_fe<OutputShape>( var, fe, this->get_elem_dim() );
360 
361  // Get shape function values at quadrature point
362  const std::vector<std::vector<OutputShape> > & phi = fe->get_phi();
363 
364  // Loop over all the q_points on this element
365  for (std::size_t qp=0; qp != u_vals.size(); qp++)
366  {
367  OutputType & u = u_vals[qp];
368 
369  // Compute the value at this q_point
370  u = 0.;
371 
372  for (unsigned int l=0; l != n_dofs; l++)
373  u += phi[l][qp] * coef(l);
374  }
375 
376  return;
377 }
const std::vector< dof_id_type > & get_dof_indices() const
Definition: diff_context.h:366
const class libmesh_nullptr_t libmesh_nullptr
DenseSubVector< Number > & get_localized_subvector(const NumericVector< Number > &localized_vector, unsigned int var)
Definition: diff_context.C:184
unsigned char get_elem_dim() const
Definition: fem_context.h:904
bool libMesh::DiffContext::is_adjoint ( ) const
inlineinherited

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

Definition at line 453 of file diff_context.h.

References libMesh::DiffContext::_is_adjoint.

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

454  { 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 460 of file diff_context.h.

References libMesh::DiffContext::_is_adjoint.

461  { 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 111 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().

112 {
113  // Call this *after* side_fe_reinit
114 
115  // Initialize all the neighbor side FE objects based on inverse mapping
116  // the quadrature points on the current side
117  std::vector<Point> qface_side_points;
118  std::vector<Point> qface_neighbor_points;
119  std::map<FEType, FEAbstract *>::iterator local_fe_end = _neighbor_side_fe.end();
120  for (std::map<FEType, FEAbstract *>::iterator i = _neighbor_side_fe.begin();
121  i != local_fe_end; ++i)
122  {
123  FEType neighbor_side_fe_type = i->first;
124  FEAbstract * side_fe = _side_fe[this->get_dim()][neighbor_side_fe_type];
125  qface_side_points = side_fe->get_xyz();
126 
128  neighbor_side_fe_type,
129  &get_neighbor(),
130  qface_side_points,
131  qface_neighbor_points);
132 
133  i->second->reinit(&get_neighbor(), &qface_neighbor_points);
134  }
135 
136  // Set boolean flag to indicate that the DG terms are active on this element
137  _dg_terms_active = true;
138 
139  // Also, initialize data required for DG assembly on the current side,
140  // analogously to FEMContext::pre_fe_reinit
141 
142  // Initialize the per-element data for elem.
144 
145  const unsigned int n_dofs = cast_int<unsigned int>
146  (this->get_dof_indices().size());
147  const unsigned int n_neighbor_dofs = cast_int<unsigned int>
148  (_neighbor_dof_indices.size());
149 
150  // These resize calls also zero out the residual and jacobian
151  _neighbor_residual.resize(n_neighbor_dofs);
152  _elem_elem_jacobian.resize(n_dofs, n_dofs);
153  _elem_neighbor_jacobian.resize(n_dofs, n_neighbor_dofs);
154  _neighbor_elem_jacobian.resize(n_neighbor_dofs, n_dofs);
155  _neighbor_neighbor_jacobian.resize(n_neighbor_dofs, n_neighbor_dofs);
156 
157  // Initialize the per-variable data for elem.
158  {
159  unsigned int sub_dofs = 0;
160  for (unsigned int i=0; i != get_system().n_vars(); ++i)
161  {
163 
164  const unsigned int n_dofs_var = cast_int<unsigned int>
165  (_neighbor_dof_indices_var[i].size());
166 
167  _neighbor_subresiduals[i]->reposition
168  (sub_dofs, n_dofs_var);
169 
170  for (unsigned int j=0; j != i; ++j)
171  {
172  const unsigned int n_dofs_var_j =
173  cast_int<unsigned int>
174  (this->get_dof_indices(j).size());
175 
176  _elem_elem_subjacobians[i][j]->reposition
177  (sub_dofs, _neighbor_subresiduals[j]->i_off(),
178  n_dofs_var, n_dofs_var_j);
179  _elem_elem_subjacobians[j][i]->reposition
180  (_neighbor_subresiduals[j]->i_off(), sub_dofs,
181  n_dofs_var_j, n_dofs_var);
182 
183  _elem_neighbor_subjacobians[i][j]->reposition
184  (sub_dofs, _neighbor_subresiduals[j]->i_off(),
185  n_dofs_var, n_dofs_var_j);
186  _elem_neighbor_subjacobians[j][i]->reposition
187  (_neighbor_subresiduals[j]->i_off(), sub_dofs,
188  n_dofs_var_j, n_dofs_var);
189 
190  _neighbor_elem_subjacobians[i][j]->reposition
191  (sub_dofs, _neighbor_subresiduals[j]->i_off(),
192  n_dofs_var, n_dofs_var_j);
193  _neighbor_elem_subjacobians[j][i]->reposition
194  (_neighbor_subresiduals[j]->i_off(), sub_dofs,
195  n_dofs_var_j, n_dofs_var);
196 
197  _neighbor_neighbor_subjacobians[i][j]->reposition
198  (sub_dofs, _neighbor_subresiduals[j]->i_off(),
199  n_dofs_var, n_dofs_var_j);
200  _neighbor_neighbor_subjacobians[j][i]->reposition
201  (_neighbor_subresiduals[j]->i_off(), sub_dofs,
202  n_dofs_var_j, n_dofs_var);
203  }
204  _elem_elem_subjacobians[i][i]->reposition
205  (sub_dofs, sub_dofs,
206  n_dofs_var,
207  n_dofs_var);
208  _elem_neighbor_subjacobians[i][i]->reposition
209  (sub_dofs, sub_dofs,
210  n_dofs_var,
211  n_dofs_var);
212  _neighbor_elem_subjacobians[i][i]->reposition
213  (sub_dofs, sub_dofs,
214  n_dofs_var,
215  n_dofs_var);
216  _neighbor_neighbor_subjacobians[i][i]->reposition
217  (sub_dofs, sub_dofs,
218  n_dofs_var,
219  n_dofs_var);
220  sub_dofs += n_dofs_var;
221  }
222  libmesh_assert_equal_to (sub_dofs, n_dofs);
223  }
224 
225 }
std::vector< dof_id_type > _neighbor_dof_indices
DenseVector< Number > _neighbor_residual
DenseMatrix< Number > _elem_elem_jacobian
void resize(const unsigned int n)
Definition: dense_vector.h:350
std::vector< std::vector< dof_id_type > > _neighbor_dof_indices_var
std::map< FEType, FEAbstract * > _neighbor_side_fe
const std::vector< dof_id_type > & get_dof_indices() const
Definition: diff_context.h:366
const Elem & get_neighbor() const
unsigned char get_dim() const
Definition: fem_context.h:897
const DofMap & get_dof_map() const
Definition: system.h:2028
std::vector< std::vector< DenseSubMatrix< Number > * > > _elem_elem_subjacobians
std::vector< std::vector< DenseSubMatrix< Number > * > > _neighbor_neighbor_subjacobians
std::vector< std::vector< DenseSubMatrix< Number > * > > _elem_neighbor_subjacobians
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:556
DenseMatrix< Number > _elem_neighbor_jacobian
const System & get_system() const
Definition: diff_context.h:104
std::vector< std::map< FEType, FEAbstract * > > _side_fe
Definition: fem_context.h:1080
std::vector< std::vector< 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
std::vector< DenseSubVector< Number > * > _neighbor_subresiduals
unsigned int n_vars() const
Definition: system.h:2084
void dof_indices(const Elem *const elem, std::vector< dof_id_type > &di) const
Definition: dof_map.C:2005
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 1370 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().

1371 {
1372  // Update the "time" variable of this context object
1373  this->_update_time_from_system(theta);
1374 
1375  // We can reuse the Elem FE safely here.
1376  elem_fe_reinit();
1377 }
void _update_time_from_system(Real theta)
Definition: fem_context.C:1794
virtual void elem_fe_reinit(const std::vector< Point > *const pts=libmesh_nullptr)
Definition: fem_context.C:1380
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 935 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().

939 {
940  typedef typename TensorTools::MakeReal<OutputType>::type OutputShape;
941 
942  // Get local-to-global dof index lookup
943  const unsigned int n_dofs = cast_int<unsigned int>
944  (this->get_dof_indices(var).size());
945 
946  // Get current local coefficients
947  libmesh_assert_greater (this->_elem_subsolutions.size(), var);
948  const DenseSubVector<Number> & coef = this->get_elem_solution(var);
949 
950  // Get finite element object
951  FEGenericBase<OutputShape> * fe = libmesh_nullptr;
952  this->get_element_fe<OutputShape>( var, fe, this->get_elem_dim() );
953 
954  // Build a FE for calculating u(p)
955  UniquePtr<FEGenericBase<OutputShape> > fe_new =
956  this->build_new_fe( fe, p, tolerance );
957 
958  // Get the values of the shape function derivatives
959  const std::vector<std::vector<typename FEGenericBase<OutputShape>::OutputShape> > & curl_phi = fe_new->get_curl_phi();
960 
961  curl_u = 0.0;
962 
963  for (unsigned int l=0; l != n_dofs; l++)
964  curl_u.add_scaled(curl_phi[l][0], coef(l));
965 
966  return;
967 }
UniquePtr< FEGenericBase< OutputShape > > build_new_fe(const FEGenericBase< OutputShape > *fe, const Point &p, const Real tolerance=TOLERANCE) const
Definition: fem_context.C:1809
const DenseVector< Number > & get_elem_solution() const
Definition: diff_context.h:110
const std::vector< dof_id_type > & get_dof_indices() const
Definition: diff_context.h:366
const class libmesh_nullptr_t libmesh_nullptr
std::vector< DenseSubVector< Number > * > _elem_subsolutions
Definition: diff_context.h:565
unsigned char get_elem_dim() const
Definition: fem_context.h:904
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 832 of file fem_context.C.

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

833 {
834  Gradient grad_u;
835 
836  this->point_gradient( var, p, grad_u );
837 
838  return grad_u;
839 }
NumberVectorValue Gradient
Gradient point_gradient(unsigned int var, const Point &p) const
Definition: fem_context.C:832
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 844 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.

848 {
849  typedef typename TensorTools::MakeReal
851  OutputShape;
852 
853  // Get local-to-global dof index lookup
854  const unsigned int n_dofs = cast_int<unsigned int>
855  (this->get_dof_indices(var).size());
856 
857  // Get current local coefficients
858  libmesh_assert_greater (this->_elem_subsolutions.size(), var);
859  const DenseSubVector<Number> & coef = this->get_elem_solution(var);
860 
861  // Get finite element object
862  FEGenericBase<OutputShape> * fe = libmesh_nullptr;
863  this->get_element_fe<OutputShape>( var, fe, this->get_elem_dim() );
864 
865  // Build a FE for calculating u(p)
866  UniquePtr<FEGenericBase<OutputShape> > fe_new =
867  this->build_new_fe( fe, p, tolerance );
868 
869  // Get the values of the shape function derivatives
870  const std::vector<std::vector<typename FEGenericBase<OutputShape>::OutputGradient> > & dphi = fe_new->get_dphi();
871 
872  grad_u = 0.0;
873 
874  for (unsigned int l=0; l != n_dofs; l++)
875  grad_u.add_scaled(dphi[l][0], coef(l));
876 
877  return;
878 }
UniquePtr< FEGenericBase< OutputShape > > build_new_fe(const FEGenericBase< OutputShape > *fe, const Point &p, const Real tolerance=TOLERANCE) const
Definition: fem_context.C:1809
const DenseVector< Number > & get_elem_solution() const
Definition: diff_context.h:110
const std::vector< dof_id_type > & get_dof_indices() const
Definition: diff_context.h:366
const class libmesh_nullptr_t libmesh_nullptr
std::vector< DenseSubVector< Number > * > _elem_subsolutions
Definition: diff_context.h:565
unsigned char get_elem_dim() const
Definition: fem_context.h:904
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 884 of file fem_context.C.

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

885 {
886  Tensor hess_u;
887 
888  this->point_hessian( var, p, hess_u );
889 
890  return hess_u;
891 }
Tensor point_hessian(unsigned int var, const Point &p) const
Definition: fem_context.C:884
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 895 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.

899 {
900  typedef typename TensorTools::DecrementRank<OutputType>::type Rank1Decrement;
901  typedef typename TensorTools::DecrementRank<Rank1Decrement>::type Rank2Decrement;
902  typedef typename TensorTools::MakeReal<Rank2Decrement>::type OutputShape;
903 
904  // Get local-to-global dof index lookup
905  const unsigned int n_dofs = cast_int<unsigned int>
906  (this->get_dof_indices(var).size());
907 
908  // Get current local coefficients
909  libmesh_assert_greater (this->_elem_subsolutions.size(), var);
910  const DenseSubVector<Number> & coef = this->get_elem_solution(var);
911 
912  // Get finite element object
913  FEGenericBase<OutputShape> * fe = libmesh_nullptr;
914  this->get_element_fe<OutputShape>( var, fe, this->get_elem_dim() );
915 
916  // Build a FE for calculating u(p)
917  UniquePtr<FEGenericBase<OutputShape> > fe_new =
918  this->build_new_fe( fe, p, tolerance );
919 
920  // Get the values of the shape function derivatives
921  const std::vector<std::vector<typename FEGenericBase<OutputShape>::OutputTensor> > & d2phi = fe_new->get_d2phi();
922 
923  hess_u = 0.0;
924 
925  for (unsigned int l=0; l != n_dofs; l++)
926  hess_u.add_scaled(d2phi[l][0], coef(l));
927 
928  return;
929 }
UniquePtr< FEGenericBase< OutputShape > > build_new_fe(const FEGenericBase< OutputShape > *fe, const Point &p, const Real tolerance=TOLERANCE) const
Definition: fem_context.C:1809
const DenseVector< Number > & get_elem_solution() const
Definition: diff_context.h:110
const std::vector< dof_id_type > & get_dof_indices() const
Definition: diff_context.h:366
const class libmesh_nullptr_t libmesh_nullptr
std::vector< DenseSubVector< Number > * > _elem_subsolutions
Definition: diff_context.h:565
unsigned char get_elem_dim() const
Definition: fem_context.h:904
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 786 of file fem_context.C.

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

787 {
788  Number u = 0.;
789 
790  this->point_value( var, p, u );
791 
792  return u;
793 }
Number point_value(unsigned int var, const Point &p) const
Definition: fem_context.C:786
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 796 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.

800 {
801  typedef typename TensorTools::MakeReal<OutputType>::type OutputShape;
802 
803  // Get local-to-global dof index lookup
804  const unsigned int n_dofs = cast_int<unsigned int>
805  (this->get_dof_indices(var).size());
806 
807  // Get current local coefficients
808  libmesh_assert_greater (this->_elem_subsolutions.size(), var);
809  const DenseSubVector<Number> & coef = this->get_elem_solution(var);
810 
811  // Get finite element object
812  FEGenericBase<OutputShape> * fe = libmesh_nullptr;
813  this->get_element_fe<OutputShape>( var, fe, this->get_elem_dim() );
814 
815  // Build a FE for calculating u(p)
816  UniquePtr<FEGenericBase<OutputShape> > fe_new =
817  this->build_new_fe( fe, p, tolerance );
818 
819  // Get the values of the shape function derivatives
820  const std::vector<std::vector<OutputShape> > & phi = fe_new->get_phi();
821 
822  u = 0.;
823 
824  for (unsigned int l=0; l != n_dofs; l++)
825  u += phi[l][0] * coef(l);
826 
827  return;
828 }
UniquePtr< FEGenericBase< OutputShape > > build_new_fe(const FEGenericBase< OutputShape > *fe, const Point &p, const Real tolerance=TOLERANCE) const
Definition: fem_context.C:1809
const DenseVector< Number > & get_elem_solution() const
Definition: diff_context.h:110
const std::vector< dof_id_type > & get_dof_indices() const
Definition: diff_context.h:366
const class libmesh_nullptr_t libmesh_nullptr
std::vector< DenseSubVector< Number > * > _elem_subsolutions
Definition: diff_context.h:565
unsigned char get_elem_dim() const
Definition: fem_context.h:904
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 1580 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::System::qoi, libMesh::DenseVector< T >::resize(), libMesh::DenseMatrix< T >::resize(), libMesh::FEMContext::set_elem(), libMesh::sys, 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().

1581 {
1582  this->set_elem(e);
1583 
1584  if (algebraic_type() == CURRENT ||
1586  {
1587  // Initialize the per-element data for elem.
1588  if (this->has_elem())
1589  sys.get_dof_map().dof_indices (&(this->get_elem()), this->get_dof_indices());
1590  else
1591  // If !this->has_elem(), then we assume we are dealing with a SCALAR variable
1593  (static_cast<Elem*>(libmesh_nullptr), this->get_dof_indices());
1594  }
1595 #ifdef LIBMESH_ENABLE_AMR
1596  else if (algebraic_type() == OLD)
1597  {
1598  // Initialize the per-element data for elem.
1599  if (this->has_elem())
1600  sys.get_dof_map().old_dof_indices (&(this->get_elem()), this->get_dof_indices());
1601  else
1602  // If !this->has_elem(), then we assume we are dealing with a SCALAR variable
1604  (static_cast<Elem*>(libmesh_nullptr), this->get_dof_indices());
1605  }
1606 #endif // LIBMESH_ENABLE_AMR
1607 
1608  const unsigned int n_dofs = cast_int<unsigned int>
1609  (this->get_dof_indices().size());
1610  const std::size_t n_qoi = sys.qoi.size();
1611 
1612  if (this->algebraic_type() != NONE &&
1613  this->algebraic_type() != DOFS_ONLY)
1614  {
1615  // This also resizes elem_solution
1617  sys.current_local_solution->get(this->get_dof_indices(), this->get_elem_solution().get_values());
1618  else
1619  _custom_solution->get(this->get_dof_indices(), this->get_elem_solution().get_values());
1620 
1621  if (sys.use_fixed_solution)
1622  this->get_elem_fixed_solution().resize(n_dofs);
1623 
1624  // Only make space for these if we're using DiffSystem
1625  // This is assuming *only* DiffSystem is using elem_solution_rate/accel
1626  const DifferentiableSystem * diff_system = dynamic_cast<const DifferentiableSystem *>(&sys);
1627  if (diff_system)
1628  {
1629  // Now, we only need these if the solver is unsteady
1630  if (!diff_system->get_time_solver().is_steady())
1631  {
1632  this->get_elem_solution_rate().resize(n_dofs);
1633 
1634  // We only need accel space if the TimeSolver is second order
1635  const UnsteadySolver & time_solver = cast_ref<const UnsteadySolver &>(diff_system->get_time_solver());
1636 
1637  if (time_solver.time_order() >= 2 || !diff_system->get_second_order_vars().empty())
1638  this->get_elem_solution_accel().resize(n_dofs);
1639  }
1640  }
1641 
1642  if (algebraic_type() != OLD)
1643  {
1644  // These resize calls also zero out the residual and jacobian
1645  this->get_elem_residual().resize(n_dofs);
1646  this->get_elem_jacobian().resize(n_dofs, n_dofs);
1647 
1648  this->get_qoi_derivatives().resize(n_qoi);
1649  this->_elem_qoi_subderivatives.resize(n_qoi);
1650  for (std::size_t q=0; q != n_qoi; ++q)
1651  (this->get_qoi_derivatives())[q].resize(n_dofs);
1652  }
1653  }
1654 
1655  // Initialize the per-variable data for elem.
1656  {
1657  unsigned int sub_dofs = 0;
1658  for (unsigned int i=0; i != sys.n_vars(); ++i)
1659  {
1660  if (algebraic_type() == CURRENT ||
1662  {
1663  if (this->has_elem())
1664  sys.get_dof_map().dof_indices (&(this->get_elem()), this->get_dof_indices(i), i);
1665  else
1666  // If !this->has_elem(), then we assume we are dealing with a SCALAR variable
1668  (static_cast<Elem*>(libmesh_nullptr), this->get_dof_indices(i), i);
1669  }
1670 #ifdef LIBMESH_ENABLE_AMR
1671  else if (algebraic_type() == OLD)
1672  {
1673  if (this->has_elem())
1674  sys.get_dof_map().old_dof_indices (&(this->get_elem()), this->get_dof_indices(i), i);
1675  else
1676  // If !this->has_elem(), then we assume we are dealing with a SCALAR variable
1678  (static_cast<Elem*>(libmesh_nullptr), this->get_dof_indices(i), i);
1679  }
1680 #endif // LIBMESH_ENABLE_AMR
1681 
1682  if (this->algebraic_type() != NONE &&
1683  this->algebraic_type() != DOFS_ONLY)
1684  {
1685  const unsigned int n_dofs_var = cast_int<unsigned int>
1686  (this->get_dof_indices(i).size());
1687 
1688  this->get_elem_solution(i).reposition
1689  (sub_dofs, n_dofs_var);
1690 
1691  // Only make space for these if we're using DiffSystem
1692  // This is assuming *only* DiffSystem is using elem_solution_rate/accel
1693  const DifferentiableSystem * diff_system = dynamic_cast<const DifferentiableSystem *>(&sys);
1694  if (diff_system)
1695  {
1696  // Now, we only need these if the solver is unsteady
1697  if (!diff_system->get_time_solver().is_steady())
1698  {
1699  this->get_elem_solution_rate(i).reposition
1700  (sub_dofs, n_dofs_var);
1701 
1702  // We only need accel space if the TimeSolver is second order
1703  const UnsteadySolver & time_solver = cast_ref<const UnsteadySolver &>(diff_system->get_time_solver());
1704 
1705  if (time_solver.time_order() >= 2 || !diff_system->get_second_order_vars().empty())
1706  this->get_elem_solution_accel(i).reposition
1707  (sub_dofs, n_dofs_var);
1708  }
1709  }
1710 
1711  if (sys.use_fixed_solution)
1712  this->get_elem_fixed_solution(i).reposition
1713  (sub_dofs, n_dofs_var);
1714 
1715  if (algebraic_type() != OLD)
1716  {
1717  this->get_elem_residual(i).reposition
1718  (sub_dofs, n_dofs_var);
1719 
1720  for (std::size_t q=0; q != n_qoi; ++q)
1721  this->get_qoi_derivatives(q,i).reposition
1722  (sub_dofs, n_dofs_var);
1723 
1724  for (unsigned int j=0; j != i; ++j)
1725  {
1726  const unsigned int n_dofs_var_j =
1727  cast_int<unsigned int>
1728  (this->get_dof_indices(j).size());
1729 
1730  this->get_elem_jacobian(i,j).reposition
1731  (sub_dofs, this->get_elem_residual(j).i_off(),
1732  n_dofs_var, n_dofs_var_j);
1733  this->get_elem_jacobian(j,i).reposition
1734  (this->get_elem_residual(j).i_off(), sub_dofs,
1735  n_dofs_var_j, n_dofs_var);
1736  }
1737  this->get_elem_jacobian(i,i).reposition
1738  (sub_dofs, sub_dofs,
1739  n_dofs_var,
1740  n_dofs_var);
1741  }
1742 
1743  sub_dofs += n_dofs_var;
1744  }
1745  }
1746 
1747  if (this->algebraic_type() != NONE &&
1748  this->algebraic_type() != DOFS_ONLY &&
1749  this->algebraic_type() != OLD)
1750  libmesh_assert_equal_to (sub_dofs, n_dofs);
1751  }
1752 
1753  // Now do the localization for the user requested vectors
1754  if (this->algebraic_type() != NONE)
1755  {
1756  DiffContext::localized_vectors_iterator localized_vec_it = this->_localized_vectors.begin();
1757  const DiffContext::localized_vectors_iterator localized_vec_end = this->_localized_vectors.end();
1758 
1759  for (; localized_vec_it != localized_vec_end; ++localized_vec_it)
1760  {
1761  const NumericVector<Number> & current_localized_vector = *localized_vec_it->first;
1762  DenseVector<Number> & target_vector = localized_vec_it->second.first;
1763 
1764  current_localized_vector.get(this->get_dof_indices(), target_vector.get_values());
1765 
1766  // Initialize the per-variable data for elem.
1767  unsigned int sub_dofs = 0;
1768  for (unsigned int i=0; i != sys.n_vars(); ++i)
1769  {
1770  const unsigned int n_dofs_var = cast_int<unsigned int>
1771  (this->get_dof_indices(i).size());
1772 
1773  // This is redundant with earlier initialization, isn't it? - RHS
1774  // sys.get_dof_map().dof_indices (&(this->get_elem()), this->get_dof_indices(i), i);
1775 
1776  localized_vec_it->second.second[i]->reposition
1777  (sub_dofs, n_dofs_var);
1778 
1779  sub_dofs += n_dofs_var;
1780  }
1781  libmesh_assert_equal_to (sub_dofs, n_dofs);
1782  }
1783  }
1784 }
const DenseVector< Number > & get_elem_solution() const
Definition: diff_context.h:110
std::map< const NumericVector< Number > *, std::pair< DenseVector< Number >, std::vector< DenseSubVector< Number > * > > > _localized_vectors
Definition: diff_context.h:558
const NumericVector< Number > * _custom_solution
Definition: fem_context.h:992
void set_elem(const Elem *e)
Definition: fem_context.C:1786
ImplicitSystem & sys
bool has_elem() const
Definition: fem_context.h:863
std::vector< std::vector< DenseSubVector< Number > * > > _elem_qoi_subderivatives
Definition: diff_context.h:609
const DenseVector< Number > & get_elem_solution_accel() const
Definition: diff_context.h:179
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:366
const DenseVector< Number > & get_elem_fixed_solution() const
Definition: diff_context.h:214
UniquePtr< NumericVector< Number > > current_local_solution
Definition: system.h:1533
const class libmesh_nullptr_t libmesh_nullptr
void old_dof_indices(const Elem *const elem, std::vector< dof_id_type > &di, const unsigned int vn=libMesh::invalid_uint) const
Definition: dof_map.C:2463
const DenseVector< Number > & get_elem_residual() const
Definition: diff_context.h:248
const Elem & get_elem() const
Definition: fem_context.h:869
const DenseMatrix< Number > & get_elem_jacobian() const
Definition: diff_context.h:282
const std::vector< DenseVector< Number > > & get_qoi_derivatives() const
Definition: diff_context.h:330
const DofMap & get_dof_map() const
Definition: system.h:2028
std::map< const NumericVector< Number > *, std::pair< DenseVector< Number >, std::vector< DenseSubVector< Number > * > > >::iterator localized_vectors_iterator
Definition: diff_context.h:527
std::vector< Number > qoi
Definition: system.h:1551
bool use_fixed_solution
Definition: system.h:1491
const DenseVector< Number > & get_elem_solution_rate() const
Definition: diff_context.h:144
AlgebraicType algebraic_type() const
Definition: fem_context.h:950
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
unsigned int n_vars() const
Definition: system.h:2084
void dof_indices(const Elem *const elem, std::vector< dof_id_type > &di) const
Definition: dof_map.C:2005
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 944 of file fem_context.h.

References libMesh::FEMContext::_atype.

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

945  { _atype = atype; }
AlgebraicType _atype
Definition: fem_context.h:987
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 959 of file fem_context.h.

References libMesh::FEMContext::_custom_solution.

960  { _custom_solution = custom_sol; }
const NumericVector< Number > * _custom_solution
Definition: fem_context.h:992
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 138 of file diff_context.C.

References libMesh::DiffContext::_deltat.

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

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

Helper function to promote accessor usage

Definition at line 1786 of file fem_context.C.

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

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

1787 {
1788  this->_elem = e;
1789 
1790  // If e is NULL, we assume it's SCALAR and set _elem_dim to 0.
1791  this->_elem_dim = this->_elem ? this->_elem->dim() : 0;
1792 }
unsigned char _elem_dim
Definition: fem_context.h:1113
virtual unsigned int dim() const =0
const Elem * _elem
Definition: fem_context.h:1103
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 803 of file fem_context.h.

References libMesh::FEMContext::_mesh_sys, and libMesh::sys.

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

804  { this->_mesh_sys = sys; }
ImplicitSystem & 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 829 of file fem_context.h.

References libMesh::FEMContext::_mesh_x_var.

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

830  { _mesh_x_var = x_var; }
unsigned int _mesh_x_var
Definition: fem_context.h:970
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 843 of file fem_context.h.

References libMesh::FEMContext::_mesh_y_var.

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

844  { _mesh_y_var = y_var; }
unsigned int _mesh_y_var
Definition: fem_context.h:970
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 857 of file fem_context.h.

References libMesh::FEMContext::_mesh_z_var.

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

858  { _mesh_z_var = z_var; }
unsigned int _mesh_z_var
Definition: fem_context.h:970
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 410 of file diff_context.h.

References libMesh::DiffContext::time.

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

411  { 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 1305 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().

1307 {
1308  this->some_value<OutputType,
1312 }
const DenseVector< Number > & get_elem_solution_accel() const
Definition: diff_context.h:179
void some_value(unsigned int var, unsigned int qp, OutputType &u) const
Definition: fem_context.C:232
void get_side_fe(unsigned int var, FEGenericBase< OutputShape > *&fe) const
Definition: fem_context.h:297
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 215 of file fem_context.C.

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

216 {
217  libmesh_deprecated();
218  return _boundary_info.boundary_ids(&(this->get_elem()), side);
219 }
const Elem & get_elem() const
Definition: fem_context.h:869
std::vector< boundary_id_type > boundary_ids(const Node *node) const
const BoundaryInfo & _boundary_info
Definition: fem_context.h:1098
unsigned char side
Definition: fem_context.h:975
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 222 of file fem_context.C.

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

223 {
224  _boundary_info.boundary_ids(&(this->get_elem()), side, vec_to_fill);
225 }
const Elem & get_elem() const
Definition: fem_context.h:869
std::vector< boundary_id_type > boundary_ids(const Node *node) const
const BoundaryInfo & _boundary_info
Definition: fem_context.h:1098
unsigned char side
Definition: fem_context.h:975
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 102 of file dg_fem_context.C.

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

103 {
105 
106  // By default we assume that the DG terms are inactive
107  // They are only active if neighbor_side_fe_reinit is called
108  _dg_terms_active = false;
109 }
virtual void side_fe_reinit()
Definition: fem_context.C:1403
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 631 of file fem_context.C.

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

632 {
633  Gradient du;
634 
635  this->side_gradient( var, qp, du );
636 
637  return du;
638 }
NumberVectorValue Gradient
Gradient side_gradient(unsigned int var, unsigned int qp) const
Definition: fem_context.C:631
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 642 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.

644 {
645  typedef typename TensorTools::MakeReal
647  OutputShape;
648 
649  // Get local-to-global dof index lookup
650  const unsigned int n_dofs = cast_int<unsigned int>
651  (this->get_dof_indices(var).size());
652 
653  // Get current local coefficients
654  libmesh_assert_greater (this->_elem_subsolutions.size(), var);
655  const DenseSubVector<Number> & coef = this->get_elem_solution(var);
656 
657  // Get finite element object
658  FEGenericBase<OutputShape> * the_side_fe = libmesh_nullptr;
659  this->get_side_fe<OutputShape>( var, the_side_fe, this->get_elem_dim() );
660 
661  // Get shape function values at quadrature point
662  const std::vector<std::vector< typename FEGenericBase<OutputShape>::OutputGradient> > & dphi = the_side_fe->get_dphi();
663 
664  // Accumulate solution derivatives
665  du = 0.;
666 
667  for (unsigned int l=0; l != n_dofs; l++)
668  du.add_scaled(dphi[l][qp], coef(l));
669 
670  return;
671 }
const DenseVector< Number > & get_elem_solution() const
Definition: diff_context.h:110
const std::vector< dof_id_type > & get_dof_indices() const
Definition: diff_context.h:366
const class libmesh_nullptr_t libmesh_nullptr
std::vector< DenseSubVector< Number > * > _elem_subsolutions
Definition: diff_context.h:565
unsigned char get_elem_dim() const
Definition: fem_context.h:904
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 676 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().

679 {
680  typedef typename TensorTools::MakeReal
682  OutputShape;
683 
684  // Get local-to-global dof index lookup
685  const unsigned int n_dofs = cast_int<unsigned int>
686  (this->get_dof_indices(var).size());
687 
688  // Get current local coefficients
689  const DenseSubVector<Number> & coef = get_localized_subvector(_system_vector, var);
690 
691  // Get finite element object
692  FEGenericBase<OutputShape> * the_side_fe = libmesh_nullptr;
693  this->get_side_fe<OutputShape>( var, the_side_fe, this->get_elem_dim() );
694 
695  // Get shape function values at quadrature point
696  const std::vector<std::vector<typename FEGenericBase<OutputShape>::OutputGradient> > & dphi = the_side_fe->get_dphi();
697 
698  // Loop over all the q_points in this finite element
699  for (std::size_t qp=0; qp != du_vals.size(); qp++)
700  {
701  OutputType & du = du_vals[qp];
702 
703  du = 0;
704 
705  // Compute the gradient at this q_point
706  for (unsigned int l=0; l != n_dofs; l++)
707  du.add_scaled(dphi[l][qp], coef(l));
708  }
709 
710  return;
711 }
const std::vector< dof_id_type > & get_dof_indices() const
Definition: diff_context.h:366
const class libmesh_nullptr_t libmesh_nullptr
DenseSubVector< Number > & get_localized_subvector(const NumericVector< Number > &localized_vector, unsigned int var)
Definition: diff_context.C:184
unsigned char get_elem_dim() const
Definition: fem_context.h:904
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 714 of file fem_context.C.

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

716 {
717  Tensor d2u;
718 
719  this->side_hessian( var, qp, d2u );
720 
721  return d2u;
722 }
NumberTensorValue Tensor
Tensor side_hessian(unsigned int var, unsigned int qp) const
Definition: fem_context.C:714
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 727 of file fem_context.C.

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

730 {
731  this->some_hessian<OutputType,
733  <typename TensorTools::MakeReal
734  <typename TensorTools::DecrementRank
735  <typename TensorTools::DecrementRank
736  <OutputType>::type>::type>::type>,
737  &DiffContext::get_elem_solution>(var, qp, d2u);
738 }
const DenseVector< Number > & get_elem_solution() const
Definition: diff_context.h:110
void some_hessian(unsigned int var, unsigned int qp, OutputType &u) const
Definition: fem_context.C:294
void get_side_fe(unsigned int var, FEGenericBase< OutputShape > *&fe) const
Definition: fem_context.h:297
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 743 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().

746 {
747  typedef typename TensorTools::DecrementRank<OutputType>::type Rank1Decrement;
748  typedef typename TensorTools::DecrementRank<Rank1Decrement>::type Rank2Decrement;
749  typedef typename TensorTools::MakeReal<Rank2Decrement>::type OutputShape;
750 
751  // Get local-to-global dof index lookup
752  const unsigned int n_dofs = cast_int<unsigned int>
753  (this->get_dof_indices(var).size());
754 
755  // Get current local coefficients
756  const DenseSubVector<Number> & coef = get_localized_subvector(_system_vector, var);
757 
758  // Get finite element object
759  FEGenericBase<OutputShape> * the_side_fe = libmesh_nullptr;
760  this->get_side_fe<OutputShape>( var, the_side_fe, this->get_elem_dim() );
761 
762  // Get shape function values at quadrature point
763  const std::vector<std::vector<typename FEGenericBase<OutputShape>::OutputTensor> > & d2phi = the_side_fe->get_d2phi();
764 
765  // Loop over all the q_points in this finite element
766  for (std::size_t qp=0; qp != d2u_vals.size(); qp++)
767  {
768  OutputType & d2u = d2u_vals[qp];
769 
770  // Compute the gradient at this q_point
771  d2u = 0;
772 
773  for (unsigned int l=0; l != n_dofs; l++)
774  d2u.add_scaled(d2phi[l][qp], coef(l));
775  }
776 
777  return;
778 }
const std::vector< dof_id_type > & get_dof_indices() const
Definition: diff_context.h:366
const class libmesh_nullptr_t libmesh_nullptr
DenseSubVector< Number > & get_localized_subvector(const NumericVector< Number > &localized_vector, unsigned int var)
Definition: diff_context.C:184
unsigned char get_elem_dim() const
Definition: fem_context.h:904
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 1283 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().

1285 {
1286  this->some_value<OutputType,
1290 }
void some_value(unsigned int var, unsigned int qp, OutputType &u) const
Definition: fem_context.C:232
const DenseVector< Number > & get_elem_solution_rate() const
Definition: diff_context.h:144
void get_side_fe(unsigned int var, FEGenericBase< OutputShape > *&fe) const
Definition: fem_context.h:297
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 573 of file fem_context.C.

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

575 {
576  Number u = 0.;
577 
578  this->side_value( var, qp, u );
579 
580  return u;
581 }
Number side_value(unsigned int var, unsigned int qp) const
Definition: fem_context.C:573
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 585 of file fem_context.C.

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

588 {
589  this->some_value<OutputType,
590  &FEMContext::get_side_fe<typename TensorTools::MakeReal<OutputType>::type>,
591  &DiffContext::get_elem_solution>(var, qp, u);
592 }
const DenseVector< Number > & get_elem_solution() const
Definition: diff_context.h:110
void some_value(unsigned int var, unsigned int qp, OutputType &u) const
Definition: fem_context.C:232
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 596 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().

599 {
600  typedef typename TensorTools::MakeReal<OutputType>::type OutputShape;
601 
602  // Get local-to-global dof index lookup
603  const unsigned int n_dofs = cast_int<unsigned int>
604  (this->get_dof_indices(var).size());
605 
606  // Get current local coefficients
607  const DenseSubVector<Number> & coef = get_localized_subvector(_system_vector, var);
608 
609  // Get the finite element object
610  FEGenericBase<OutputShape> * the_side_fe = libmesh_nullptr;
611  this->get_side_fe<OutputShape>( var, the_side_fe, this->get_elem_dim() );
612 
613  // Get shape function values at quadrature point
614  const std::vector<std::vector<OutputShape> > & phi = the_side_fe->get_phi();
615 
616  // Loop over all the q_points on this element
617  for (std::size_t qp=0; qp != u_vals.size(); qp++)
618  {
619  OutputType & u = u_vals[qp];
620 
621  // Compute the value at this q_point
622  u = 0.;
623 
624  for (unsigned int l=0; l != n_dofs; l++)
625  u += phi[l][qp] * coef(l);
626  }
627 
628  return;
629 }
const std::vector< dof_id_type > & get_dof_indices() const
Definition: diff_context.h:366
const class libmesh_nullptr_t libmesh_nullptr
DenseSubVector< Number > & get_localized_subvector(const NumericVector< Number > &localized_vector, unsigned int var)
Definition: diff_context.C:184
unsigned char get_elem_dim() const
Definition: fem_context.h:904
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 261 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().

262 {
263  // Get local-to-global dof index lookup
264  const unsigned int n_dofs = cast_int<unsigned int>
265  (this->get_dof_indices(var).size());
266 
267  // Get current local coefficients
268  const DenseSubVector<Number> & coef = (this->*subsolution_getter)(var);
269 
270  // Get finite element object
272  (this->*fe_getter)( var, fe, this->get_elem_dim() );
273 
274  // Get shape function values at quadrature point
275  const std::vector<std::vector
277  & dphi = fe->get_dphi();
278 
279  // Accumulate solution derivatives
280  du = 0;
281 
282  for (unsigned int l=0; l != n_dofs; l++)
283  du.add_scaled(dphi[l][qp], coef(l));
284 
285  return;
286 }
const std::vector< dof_id_type > & get_dof_indices() const
Definition: diff_context.h:366
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:1034
unsigned char get_elem_dim() const
Definition: fem_context.h:904
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 294 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().

295 {
296  // Get local-to-global dof index lookup
297  const unsigned int n_dofs = cast_int<unsigned int>
298  (this->get_dof_indices(var).size());
299 
300  // Get current local coefficients
301  const DenseSubVector<Number> & coef = (this->*subsolution_getter)(var);
302 
303  // Get finite element object
305  (this->*fe_getter)( var, fe, this->get_elem_dim() );
306 
307  // Get shape function values at quadrature point
308  const std::vector<std::vector
310  & d2phi = fe->get_d2phi();
311 
312  // Accumulate solution second derivatives
313  d2u = 0.0;
314 
315  for (unsigned int l=0; l != n_dofs; l++)
316  d2u.add_scaled(d2phi[l][qp], coef(l));
317 
318  return;
319 }
const std::vector< dof_id_type > & get_dof_indices() const
Definition: diff_context.h:366
const class libmesh_nullptr_t libmesh_nullptr
FEGenericBase< hess_shape > hess_base
Definition: fem_context.h:1039
TensorTools::IncrementRank< OutputGradient >::type OutputTensor
Definition: fe_base.h:122
unsigned char get_elem_dim() const
Definition: fem_context.h:904
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 232 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().

233 {
234  // Get local-to-global dof index lookup
235  const unsigned int n_dofs = cast_int<unsigned int>
236  (this->get_dof_indices(var).size());
237 
238  // Get current local coefficients
239  const DenseSubVector<Number> & coef = (this->*subsolution_getter)(var);
240 
241  // Get finite element object
243  (this->*fe_getter)( var, fe, this->get_elem_dim() );
244 
245  // Get shape function values at quadrature point
246  const std::vector<std::vector
247  <typename FENeeded<OutputType>::value_shape> > & phi = fe->get_phi();
248 
249  // Accumulate solution value
250  u = 0.;
251 
252  for (unsigned int l=0; l != n_dofs; l++)
253  u += phi[l][qp] * coef(l);
254 }
TensorTools::MakeReal< OutputType >::type value_shape
Definition: fem_context.h:1028
FEGenericBase< value_shape > value_base
Definition: fem_context.h:1029
const std::vector< dof_id_type > & get_dof_indices() const
Definition: diff_context.h:366
const class libmesh_nullptr_t libmesh_nullptr
unsigned char get_elem_dim() const
Definition: fem_context.h:904

Member Data Documentation

AlgebraicType libMesh::FEMContext::_atype
protectedinherited

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

Definition at line 987 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 1098 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 992 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 1108 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 620 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, FEAbstract *> libMesh::FEMContext::_edge_fe
protectedinherited
std::vector<FEAbstract *> libMesh::FEMContext::_edge_fe_var
protectedinherited
UniquePtr<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 1144 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 1103 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 1113 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 1119 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<DenseSubMatrix<Number> *> > libMesh::DGFEMContext::_elem_elem_subjacobians
private
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 586 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 598 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<DenseSubMatrix<Number> *> > libMesh::DGFEMContext::_elem_neighbor_subjacobians
private
std::vector<Number> libMesh::DiffContext::_elem_qoi
protectedinherited

Element quantity of interest contributions

Definition at line 603 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 608 of file diff_context.h.

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

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

Element residual vector

Definition at line 592 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 564 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 578 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 571 of file diff_context.h.

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

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

Element residual subvectors and Jacobian submatrices

Definition at line 614 of file diff_context.h.

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

std::vector<DenseSubVector<Number> *> libMesh::DiffContext::_elem_subsolution_accels
protectedinherited
std::vector<DenseSubVector<Number> *> libMesh::DiffContext::_elem_subsolution_rates
protectedinherited
std::vector<std::map<FEType, 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 1079 of file fem_context.h.

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

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 1090 of file fem_context.h.

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

std::vector<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 1127 of file fem_context.h.

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

int libMesh::FEMContext::_extra_quadrature_order
protectedinherited

The extra quadrature order for this context.

Definition at line 1149 of file fem_context.h.

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

std::map<const NumericVector<Number> *, std::pair<DenseVector<Number>, std::vector<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 558 of file diff_context.h.

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

unsigned int libMesh::FEMContext::_mesh_x_var
inherited

Variables from which to acquire moving mesh information

Definition at line 970 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<DenseSubMatrix<Number> *> > libMesh::DGFEMContext::_neighbor_elem_subjacobians
private
DenseMatrix<Number> libMesh::DGFEMContext::_neighbor_neighbor_jacobian
private
std::vector<std::vector<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, 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 t