18#ifndef LIBMESH_STATIC_CONDENSATION_DOF_MAP_H
19#define LIBMESH_STATIC_CONDENSATION_DOF_MAP_H
21#include "libmesh/libmesh_config.h"
23#include "libmesh/id_types.h"
24#include "libmesh/libmesh_common.h"
25#include "libmesh/dof_map_base.h"
26#include "libmesh/variable.h"
27#include "libmesh/sparsity_pattern.h"
28#include "libmesh/utility.h"
30#include <unordered_map>
91 std::vector<dof_id_type> & di,
92 const unsigned int vn,
93 int p_level = -12345)
const override;
96 std::vector<dof_id_type> & di,
97 const unsigned int vn)
const override;
114 virtual void clear()
override;
142 bool involved_in_constraints,
143 std::unordered_map<dof_id_type, dof_id_type> & uncondensed_global_to_local_map,
144 std::unordered_set<dof_id_type> & local_uncondensed_dofs_set,
146 nonlocal_uncondensed_dofs,
147 std::vector<dof_id_type> & elem_uncondensed_dofs,
149 std::unordered_set<dof_id_type> & constraint_dofs);
169 bool involved_in_constraints,
170 std::unordered_map<dof_id_type, dof_id_type> & uncondensed_global_to_local_map,
171 std::unordered_set<dof_id_type> & local_uncondensed_dofs_set,
173 nonlocal_uncondensed_dofs,
174 std::vector<dof_id_type> & elem_uncondensed_dofs,
176 std::unordered_set<dof_id_type> & constraint_dofs);
This base class provides a minimal set of interfaces for satisfying user requests for.
This class handles the numbering of degrees of freedom on a mesh.
This is the base class from which all geometric element types are derived.
This is the MeshBase class.
A Node is like a Point, but with more information.
A class holding degree of freedom information pertinent to static condensation.
void dont_condense_vars(const std::unordered_set< unsigned int > &vars)
Add vars to the list of variables not to condense.
virtual ~StaticCondensationDofMap()
virtual const Variable & variable(const unsigned int c) const override
dof_id_type get_reduced_from_global_constraint_dof(dof_id_type full_dof) const
Retrieve the dof index in the reduced system corresponding to the provided dof index in the full syst...
virtual void clear() override
std::unordered_set< unsigned int > _uncondensed_vars
Variables for which we will keep all dofs.
std::vector< dof_id_type > _local_uncondensed_dofs
All the uncondensed degrees of freedom (numbered in the "full" uncondensed + condensed space).
std::unique_ptr< SparsityPattern::Build > _reduced_sp
Owned storage of the reduced system sparsity pattern.
const MeshBase & mesh() const
const System & reduced_system() const
std::unordered_map< dof_id_type, dof_id_type > _full_to_reduced_constraint_dofs
A small map from full system degrees of freedom to reduced/condensed system degrees of freedom involv...
const std::unordered_set< unsigned int > & uncondensed_vars() const
std::vector< Variable > _reduced_vars
The variables in the reduced system.
std::unordered_map< dof_id_type, DofData > _elem_to_dof_data
A map from element ID to Schur complement data.
void add_uncondensed_dof_plus_constraint_dofs(dof_id_type full_dof_number, bool involved_in_constraints, std::unordered_map< dof_id_type, dof_id_type > &uncondensed_global_to_local_map, std::unordered_set< dof_id_type > &local_uncondensed_dofs_set, std::unordered_map< processor_id_type, std::unordered_set< dof_id_type > > &nonlocal_uncondensed_dofs, std::vector< dof_id_type > &elem_uncondensed_dofs, dof_id_type &uncondensed_local_dof_number, std::unordered_set< dof_id_type > &constraint_dofs)
Add an uncondensed dof potentially along with constraining dofs which themselves must/will also be un...
std::vector< dof_id_type > _reduced_noz
Number of off-diagonal nonzeros per row in the reduced system.
void add_uncondensed_dof(dof_id_type full_dof_number, bool involved_in_constraints, std::unordered_map< dof_id_type, dof_id_type > &uncondensed_global_to_local_map, std::unordered_set< dof_id_type > &local_uncondensed_dofs_set, std::unordered_map< processor_id_type, std::unordered_set< dof_id_type > > &nonlocal_uncondensed_dofs, std::vector< dof_id_type > &elem_uncondensed_dofs, dof_id_type &uncondensed_local_dof_number, std::unordered_set< dof_id_type > &constraint_dofs)
Add an uncondensed dof.
std::vector< dof_id_type > _reduced_nnz
Number of on-diagonal nonzeros per row in the reduced system.
System * _reduced_system
A dummyish system to help with DofObjects.
bool _sc_is_initialized
Whether our object has been initialized.
virtual void dof_indices(const Elem *const elem, std::vector< dof_id_type > &di, const unsigned int vn, int p_level=-12345) const override
Fills the vector di with the global degree of freedom indices for the element.
bool initialized() const
Whether we are initialized.
virtual unsigned int n_variables() const override
void reinit()
Build the element global to local index maps.
Manages consistently variables, degrees of freedom, and coefficient vectors.
This class defines the notion of a variable in the system.
The libMesh namespace provides an interface to certain functionality in the library.
uint8_t processor_id_type
Data stored on a per-element basis used to compute element Schur complements and their applications t...
std::unordered_map< dof_id_type, dof_id_type > uncondensed_global_to_local_map
A map from the global degree of freedom number for the full system (condensed + uncondensed) to an el...
std::vector< std::vector< dof_id_type > > reduced_space_indices
The uncondensed degrees of freedom with global numbering corresponding to the the \emph reduced syste...
std::unordered_map< dof_id_type, dof_id_type > condensed_global_to_local_map
A map from the global degree of freedom number for the full system (condensed + uncondensed) to an el...