Manages the degrees of freedom (DOFs) in a simulation. More...
#include <dof_map.h>
Classes | |
class | AugmentSendList |
class | AugmentSparsityPattern |
Public Member Functions | |
DofMap (const unsigned int sys_number, MeshBase &mesh) | |
~DofMap () | |
void | attach_matrix (SparseMatrix< Number > &matrix) |
bool | is_attached (SparseMatrix< Number > &matrix) |
void | distribute_dofs (MeshBase &) |
void | compute_sparsity (const MeshBase &) |
void | clear_sparsity () |
void | remove_default_ghosting () |
void | add_default_ghosting () |
void | add_coupling_functor (GhostingFunctor &coupling_functor, bool to_mesh=true) |
void | remove_coupling_functor (GhostingFunctor &coupling_functor) |
std::set< GhostingFunctor * >::const_iterator | coupling_functors_begin () const |
std::set< GhostingFunctor * >::const_iterator | coupling_functors_end () const |
DefaultCoupling & | default_coupling () |
void | add_algebraic_ghosting_functor (GhostingFunctor &evaluable_functor, bool to_mesh=true) |
void | remove_algebraic_ghosting_functor (GhostingFunctor &evaluable_functor) |
std::set< GhostingFunctor * >::const_iterator | algebraic_ghosting_functors_begin () const |
std::set< GhostingFunctor * >::const_iterator | algebraic_ghosting_functors_end () const |
DefaultCoupling & | default_algebraic_ghosting () |
void | attach_extra_sparsity_object (DofMap::AugmentSparsityPattern &asp) |
void | attach_extra_sparsity_function (void(*func)(SparsityPattern::Graph &sparsity, std::vector< dof_id_type > &n_nz, std::vector< dof_id_type > &n_oz, void *), void *context=nullptr) |
void | attach_extra_send_list_object (DofMap::AugmentSendList &asl) |
void | attach_extra_send_list_function (void(*func)(std::vector< dof_id_type > &, void *), void *context=nullptr) |
void | prepare_send_list () |
const std::vector< dof_id_type > & | get_send_list () const |
const std::vector< dof_id_type > & | get_n_nz () const |
const std::vector< dof_id_type > & | get_n_oz () const |
void | add_variable_group (const VariableGroup &var_group) |
void | set_error_on_cyclic_constraint (bool error_on_cyclic_constraint) |
const VariableGroup & | variable_group (const unsigned int c) const |
const Variable & | variable (const unsigned int c) const |
Order | variable_order (const unsigned int c) const |
Order | variable_group_order (const unsigned int vg) const |
const FEType & | variable_type (const unsigned int c) const |
const FEType & | variable_group_type (const unsigned int vg) const |
unsigned int | n_variable_groups () const |
unsigned int | n_variables () const |
bool | has_blocked_representation () const |
unsigned int | block_size () const |
dof_id_type | n_dofs () const |
dof_id_type | n_SCALAR_dofs () const |
dof_id_type | n_local_dofs () const |
dof_id_type | n_dofs_on_processor (const processor_id_type proc) const |
dof_id_type | first_dof (const processor_id_type proc) const |
dof_id_type | first_dof () const |
dof_id_type | first_old_dof (const processor_id_type proc) const |
dof_id_type | first_old_dof () const |
dof_id_type | last_dof (const processor_id_type proc) const |
dof_id_type | last_dof () const |
dof_id_type | end_dof (const processor_id_type proc) const |
dof_id_type | end_dof () const |
processor_id_type | dof_owner (const dof_id_type dof) const |
dof_id_type | end_old_dof (const processor_id_type proc) const |
dof_id_type | end_old_dof () const |
void | dof_indices (const Elem *const elem, std::vector< dof_id_type > &di) const |
void | dof_indices (const Elem *const elem, std::vector< dof_id_type > &di, const unsigned int vn, int p_level=-12345) const |
void | dof_indices (const Node *const node, std::vector< dof_id_type > &di) const |
void | dof_indices (const Node *const node, std::vector< dof_id_type > &di, const unsigned int vn) const |
void | SCALAR_dof_indices (std::vector< dof_id_type > &di, const unsigned int vn, const bool old_dofs=false) const |
bool | semilocal_index (dof_id_type dof_index) const |
bool | all_semilocal_indices (const std::vector< dof_id_type > &dof_indices) const |
bool | local_index (dof_id_type dof_index) const |
template<typename DofObjectSubclass > | |
bool | is_evaluable (const DofObjectSubclass &obj, unsigned int var_num=libMesh::invalid_uint) const |
void | set_implicit_neighbor_dofs (bool implicit_neighbor_dofs) |
bool | use_coupled_neighbor_dofs (const MeshBase &mesh) const |
void | extract_local_vector (const NumericVector< Number > &Ug, const std::vector< dof_id_type > &dof_indices, DenseVectorBase< Number > &Ue) const |
void | local_variable_indices (std::vector< dof_id_type > &idx, const MeshBase &mesh, unsigned int var_num) const |
dof_id_type | n_constrained_dofs () const |
dof_id_type | n_local_constrained_dofs () const |
dof_id_type | n_constrained_nodes () const |
void | create_dof_constraints (const MeshBase &, Real time=0) |
void | allgather_recursive_constraints (MeshBase &) |
void | scatter_constraints (MeshBase &) |
void | gather_constraints (MeshBase &mesh, std::set< dof_id_type > &unexpanded_dofs, bool look_for_constrainees) |
void | process_constraints (MeshBase &) |
void | check_for_cyclic_constraints () |
void | add_constraint_row (const dof_id_type dof_number, const DofConstraintRow &constraint_row, const Number constraint_rhs, const bool forbid_constraint_overwrite) |
void | add_adjoint_constraint_row (const unsigned int qoi_index, const dof_id_type dof_number, const DofConstraintRow &constraint_row, const Number constraint_rhs, const bool forbid_constraint_overwrite) |
void | add_constraint_row (const dof_id_type dof_number, const DofConstraintRow &constraint_row, const bool forbid_constraint_overwrite=true) |
DofConstraints::const_iterator | constraint_rows_begin () const |
DofConstraints::const_iterator | constraint_rows_end () const |
void | stash_dof_constraints () |
void | unstash_dof_constraints () |
NodeConstraints::const_iterator | node_constraint_rows_begin () const |
NodeConstraints::const_iterator | node_constraint_rows_end () const |
bool | is_constrained_dof (const dof_id_type dof) const |
bool | has_heterogenous_adjoint_constraints (const unsigned int qoi_num) const |
Number | has_heterogenous_adjoint_constraint (const unsigned int qoi_num, const dof_id_type dof) const |
DofConstraintValueMap & | get_primal_constraint_values () |
bool | is_constrained_node (const Node *node) const |
void | print_dof_constraints (std::ostream &os=libMesh::out, bool print_nonlocal=false) const |
std::string | get_local_constraints (bool print_nonlocal=false) const |
std::pair< Real, Real > | max_constraint_error (const System &system, NumericVector< Number > *v=nullptr) const |
void | constrain_element_matrix (DenseMatrix< Number > &matrix, std::vector< dof_id_type > &elem_dofs, bool asymmetric_constraint_rows=true) const |
void | constrain_element_matrix (DenseMatrix< Number > &matrix, std::vector< dof_id_type > &row_dofs, std::vector< dof_id_type > &col_dofs, bool asymmetric_constraint_rows=true) const |
void | constrain_element_vector (DenseVector< Number > &rhs, std::vector< dof_id_type > &dofs, bool asymmetric_constraint_rows=true) const |
void | constrain_element_matrix_and_vector (DenseMatrix< Number > &matrix, DenseVector< Number > &rhs, std::vector< dof_id_type > &elem_dofs, bool asymmetric_constraint_rows=true) const |
void | heterogenously_constrain_element_matrix_and_vector (DenseMatrix< Number > &matrix, DenseVector< Number > &rhs, std::vector< dof_id_type > &elem_dofs, bool asymmetric_constraint_rows=true, int qoi_index=-1) const |
void | heterogenously_constrain_element_vector (const DenseMatrix< Number > &matrix, DenseVector< Number > &rhs, std::vector< dof_id_type > &elem_dofs, bool asymmetric_constraint_rows=true, int qoi_index=-1) const |
void | constrain_element_dyad_matrix (DenseVector< Number > &v, DenseVector< Number > &w, std::vector< dof_id_type > &row_dofs, bool asymmetric_constraint_rows=true) const |
void | constrain_nothing (std::vector< dof_id_type > &dofs) const |
void | enforce_constraints_exactly (const System &system, NumericVector< Number > *v=nullptr, bool homogeneous=false) const |
void | enforce_adjoint_constraints_exactly (NumericVector< Number > &v, unsigned int q) const |
void | add_periodic_boundary (const PeriodicBoundaryBase &periodic_boundary) |
void | add_periodic_boundary (const PeriodicBoundaryBase &boundary, const PeriodicBoundaryBase &inverse_boundary) |
bool | is_periodic_boundary (const boundary_id_type boundaryid) const |
PeriodicBoundaries * | get_periodic_boundaries () |
void | add_dirichlet_boundary (const DirichletBoundary &dirichlet_boundary) |
void | add_adjoint_dirichlet_boundary (const DirichletBoundary &dirichlet_boundary, unsigned int q) |
void | remove_dirichlet_boundary (const DirichletBoundary &dirichlet_boundary) |
void | remove_adjoint_dirichlet_boundary (const DirichletBoundary &dirichlet_boundary, unsigned int q) |
const DirichletBoundaries * | get_dirichlet_boundaries () const |
DirichletBoundaries * | get_dirichlet_boundaries () |
bool | has_adjoint_dirichlet_boundaries (unsigned int q) const |
const DirichletBoundaries * | get_adjoint_dirichlet_boundaries (unsigned int q) const |
DirichletBoundaries * | get_adjoint_dirichlet_boundaries (unsigned int q) |
void | old_dof_indices (const Elem *const elem, std::vector< dof_id_type > &di, const unsigned int vn=libMesh::invalid_uint) const |
dof_id_type | n_old_dofs () const |
void | constrain_p_dofs (unsigned int var, const Elem *elem, unsigned int s, unsigned int p) |
void | reinit (MeshBase &mesh) |
void | clear () |
void | print_info (std::ostream &os=libMesh::out) const |
std::string | get_info () const |
unsigned int | sys_number () const |
const Parallel::Communicator & | comm () const |
processor_id_type | n_processors () const |
processor_id_type | processor_id () const |
Static Public Member Functions | |
static std::string | get_info () |
static void | print_info (std::ostream &out=libMesh::out) |
static unsigned int | n_objects () |
static void | enable_print_counter_info () |
static void | disable_print_counter_info () |
Public Attributes | |
CouplingMatrix * | _dof_coupling |
Protected Types | |
typedef std::map< std::string, std::pair< unsigned int, unsigned int > > | Counts |
Protected Member Functions | |
void | increment_constructor_count (const std::string &name) |
void | increment_destructor_count (const std::string &name) |
Protected Attributes | |
const Parallel::Communicator & | _communicator |
Static Protected Attributes | |
static Counts | _counts |
static Threads::atomic< unsigned int > | _n_objects |
static Threads::spin_mutex | _mutex |
static bool | _enable_print_counter = true |
Private Types | |
typedef DofObject *(DofMap::* | dofobject_accessor) (MeshBase &mesh, dof_id_type i) const |
Private Member Functions | |
void | _dof_indices (const Elem &elem, int p_level, std::vector< dof_id_type > &di, const unsigned int vg, const unsigned int vig, const Node *const *nodes, unsigned int n_nodes #ifdef DEBUG, const unsigned int v, std::size_t &tot_size #endif) const |
std::unique_ptr< SparsityPattern::Build > | build_sparsity (const MeshBase &mesh) const |
void | invalidate_dofs (MeshBase &mesh) const |
DofObject * | node_ptr (MeshBase &mesh, dof_id_type i) const |
DofObject * | elem_ptr (MeshBase &mesh, dof_id_type i) const |
template<typename iterator_type > | |
void | set_nonlocal_dof_objects (iterator_type objects_begin, iterator_type objects_end, MeshBase &mesh, dofobject_accessor objects) |
void | distribute_local_dofs_var_major (dof_id_type &next_free_dof, MeshBase &mesh) |
void | distribute_local_dofs_node_major (dof_id_type &next_free_dof, MeshBase &mesh) |
void | add_neighbors_to_send_list (MeshBase &mesh) |
void | build_constraint_matrix (DenseMatrix< Number > &C, std::vector< dof_id_type > &elem_dofs, const bool called_recursively=false) const |
void | build_constraint_matrix_and_vector (DenseMatrix< Number > &C, DenseVector< Number > &H, std::vector< dof_id_type > &elem_dofs, int qoi_index=-1, const bool called_recursively=false) const |
void | find_connected_dofs (std::vector< dof_id_type > &elem_dofs) const |
void | find_connected_dof_objects (std::vector< const DofObject *> &objs) const |
void | add_constraints_to_send_list () |
void | check_dirichlet_bcid_consistency (const MeshBase &mesh, const DirichletBoundary &boundary) const |
Static Private Member Functions | |
static void | merge_ghost_functor_outputs (GhostingFunctor::map_type &elements_to_ghost, std::set< CouplingMatrix *> &temporary_coupling_matrices, const std::set< GhostingFunctor *>::iterator &gf_begin, const std::set< GhostingFunctor *>::iterator &gf_end, const MeshBase::const_element_iterator &elems_begin, const MeshBase::const_element_iterator &elems_end, processor_id_type p) |
Friends | |
class | SparsityPattern::Build |
Manages the degrees of freedom (DOFs) in a simulation.
This class handles the numbering of degrees of freedom on a mesh. For systems of equations the class supports a fixed number of variables. The degrees of freedom are numbered such that sequential, contiguous blocks belong to distinct processors. This is so that the resulting data structures will work well with parallel linear algebra packages.
|
protectedinherited |
Data structure to log the information. The log is identified by the class name.
Definition at line 117 of file reference_counter.h.
|
private |
A member function type like node_ptr()
or elem_ptr()
.
|
explicit |
Constructor. Requires the number of the system for which we will be numbering degrees of freedom & the parent object we are contained in, which defines our communication space.
Definition at line 130 of file dof_map.C.
References _default_coupling, _default_evaluating, _matrices, _mesh, _periodic_boundaries, add_algebraic_ghosting_functor(), and add_coupling_functor().
libMesh::DofMap::~DofMap | ( | ) |
Destructor.
Definition at line 201 of file dof_map.C.
References _adjoint_dirichlet_boundaries, _default_coupling, _default_evaluating, _mesh, clear(), and libMesh::MeshBase::remove_ghosting_functor().
|
private |
Helper function that gets the dof indices on the current element for a non-SCALAR type variable, where the variable is identified by its variable group number vg
and its offset vig
from the first variable in that group.
In DEBUG mode, the tot_size parameter will add up the total number of dof indices that should have been added to di, and v will be the variable number corresponding to vg and vig.
Definition at line 2209 of file dof_map.C.
References libMesh::Elem::active(), libMesh::Variable::active_on_subdomain(), libMesh::Elem::dim(), libMesh::DofObject::dof_number(), libMesh::FEInterface::extra_hanging_dofs(), libMesh::FEType::family, libMesh::Elem::infinite(), libMesh::DofObject::invalid_id, libMesh::Elem::is_vertex(), libMesh::LAGRANGE, libMesh::DofObject::n_comp_group(), libMesh::FEInterface::n_dofs(), libMesh::FEInterface::n_dofs_at_node(), libMesh::FEInterface::n_dofs_at_node_function(), libMesh::FEInterface::n_dofs_per_elem(), n_nodes, libMesh::DofObject::n_systems(), libMesh::FEType::order, libMesh::SUBDIVISION, libMesh::Elem::subdomain_id(), sys_number(), libMesh::Variable::type(), libMesh::Elem::type(), libMesh::DofObject::var_to_vg_and_offset(), and variable_group().
Referenced by dof_indices().
void libMesh::DofMap::add_adjoint_constraint_row | ( | const unsigned int | qoi_index, |
const dof_id_type | dof_number, | ||
const DofConstraintRow & | constraint_row, | ||
const Number | constraint_rhs, | ||
const bool | forbid_constraint_overwrite | ||
) |
Adds a copy of the user-defined row to the constraint matrix, using an inhomogeneous right-hand-side for the adjoint constraint equation.
forbid_constraint_overwrite
here only tests for overwriting the rhs. This method should only be used when an equivalent constraint (with a potentially different rhs) already exists for the primal problem.
Definition at line 1373 of file dof_map_constraints.C.
void libMesh::DofMap::add_adjoint_dirichlet_boundary | ( | const DirichletBoundary & | dirichlet_boundary, |
unsigned int | q | ||
) |
Adds a copy of the specified Dirichlet boundary to the system, corresponding to the adjoint problem defined by Quantity of Interest q
.
Definition at line 4279 of file dof_map_constraints.C.
void libMesh::DofMap::add_algebraic_ghosting_functor | ( | GhostingFunctor & | evaluable_functor, |
bool | to_mesh = true |
||
) |
Adds a functor which can specify algebraic ghosting requirements for use with distributed vectors. Degrees of freedom on other processors which match the elements and variables returned by these functors will be added to the send_list, and the elements on other processors will be ghosted on a distributed mesh, so that the elements can always be found and the solutions on them will always be evaluable.
GhostingFunctor memory must be managed by the code which calls this function; the GhostingFunctor lifetime is expected to extend until either the functor is removed or the DofMap is destructed.
When to_mesh
is true, the coupling_functor
is also added to our associated mesh, to ensure that evaluable elements do not get lost during mesh distribution. (if evaluable elements were already lost there's no getting them back after the fact, sorry)
If to_mesh
is false, no change to mesh ghosting is made; the Mesh must already have ghosting functor(s) specifying a superset of evaluable_functor
or this is a horrible bug.
Definition at line 1829 of file dof_map.C.
References _algebraic_ghosting_functors, _mesh, and libMesh::MeshBase::add_ghosting_functor().
Referenced by add_default_ghosting(), clear(), and DofMap().
void libMesh::DofMap::add_constraint_row | ( | const dof_id_type | dof_number, |
const DofConstraintRow & | constraint_row, | ||
const Number | constraint_rhs, | ||
const bool | forbid_constraint_overwrite | ||
) |
Adds a copy of the user-defined row to the constraint matrix, using an inhomogeneous right-hand-side for the constraint equation.
Definition at line 1350 of file dof_map_constraints.C.
Referenced by add_constraint_row().
|
inline |
Adds a copy of the user-defined row to the constraint matrix, using a homogeneous right-hand-side for the constraint equation. By default, produces an error if the DOF was already constrained.
Definition at line 894 of file dof_map.h.
References add_constraint_row().
|
private |
Adds entries to the _send_list
vector corresponding to DoFs which are dependencies for constraint equations on the current processor.
Definition at line 4163 of file dof_map_constraints.C.
void libMesh::DofMap::add_coupling_functor | ( | GhostingFunctor & | coupling_functor, |
bool | to_mesh = true |
||
) |
Adds a functor which can specify coupling requirements for creation of sparse matrices. Degree of freedom pairs which match the elements and variables returned by these functors will be added to the sparsity pattern, and the degrees of freedom which live on other processors will be added to the send_list for use on ghosted vectors, and the elements which live on other processors will be ghosted on a distributed mesh.
GhostingFunctor memory must be managed by the code which calls this function; the GhostingFunctor lifetime is expected to extend until either the functor is removed or the DofMap is destructed.
When to_mesh
is true, the coupling_functor
is also added to our associated mesh, to ensure that coupled elements do not get lost during mesh distribution. (if coupled elements were already lost there's no getting them back after the fact, sorry)
If to_mesh
is false, no change to mesh ghosting is made; the Mesh must already have ghosting functor(s) specifying a superset of coupling_functor
or this is a horrible bug.
Definition at line 1809 of file dof_map.C.
References _coupling_functors, _mesh, and libMesh::MeshBase::add_ghosting_functor().
Referenced by add_default_ghosting(), clear(), and DofMap().
void libMesh::DofMap::add_default_ghosting | ( | ) |
Add the default functor(s) for coupling and algebraic ghosting. User-added ghosting functors will be unaffected.
Definition at line 1800 of file dof_map.C.
References add_algebraic_ghosting_functor(), add_coupling_functor(), default_algebraic_ghosting(), and default_coupling().
Referenced by libMesh::EquationSystems::enable_default_ghosting().
void libMesh::DofMap::add_dirichlet_boundary | ( | const DirichletBoundary & | dirichlet_boundary | ) |
Adds a copy of the specified Dirichlet boundary to the system.
Definition at line 4273 of file dof_map_constraints.C.
Referenced by libMesh::DifferentiableSystem::add_dot_var_dirichlet_bcs().
|
private |
Adds entries to the _send_list
vector corresponding to DoFs on elements neighboring the current processor.
Definition at line 1499 of file dof_map.C.
References _send_list, algebraic_ghosting_functors_begin(), algebraic_ghosting_functors_end(), coupling_functors_begin(), coupling_functors_end(), dof_indices(), local_index(), merge_ghost_functor_outputs(), mesh, n_variables(), libMesh::ParallelObject::processor_id(), and libMesh::DofObject::processor_id().
Referenced by distribute_dofs().
void libMesh::DofMap::add_periodic_boundary | ( | const PeriodicBoundaryBase & | periodic_boundary | ) |
Adds a copy of the specified periodic boundary to the system.
Definition at line 4393 of file dof_map_constraints.C.
References libMesh::PeriodicBoundaryBase::clone(), libMesh::PeriodicBoundaryBase::merge(), libMesh::PeriodicBoundaryBase::myboundary, and libMesh::PeriodicBoundaryBase::pairedboundary.
void libMesh::DofMap::add_periodic_boundary | ( | const PeriodicBoundaryBase & | boundary, |
const PeriodicBoundaryBase & | inverse_boundary | ||
) |
Add a periodic boundary pair
boundary | - primary boundary |
inverse_boundary | - inverse boundary |
Definition at line 4423 of file dof_map_constraints.C.
References libMesh::PeriodicBoundaryBase::clone(), libMesh::PeriodicBoundaryBase::myboundary, and libMesh::PeriodicBoundaryBase::pairedboundary.
void libMesh::DofMap::add_variable_group | ( | const VariableGroup & | var_group | ) |
Add an unknown of order order
and finite element type type
to the system of equations. Add a group of unknowns of order order
and finite element type type
to the system of equations.
Definition at line 245 of file dof_map.C.
References _variable_group_numbers, _variable_groups, _variables, and libMesh::VariableGroup::n_variables().
|
inline |
Beginning of range of algebraic ghosting functors
Definition at line 367 of file dof_map.h.
References _algebraic_ghosting_functors.
Referenced by add_neighbors_to_send_list().
|
inline |
End of range of algebraic ghosting functors
Definition at line 373 of file dof_map.h.
References _algebraic_ghosting_functors.
Referenced by add_neighbors_to_send_list().
bool libMesh::DofMap::all_semilocal_indices | ( | const std::vector< dof_id_type > & | dof_indices | ) | const |
true
if all degree of freedom indices in dof_indices
are either local indices or in the send_list
.Definition at line 2400 of file dof_map.C.
References semilocal_index().
Referenced by is_evaluable().
void libMesh::DofMap::allgather_recursive_constraints | ( | MeshBase & | mesh | ) |
Gathers constraint equation dependencies from other processors
Definition at line 2595 of file dof_map_constraints.C.
References libMesh::MeshBase::active_not_local_elements_begin(), libMesh::MeshBase::active_not_local_elements_end(), libMesh::as_range(), data, libMesh::DofObject::dof_number(), libMesh::DofObject::id(), libMesh::index_range(), libMesh::MeshBase::is_serial(), libMesh::libmesh_isnan(), mesh, libMesh::DofObject::n_comp(), n_nodes, n_vars, libMesh::DofObject::n_vars(), libMesh::MeshBase::node_ptr(), libMesh::DofObject::processor_id(), libMesh::Parallel::pull_parallel_vector_data(), libMesh::Parallel::push_parallel_vector_data(), libMesh::Real, libMesh::TypeVector< T >::size(), and libMesh::Parallel::wait().
|
inline |
Attach a function pointer to use as a callback to populate the send_list with extra entries.
Definition at line 429 of file dof_map.h.
References _extra_send_list_context, and _extra_send_list_function.
|
inline |
Attach an object to populate the send_list with extra entries. This should only add to the send list, but no checking is done to enforce this behavior.
This is an advanced function... use at your own peril!
Definition at line 420 of file dof_map.h.
References _augment_send_list.
|
inline |
Attach a function pointer to use as a callback to populate the sparsity pattern with extra entries.
Care must be taken that when adding entries they are sorted into the Rows
Further, you must modify n_nz and n_oz properly!
This is an advanced function... use at your own peril!
Definition at line 406 of file dof_map.h.
References _extra_sparsity_context, and _extra_sparsity_function.
|
inline |
Attach an object to use to populate the sparsity pattern with extra entries.
Care must be taken that when adding entries they are sorted into the Rows
Further, you must modify n_nz and n_oz properly!
This is an advanced function... use at your own peril!
Definition at line 391 of file dof_map.h.
References _augment_sparsity_pattern.
void libMesh::DofMap::attach_matrix | ( | SparseMatrix< Number > & | matrix | ) |
Additional matrices may be handled with this DofMap
. They are initialized to the same sparsity structure as the major matrix.
Definition at line 262 of file dof_map.C.
References _matrices, _n_nz, _n_oz, _sp, libMesh::SparseMatrix< T >::attach_dof_map(), libMesh::ParallelObject::comm(), libMesh::Parallel::Communicator::max(), libMesh::SparseMatrix< T >::need_full_sparsity_pattern(), need_full_sparsity_pattern, and libMesh::SparseMatrix< T >::update_sparsity_pattern().
Referenced by libMesh::EigenSystem::init_matrices(), and libMesh::ImplicitSystem::init_matrices().
|
inline |
Definition at line 562 of file dof_map.h.
References has_blocked_representation(), and n_variables().
|
private |
Build the constraint matrix C associated with the element degree of freedom indices elem_dofs. The optional parameter called_recursively
should be left at the default value false
. This is used to handle the special case of an element's degrees of freedom being constrained in terms of other, local degrees of freedom. The usual case is for an elements DOFs to be constrained by some other, external DOFs.
Definition at line 2346 of file dof_map_constraints.C.
References libMesh::DenseMatrixBase< T >::m(), libMesh::DenseMatrixBase< T >::n(), libMesh::DenseMatrix< T >::resize(), and libMesh::DenseMatrix< T >::right_multiply().
|
private |
Build the constraint matrix C and the forcing vector H associated with the element degree of freedom indices elem_dofs. The optional parameter called_recursively
should be left at the default value false
. This is used to handle the special case of an element's degrees of freedom being constrained in terms of other, local degrees of freedom. The usual case is for an elements DOFs to be constrained by some other, external DOFs and/or Dirichlet conditions.
The forcing vector will depend on which solution's heterogenous constraints are being applied. For the default qoi_index
this will be the primal solution; for qoi_index
>= 0 the corresponding adjoint solution's constraints will be used.
Definition at line 2456 of file dof_map_constraints.C.
References libMesh::DenseMatrixBase< T >::m(), libMesh::DenseMatrixBase< T >::n(), libMesh::DenseVector< T >::resize(), libMesh::DenseMatrix< T >::resize(), libMesh::DenseMatrix< T >::right_multiply(), and libMesh::DenseMatrix< T >::vector_mult_add().
Referenced by extract_local_vector().
|
private |
Builds a sparsity pattern
Definition at line 58 of file dof_map.C.
References _augment_sparsity_pattern, _coupling_functors, _dof_coupling, _extra_sparsity_context, _extra_sparsity_function, libMesh::DofMap::AugmentSparsityPattern::augment_sparsity_pattern(), mesh, n_dofs_on_processor(), need_full_sparsity_pattern, libMesh::out, libMesh::Threads::parallel_reduce(), and use_coupled_neighbor_dofs().
Referenced by compute_sparsity().
|
private |
Check that all the ids in dirichlet_bcids are actually present in the mesh. If not, this will throw an error.
Definition at line 4362 of file dof_map_constraints.C.
References libMesh::DirichletBoundary::b, bc_id, libMesh::ParallelObject::comm(), libMesh::BoundaryInfo::get_boundary_ids(), libMesh::MeshBase::get_boundary_info(), libMesh::Parallel::Communicator::max(), mesh, and libMesh::Parallel::Communicator::verify().
void libMesh::DofMap::check_for_cyclic_constraints | ( | ) |
Throw an error if we detect and cyclic constraints, since these are not supported by libMesh and give erroneous results if they are present.
Definition at line 3334 of file dof_map_constraints.C.
References libMesh::Real.
void libMesh::DofMap::clear | ( | ) |
Free all new memory associated with the object, but restore its original state, with the mesh pointer and any default ghosting.
Definition at line 828 of file dof_map.C.
References _adjoint_constraint_values, _algebraic_ghosting_functors, _coupling_functors, _default_coupling, _default_evaluating, _dof_constraints, _dof_coupling, _end_df, _end_old_df, _first_df, _first_old_df, _first_old_scalar_df, _first_scalar_df, _matrices, _mesh, _n_dfs, _n_old_dfs, _primal_constraint_values, _send_list, _stashed_dof_constraints, _variable_group_numbers, _variable_groups, _variables, add_algebraic_ghosting_functor(), add_coupling_functor(), clear_sparsity(), need_full_sparsity_pattern, libMesh::MeshBase::remove_ghosting_functor(), and use_coupled_neighbor_dofs().
Referenced by ~DofMap().
void libMesh::DofMap::clear_sparsity | ( | ) |
Clears the sparsity pattern
Definition at line 1771 of file dof_map.C.
References _n_nz, _n_oz, _sp, and need_full_sparsity_pattern.
Referenced by clear(), libMesh::EigenSystem::reinit(), and libMesh::ImplicitSystem::reinit().
|
inlineinherited |
Parallel::Communicator
object used by this mesh. Definition at line 89 of file parallel_object.h.
References libMesh::ParallelObject::_communicator.
Referenced by libMesh::__libmesh_petsc_diff_solver_jacobian(), libMesh::__libmesh_petsc_diff_solver_monitor(), libMesh::__libmesh_petsc_diff_solver_residual(), libMesh::__libmesh_tao_equality_constraints(), libMesh::__libmesh_tao_equality_constraints_jacobian(), libMesh::__libmesh_tao_gradient(), libMesh::__libmesh_tao_hessian(), libMesh::__libmesh_tao_inequality_constraints(), libMesh::__libmesh_tao_inequality_constraints_jacobian(), libMesh::__libmesh_tao_objective(), libMesh::MeshRefinement::_coarsen_elements(), libMesh::ExactSolution::_compute_error(), libMesh::UniformRefinementEstimator::_estimate_error(), libMesh::BoundaryInfo::_find_id_maps(), libMesh::SlepcEigenSolver< T >::_petsc_shell_matrix_get_diagonal(), libMesh::PetscLinearSolver< T >::_petsc_shell_matrix_get_diagonal(), libMesh::SlepcEigenSolver< T >::_petsc_shell_matrix_mult(), libMesh::PetscLinearSolver< T >::_petsc_shell_matrix_mult(), libMesh::PetscLinearSolver< T >::_petsc_shell_matrix_mult_add(), libMesh::EquationSystems::_read_impl(), libMesh::MeshRefinement::_refine_elements(), libMesh::MeshRefinement::_smooth_flags(), libMesh::PetscDMWrapper::add_dofs_helper(), libMesh::PetscDMWrapper::add_dofs_to_section(), libMesh::ImplicitSystem::add_matrix(), libMesh::System::add_vector(), libMesh::UnstructuredMesh::all_second_order(), libMesh::MeshTools::Modification::all_tri(), libMesh::LaplaceMeshSmoother::allgather_graph(), libMesh::FEMSystem::assemble_qoi(), libMesh::MeshCommunication::assign_global_indices(), attach_matrix(), libMesh::MeshTools::Generation::build_extrusion(), libMesh::BoundaryInfo::build_node_list_from_side_list(), libMesh::EquationSystems::build_parallel_elemental_solution_vector(), libMesh::EquationSystems::build_parallel_solution_vector(), libMesh::PetscDMWrapper::build_section(), libMesh::PetscDMWrapper::build_sf(), libMesh::MeshBase::cache_elem_dims(), libMesh::System::calculate_norm(), check_dirichlet_bcid_consistency(), libMesh::PetscDMWrapper::check_section_n_dofs(), libMesh::Nemesis_IO_Helper::compute_num_global_elem_blocks(), libMesh::Nemesis_IO_Helper::compute_num_global_nodesets(), libMesh::Nemesis_IO_Helper::compute_num_global_sidesets(), libMesh::Problem_Interface::computeF(), libMesh::Problem_Interface::computeJacobian(), libMesh::Problem_Interface::computePreconditioner(), libMesh::ExodusII_IO::copy_elemental_solution(), libMesh::MeshTools::correct_node_proc_ids(), libMesh::MeshTools::create_bounding_box(), libMesh::MeshTools::create_nodal_bounding_box(), libMesh::MeshRefinement::create_parent_error_vector(), libMesh::MeshTools::create_processor_bounding_box(), libMesh::MeshTools::create_subdomain_bounding_box(), libMesh::MeshCommunication::delete_remote_elements(), distribute_dofs(), DMlibMeshFunction(), DMlibMeshJacobian(), DMlibMeshSetSystem_libMesh(), DMVariableBounds_libMesh(), libMesh::MeshRefinement::eliminate_unrefined_patches(), libMesh::EpetraVector< T >::EpetraVector(), libMesh::WeightedPatchRecoveryErrorEstimator::estimate_error(), libMesh::PatchRecoveryErrorEstimator::estimate_error(), libMesh::JumpErrorEstimator::estimate_error(), libMesh::AdjointRefinementEstimator::estimate_error(), libMesh::ExactErrorEstimator::estimate_error(), libMesh::MeshRefinement::flag_elements_by_elem_fraction(), libMesh::MeshRefinement::flag_elements_by_error_fraction(), libMesh::MeshRefinement::flag_elements_by_nelem_target(), libMesh::CondensedEigenSystem::get_eigenpair(), get_info(), libMesh::ImplicitSystem::get_linear_solver(), libMesh::LocationMap< T >::init(), libMesh::TimeSolver::init(), libMesh::SystemSubsetBySubdomain::init(), libMesh::PetscDMWrapper::init_and_attach_petscdm(), libMesh::EigenSystem::init_data(), libMesh::EigenSystem::init_matrices(), libMesh::OptimizationSystem::initialize_equality_constraints_storage(), libMesh::OptimizationSystem::initialize_inequality_constraints_storage(), libMesh::MeshTools::libmesh_assert_consistent_distributed(), libMesh::MeshTools::libmesh_assert_consistent_distributed_nodes(), libMesh::MeshTools::libmesh_assert_contiguous_dof_ids(), libMesh::MeshTools::libmesh_assert_parallel_consistent_new_node_procids(), libMesh::MeshTools::libmesh_assert_parallel_consistent_procids< Elem >(), libMesh::MeshTools::libmesh_assert_parallel_consistent_procids< Node >(), libMesh::MeshTools::libmesh_assert_topology_consistent_procids< Node >(), libMesh::MeshTools::libmesh_assert_valid_boundary_ids(), libMesh::MeshTools::libmesh_assert_valid_dof_ids(), libMesh::MeshTools::libmesh_assert_valid_neighbors(), libMesh::DistributedMesh::libmesh_assert_valid_parallel_flags(), libMesh::DistributedMesh::libmesh_assert_valid_parallel_object_ids(), libMesh::DistributedMesh::libmesh_assert_valid_parallel_p_levels(), libMesh::MeshTools::libmesh_assert_valid_refinement_flags(), libMesh::MeshTools::libmesh_assert_valid_unique_ids(), libMesh::libmesh_petsc_snes_fd_residual(), libMesh::libmesh_petsc_snes_jacobian(), libMesh::libmesh_petsc_snes_mffd_residual(), libMesh::libmesh_petsc_snes_postcheck(), libMesh::libmesh_petsc_snes_residual(), libMesh::libmesh_petsc_snes_residual_helper(), libMesh::MeshRefinement::limit_level_mismatch_at_edge(), libMesh::MeshRefinement::limit_level_mismatch_at_node(), libMesh::MeshRefinement::limit_overrefined_boundary(), libMesh::MeshRefinement::limit_underrefined_boundary(), libMesh::MeshRefinement::make_coarsening_compatible(), libMesh::MeshCommunication::make_elems_parallel_consistent(), libMesh::MeshRefinement::make_flags_parallel_consistent(), libMesh::MeshCommunication::make_new_node_proc_ids_parallel_consistent(), libMesh::MeshCommunication::make_new_nodes_parallel_consistent(), libMesh::MeshCommunication::make_node_ids_parallel_consistent(), libMesh::MeshCommunication::make_node_proc_ids_parallel_consistent(), libMesh::MeshCommunication::make_node_unique_ids_parallel_consistent(), libMesh::MeshCommunication::make_nodes_parallel_consistent(), libMesh::MeshCommunication::make_p_levels_parallel_consistent(), libMesh::MeshRefinement::make_refinement_compatible(), libMesh::FEMSystem::mesh_position_set(), libMesh::DistributedMesh::n_active_elem(), libMesh::MeshTools::n_active_levels(), libMesh::BoundaryInfo::n_boundary_conds(), libMesh::BoundaryInfo::n_edge_conds(), libMesh::CondensedEigenSystem::n_global_non_condensed_dofs(), libMesh::MeshTools::n_levels(), libMesh::BoundaryInfo::n_nodeset_conds(), libMesh::MeshTools::n_p_levels(), libMesh::BoundaryInfo::n_shellface_conds(), libMesh::DistributedMesh::parallel_max_elem_id(), libMesh::DistributedMesh::parallel_max_node_id(), libMesh::ReplicatedMesh::parallel_max_unique_id(), libMesh::DistributedMesh::parallel_max_unique_id(), libMesh::DistributedMesh::parallel_n_elem(), libMesh::DistributedMesh::parallel_n_nodes(), libMesh::SparsityPattern::Build::parallel_sync(), libMesh::MeshTools::paranoid_n_levels(), libMesh::petsc_auto_fieldsplit(), libMesh::System::point_gradient(), libMesh::System::point_hessian(), libMesh::System::point_value(), libMesh::MeshBase::prepare_for_use(), libMesh::Nemesis_IO::read(), libMesh::XdrIO::read(), libMesh::CheckpointIO::read_header(), libMesh::XdrIO::read_header(), libMesh::System::read_header(), libMesh::System::read_legacy_data(), libMesh::System::read_SCALAR_dofs(), libMesh::XdrIO::read_serialized_bc_names(), libMesh::XdrIO::read_serialized_bcs_helper(), libMesh::System::read_serialized_blocked_dof_objects(), libMesh::XdrIO::read_serialized_connectivity(), libMesh::XdrIO::read_serialized_nodes(), libMesh::XdrIO::read_serialized_nodesets(), libMesh::XdrIO::read_serialized_subdomain_names(), libMesh::System::read_serialized_vector(), libMesh::MeshBase::recalculate_n_partitions(), libMesh::MeshRefinement::refine_and_coarsen_elements(), libMesh::DistributedMesh::renumber_dof_objects(), libMesh::CheckpointIO::select_split_config(), set_nonlocal_dof_objects(), libMesh::PetscDMWrapper::set_point_range_in_section(), libMesh::PetscDiffSolver::setup_petsc_data(), libMesh::LaplaceMeshSmoother::smooth(), libMesh::split_mesh(), libMesh::MeshBase::subdomain_ids(), libMesh::BoundaryInfo::sync(), libMesh::MeshRefinement::test_level_one(), libMesh::MeshRefinement::test_unflagged(), libMesh::MeshTools::total_weight(), libMesh::MeshRefinement::uniformly_coarsen(), libMesh::NameBasedIO::write(), libMesh::XdrIO::write(), libMesh::System::write_SCALAR_dofs(), libMesh::XdrIO::write_serialized_bcs_helper(), libMesh::System::write_serialized_blocked_dof_objects(), libMesh::XdrIO::write_serialized_connectivity(), libMesh::XdrIO::write_serialized_nodes(), and libMesh::XdrIO::write_serialized_nodesets().
void libMesh::DofMap::compute_sparsity | ( | const MeshBase & | mesh | ) |
Computes the sparsity pattern for the matrices corresponding to proc_id
and sends that data to Linear Algebra packages for preallocation of sparse matrices.
Definition at line 1739 of file dof_map.C.
References _matrices, _n_nz, _n_oz, _sp, build_sparsity(), and need_full_sparsity_pattern.
Referenced by libMesh::EigenSystem::init_matrices(), libMesh::ImplicitSystem::init_matrices(), libMesh::EigenSystem::reinit(), and libMesh::ImplicitSystem::reinit().
|
inline |
Constrains a dyadic element matrix B = v w'. This method requires the element matrix to be square, in which case the elem_dofs correspond to the global DOF indices of both the rows and columns of the element matrix. For this case the rows and columns of the matrix necessarily correspond to variables of the same approximation order.
Definition at line 2012 of file dof_map_constraints.C.
References libMesh::DenseMatrixBase< T >::m(), libMesh::DenseMatrixBase< T >::n(), libMesh::DenseVector< T >::size(), and libMesh::DenseMatrix< T >::vector_mult_transpose().
|
inline |
Constrains the element matrix. This method requires the element matrix to be square, in which case the elem_dofs correspond to the global DOF indices of both the rows and columns of the element matrix. For this case the rows and columns of the matrix necessarily correspond to variables of the same approximation order.
If asymmetric_constraint_rows
is set to true (as it is by default), constraint row equations will be reinforced in a way which breaks matrix symmetry but makes inexact linear solver solutions more likely to satisfy hanging node constraints.
Definition at line 1545 of file dof_map_constraints.C.
References libMesh::DenseMatrix< T >::left_multiply_transpose(), libMesh::DenseMatrixBase< T >::m(), libMesh::DenseMatrixBase< T >::n(), and libMesh::DenseMatrix< T >::right_multiply().
|
inline |
Constrains the element matrix. This method allows the element matrix to be non-square, in which case the row_dofs and col_dofs may be of different size and correspond to variables approximated in different spaces.
Definition at line 1878 of file dof_map_constraints.C.
References libMesh::DenseMatrix< T >::left_multiply_transpose(), libMesh::DenseMatrixBase< T >::m(), libMesh::DenseMatrixBase< T >::n(), and libMesh::DenseMatrix< T >::right_multiply().
|
inline |
Constrains the element matrix and vector. This method requires the element matrix to be square, in which case the elem_dofs correspond to the global DOF indices of both the rows and columns of the element matrix. For this case the rows and columns of the matrix necessarily correspond to variables of the same approximation order.
Definition at line 1615 of file dof_map_constraints.C.
References libMesh::DenseMatrix< T >::left_multiply_transpose(), libMesh::DenseMatrixBase< T >::m(), libMesh::DenseMatrixBase< T >::n(), libMesh::DenseMatrix< T >::right_multiply(), libMesh::DenseVector< T >::size(), and libMesh::DenseMatrix< T >::vector_mult_transpose().
|
inline |
Constrains the element vector.
Definition at line 1970 of file dof_map_constraints.C.
References libMesh::DenseMatrixBase< T >::m(), libMesh::DenseMatrixBase< T >::n(), libMesh::DenseVector< T >::size(), and libMesh::DenseMatrix< T >::vector_mult_transpose().
void libMesh::DofMap::constrain_nothing | ( | std::vector< dof_id_type > & | dofs | ) | const |
Does not actually constrain anything, but modifies dofs
in the same way as any of the constrain functions would do, i.e. adds those dofs in terms of which any of the existing dofs is constrained.
Definition at line 2063 of file dof_map_constraints.C.
void libMesh::DofMap::constrain_p_dofs | ( | unsigned int | var, |
const Elem * | elem, | ||
unsigned int | s, | ||
unsigned int | p | ||
) |
Constrains degrees of freedom on side s
of element elem
which correspond to variable number var
and to p refinement levels above p
.
Definition at line 4208 of file dof_map_constraints.C.
References libMesh::Elem::dim(), libMesh::DofObject::dof_number(), libMesh::Elem::is_node_on_side(), libMesh::Elem::is_vertex(), libMesh::DofObject::n_comp(), n_nodes, libMesh::Elem::n_nodes(), libMesh::Elem::n_sides(), libMesh::Elem::node_ref(), libMesh::FEType::order, libMesh::Elem::p_level(), libMesh::Threads::spin_mtx, and libMesh::Elem::type().
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::compute_periodic_constraints(), and libMesh::FEGenericBase< FEOutputType< T >::type >::compute_proj_constraints().
|
inline |
Definition at line 902 of file dof_map.h.
References _dof_constraints.
|
inline |
Definition at line 908 of file dof_map.h.
References _dof_constraints.
|
inline |
Beginning of range of coupling functors
Definition at line 317 of file dof_map.h.
References _coupling_functors.
Referenced by add_neighbors_to_send_list(), and libMesh::SparsityPattern::Build::operator()().
|
inline |
End of range of coupling functors
Definition at line 323 of file dof_map.h.
References _coupling_functors.
Referenced by add_neighbors_to_send_list(), and libMesh::SparsityPattern::Build::operator()().
Rebuilds the raw degree of freedom and DofObject constraints. A time is specified for use in building time-dependent Dirichlet constraints.
Definition at line 1194 of file dof_map_constraints.C.
References libMesh::StoredRange< iterator_type, object_type >::empty(), libMesh::MeshBase::is_prepared(), libMesh::MeshBase::is_serial(), libMesh::MeshTools::libmesh_assert_valid_boundary_ids(), libMesh::MeshBase::local_elements_begin(), libMesh::MeshBase::local_elements_end(), mesh, libMesh::MeshBase::mesh_dimension(), libMesh::MeshBase::n_elem(), libMesh::Threads::parallel_for(), libMesh::StoredRange< iterator_type, object_type >::reset(), and libMesh::MeshBase::sub_point_locator().
Referenced by libMesh::System::reinit_constraints().
|
inline |
Default algebraic ghosting functor
Definition at line 379 of file dof_map.h.
References _default_evaluating.
Referenced by add_default_ghosting(), and remove_default_ghosting().
|
inline |
Default coupling functor
Definition at line 329 of file dof_map.h.
References _default_coupling.
Referenced by add_default_ghosting(), and remove_default_ghosting().
|
staticinherited |
Definition at line 106 of file reference_counter.C.
References libMesh::ReferenceCounter::_enable_print_counter.
Referenced by libMesh::LibMeshInit::LibMeshInit().
void libMesh::DofMap::distribute_dofs | ( | MeshBase & | mesh | ) |
Distribute dofs on the current mesh. Also builds the send list for processor proc_id
, which defaults to 0 for ease of use in serial applications.
Definition at line 902 of file dof_map.C.
References _algebraic_ghosting_functors, _coupling_functors, _end_df, _end_old_df, _first_df, _first_old_df, _first_old_scalar_df, _first_scalar_df, _n_dfs, _n_old_dfs, _send_list, add_neighbors_to_send_list(), libMesh::Parallel::Communicator::allgather(), libMesh::ParallelObject::comm(), distribute_local_dofs_node_major(), distribute_local_dofs_var_major(), libMesh::DofObject::dof_number(), elem_ptr(), libMesh::MeshBase::elements_begin(), end_dof(), libMesh::FEType::family, first_dof(), libMesh::OrderWrapper::get_order(), libMesh::DofObject::invalid_id, invalidate_dofs(), libMesh::MeshTools::libmesh_assert_valid_dof_ids(), mesh, libMesh::DofObject::n_comp(), n_dofs(), libMesh::ParallelObject::n_processors(), n_SCALAR_dofs(), n_variables(), libMesh::DofObject::n_vars(), node_ptr(), libMesh::MeshBase::nodes_begin(), libMesh::on_command_line(), libMesh::FEType::order, libMesh::ParallelObject::processor_id(), libMesh::DofObject::processor_id(), reinit(), libMesh::SCALAR, set_nonlocal_dof_objects(), sys_number(), libMesh::Variable::type(), and variable().
Referenced by libMesh::EquationSystems::allgather(), and libMesh::EquationSystems::reinit_solutions().
|
private |
Distributes the global degrees of freedom for dofs on this processor. In this format all the degrees of freedom at a node/element are in contiguous blocks. Starts at index next_free_dof
, and increments it to the post-final index. If build_send_list
is true
, builds the send list. If false
, clears and reserves the send list.
distribute_local_dofs_var_major
. Definition at line 1163 of file dof_map.C.
References _n_SCALAR_dofs, libMesh::Variable::active_on_subdomain(), libMesh::FEType::family, libMesh::OrderWrapper::get_order(), libMesh::DofObject::invalid_id, mesh, libMesh::DofObject::n_comp_group(), n_nodes, libMesh::ParallelObject::n_processors(), n_variable_groups(), libMesh::VariableGroup::n_variables(), libMesh::FEType::order, libMesh::ParallelObject::processor_id(), libMesh::DofObject::processor_id(), libMesh::SCALAR, libMesh::DofObject::set_vg_dof_base(), sys_number(), libMesh::Variable::type(), variable_group(), and libMesh::DofObject::vg_dof_base().
Referenced by distribute_dofs().
|
private |
Distributes the global degrees of freedom, for dofs on this processor. In this format the local degrees of freedom are in a contiguous block for each variable in the system. Starts at index next_free_dof, and increments it to the post-final index.
Definition at line 1302 of file dof_map.C.
References _n_SCALAR_dofs, libMesh::Variable::active_on_subdomain(), libMesh::FEType::family, libMesh::OrderWrapper::get_order(), libMesh::DofObject::invalid_id, mesh, libMesh::DofObject::n_comp_group(), n_nodes, libMesh::ParallelObject::n_processors(), n_variable_groups(), libMesh::VariableGroup::n_variables(), libMesh::FEType::order, libMesh::ParallelObject::processor_id(), libMesh::DofObject::processor_id(), libMesh::SCALAR, libMesh::DofObject::set_vg_dof_base(), sys_number(), libMesh::Variable::type(), variable_group(), and libMesh::DofObject::vg_dof_base().
Referenced by distribute_dofs().
void libMesh::DofMap::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.
Definition at line 1930 of file dof_map.C.
References _dof_indices(), libMesh::Elem::active(), libMesh::Variable::active_on_subdomain(), libMesh::FEType::family, libMesh::MeshTools::Subdivision::find_one_ring(), libMesh::Elem::get_nodes(), libMesh::Tri3Subdivision::is_ghost(), n_nodes, libMesh::Elem::n_nodes(), n_variable_groups(), libMesh::VariableGroup::n_variables(), libMesh::VariableGroup::number(), libMesh::FEType::order, libMesh::Elem::p_level(), libMesh::SCALAR, SCALAR_dof_indices(), libMesh::Elem::subdomain_id(), libMesh::TRI3SUBDIVISION, libMesh::Variable::type(), libMesh::Elem::type(), and variable_group().
Referenced by libMesh::ExactSolution::_compute_error(), libMesh::UniformRefinementEstimator::_estimate_error(), add_neighbors_to_send_list(), libMesh::HPCoarsenTest::add_projection(), libMesh::EquationSystems::build_discontinuous_solution_vector(), libMesh::EquationSystems::build_parallel_elemental_solution_vector(), libMesh::EquationSystems::build_parallel_solution_vector(), libMesh::System::calculate_norm(), libMesh::FEGenericBase< FEOutputType< T >::type >::coarsened_dof_values(), libMesh::FEGenericBase< FEOutputType< T >::type >::compute_periodic_constraints(), libMesh::FEGenericBase< FEOutputType< T >::type >::compute_proj_constraints(), libMesh::MeshFunction::discontinuous_gradient(), libMesh::MeshFunction::discontinuous_value(), DMCreateDomainDecomposition_libMesh(), DMCreateFieldDecomposition_libMesh(), dof_indices(), libMesh::AdjointRefinementEstimator::estimate_error(), libMesh::ExactErrorEstimator::estimate_error(), libMesh::MeshFunction::gradient(), libMesh::MeshFunction::hessian(), libMesh::SystemSubsetBySubdomain::init(), is_evaluable(), libMesh::System::local_dof_indices(), libMesh::DGFEMContext::neighbor_side_fe_reinit(), libMesh::WeightedPatchRecoveryErrorEstimator::EstimateError::operator()(), libMesh::PatchRecoveryErrorEstimator::EstimateError::operator()(), libMesh::MeshFunction::operator()(), libMesh::BoundaryProjectSolution::operator()(), libMesh::ErrorVector::plot_error(), libMesh::System::point_gradient(), libMesh::System::point_hessian(), libMesh::FEMContext::pre_fe_reinit(), libMesh::HPCoarsenTest::select_refinement(), libMesh::PetscDMWrapper::set_point_range_in_section(), libMesh::SparsityPattern::Build::sorted_connected_dofs(), libMesh::EnsightIO::write_scalar_ascii(), and libMesh::EnsightIO::write_vector_ascii().
void libMesh::DofMap::dof_indices | ( | const Elem *const | elem, |
std::vector< dof_id_type > & | di, | ||
const unsigned int | vn, | ||
int | p_level = -12345 |
||
) | const |
Fills the vector di
with the global degree of freedom indices for the element. For one variable, and potentially for a non-default element p refinement level
Definition at line 2040 of file dof_map.C.
References _dof_indices(), _variable_group_numbers, libMesh::Variable::active_on_subdomain(), libMesh::FEType::family, libMesh::MeshTools::Subdivision::find_one_ring(), libMesh::Elem::get_nodes(), libMesh::Tri3Subdivision::is_ghost(), libMesh::Elem::n_nodes(), libMesh::VariableGroup::number(), libMesh::FEType::order, libMesh::Elem::p_level(), libMesh::SCALAR, SCALAR_dof_indices(), libMesh::Elem::subdomain_id(), libMesh::TRI3SUBDIVISION, libMesh::Variable::type(), libMesh::Elem::type(), and variable_group().
void libMesh::DofMap::dof_indices | ( | const Node *const | node, |
std::vector< dof_id_type > & | di | ||
) | const |
Fills the vector di
with the global degree of freedom indices for the node.
Definition at line 2115 of file dof_map.C.
References libMesh::DofObject::dof_number(), libMesh::FEType::family, libMesh::DofObject::invalid_id, libMesh::DofObject::n_comp_group(), n_variable_groups(), libMesh::VariableGroup::n_variables(), libMesh::VariableGroup::number(), libMesh::SCALAR, SCALAR_dof_indices(), sys_number(), libMesh::Variable::type(), and variable_group().
void libMesh::DofMap::dof_indices | ( | const Node *const | node, |
std::vector< dof_id_type > & | di, | ||
const unsigned int | vn | ||
) | const |
Fills the vector di
with the global degree of freedom indices for the node. For one variable vn
.
Definition at line 2163 of file dof_map.C.
References _variable_group_numbers, dof_indices(), libMesh::DofObject::dof_number(), libMesh::FEType::family, libMesh::DofObject::invalid_id, libMesh::invalid_uint, libMesh::DofObject::n_comp_group(), libMesh::VariableGroup::number(), libMesh::SCALAR, SCALAR_dof_indices(), sys_number(), libMesh::Variable::type(), and variable_group().
|
inline |
dof
Definition at line 650 of file dof_map.h.
References _end_df.
Referenced by libMesh::PetscDMWrapper::build_sf().
|
private |
i
from the mesh
. Definition at line 313 of file dof_map.C.
References mesh.
Referenced by distribute_dofs().
|
staticinherited |
Methods to enable/disable the reference counter output from print_info()
Definition at line 100 of file reference_counter.C.
References libMesh::ReferenceCounter::_enable_print_counter.
|
inline |
proc
.Analogous to the end() member function of STL containers.
Definition at line 641 of file dof_map.h.
References _end_df.
Referenced by DMCreateDomainDecomposition_libMesh(), DMCreateFieldDecomposition_libMesh(), libMesh::SparsityPattern::Build::handle_vi_vj(), libMesh::SystemSubsetBySubdomain::init(), libMesh::CondensedEigenSystem::initialize_condensed_dofs(), libMesh::SparsityPattern::Build::join(), libMesh::System::local_dof_indices(), libMesh::SparsityPattern::Build::operator()(), and libMesh::SparsityPattern::Build::parallel_sync().
|
inline |
Definition at line 644 of file dof_map.h.
References libMesh::ParallelObject::processor_id().
Referenced by distribute_dofs(), and local_index().
|
inline |
proc
.Analogous to the end() member function of STL containers.
Definition at line 664 of file dof_map.h.
References _end_old_df.
Referenced by libMesh::BuildProjectionList::operator()().
|
inline |
Definition at line 667 of file dof_map.h.
References libMesh::ParallelObject::processor_id().
|
inline |
Heterogenously constrains the numeric vector v
, which represents an adjoint solution defined on the mesh for quantity fo interest q
. For homogeneous constraints, use enforce_constraints_exactly
instead
Definition at line 2170 of file dof_map_constraints.C.
References libMesh::NumericVector< T >::close(), libMesh::NumericVector< T >::closed(), libMesh::NumericVector< T >::get(), libMesh::GHOSTED, libMesh::NumericVector< T >::localize(), libMesh::PARALLEL, libMesh::SERIAL, libMesh::NumericVector< T >::set(), libMesh::NumericVector< T >::size(), and libMesh::NumericVector< T >::type().
Referenced by libMesh::ImplicitSystem::adjoint_solve(), and libMesh::AdjointRefinementEstimator::estimate_error().
|
inline |
Constrains the numeric vector v
, which represents a solution defined on the mesh. This may need to be used after a linear solve, if your linear solver's solutions do not satisfy your DoF constraints to a tight enough tolerance.
If v
== nullptr, the system solution vector is constrained
If homogeneous
== true, heterogeneous constraints are enforced as if they were homogeneous. This might be appropriate for e.g. a vector representing a difference between two heterogeneously-constrained solutions.
Definition at line 2077 of file dof_map_constraints.C.
References libMesh::NumericVector< T >::close(), libMesh::NumericVector< T >::closed(), libMesh::NumericVector< T >::get(), libMesh::System::get_dof_map(), libMesh::GHOSTED, libMesh::NumericVector< T >::localize(), libMesh::PARALLEL, libMesh::SERIAL, libMesh::NumericVector< T >::set(), libMesh::NumericVector< T >::size(), libMesh::System::solution, and libMesh::NumericVector< T >::type().
Referenced by libMesh::__libmesh_petsc_diff_solver_jacobian(), libMesh::__libmesh_petsc_diff_solver_residual(), libMesh::Problem_Interface::computeF(), libMesh::Problem_Interface::computeJacobian(), libMesh::Problem_Interface::computePreconditioner(), DMlibMeshFunction(), DMlibMeshJacobian(), libMesh::libmesh_petsc_snes_jacobian(), libMesh::libmesh_petsc_snes_postcheck(), libMesh::libmesh_petsc_snes_residual_helper(), libMesh::ImplicitSystem::sensitivity_solve(), libMesh::NewtonSolver::solve(), libMesh::PetscDiffSolver::solve(), libMesh::ImplicitSystem::weighted_sensitivity_adjoint_solve(), and libMesh::ImplicitSystem::weighted_sensitivity_solve().
void libMesh::DofMap::extract_local_vector | ( | const NumericVector< Number > & | Ug, |
const std::vector< dof_id_type > & | dof_indices, | ||
DenseVectorBase< Number > & | Ue | ||
) | const |
Builds the local element vector Ue
from the global vector Ug
, accounting for any constrained degrees of freedom. For an element without constrained degrees of freedom this is the trivial mapping
Ue
is properly sized when calling this method. This is because there is no resize()
method in the DenseVectorBase<>
class. Definition at line 1848 of file dof_map.C.
References build_constraint_matrix_and_vector(), libMesh::DenseVectorBase< T >::el(), libMesh::NumericVector< T >::first_local_index(), is_constrained_dof(), libMesh::NumericVector< T >::last_local_index(), libMesh::DenseMatrixBase< T >::m(), libMesh::DenseMatrixBase< T >::n(), libMesh::DenseVectorBase< T >::size(), libMesh::NumericVector< T >::size(), and libMesh::DenseVectorBase< T >::zero().
|
private |
Finds all the DofObjects associated with the set in objs
. This will account for off-element couplings via hanging nodes.
|
private |
Finds all the DOFS associated with the element DOFs elem_dofs. This will account for off-element couplings via hanging nodes.
Definition at line 2633 of file dof_map.C.
References _dof_constraints, and is_constrained_dof().
Referenced by libMesh::SparsityPattern::Build::sorted_connected_dofs().
|
inline |
proc
. Definition at line 599 of file dof_map.h.
References _first_df.
Referenced by libMesh::PetscDMWrapper::build_sf(), DMCreateDomainDecomposition_libMesh(), DMCreateFieldDecomposition_libMesh(), libMesh::SparsityPattern::Build::handle_vi_vj(), libMesh::SystemSubsetBySubdomain::init(), libMesh::SparsityPattern::Build::join(), libMesh::System::local_dof_indices(), libMesh::SparsityPattern::Build::operator()(), and libMesh::SparsityPattern::Build::parallel_sync().
|
inline |
Definition at line 602 of file dof_map.h.
References libMesh::ParallelObject::processor_id().
Referenced by distribute_dofs(), and local_index().
|
inline |
proc
. Definition at line 609 of file dof_map.h.
References _first_old_df.
Referenced by libMesh::BuildProjectionList::operator()().
|
inline |
Definition at line 612 of file dof_map.h.
References libMesh::ParallelObject::processor_id().
void libMesh::DofMap::gather_constraints | ( | MeshBase & | mesh, |
std::set< dof_id_type > & | unexpanded_dofs, | ||
bool | look_for_constrainees | ||
) |
Helper function for querying about constraint equations on other processors. If any id in requested_dof_ids
is constrained on another processor, its constraint will be added on this processor as well. If look_for_constrainees
is true, then constraints will also be returned if the id appears as a constraining value not just if it appears as a constrained value.
This function operates recursively: if the constraint for a constrained dof is newly added locally, then any other dofs which constrain it are queried to see if they are in turn constrained, and so on.
Definition at line 3871 of file dof_map_constraints.C.
References data, libMesh::Parallel::pull_parallel_vector_data(), and libMesh::Real.
const DirichletBoundaries * libMesh::DofMap::get_adjoint_dirichlet_boundaries | ( | unsigned int | q | ) | const |
Definition at line 4302 of file dof_map_constraints.C.
DirichletBoundaries * libMesh::DofMap::get_adjoint_dirichlet_boundaries | ( | unsigned int | q | ) |
Definition at line 4310 of file dof_map_constraints.C.
|
inline |
Definition at line 1223 of file dof_map.h.
References _dirichlet_boundaries.
Referenced by libMesh::DifferentiableSystem::add_dot_var_dirichlet_bcs().
|
inline |
Definition at line 1228 of file dof_map.h.
References _dirichlet_boundaries.
|
staticinherited |
Gets a string containing the reference information.
Definition at line 47 of file reference_counter.C.
References libMesh::ReferenceCounter::_counts, and libMesh::Quality::name().
Referenced by libMesh::ReferenceCounter::print_info().
std::string libMesh::DofMap::get_info | ( | ) | const |
Gets summary info about the sparsity bandwidth and constraints.
Definition at line 2703 of file dof_map.C.
References _dof_constraints, _matrices, _n_nz, _n_oz, _node_constraints, _primal_constraint_values, libMesh::ParallelObject::comm(), local_index(), std::max(), libMesh::Parallel::Communicator::max(), libMesh::ParallelObject::processor_id(), libMesh::DofObject::processor_id(), libMesh::TypeVector< T >::size(), and libMesh::Parallel::Communicator::sum().
Referenced by libMesh::System::get_info(), and print_info().
std::string libMesh::DofMap::get_local_constraints | ( | bool | print_nonlocal = false | ) | const |
Gets a string reporting all DoF and Node constraints local to this processor. If print_nonlocal
is true, then nonlocal constraints which are locally known are included.
Definition at line 1444 of file dof_map_constraints.C.
References libMesh::DofObject::id(), and libMesh::DofObject::processor_id().
|
inline |
_n_nz
list for this processor.The vector contains the bandwidth of the on-processor coupling for each row of the global matrix that the current processor owns. This information can be used to preallocate space for a parallel sparse matrix.
Definition at line 459 of file dof_map.h.
References _n_nz.
|
inline |
_n_oz
list for this processor.The vector contains the bandwidth of the off-processor coupling for each row of the global matrix that the current processor owns. This information can be used to preallocate space for a parallel sparse matrix.
Definition at line 472 of file dof_map.h.
References _n_oz.
|
inline |
Definition at line 1185 of file dof_map.h.
References _periodic_boundaries.
|
inline |
Definition at line 1874 of file dof_map.h.
References _primal_constraint_values.
|
inline |
_send_list
for this processor.The _send_list
contains the global indices of all the variables in the global solution vector that influence the current processor. This information can be used for gathers at each solution step to retrieve solution values needed for computation.
Definition at line 450 of file dof_map.h.
References _send_list.
Referenced by libMesh::UniformRefinementEstimator::_estimate_error(), libMesh::UnsteadySolver::adjoint_advance_timestep(), libMesh::NewmarkSolver::advance_timestep(), libMesh::UnsteadySolver::advance_timestep(), libMesh::PetscDMWrapper::build_sf(), libMesh::AdjointRefinementEstimator::estimate_error(), libMesh::SecondOrderUnsteadySolver::init_data(), libMesh::UnsteadySolver::init_data(), libMesh::System::re_update(), libMesh::SecondOrderUnsteadySolver::reinit(), libMesh::UnsteadySolver::reinit(), and libMesh::UnsteadySolver::retrieve_timestep().
bool libMesh::DofMap::has_adjoint_dirichlet_boundaries | ( | unsigned int | q | ) | const |
Definition at line 4292 of file dof_map_constraints.C.
Referenced by libMesh::AdjointRefinementEstimator::estimate_error(), and libMesh::ImplicitSystem::weighted_sensitivity_adjoint_solve().
|
inline |
true
if the variables are capable of being stored in a blocked form. Presently, this means that there can only be one variable group, and that the group has more than one variable. Definition at line 549 of file dof_map.h.
References n_variable_groups(), and n_variables().
Referenced by block_size().
|
inline |
dof
has a heterogenous constraint for adjoint solution qoi_num
, zero otherwise. Definition at line 1853 of file dof_map.h.
References _adjoint_constraint_values.
|
inline |
true
if the system has any heterogenous constraints for adjoint solution qoi_num
, false
otherwise. Definition at line 1839 of file dof_map.h.
References _adjoint_constraint_values.
void libMesh::DofMap::heterogenously_constrain_element_matrix_and_vector | ( | DenseMatrix< Number > & | matrix, |
DenseVector< Number > & | rhs, | ||
std::vector< dof_id_type > & | elem_dofs, | ||
bool | asymmetric_constraint_rows = true , |
||
int | qoi_index = -1 |
||
) | const |
Constrains the element matrix and vector. This method requires the element matrix to be square, in which case the elem_dofs correspond to the global DOF indices of both the rows and columns of the element matrix. For this case the rows and columns of the matrix necessarily correspond to variables of the same approximation order.
The heterogenous version of this method creates linear systems in which heterogenously constrained degrees of freedom will solve to their correct offset values, as would be appropriate for finding a solution to a linear problem in a single algebraic solve. The non-heterogenous version of this method creates linear systems in which even heterogenously constrained degrees of freedom are solved without offset values taken into account, as would be appropriate for finding linearized updates to a solution in which heterogenous constraints are already satisfied.
By default, the constraints for the primal solution of this system are used. If a non-negative qoi_index
is passed in, then the constraints for the corresponding adjoint solution are used instead.
Definition at line 1694 of file dof_map_constraints.C.
References dof_id, libMesh::DenseMatrix< T >::left_multiply_transpose(), libMesh::DenseMatrixBase< T >::m(), libMesh::DenseMatrixBase< T >::n(), libMesh::DenseMatrix< T >::right_multiply(), libMesh::DenseVector< T >::size(), libMesh::DenseMatrix< T >::vector_mult(), and libMesh::DenseMatrix< T >::vector_mult_transpose().
void libMesh::DofMap::heterogenously_constrain_element_vector | ( | const DenseMatrix< Number > & | matrix, |
DenseVector< Number > & | rhs, | ||
std::vector< dof_id_type > & | elem_dofs, | ||
bool | asymmetric_constraint_rows = true , |
||
int | qoi_index = -1 |
||
) | const |
Constrains the element vector. This method requires the element matrix to be square and not-yet-constrained, in which case the elem_dofs correspond to the global DOF indices of both the rows and columns of the element matrix.
The heterogenous version of this method creates linear systems in which heterogenously constrained degrees of freedom will solve to their correct offset values, as would be appropriate for finding a solution to a linear problem in a single algebraic solve. The non-heterogenous version of this method creates linear systems in which even heterogenously constrained degrees of freedom are solved without offset values taken into account, as would be appropriate for finding linearized updates to a solution in which heterogenous constraints are already satisfied.
By default, the constraints for the primal solution of this system are used. If a non-negative qoi_index
is passed in, then the constraints for the corresponding adjoint solution are used instead.
Definition at line 1800 of file dof_map_constraints.C.
References dof_id, libMesh::DenseMatrixBase< T >::m(), libMesh::DenseMatrixBase< T >::n(), libMesh::DenseVector< T >::size(), libMesh::DenseMatrix< T >::vector_mult(), and libMesh::DenseMatrix< T >::vector_mult_transpose().
|
inlineprotectedinherited |
Increments the construction counter. Should be called in the constructor of any derived class that will be reference counted.
Definition at line 181 of file reference_counter.h.
References libMesh::ReferenceCounter::_counts, libMesh::Quality::name(), and libMesh::Threads::spin_mtx.
Referenced by libMesh::ReferenceCountedObject< RBParametrized >::ReferenceCountedObject().
|
inlineprotectedinherited |
Increments the destruction counter. Should be called in the destructor of any derived class that will be reference counted.
Definition at line 194 of file reference_counter.h.
References libMesh::ReferenceCounter::_counts, libMesh::Quality::name(), and libMesh::Threads::spin_mtx.
Referenced by libMesh::ReferenceCountedObject< RBParametrized >::~ReferenceCountedObject().
|
private |
Invalidates all active DofObject dofs for this system
Definition at line 813 of file dof_map.C.
References mesh, and sys_number().
Referenced by distribute_dofs(), and reinit().
bool libMesh::DofMap::is_attached | ( | SparseMatrix< Number > & | matrix | ) |
Matrices should not be attached more than once. We can test for an already-attached matrix if necessary using is_attached
Definition at line 298 of file dof_map.C.
References _matrices.
Referenced by libMesh::ImplicitSystem::init_matrices().
|
inline |
true
if the degree of freedom dof is constrained, false
otherwise. Definition at line 1829 of file dof_map.h.
References _dof_constraints.
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::compute_periodic_constraints(), libMesh::FEGenericBase< FEOutputType< T >::type >::compute_proj_constraints(), extract_local_vector(), find_connected_dofs(), and libMesh::CondensedEigenSystem::initialize_condensed_dofs().
|
inline |
true
if the Node is constrained, false otherwise. Definition at line 1812 of file dof_map.h.
References _node_constraints.
template bool libMesh::DofMap::is_evaluable< Node > | ( | const DofObjectSubclass & | obj, |
unsigned int | var_num = libMesh::invalid_uint |
||
) | const |
true
iff our solutions can be locally evaluated on obj
(which should be an Elem or a Node) for variable number var_num
(for all variables, if var_num
is invalid_uint) Definition at line 2413 of file dof_map.C.
References all_semilocal_indices(), dof_indices(), libMesh::invalid_uint, and libMesh::ParallelObject::processor_id().
Referenced by libMesh::System::point_gradient(), and libMesh::System::point_hessian().
bool libMesh::DofMap::is_periodic_boundary | ( | const boundary_id_type | boundaryid | ) | const |
true
if the boundary given by boundaryid
is periodic, false otherwise Definition at line 219 of file dof_map.C.
References _periodic_boundaries.
|
inline |
proc
.proc
has no local dof indices. Use end_dof() instead. Definition at line 624 of file dof_map.h.
References _end_df.
|
inline |
Definition at line 631 of file dof_map.h.
References libMesh::ParallelObject::processor_id().
|
inline |
true
if degree of freedom index dof_index
is a local index. Definition at line 738 of file dof_map.h.
References end_dof(), and first_dof().
Referenced by add_neighbors_to_send_list(), get_info(), local_variable_indices(), semilocal_index(), and libMesh::PetscDMWrapper::set_point_range_in_section().
void libMesh::DofMap::local_variable_indices | ( | std::vector< dof_id_type > & | idx, |
const MeshBase & | mesh, | ||
unsigned int | var_num | ||
) | const |
Fills an array of those dof indices which belong to the given variable number and live on the current processor.
Definition at line 1076 of file dof_map.C.
References libMesh::Variable::active_on_subdomain(), libMesh::DofObject::dof_number(), libMesh::MeshTools::Generation::Private::idx(), local_index(), mesh, libMesh::DofObject::n_comp(), n_nodes, libMesh::ParallelObject::n_processors(), libMesh::ParallelObject::processor_id(), libMesh::DofObject::processor_id(), libMesh::SCALAR, SCALAR_dof_indices(), sys_number(), variable(), and variable_type().
Referenced by libMesh::petsc_auto_fieldsplit().
std::pair< Real, Real > libMesh::DofMap::max_constraint_error | ( | const System & | system, |
NumericVector< Number > * | v = nullptr |
||
) | const |
Tests the constrained degrees of freedom on the numeric vector v
, which represents a solution defined on the mesh, returning a pair whose first entry is the maximum absolute error on a constrained DoF and whose second entry is the maximum relative error. Useful for debugging purposes.
If v
== nullptr, the system solution vector is tested.
Definition at line 2268 of file dof_map_constraints.C.
References std::abs(), libMesh::MeshBase::active_local_element_ptr_range(), libMesh::NumericVector< T >::closed(), libMesh::NumericVector< T >::first_local_index(), libMesh::System::get_dof_map(), libMesh::System::get_mesh(), libMesh::NumericVector< T >::last_local_index(), libMesh::DenseMatrixBase< T >::m(), std::max(), mesh, libMesh::DenseMatrixBase< T >::n(), libMesh::Real, and libMesh::System::solution.
|
staticprivate |
Definition at line 1432 of file dof_map.C.
References libMesh::as_range().
Referenced by add_neighbors_to_send_list(), and libMesh::SparsityPattern::Build::operator()().
dof_id_type libMesh::DofMap::n_constrained_dofs | ( | ) | const |
Definition at line 1172 of file dof_map_constraints.C.
Referenced by libMesh::libmesh_petsc_snes_postcheck().
|
inline |
Definition at line 810 of file dof_map.h.
References _node_constraints.
|
inline |
Definition at line 574 of file dof_map.h.
References _n_dfs.
Referenced by distribute_dofs(), libMesh::SparsityPattern::Build::join(), libMesh::UnsteadySolver::old_nonlinear_solution(), libMesh::SecondOrderUnsteadySolver::old_solution_accel(), libMesh::SecondOrderUnsteadySolver::old_solution_rate(), and libMesh::SparsityPattern::Build::parallel_sync().
|
inline |
proc
. Definition at line 590 of file dof_map.h.
References _end_df, and _first_df.
Referenced by build_sparsity(), libMesh::SparsityPattern::Build::join(), n_local_dofs(), libMesh::SparsityPattern::Build::operator()(), and libMesh::SparsityPattern::Build::parallel_sync().
dof_id_type libMesh::DofMap::n_local_constrained_dofs | ( | ) | const |
Definition at line 1182 of file dof_map_constraints.C.
|
inline |
Definition at line 584 of file dof_map.h.
References n_dofs_on_processor(), and libMesh::ParallelObject::processor_id().
Referenced by libMesh::PetscDMWrapper::build_sf(), and libMesh::PetscDMWrapper::set_point_range_in_section().
|
inlinestaticinherited |
Prints the number of outstanding (created, but not yet destroyed) objects.
Definition at line 83 of file reference_counter.h.
References libMesh::ReferenceCounter::_n_objects.
|
inline |
Definition at line 1271 of file dof_map.h.
References _n_old_dfs.
Referenced by SCALAR_dof_indices().
|
inlineinherited |
Definition at line 95 of file parallel_object.h.
References libMesh::ParallelObject::_communicator, and libMesh::Parallel::Communicator::size().
Referenced by libMesh::BoundaryInfo::_find_id_maps(), libMesh::PetscDMWrapper::add_dofs_to_section(), libMesh::DistributedMesh::add_elem(), libMesh::DistributedMesh::add_node(), libMesh::LaplaceMeshSmoother::allgather_graph(), libMesh::FEMSystem::assembly(), libMesh::AztecLinearSolver< T >::AztecLinearSolver(), libMesh::BoundaryInfo::build_node_list_from_side_list(), libMesh::EquationSystems::build_parallel_elemental_solution_vector(), libMesh::DistributedMesh::clear(), libMesh::Nemesis_IO_Helper::compute_border_node_ids(), libMesh::Nemesis_IO_Helper::construct_nemesis_filename(), libMesh::UnstructuredMesh::create_pid_mesh(), libMesh::MeshTools::create_processor_bounding_box(), distribute_dofs(), distribute_local_dofs_node_major(), distribute_local_dofs_var_major(), libMesh::EnsightIO::EnsightIO(), libMesh::MeshBase::get_info(), libMesh::SystemSubsetBySubdomain::init(), libMesh::PetscDMWrapper::init_and_attach_petscdm(), libMesh::Nemesis_IO_Helper::initialize(), libMesh::DistributedMesh::insert_elem(), libMesh::MeshTools::libmesh_assert_contiguous_dof_ids(), libMesh::MeshTools::libmesh_assert_parallel_consistent_new_node_procids(), libMesh::MeshTools::libmesh_assert_parallel_consistent_procids< Elem >(), libMesh::MeshTools::libmesh_assert_parallel_consistent_procids< Node >(), libMesh::MeshTools::libmesh_assert_topology_consistent_procids< Node >(), libMesh::MeshTools::libmesh_assert_valid_boundary_ids(), libMesh::MeshTools::libmesh_assert_valid_dof_ids(), libMesh::MeshTools::libmesh_assert_valid_neighbors(), libMesh::MeshTools::libmesh_assert_valid_refinement_flags(), local_variable_indices(), libMesh::MeshRefinement::make_coarsening_compatible(), libMesh::MeshBase::n_active_elem_on_proc(), libMesh::MeshBase::n_elem_on_proc(), libMesh::MeshBase::n_nodes_on_proc(), libMesh::MeshBase::partition(), libMesh::PetscLinearSolver< T >::PetscLinearSolver(), libMesh::System::point_gradient(), libMesh::System::point_hessian(), libMesh::System::point_value(), libMesh::NameBasedIO::read(), libMesh::Nemesis_IO::read(), libMesh::CheckpointIO::read(), libMesh::CheckpointIO::read_connectivity(), libMesh::XdrIO::read_header(), libMesh::CheckpointIO::read_nodes(), libMesh::System::read_parallel_data(), libMesh::System::read_SCALAR_dofs(), libMesh::System::read_serialized_blocked_dof_objects(), libMesh::System::read_serialized_vector(), libMesh::DistributedMesh::renumber_dof_objects(), set_nonlocal_dof_objects(), libMesh::PetscDMWrapper::set_point_range_in_section(), libMesh::MeshRefinement::uniformly_coarsen(), libMesh::DistributedMesh::update_parallel_id_counts(), libMesh::GMVIO::write_binary(), libMesh::GMVIO::write_discontinuous_gmv(), libMesh::System::write_parallel_data(), libMesh::System::write_SCALAR_dofs(), libMesh::XdrIO::write_serialized_bcs_helper(), libMesh::System::write_serialized_blocked_dof_objects(), libMesh::XdrIO::write_serialized_connectivity(), libMesh::XdrIO::write_serialized_nodes(), and libMesh::XdrIO::write_serialized_nodesets().
|
inline |
Definition at line 579 of file dof_map.h.
References _n_SCALAR_dofs.
Referenced by distribute_dofs(), SCALAR_dof_indices(), and libMesh::PetscDMWrapper::set_point_range_in_section().
|
inline |
Definition at line 533 of file dof_map.h.
References _variable_groups.
Referenced by distribute_local_dofs_node_major(), distribute_local_dofs_var_major(), dof_indices(), has_blocked_representation(), old_dof_indices(), reinit(), and set_nonlocal_dof_objects().
|
inline |
Definition at line 541 of file dof_map.h.
References _variables.
Referenced by add_neighbors_to_send_list(), block_size(), libMesh::FEGenericBase< FEOutputType< T >::type >::coarsened_dof_values(), distribute_dofs(), DMlibMeshSetSystem_libMesh(), has_blocked_representation(), libMesh::SparsityPattern::Build::operator()(), reinit(), and use_coupled_neighbor_dofs().
|
inline |
Definition at line 927 of file dof_map.h.
References _node_constraints.
|
inline |
Definition at line 933 of file dof_map.h.
References _node_constraints.
|
private |
i
from the mesh
. Definition at line 306 of file dof_map.C.
References mesh.
Referenced by distribute_dofs().
void libMesh::DofMap::old_dof_indices | ( | const Elem *const | elem, |
std::vector< dof_id_type > & | di, | ||
const unsigned int | vn = libMesh::invalid_uint |
||
) | const |
After a mesh is refined and repartitioned it is possible that the _send_list
will need to be augmented. This is the case when an element is refined and its children end up on different processors than the parent. These children will need values from the parent when projecting the solution onto the refined mesh, hence the parent's DOF indices need to be included in the _send_list
. Fills the vector di with the global degree of freedom indices for the element using the DofMap::old_dof_object
. If no variable number is specified then all variables are returned.
Definition at line 2434 of file dof_map.C.
References libMesh::Elem::active(), libMesh::Variable::active_on_subdomain(), libMesh::Elem::dim(), libMesh::DofObject::dof_number(), libMesh::FEInterface::extra_hanging_dofs(), libMesh::FEType::family, libMesh::MeshTools::Subdivision::find_one_ring(), libMesh::Elem::get_nodes(), libMesh::DofObject::has_dofs(), libMesh::Elem::infinite(), libMesh::DofObject::invalid_id, libMesh::invalid_uint, libMesh::Elem::is_vertex(), libMesh::Elem::JUST_COARSENED, libMesh::Elem::JUST_REFINED, libMesh::LAGRANGE, libMesh::DofObject::n_comp_group(), libMesh::FEInterface::n_dofs_at_node(), libMesh::FEInterface::n_dofs_at_node_function(), libMesh::FEInterface::n_dofs_per_elem(), n_nodes, libMesh::Elem::n_nodes(), libMesh::DofObject::n_systems(), n_variable_groups(), libMesh::VariableGroup::n_variables(), libMesh::VariableGroup::number(), libMesh::DofObject::old_dof_object, libMesh::FEType::order, libMesh::Elem::p_level(), libMesh::Elem::p_refinement_flag(), libMesh::Elem::refinement_flag(), libMesh::SCALAR, SCALAR_dof_indices(), libMesh::Elem::subdomain_id(), sys_number(), libMesh::TRI3SUBDIVISION, libMesh::Variable::type(), libMesh::Elem::type(), and variable_group().
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::coarsened_dof_values(), libMesh::BuildProjectionList::operator()(), and libMesh::FEMContext::pre_fe_reinit().
void libMesh::DofMap::prepare_send_list | ( | ) |
Takes the _send_list
vector (which may have duplicate entries) and sorts it. The duplicate entries are then removed, resulting in a sorted _send_list
with unique entries. Also calls any user-provided methods for adding to the send list.
Definition at line 1639 of file dof_map.C.
References _augment_send_list, _extra_send_list_context, _extra_send_list_function, _send_list, libMesh::DofMap::AugmentSendList::augment_send_list(), libMesh::out, and swap().
Referenced by libMesh::EquationSystems::allgather(), and libMesh::System::reinit_constraints().
void libMesh::DofMap::print_dof_constraints | ( | std::ostream & | os = libMesh::out , |
bool | print_nonlocal = false |
||
) | const |
Prints (from processor 0) all DoF and Node constraints. If print_nonlocal
is true, then each constraint is printed once for each processor that knows about it, which may be useful for DistributedMesh
debugging.
Definition at line 1418 of file dof_map_constraints.C.
|
staticinherited |
Prints the reference information, by default to libMesh::out
.
Definition at line 87 of file reference_counter.C.
References libMesh::ReferenceCounter::_enable_print_counter, and libMesh::ReferenceCounter::get_info().
void libMesh::DofMap::print_info | ( | std::ostream & | os = libMesh::out | ) | const |
Prints summary info about the sparsity bandwidth and constraints.
Definition at line 2696 of file dof_map.C.
References get_info().
void libMesh::DofMap::process_constraints | ( | MeshBase & | mesh | ) |
Postprocesses any constrained degrees of freedom to be constrained only in terms of unconstrained dofs, then adds unconstrained dofs to the send_list and prepares that for use. This should be run after both system (create_dof_constraints) and user constraints have all been added.
Definition at line 3227 of file dof_map_constraints.C.
References mesh, and libMesh::Real.
Referenced by libMesh::System::reinit_constraints().
|
inlineinherited |
Definition at line 101 of file parallel_object.h.
References libMesh::ParallelObject::_communicator, and libMesh::Parallel::Communicator::rank().
Referenced by libMesh::BoundaryInfo::_find_id_maps(), libMesh::EquationSystems::_read_impl(), libMesh::PetscDMWrapper::add_dofs_to_section(), libMesh::DistributedMesh::add_elem(), libMesh::BoundaryInfo::add_elements(), add_neighbors_to_send_list(), libMesh::DistributedMesh::add_node(), libMesh::UnstructuredMesh::all_second_order(), libMesh::MeshTools::Modification::all_tri(), libMesh::FEMSystem::assembly(), libMesh::EquationSystems::build_discontinuous_solution_vector(), libMesh::Nemesis_IO_Helper::build_element_and_node_maps(), libMesh::InfElemBuilder::build_inf_elem(), libMesh::BoundaryInfo::build_node_list_from_side_list(), libMesh::EquationSystems::build_parallel_elemental_solution_vector(), libMesh::DistributedMesh::clear(), libMesh::ExodusII_IO_Helper::close(), libMesh::Nemesis_IO_Helper::compute_border_node_ids(), libMesh::Nemesis_IO_Helper::compute_communication_map_parameters(), libMesh::Nemesis_IO_Helper::compute_internal_and_border_elems_and_internal_nodes(), libMesh::Nemesis_IO_Helper::compute_node_communication_maps(), libMesh::Nemesis_IO_Helper::compute_num_global_elem_blocks(), libMesh::Nemesis_IO_Helper::compute_num_global_nodesets(), libMesh::Nemesis_IO_Helper::compute_num_global_sidesets(), libMesh::Nemesis_IO_Helper::construct_nemesis_filename(), libMesh::MeshTools::correct_node_proc_ids(), libMesh::ExodusII_IO_Helper::create(), libMesh::DistributedMesh::delete_elem(), libMesh::DistributedMesh::delete_node(), libMesh::MeshCommunication::delete_remote_elements(), distribute_dofs(), distribute_local_dofs_node_major(), distribute_local_dofs_var_major(), libMesh::DistributedMesh::DistributedMesh(), end_dof(), end_old_dof(), libMesh::EnsightIO::EnsightIO(), libMesh::MeshFunction::find_element(), libMesh::MeshFunction::find_elements(), libMesh::UnstructuredMesh::find_neighbors(), first_dof(), first_old_dof(), libMesh::Nemesis_IO_Helper::get_cmap_params(), libMesh::Nemesis_IO_Helper::get_eb_info_global(), libMesh::Nemesis_IO_Helper::get_elem_cmap(), libMesh::Nemesis_IO_Helper::get_elem_map(), libMesh::MeshBase::get_info(), get_info(), libMesh::Nemesis_IO_Helper::get_init_global(), libMesh::Nemesis_IO_Helper::get_init_info(), libMesh::Nemesis_IO_Helper::get_loadbal_param(), libMesh::Nemesis_IO_Helper::get_node_cmap(), libMesh::Nemesis_IO_Helper::get_node_map(), libMesh::Nemesis_IO_Helper::get_ns_param_global(), libMesh::Nemesis_IO_Helper::get_ss_param_global(), libMesh::SparsityPattern::Build::handle_vi_vj(), libMesh::SystemSubsetBySubdomain::init(), libMesh::ExodusII_IO_Helper::initialize(), libMesh::ExodusII_IO_Helper::initialize_element_variables(), libMesh::ExodusII_IO_Helper::initialize_global_variables(), libMesh::ExodusII_IO_Helper::initialize_nodal_variables(), libMesh::DistributedMesh::insert_elem(), is_evaluable(), libMesh::SparsityPattern::Build::join(), last_dof(), libMesh::MeshTools::libmesh_assert_consistent_distributed(), libMesh::MeshTools::libmesh_assert_consistent_distributed_nodes(), libMesh::MeshTools::libmesh_assert_contiguous_dof_ids(), libMesh::MeshTools::libmesh_assert_parallel_consistent_procids< Elem >(), libMesh::MeshTools::libmesh_assert_valid_neighbors(), libMesh::DistributedMesh::libmesh_assert_valid_parallel_object_ids(), local_variable_indices(), libMesh::MeshRefinement::make_coarsening_compatible(), libMesh::MeshBase::n_active_local_elem(), libMesh::BoundaryInfo::n_boundary_conds(), libMesh::BoundaryInfo::n_edge_conds(), n_local_dofs(), libMesh::System::n_local_dofs(), libMesh::MeshBase::n_local_elem(), libMesh::MeshBase::n_local_nodes(), libMesh::BoundaryInfo::n_nodeset_conds(), libMesh::BoundaryInfo::n_shellface_conds(), libMesh::SparsityPattern::Build::operator()(), libMesh::DistributedMesh::own_node(), libMesh::System::point_gradient(), libMesh::System::point_hessian(), libMesh::System::point_value(), libMesh::Nemesis_IO_Helper::put_cmap_params(), libMesh::Nemesis_IO_Helper::put_elem_cmap(), libMesh::Nemesis_IO_Helper::put_elem_map(), libMesh::Nemesis_IO_Helper::put_loadbal_param(), libMesh::Nemesis_IO_Helper::put_node_cmap(), libMesh::Nemesis_IO_Helper::put_node_map(), libMesh::NameBasedIO::read(), libMesh::Nemesis_IO::read(), libMesh::XdrIO::read(), libMesh::CheckpointIO::read(), libMesh::ExodusII_IO_Helper::read_elem_num_map(), libMesh::ExodusII_IO_Helper::read_global_values(), libMesh::CheckpointIO::read_header(), libMesh::XdrIO::read_header(), libMesh::System::read_header(), libMesh::System::read_legacy_data(), libMesh::ExodusII_IO_Helper::read_node_num_map(), libMesh::System::read_parallel_data(), libMesh::System::read_SCALAR_dofs(), libMesh::XdrIO::read_serialized_bc_names(), libMesh::XdrIO::read_serialized_bcs_helper(), libMesh::System::read_serialized_blocked_dof_objects(), libMesh::XdrIO::read_serialized_connectivity(), libMesh::System::read_serialized_data(), libMesh::XdrIO::read_serialized_nodes(), libMesh::XdrIO::read_serialized_nodesets(), libMesh::XdrIO::read_serialized_subdomain_names(), libMesh::System::read_serialized_vector(), libMesh::System::read_serialized_vectors(), libMesh::DistributedMesh::renumber_dof_objects(), libMesh::CheckpointIO::select_split_config(), set_nonlocal_dof_objects(), libMesh::PetscDMWrapper::set_point_range_in_section(), libMesh::LaplaceMeshSmoother::smooth(), libMesh::MeshTools::total_weight(), libMesh::MeshRefinement::uniformly_coarsen(), libMesh::Parallel::Packing< T >::unpack(), libMesh::DistributedMesh::update_parallel_id_counts(), libMesh::NameBasedIO::write(), libMesh::XdrIO::write(), libMesh::CheckpointIO::write(), libMesh::EquationSystems::write(), libMesh::GMVIO::write_discontinuous_gmv(), libMesh::ExodusII_IO::write_element_data(), libMesh::ExodusII_IO_Helper::write_element_values(), libMesh::ExodusII_IO_Helper::write_elements(), libMesh::ExodusII_IO::write_global_data(), libMesh::ExodusII_IO_Helper::write_global_values(), libMesh::System::write_header(), libMesh::ExodusII_IO::write_information_records(), libMesh::ExodusII_IO_Helper::write_information_records(), libMesh::ExodusII_IO_Helper::write_nodal_coordinates(), libMesh::UCDIO::write_nodal_data(), libMesh::ExodusII_IO::write_nodal_data(), libMesh::ExodusII_IO::write_nodal_data_discontinuous(), libMesh::ExodusII_IO_Helper::write_nodal_values(), libMesh::Nemesis_IO_Helper::write_nodesets(), libMesh::ExodusII_IO_Helper::write_nodesets(), libMesh::System::write_parallel_data(), libMesh::System::write_SCALAR_dofs(), libMesh::XdrIO::write_serialized_bc_names(), libMesh::XdrIO::write_serialized_bcs_helper(), libMesh::System::write_serialized_blocked_dof_objects(), libMesh::XdrIO::write_serialized_connectivity(), libMesh::System::write_serialized_data(), libMesh::XdrIO::write_serialized_nodes(), libMesh::XdrIO::write_serialized_nodesets(), libMesh::XdrIO::write_serialized_subdomain_names(), libMesh::System::write_serialized_vector(), libMesh::System::write_serialized_vectors(), libMesh::Nemesis_IO_Helper::write_sidesets(), libMesh::ExodusII_IO_Helper::write_sidesets(), libMesh::ExodusII_IO::write_timestep(), libMesh::ExodusII_IO_Helper::write_timestep(), and libMesh::ExodusII_IO::write_timestep_discontinuous().
void libMesh::DofMap::reinit | ( | MeshBase & | mesh | ) |
Reinitialize the underlying data structures conformal to the current mesh.
Definition at line 474 of file dof_map.C.
References _default_coupling, _dof_coupling, _n_SCALAR_dofs, libMesh::Variable::active_on_subdomain(), libMesh::CouplingMatrix::empty(), libMesh::Utility::enum_to_string(), libMesh::err, libMesh::FEInterface::extra_hanging_dofs(), libMesh::FEType::family, libMesh::OrderWrapper::get_order(), libMesh::DofObject::has_dofs(), invalidate_dofs(), libMesh::Elem::JUST_REFINED, std::max(), libMesh::FEInterface::max_order(), mesh, libMesh::DofObject::n_comp_group(), libMesh::FEInterface::n_dofs_at_node(), libMesh::FEInterface::n_dofs_per_elem(), n_variable_groups(), libMesh::VariableGroup::n_variables(), n_variables(), libMesh::DofObject::old_dof_object, libMesh::FEType::order, libMesh::SCALAR, libMesh::DofObject::set_n_comp_group(), libMesh::DofObject::set_old_dof_object(), libMesh::DofObject::set_vg_dof_base(), sys_number(), libMesh::Variable::type(), use_coupled_neighbor_dofs(), variable_group(), and libMesh::DofObject::vg_dof_base().
Referenced by distribute_dofs().
void libMesh::DofMap::remove_adjoint_dirichlet_boundary | ( | const DirichletBoundary & | dirichlet_boundary, |
unsigned int | q | ||
) |
Removes from the system the specified Dirichlet boundary for the adjoint equation defined by Quantity of interest index q
Definition at line 4336 of file dof_map_constraints.C.
References libMesh::DirichletBoundary::b, end, and libMesh::DirichletBoundary::variables.
void libMesh::DofMap::remove_algebraic_ghosting_functor | ( | GhostingFunctor & | evaluable_functor | ) |
Removes a functor which was previously added to the set of algebraic ghosting functors, from both this DofMap and from the underlying mesh.
Definition at line 1840 of file dof_map.C.
References _algebraic_ghosting_functors, _mesh, and libMesh::MeshBase::remove_ghosting_functor().
Referenced by remove_default_ghosting().
void libMesh::DofMap::remove_coupling_functor | ( | GhostingFunctor & | coupling_functor | ) |
Removes a functor which was previously added to the set of coupling functors, from both this DofMap and from the underlying mesh.
Definition at line 1820 of file dof_map.C.
References _coupling_functors, _mesh, and libMesh::MeshBase::remove_ghosting_functor().
Referenced by remove_default_ghosting().
void libMesh::DofMap::remove_default_ghosting | ( | ) |
Remove any default ghosting functor(s). User-added ghosting functors will be unaffected.
Unless user-added equivalent ghosting functors exist, removing the default coupling functor is only safe for explicit solves, and removing the default algebraic ghosting functor is only safe for codes where no evaluations on neighbor cells (e.g. no jump error estimators) are done.
Defaults can be restored manually via add_default_ghosting(), or automatically if clear() returns the DofMap to a default state.
Definition at line 1792 of file dof_map.C.
References default_algebraic_ghosting(), default_coupling(), remove_algebraic_ghosting_functor(), and remove_coupling_functor().
Referenced by libMesh::EquationSystems::enable_default_ghosting().
void libMesh::DofMap::remove_dirichlet_boundary | ( | const DirichletBoundary & | dirichlet_boundary | ) |
Removes the specified Dirichlet boundary from the system.
Definition at line 4321 of file dof_map_constraints.C.
References libMesh::DirichletBoundary::b, and libMesh::DirichletBoundary::variables.
void libMesh::DofMap::SCALAR_dof_indices | ( | std::vector< dof_id_type > & | di, |
const unsigned int | vn, | ||
const bool | old_dofs = false |
||
) | const |
Fills the vector di
with the global degree of freedom indices corresponding to the SCALAR variable vn. If old_dofs=true, the old SCALAR dof indices are returned.
Definition at line 2348 of file dof_map.C.
References _first_old_scalar_df, _first_scalar_df, libMesh::OrderWrapper::get_order(), libMesh::DofObject::invalid_id, n_old_dofs(), n_SCALAR_dofs(), libMesh::FEType::order, libMesh::SCALAR, libMesh::Variable::type(), and variable().
Referenced by dof_indices(), local_variable_indices(), old_dof_indices(), libMesh::System::project_vector(), libMesh::System::projection_matrix(), libMesh::System::read_parallel_data(), libMesh::System::read_SCALAR_dofs(), libMesh::System::write_parallel_data(), and libMesh::System::write_SCALAR_dofs().
void libMesh::DofMap::scatter_constraints | ( | MeshBase & | mesh | ) |
Sends constraint equations to constraining processors
Definition at line 3432 of file dof_map_constraints.C.
References libMesh::MeshBase::active_local_elements_begin(), libMesh::MeshBase::active_local_elements_end(), libMesh::MeshBase::active_not_local_elements_begin(), libMesh::MeshBase::active_not_local_elements_end(), libMesh::as_range(), data, end, libMesh::DofObject::id(), libMesh::index_range(), libMesh::MeshBase::is_serial(), mesh, libMesh::MeshBase::node_ptr(), libMesh::DofObject::processor_id(), libMesh::Parallel::push_parallel_vector_data(), libMesh::TypeVector< T >::size(), and libMesh::Parallel::wait().
bool libMesh::DofMap::semilocal_index | ( | dof_id_type | dof_index | ) | const |
true
if degree of freedom index dof_index
is either a local index or in the send_list
.Definition at line 2384 of file dof_map.C.
References _send_list, and local_index().
Referenced by all_semilocal_indices().
void libMesh::DofMap::set_error_on_cyclic_constraint | ( | bool | error_on_cyclic_constraint | ) |
Specify whether or not we perform an extra (opt-mode enabled) check for cyclic constraints. If a cyclic constraint is present then the system constraints are not valid, so if error_on_cyclic_constraint
is true we will throw an error in this case.
Definition at line 238 of file dof_map.C.
References _error_on_cyclic_constraint.
void libMesh::DofMap::set_implicit_neighbor_dofs | ( | bool | implicit_neighbor_dofs | ) |
Allow the implicit_neighbor_dofs flag to be set programmatically. This overrides the –implicit_neighbor_dofs commandline option. We can use this to set the implicit neighbor dofs option differently for different systems, whereas the commandline option is the same for all systems.
Definition at line 1675 of file dof_map.C.
References _implicit_neighbor_dofs, and _implicit_neighbor_dofs_initialized.
|
private |
Helper function for distributing dofs in parallel
Definition at line 321 of file dof_map.C.
References libMesh::ParallelObject::comm(), data, libMesh::DofObject::dof_number(), libMesh::DofObject::id(), libMesh::index_range(), libMesh::DofObject::invalid_id, libMesh::DofObject::invalid_processor_id, mesh, libMesh::DofObject::n_comp(), libMesh::DofObject::n_comp_group(), libMesh::ParallelObject::n_processors(), libMesh::DofObject::n_var_groups(), n_variable_groups(), libMesh::DofObject::n_vars(), libMesh::ParallelObject::processor_id(), libMesh::DofObject::processor_id(), libMesh::Parallel::pull_parallel_vector_data(), libMesh::DofObject::set_n_comp_group(), libMesh::DofObject::set_vg_dof_base(), sys_number(), and libMesh::DofObject::vg_dof_base().
Referenced by distribute_dofs().
|
inline |
Definition at line 911 of file dof_map.h.
References _dof_constraints, and _stashed_dof_constraints.
|
inline |
Definition at line 1744 of file dof_map.h.
References _sys_number.
Referenced by _dof_indices(), libMesh::FEGenericBase< FEOutputType< T >::type >::compute_periodic_constraints(), distribute_dofs(), distribute_local_dofs_node_major(), distribute_local_dofs_var_major(), dof_indices(), invalidate_dofs(), local_variable_indices(), old_dof_indices(), reinit(), and set_nonlocal_dof_objects().
|
inline |
Definition at line 917 of file dof_map.h.
References _dof_constraints, and _stashed_dof_constraints.
bool libMesh::DofMap::use_coupled_neighbor_dofs | ( | const MeshBase & | mesh | ) | const |
Tells other library functions whether or not this problem includes coupling between dofs in neighboring cells, as can currently be specified on the command line or inferred from the use of all discontinuous variables.
Definition at line 1682 of file dof_map.C.
References _implicit_neighbor_dofs, _implicit_neighbor_dofs_initialized, libMesh::FEAbstract::build(), libMesh::command_line_next(), libMesh::DISCONTINUOUS, mesh, n_variables(), libMesh::on_command_line(), and variable_type().
Referenced by build_sparsity(), clear(), and reinit().
|
inline |
c
. Definition at line 1762 of file dof_map.h.
References _variables.
Referenced by distribute_dofs(), DMlibMeshSetSystem_libMesh(), local_variable_indices(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::operator()(), libMesh::BoundaryProjectSolution::operator()(), and SCALAR_dof_indices().
|
inline |
VariableGroup
description object for group g
. Definition at line 1752 of file dof_map.h.
References _variable_groups.
Referenced by _dof_indices(), distribute_local_dofs_node_major(), distribute_local_dofs_var_major(), dof_indices(), libMesh::System::get_info(), old_dof_indices(), and reinit().
|
inline |
VariableGroup
vg
. Definition at line 1782 of file dof_map.h.
References _variable_groups.
|
inline |
VariableGroup
vg
. Definition at line 1802 of file dof_map.h.
References _variable_groups.
|
inline |
c
. Definition at line 1772 of file dof_map.h.
References _variables.
|
inline |
c
. Definition at line 1792 of file dof_map.h.
References _variables.
Referenced by libMesh::ExactSolution::_compute_error(), libMesh::UniformRefinementEstimator::_estimate_error(), libMesh::HPCoarsenTest::add_projection(), libMesh::System::calculate_norm(), libMesh::FEGenericBase< FEOutputType< T >::type >::coarsened_dof_values(), libMesh::FEInterface::compute_constraints(), libMesh::FEGenericBase< FEOutputType< T >::type >::compute_periodic_constraints(), libMesh::FEGenericBase< FEOutputType< T >::type >::compute_proj_constraints(), libMesh::MeshFunction::discontinuous_gradient(), libMesh::MeshFunction::discontinuous_value(), libMesh::ExactErrorEstimator::estimate_error(), libMesh::MeshFunction::gradient(), libMesh::MeshFunction::hessian(), local_variable_indices(), libMesh::WeightedPatchRecoveryErrorEstimator::EstimateError::operator()(), libMesh::PatchRecoveryErrorEstimator::EstimateError::operator()(), libMesh::MeshFunction::operator()(), libMesh::System::point_gradient(), libMesh::System::point_hessian(), libMesh::HPCoarsenTest::select_refinement(), and use_coupled_neighbor_dofs().
|
friend |
|
private |
Definition at line 1691 of file dof_map.h.
Referenced by clear(), has_heterogenous_adjoint_constraint(), and has_heterogenous_adjoint_constraints().
|
private |
|
private |
The list of all GhostingFunctor objects to be used when distributing ghosted vectors.
The library should automatically copy these functors to the MeshBase, too, so any algebraically ghosted dofs will live on geometrically ghosted elements.
Definition at line 1605 of file dof_map.h.
Referenced by add_algebraic_ghosting_functor(), algebraic_ghosting_functors_begin(), algebraic_ghosting_functors_end(), clear(), distribute_dofs(), and remove_algebraic_ghosting_functor().
|
private |
Function object to call to add extra entries to the send list
Definition at line 1569 of file dof_map.h.
Referenced by attach_extra_send_list_object(), and prepare_send_list().
|
private |
Function object to call to add extra entries to the sparsity pattern
Definition at line 1552 of file dof_map.h.
Referenced by attach_extra_sparsity_object(), and build_sparsity().
|
protectedinherited |
Definition at line 107 of file parallel_object.h.
Referenced by libMesh::EquationSystems::build_parallel_elemental_solution_vector(), libMesh::EquationSystems::build_parallel_solution_vector(), libMesh::ParallelObject::comm(), libMesh::ParallelObject::n_processors(), libMesh::ParallelObject::operator=(), and libMesh::ParallelObject::processor_id().
|
staticprotectedinherited |
Actually holds the data.
Definition at line 122 of file reference_counter.h.
Referenced by libMesh::ReferenceCounter::get_info(), libMesh::ReferenceCounter::increment_constructor_count(), and libMesh::ReferenceCounter::increment_destructor_count().
|
private |
The list of all GhostingFunctor objects to be used when coupling degrees of freedom in matrix sparsity patterns.
These objects will also be used as algebraic ghosting functors, but not vice-versa.
The library should automatically copy these functors to the MeshBase, too, so any dofs coupled to local dofs will live on geometrically ghosted elements.
Definition at line 1618 of file dof_map.h.
Referenced by add_coupling_functor(), build_sparsity(), clear(), coupling_functors_begin(), coupling_functors_end(), distribute_dofs(), and remove_coupling_functor().
|
private |
The default coupling GhostingFunctor, used to implement standard libMesh sparsity pattern construction.
We use a std::unique_ptr here to reduce header dependencies.
Definition at line 1587 of file dof_map.h.
Referenced by clear(), default_coupling(), DofMap(), reinit(), and ~DofMap().
|
private |
The default algebraic GhostingFunctor, used to implement standard libMesh send_list construction.
We use a std::unique_ptr here to reduce header dependencies.
Definition at line 1595 of file dof_map.h.
Referenced by clear(), default_algebraic_ghosting(), DofMap(), and ~DofMap().
|
private |
Data structure containing Dirichlet functions. The ith entry is the constraint matrix row for boundaryid i.
Definition at line 1721 of file dof_map.h.
Referenced by get_dirichlet_boundaries().
|
private |
Data structure containing DOF constraints. The ith entry is the constraint matrix row for DOF i.
Definition at line 1687 of file dof_map.h.
Referenced by clear(), constraint_rows_begin(), constraint_rows_end(), find_connected_dofs(), get_info(), is_constrained_dof(), stash_dof_constraints(), and unstash_dof_constraints().
CouplingMatrix* libMesh::DofMap::_dof_coupling |
Degree of freedom coupling. If left empty each DOF couples to all others. Can be used to reduce memory requirements for sparse matrices. DOF 0 might only couple to itself, in which case dof_coupling(0,0)
should be 1 and dof_coupling(0,j)
= 0 for j not equal to 0.
This variable is named as though it were class private, but it is in the public interface. Also there are no public methods for accessing it... This typically means you should only use it if you know what you are doing.
Definition at line 1319 of file dof_map.h.
Referenced by build_sparsity(), clear(), and reinit().
|
staticprotectedinherited |
Flag to control whether reference count information is printed when print_info is called.
Definition at line 141 of file reference_counter.h.
Referenced by libMesh::ReferenceCounter::disable_print_counter_info(), libMesh::ReferenceCounter::enable_print_counter_info(), and libMesh::ReferenceCounter::print_info().
|
private |
Last DOF index (plus 1) on processor p
.
Definition at line 1535 of file dof_map.h.
Referenced by clear(), distribute_dofs(), dof_owner(), end_dof(), last_dof(), and n_dofs_on_processor().
|
private |
Last old DOF index (plus 1) on processor p
.
Definition at line 1672 of file dof_map.h.
Referenced by clear(), distribute_dofs(), and end_old_dof().
|
private |
This flag indicates whether or not we do an opt-mode check for the presence of cyclic constraints.
Definition at line 1493 of file dof_map.h.
Referenced by set_error_on_cyclic_constraint().
|
private |
A pointer associated with the extra send list that can optionally be passed in
Definition at line 1579 of file dof_map.h.
Referenced by attach_extra_send_list_function(), and prepare_send_list().
|
private |
A function pointer to a function to call to add extra entries to the send list
Definition at line 1574 of file dof_map.h.
Referenced by attach_extra_send_list_function(), and prepare_send_list().
|
private |
A pointer associated with the extra sparsity that can optionally be passed in
Definition at line 1564 of file dof_map.h.
Referenced by attach_extra_sparsity_function(), and build_sparsity().
|
private |
A function pointer to a function to call to add extra entries to the sparsity pattern
Definition at line 1557 of file dof_map.h.
Referenced by attach_extra_sparsity_function(), and build_sparsity().
|
private |
First DOF index on processor p
.
Definition at line 1530 of file dof_map.h.
Referenced by clear(), distribute_dofs(), first_dof(), and n_dofs_on_processor().
|
private |
First old DOF index on processor p
.
Definition at line 1667 of file dof_map.h.
Referenced by clear(), distribute_dofs(), and first_old_dof().
|
private |
First old DOF index for SCALAR variable v, or garbage for non-SCALAR variable v
Definition at line 1678 of file dof_map.h.
Referenced by clear(), distribute_dofs(), and SCALAR_dof_indices().
|
private |
First DOF index for SCALAR variable v, or garbage for non-SCALAR variable v
Definition at line 1541 of file dof_map.h.
Referenced by clear(), distribute_dofs(), and SCALAR_dof_indices().
|
private |
Definition at line 1737 of file dof_map.h.
Referenced by set_implicit_neighbor_dofs(), and use_coupled_neighbor_dofs().
|
private |
Bools to indicate if we override the –implicit_neighbor_dofs commandline options.
Definition at line 1736 of file dof_map.h.
Referenced by set_implicit_neighbor_dofs(), and use_coupled_neighbor_dofs().
|
private |
Additional matrices handled by this object. These pointers do not handle the memory, instead, System
, who told DofMap
about them, owns them.
Definition at line 1525 of file dof_map.h.
Referenced by attach_matrix(), clear(), compute_sparsity(), DofMap(), get_info(), and is_attached().
|
private |
The mesh that system uses.
Definition at line 1518 of file dof_map.h.
Referenced by add_algebraic_ghosting_functor(), add_coupling_functor(), clear(), DofMap(), remove_algebraic_ghosting_functor(), remove_coupling_functor(), and ~DofMap().
|
staticprotectedinherited |
Mutual exclusion object to enable thread-safe reference counting.
Definition at line 135 of file reference_counter.h.
|
private |
Total number of degrees of freedom.
Definition at line 1649 of file dof_map.h.
Referenced by clear(), distribute_dofs(), and n_dofs().
|
private |
The number of on-processor nonzeros in my portion of the global matrix. If need_full_sparsity_pattern is true, this will just be a pointer into the corresponding sparsity pattern vector. Otherwise we have to new/delete it ourselves.
Definition at line 1638 of file dof_map.h.
Referenced by attach_matrix(), clear_sparsity(), compute_sparsity(), get_info(), and get_n_nz().
|
staticprotectedinherited |
The number of objects. Print the reference count information when the number returns to 0.
Definition at line 130 of file reference_counter.h.
Referenced by libMesh::ReferenceCounter::n_objects(), libMesh::ReferenceCounter::ReferenceCounter(), and libMesh::ReferenceCounter::~ReferenceCounter().
|
private |
Total number of degrees of freedom on old dof objects
Definition at line 1662 of file dof_map.h.
Referenced by clear(), distribute_dofs(), and n_old_dofs().
|
private |
The number of off-processor nonzeros in my portion of the global matrix; allocated similar to _n_nz.
Definition at line 1644 of file dof_map.h.
Referenced by attach_matrix(), clear_sparsity(), compute_sparsity(), get_info(), and get_n_oz().
|
private |
The total number of SCALAR dofs associated to all SCALAR variables.
Definition at line 1655 of file dof_map.h.
Referenced by distribute_local_dofs_node_major(), distribute_local_dofs_var_major(), n_SCALAR_dofs(), and reinit().
|
private |
Data structure containing DofObject constraints.
Definition at line 1698 of file dof_map.h.
Referenced by get_info(), is_constrained_node(), n_constrained_nodes(), node_constraint_rows_begin(), and node_constraint_rows_end().
|
private |
Data structure containing periodic boundaries. The ith entry is the constraint matrix row for boundaryid i.
Definition at line 1707 of file dof_map.h.
Referenced by DofMap(), get_periodic_boundaries(), and is_periodic_boundary().
|
private |
Definition at line 1689 of file dof_map.h.
Referenced by clear(), get_info(), and get_primal_constraint_values().
|
private |
A list containing all the global DOF indices that affect the solution on my processor.
Definition at line 1547 of file dof_map.h.
Referenced by add_neighbors_to_send_list(), clear(), distribute_dofs(), get_send_list(), prepare_send_list(), and semilocal_index().
|
private |
The sparsity pattern of the global matrix, kept around if it might be needed by future additions of the same type of matrix.
Definition at line 1630 of file dof_map.h.
Referenced by attach_matrix(), clear_sparsity(), and compute_sparsity().
|
private |
Definition at line 1687 of file dof_map.h.
Referenced by clear(), stash_dof_constraints(), and unstash_dof_constraints().
|
private |
The number of the system we manage DOFs for.
Definition at line 1513 of file dof_map.h.
Referenced by sys_number().
|
private |
The variable group number for each variable.
Definition at line 1508 of file dof_map.h.
Referenced by add_variable_group(), clear(), and dof_indices().
|
private |
The finite element type for each variable group.
Definition at line 1503 of file dof_map.h.
Referenced by add_variable_group(), clear(), n_variable_groups(), variable_group(), variable_group_order(), and variable_group_type().
|
private |
The finite element type for each variable.
Definition at line 1498 of file dof_map.h.
Referenced by add_variable_group(), clear(), n_variables(), variable(), variable_order(), and variable_type().
|
private |
Default false; set to true if any attached matrix requires a full sparsity pattern.
Definition at line 1624 of file dof_map.h.
Referenced by attach_matrix(), build_sparsity(), clear(), clear_sparsity(), and compute_sparsity().