Go to the documentation of this file.
   18 #include "libmesh/dg_fem_context.h" 
   19 #include "libmesh/dof_map.h" 
   20 #include "libmesh/elem.h" 
   21 #include "libmesh/fe_base.h" 
   22 #include "libmesh/fe_interface.h" 
   23 #include "libmesh/quadrature.h" 
   24 #include "libmesh/system.h" 
   32     _neighbor_dof_indices_var(sys.
n_vars()),
 
   33     _dg_terms_active(false)
 
   35   unsigned int nv = sys.
n_vars();
 
   44   for (
unsigned int i=0; i != nv; ++i)
 
   52       for (
unsigned int j=0; j != nv; ++j)
 
   62   for (
unsigned int i=0; i != nv; ++i)
 
   92   std::vector<Point> qface_side_points;
 
   93   std::vector<Point> qface_neighbor_points;
 
   96       FEType neighbor_side_fe_type = pr.first;
 
   98       qface_side_points = side_fe->
get_xyz();
 
  101                           qface_side_points, qface_neighbor_points);
 
  103       pr.second->reinit(&
get_neighbor(), &qface_neighbor_points);
 
  115   const unsigned int n_dofs = cast_int<unsigned int>
 
  117   const unsigned int n_neighbor_dofs = cast_int<unsigned int>
 
  129     unsigned int sub_dofs = 0;
 
  134         const unsigned int n_dofs_var = cast_int<unsigned int>
 
  138           (sub_dofs, n_dofs_var);
 
  140         for (
unsigned int j=0; j != i; ++j)
 
  142             const unsigned int n_dofs_var_j =
 
  143               cast_int<unsigned int>
 
  148                n_dofs_var, n_dofs_var_j);
 
  151                n_dofs_var_j, n_dofs_var);
 
  155                n_dofs_var, n_dofs_var_j);
 
  158                n_dofs_var_j, n_dofs_var);
 
  162                n_dofs_var, n_dofs_var_j);
 
  165                n_dofs_var_j, n_dofs_var);
 
  169                n_dofs_var, n_dofs_var_j);
 
  172                n_dofs_var_j, n_dofs_var);
 
  190         sub_dofs += n_dofs_var;
 
  192     libmesh_assert_equal_to (sub_dofs, n_dofs);
 
  
Manages consistently variables, degrees of freedom, and coefficient vectors.
 
std::vector< std::vector< std::unique_ptr< DenseSubMatrix< Number > > > > _elem_neighbor_subjacobians
 
unsigned int n_vars() const
 
void neighbor_side_fe_reinit()
Initialize neighbor side data needed to assemble DG terms.
 
std::vector< dof_id_type > _neighbor_dof_indices
Global Degree of freedom index lists for the neighbor element.
 
const std::vector< Point > & get_xyz() const
 
void dof_indices(const Elem *const elem, std::vector< dof_id_type > &di) const
Fills the vector di with the global degree of freedom indices for the element.
 
const std::vector< dof_id_type > & get_dof_indices() const
Accessor for element dof indices.
 
virtual void side_fe_reinit() override
Override side_fe_reinit to set a boolean flag so that by default DG terms are assumed to be inactive.
 
virtual void side_fe_reinit()
Reinitializes side FE objects on the current geometric element.
 
DenseMatrix< Number > _elem_elem_jacobian
The DG Jacobian terms.
 
Defines a dense submatrix for use in Finite Element-type computations.
 
The libMesh namespace provides an interface to certain functionality in the library.
 
unsigned int n_vars() const
Number of variables in solution.
 
This class forms the foundation from which generic finite elements may be derived.
 
std::vector< std::map< FEType, std::unique_ptr< FEAbstract > > > _side_fe
 
const System & get_system() const
Accessor for associated system.
 
std::vector< std::vector< std::unique_ptr< DenseSubMatrix< Number > > > > _elem_elem_subjacobians
 
std::vector< std::vector< dof_id_type > > _neighbor_dof_indices_var
 
void resize(const unsigned int new_m, const unsigned int new_n)
Resize the matrix.
 
The IntRange templated class is intended to make it easy to loop over integers which are indices of a...
 
static Point inverse_map(const unsigned int dim, const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true)
 
std::vector< FEAbstract * > _neighbor_side_fe_var
Pointers to the same finite element objects on the neighbor element, but indexed by variable number.
 
static std::unique_ptr< FEAbstract > build(const unsigned int dim, const FEType &type)
Builds a specific finite element type.
 
DenseMatrix< Number > _neighbor_neighbor_jacobian
 
DenseMatrix< Number > _elem_neighbor_jacobian
 
DenseVector< Number > _neighbor_residual
Residual vector of the neighbor component.
 
DenseMatrix< Number > _neighbor_elem_jacobian
 
const FEType & variable_type(const unsigned int i) const
 
void resize(const unsigned int n)
Resize the vector.
 
class FEType hides (possibly multiple) FEFamily and approximation orders, thereby enabling specialize...
 
std::vector< std::unique_ptr< DenseSubVector< Number > > > _neighbor_subresiduals
Element residual subvectors and Jacobian submatrices.
 
std::vector< std::vector< std::unique_ptr< DenseSubMatrix< Number > > > > _neighbor_neighbor_subjacobians
 
std::map< FEType, std::unique_ptr< FEAbstract > > _neighbor_side_fe
Finite element objects for each variable's sides on the neighbor element.
 
unsigned char get_dim() const
Accessor for cached mesh dimension.
 
const DofMap & get_dof_map() const
 
bool _dg_terms_active
Boolean flag to indicate whether or not the DG terms have been assembled and should be used in the gl...
 
DGFEMContext(const System &sys)
Constructor.
 
virtual ~DGFEMContext()
Destructor.
 
std::vector< std::vector< std::unique_ptr< DenseSubMatrix< Number > > > > _neighbor_elem_subjacobians
 
const Elem & get_neighbor() const
Accessor for current neighbor Elem object for assembling DG terms.
 
unsigned char _dim
Cached dimension of largest dimension element in this mesh.
 
This class provides all data required for a physics package (e.g.