libMesh
|
This class handles the numbering of degrees of freedom on a mesh. More...
#include <dof_map.h>
Classes | |
class | AugmentSendList |
Abstract base class to be used to add user-defined parallel degree of freedom couplings. More... | |
class | AugmentSparsityPattern |
Backwards compatibility for prior AugmentSparsityPattern users. More... | |
Public Member Functions | |
DofMap (const unsigned int sys_number, MeshBase &mesh) | |
Constructor. More... | |
~DofMap () | |
Destructor. More... | |
void | attach_matrix (SparseMatrix< Number > &matrix) |
Additional matrices may be attached to this DofMap . More... | |
void | update_sparsity_pattern (SparseMatrix< Number > &matrix) const |
Additional matrices may be be temporarily initialized by this DofMap . More... | |
bool | is_attached (SparseMatrix< Number > &matrix) |
Matrices should not be attached more than once. More... | |
std::size_t | distribute_dofs (MeshBase &) |
Distribute dofs on the current mesh. More... | |
void | compute_sparsity (const MeshBase &) |
Computes the sparsity pattern for the matrices corresponding to proc_id and sends that data to Linear Algebra packages for preallocation of sparse matrices. More... | |
bool | computed_sparsity_already () const |
Returns true iff a sparsity pattern has already been computed. More... | |
void | set_constrained_sparsity_construction (bool use_constraints) |
Sets the current policy for constructing sparsity patterns: if use_constraints is true (for robustness), we explicitly account for sparsity entries created by constraint matrix pre- and post- application. More... | |
void | full_sparsity_pattern_needed () |
Sets need_full_sparsity_pattern to true regardless of the requirements by matrices. More... | |
bool | constrained_sparsity_construction () |
Returns true iff the current policy when constructing sparsity patterns is to explicitly account for sparsity entries created by constraint matrix pre- and post- application. More... | |
void | clear_sparsity () |
Clears the sparsity pattern. More... | |
void | remove_default_ghosting () |
Remove any default ghosting functor(s). More... | |
void | add_default_ghosting () |
Add the default functor(s) for coupling and algebraic ghosting. More... | |
void | add_coupling_functor (GhostingFunctor &coupling_functor, bool to_mesh=true) |
Adds a functor which can specify coupling requirements for creation of sparse matrices. More... | |
void | add_coupling_functor (std::shared_ptr< GhostingFunctor > coupling_functor, bool to_mesh=true) |
Adds a functor which can specify coupling requirements for creation of sparse matrices. More... | |
void | 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. More... | |
std::set< GhostingFunctor * >::const_iterator | coupling_functors_begin () const |
Beginning of range of coupling functors. More... | |
std::set< GhostingFunctor * >::const_iterator | coupling_functors_end () const |
End of range of coupling functors. More... | |
DefaultCoupling & | default_coupling () |
Default coupling functor. More... | |
void | 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. More... | |
void | add_algebraic_ghosting_functor (std::shared_ptr< GhostingFunctor > evaluable_functor, bool to_mesh=true) |
Adds a functor which can specify algebraic ghosting requirements for use with distributed vectors. More... | |
void | 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. More... | |
std::set< GhostingFunctor * >::const_iterator | algebraic_ghosting_functors_begin () const |
Beginning of range of algebraic ghosting functors. More... | |
std::set< GhostingFunctor * >::const_iterator | algebraic_ghosting_functors_end () const |
End of range of algebraic ghosting functors. More... | |
DefaultCoupling & | default_algebraic_ghosting () |
Default algebraic ghosting functor. More... | |
void | attach_extra_sparsity_object (SparsityPattern::AugmentSparsityPattern &asp) |
Attach an object to use to populate the sparsity pattern with extra entries. More... | |
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) |
Attach a function pointer to use as a callback to populate the sparsity pattern with extra entries. More... | |
void | attach_extra_send_list_object (DofMap::AugmentSendList &asl) |
Attach an object to populate the send_list with extra entries. More... | |
void | attach_extra_send_list_function (void(*func)(std::vector< dof_id_type > &, void *), void *context=nullptr) |
Attach a function pointer to use as a callback to populate the send_list with extra entries. More... | |
void | prepare_send_list () |
Takes the _send_list vector (which may have duplicate entries) and sorts it. More... | |
void | clear_send_list () |
Clears the _send_list vector. More... | |
void | reinit_send_list (MeshBase &mesh) |
Clears the _send_list vector and then rebuilds it. More... | |
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 |
const SparsityPattern::Build * | get_sparsity_pattern () const |
void | add_variable_group (VariableGroup var_group) |
Add an unknown of order order and finite element type type to the system of equations. More... | |
void | set_error_on_cyclic_constraint (bool error_on_cyclic_constraint) |
Specify whether or not we perform an extra (opt-mode enabled) check for constraint loops. More... | |
void | set_error_on_constraint_loop (bool error_on_constraint_loop) |
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 |
unsigned int | var_group_from_var_number (unsigned int var_num) const |
bool | has_blocked_representation () const |
unsigned int | block_size () const |
dof_id_type | n_dofs () const |
dof_id_type | n_dofs (const unsigned int vn) const |
dof_id_type | n_SCALAR_dofs () const |
dof_id_type | n_local_dofs () const |
dof_id_type | n_local_dofs (const unsigned int vn) const |
dof_id_type | n_dofs_on_processor (const processor_id_type proc) const |
std::vector< dof_id_type > | n_dofs_per_processor (const unsigned int vn) 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 | 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 |
Fills the vector di with the global degree of freedom indices for the element. More... | |
void | 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. More... | |
template<typename ScalarDofsFunctor , typename FieldDofsFunctor > | |
void | dof_indices (const Elem *const elem, std::vector< dof_id_type > &di, const unsigned int vn, ScalarDofsFunctor scalar_dofs_functor, FieldDofsFunctor field_dofs_functor, int p_level=-12345) const |
Retrieves degree of freedom indices for a given elem and then performs actions for these indices defined by the user-provided functors scalar_dofs_functor and field_dofs_functor . More... | |
void | 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 . More... | |
void | 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 . More... | |
void | dof_indices (const Elem &elem, unsigned int n, std::vector< dof_id_type > &di, const unsigned int vn) const |
Appends to the vector di the global degree of freedom indices for elem.node_ref(n) , for one variable vn . More... | |
void | old_dof_indices (const Elem &elem, unsigned int n, std::vector< dof_id_type > &di, const unsigned int vn) const |
Appends to the vector di the old global degree of freedom indices for elem.node_ref(n) , for one variable vn . More... | |
void | 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. More... | |
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) |
Allow the implicit_neighbor_dofs flag to be set programmatically. More... | |
void | set_verify_dirichlet_bc_consistency (bool val) |
Set the _verify_dirichlet_bc_consistency flag. More... | |
bool | 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. More... | |
void | 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. More... | |
template<typename T , std::enable_if_t< std::is_same_v< T, dof_id_type >||std::is_same_v< T, std::vector< dof_id_type >>, int > = 0> | |
void | local_variable_indices (T &idx, const MeshBase &mesh, unsigned int var_num) const |
If T == dof_id_type, counts, if T == std::vector<dof_id_type>, fills an array of, those dof indices which belong to the given variable number and live on the current processor. More... | |
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) |
Rebuilds the raw degree of freedom and DofObject constraints, based on attached DirichletBoundary objects and on non-conforming interface in adapted meshes. More... | |
void | allgather_recursive_constraints (MeshBase &) |
Gathers constraint equation dependencies from other processors. More... | |
void | scatter_constraints (MeshBase &) |
Sends constraint equations to constraining processors. More... | |
void | 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. More... | |
void | process_constraints (MeshBase &) |
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. More... | |
void | check_for_cyclic_constraints () |
Throw an error if we detect any constraint loops, i.e. More... | |
void | check_for_constraint_loops () |
void | 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. More... | |
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) |
Adds a copy of the user-defined row to the constraint matrix, using an inhomogeneous right-hand-side for the adjoint constraint equation. More... | |
void | add_constraint_row (const dof_id_type dof_number, const DofConstraintRow &constraint_row, const bool forbid_constraint_overwrite=true) |
Adds a copy of the user-defined row to the constraint matrix, using a homogeneous right-hand-side for the constraint equation. More... | |
DofConstraints::const_iterator | constraint_rows_begin () const |
DofConstraints::const_iterator | constraint_rows_end () const |
const DofConstraints & | get_dof_constraints () const |
Provide a const accessor to the DofConstraints map. More... | |
void | stash_dof_constraints () |
void | unstash_dof_constraints () |
void | swap_dof_constraints () |
Similar to the stash/unstash_dof_constraints() API, but swaps _dof_constraints and _stashed_dof_constraints without asserting that the source or destination is empty first. More... | |
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_heterogeneous_adjoint_constraints (const unsigned int qoi_num) const |
bool | has_heterogenous_adjoint_constraints (const unsigned int qoi_num) const |
Backwards compatibility with misspelling. More... | |
Number | has_heterogeneous_adjoint_constraint (const unsigned int qoi_num, const dof_id_type dof) const |
Number | has_heterogenous_adjoint_constraint (const unsigned int qoi_num, const dof_id_type dof) const |
Backwards compatibility with misspelling. More... | |
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 |
Prints (from processor 0) all DoF and Node constraints. More... | |
std::string | get_local_constraints (bool print_nonlocal=false) const |
Gets a string reporting all DoF and Node constraints local to this processor. More... | |
std::pair< Real, Real > | 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. More... | |
void | constrain_element_matrix (DenseMatrix< Number > &matrix, std::vector< dof_id_type > &elem_dofs, bool asymmetric_constraint_rows=true) const |
Constrains the element matrix. More... | |
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 |
Constrains the element matrix. More... | |
void | constrain_element_vector (DenseVector< Number > &rhs, std::vector< dof_id_type > &dofs, bool asymmetric_constraint_rows=true) const |
Constrains the element vector. More... | |
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 |
Constrains the element matrix and vector. More... | |
void | heterogeneously_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. More... | |
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 | heterogeneously_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. More... | |
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 | heterogeneously_constrain_element_jacobian_and_residual (DenseMatrix< Number > &matrix, DenseVector< Number > &rhs, std::vector< dof_id_type > &elem_dofs, NumericVector< Number > &solution_local) const |
Constrains the element Jacobian and residual. More... | |
void | heterogeneously_constrain_element_residual (DenseVector< Number > &rhs, std::vector< dof_id_type > &elem_dofs, NumericVector< Number > &solution_local) const |
Constrains the element residual. More... | |
void | constrain_element_residual (DenseVector< Number > &rhs, std::vector< dof_id_type > &elem_dofs, NumericVector< Number > &solution_local) const |
Constrains the element residual. More... | |
void | constrain_element_dyad_matrix (DenseVector< Number > &v, DenseVector< Number > &w, std::vector< dof_id_type > &row_dofs, bool asymmetric_constraint_rows=true) const |
Constrains a dyadic element matrix B = v w'. More... | |
void | 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. More... | |
void | enforce_constraints_exactly (const System &system, NumericVector< Number > *v=nullptr, bool homogeneous=false) const |
Constrains the numeric vector v , which represents a solution defined on the mesh. More... | |
void | enforce_adjoint_constraints_exactly (NumericVector< Number > &v, unsigned int q) const |
Heterogeneously constrains the numeric vector v , which represents an adjoint solution defined on the mesh for quantity fo interest q . More... | |
void | enforce_constraints_on_residual (const NonlinearImplicitSystem &system, NumericVector< Number > *rhs, NumericVector< Number > const *solution, bool homogeneous=true) const |
void | enforce_constraints_on_jacobian (const NonlinearImplicitSystem &system, SparseMatrix< Number > *jac) const |
void | add_periodic_boundary (const PeriodicBoundaryBase &periodic_boundary) |
Adds a copy of the specified periodic boundary to the system. More... | |
void | add_periodic_boundary (const PeriodicBoundaryBase &boundary, const PeriodicBoundaryBase &inverse_boundary) |
Add a periodic boundary pair. More... | |
bool | is_periodic_boundary (const boundary_id_type boundaryid) const |
PeriodicBoundaries * | get_periodic_boundaries () |
const PeriodicBoundaries * | get_periodic_boundaries () const |
void | add_dirichlet_boundary (const DirichletBoundary &dirichlet_boundary) |
Adds a copy of the specified Dirichlet boundary to the system. More... | |
void | 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 . More... | |
void | remove_dirichlet_boundary (const DirichletBoundary &dirichlet_boundary) |
Removes the specified Dirichlet boundary from the system. More... | |
void | 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. More... | |
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 | check_dirichlet_bcid_consistency (const MeshBase &mesh, const DirichletBoundary &boundary) const |
Check that all the ids in dirichlet_bcids are actually present in the mesh. More... | |
void | 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. More... | |
dof_id_type | n_old_dofs () const |
void | 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 . More... | |
void | reinit (MeshBase &mesh, const std::map< const Node *, std::set< subdomain_id_type >> &constraining_subdomains) |
Reinitialize the underlying data structures conformal to the current mesh. More... | |
void | clear () |
Free all new memory associated with the object, but restore its original state, with the mesh pointer and any default ghosting. More... | |
void | print_info (std::ostream &os=libMesh::out) const |
Prints summary info about the sparsity bandwidth and constraints. More... | |
std::string | get_info () const |
Gets summary info about the sparsity bandwidth and constraints. More... | |
unsigned int | sys_number () const |
std::unique_ptr< SparsityPattern::Build > | build_sparsity (const MeshBase &mesh, bool calculate_constrained=false) const |
Builds a sparsity pattern for matrices using the current degree-of-freedom numbering and coupling. More... | |
void | should_p_refine (unsigned int g, bool p_refine) |
Describe whether the given variable group should be p-refined. More... | |
bool | should_p_refine (unsigned int g) const |
Whether the given variable group should be p-refined. More... | |
bool | should_p_refine_var (unsigned int var) const |
Whether the given variable should be p-refined. More... | |
void | should_p_refine (FEFamily, bool)=delete |
void | should_p_refine (Order, bool)=delete |
bool | should_p_refine (FEFamily) const =delete |
bool | should_p_refine (Order) const =delete |
void | add_static_condensation (const StaticCondensation &sc) |
Add a static condensation class. More... | |
bool | has_static_condensation () const |
Checks whether we have static condensation. More... | |
const StaticCondensation & | get_static_condensation () 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 () |
Gets a string containing the reference information. More... | |
static void | print_info (std::ostream &out_stream=libMesh::out) |
Prints the reference information, by default to libMesh::out . More... | |
static unsigned int | n_objects () |
Prints the number of outstanding (created, but not yet destroyed) objects. More... | |
static void | enable_print_counter_info () |
Methods to enable/disable the reference counter output from print_info() More... | |
static void | disable_print_counter_info () |
Public Attributes | |
CouplingMatrix * | _dof_coupling |
Degree of freedom coupling. More... | |
Protected Types | |
typedef std::map< std::string, std::pair< unsigned int, unsigned int > > | Counts |
Data structure to log the information. More... | |
Protected Member Functions | |
void | increment_constructor_count (const std::string &name) noexcept |
Increments the construction counter. More... | |
void | increment_destructor_count (const std::string &name) noexcept |
Increments the destruction counter. More... | |
Protected Attributes | |
const Parallel::Communicator & | _communicator |
Static Protected Attributes | |
static Counts | _counts |
Actually holds the data. More... | |
static Threads::atomic< unsigned int > | _n_objects |
The number of objects. More... | |
static Threads::spin_mutex | _mutex |
Mutual exclusion object to enable thread-safe reference counting. More... | |
static bool | _enable_print_counter = true |
Flag to control whether reference count information is printed when print_info is called. More... | |
Private Types | |
typedef DofObject *(DofMap::* | dofobject_accessor) (MeshBase &mesh, dof_id_type i) const |
A member function type like node_ptr() or elem_ptr() . More... | |
typedef std::set< std::unique_ptr< CouplingMatrix >, Utility::CompareUnderlying > | CouplingMatricesSet |
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, const unsigned int v #ifdef DEBUG, std::size_t &tot_size #endif) const |
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. More... | |
template<typename FieldDofsFunctor > | |
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, const unsigned int v, #ifdef DEBUG std::size_t &tot_size, #endif FieldDofsFunctor field_dofs_functor) const |
As above except a field_dofs_functor must be provided. More... | |
void | _node_dof_indices (const Elem &elem, unsigned int n, const DofObject &obj, std::vector< dof_id_type > &di, const unsigned int vn) const |
Helper function that implements the element-nodal versions of dof_indices and old_dof_indices. More... | |
void | invalidate_dofs (MeshBase &mesh) const |
Invalidates all active DofObject dofs for this system. More... | |
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) |
Helper function for distributing dofs in parallel. More... | |
std::map< const Node *, std::set< subdomain_id_type > > | calculate_constraining_subdomains () |
We may have mesh constraint rows with dependent nodes in one subdomain but dependency nodes in another subdomain, and we may have variables whose subdomain restriction includes the dependent subdomain but not the dependency. More... | |
void | distribute_local_dofs_var_major (dof_id_type &next_free_dof, MeshBase &mesh, const std::map< const Node *, std::set< subdomain_id_type >> &constraining_subdomains) |
Distributes the global degrees of freedom, for dofs on this processor. More... | |
void | distribute_local_dofs_node_major (dof_id_type &next_free_dof, MeshBase &mesh, const std::map< const Node *, std::set< subdomain_id_type >> &constraining_subdomains) |
Distributes the global degrees of freedom for dofs on this processor. More... | |
void | distribute_scalar_dofs (dof_id_type &next_free_dof) |
void | assert_no_nodes_missed (MeshBase &mesh) |
void | add_neighbors_to_send_list (MeshBase &mesh) |
Adds entries to the _send_list vector corresponding to DoFs on elements neighboring the current processor. More... | |
void | build_constraint_matrix (DenseMatrix< Number > &C, std::vector< dof_id_type > &elem_dofs, const bool called_recursively=false) const |
Build the constraint matrix C associated with the element degree of freedom indices elem_dofs. More... | |
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 |
Build the constraint matrix C and the forcing vector H associated with the element degree of freedom indices elem_dofs. More... | |
void | find_connected_dofs (std::vector< dof_id_type > &elem_dofs) const |
Finds all the DOFS associated with the element DOFs elem_dofs. More... | |
void | find_connected_dof_objects (std::vector< const DofObject *> &objs) const |
Finds all the DofObjects associated with the set in objs . More... | |
void | add_constraints_to_send_list () |
Adds entries to the _send_list vector corresponding to DoFs which are dependencies for constraint equations on the current processor. More... | |
void | process_mesh_constraint_rows (const MeshBase &mesh) |
Adds any spline constraints from the Mesh to our DoF constraints. More... | |
Static Private Member Functions | |
static void | merge_ghost_functor_outputs (GhostingFunctor::map_type &elements_to_ghost, CouplingMatricesSet &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) |
Private Attributes | |
bool | _error_on_constraint_loop |
This flag indicates whether or not we do an opt-mode check for the presence of constraint loops, i.e. More... | |
bool | _constrained_sparsity_construction |
This flag indicates whether or not we explicitly take constraint equations into account when computing a sparsity pattern. More... | |
std::vector< Variable > | _variables |
The finite element type for each variable. More... | |
std::vector< VariableGroup > | _variable_groups |
The finite element type for each variable group. More... | |
std::vector< unsigned int > | _variable_group_numbers |
The variable group number for each variable. More... | |
std::unordered_map< unsigned int, unsigned int > | _var_to_vg |
A map from variable number to variable group number. More... | |
const unsigned int | _sys_number |
The number of the system we manage DOFs for. More... | |
MeshBase & | _mesh |
The mesh that system uses. More... | |
std::vector< SparseMatrix< Number > *> | _matrices |
Additional matrices handled by this object. More... | |
std::vector< dof_id_type > | _first_df |
First DOF index on processor p . More... | |
std::vector< dof_id_type > | _end_df |
Last DOF index (plus 1) on processor p . More... | |
std::vector< dof_id_type > | _first_scalar_df |
First DOF index for SCALAR variable v, or garbage for non-SCALAR variable v. More... | |
std::vector< dof_id_type > | _send_list |
A list containing all the global DOF indices that affect the solution on my processor. More... | |
SparsityPattern::AugmentSparsityPattern * | _augment_sparsity_pattern |
Function object to call to add extra entries to the sparsity pattern. More... | |
void(* | _extra_sparsity_function )(SparsityPattern::Graph &, std::vector< dof_id_type > &n_nz, std::vector< dof_id_type > &n_oz, void *) |
A function pointer to a function to call to add extra entries to the sparsity pattern. More... | |
void * | _extra_sparsity_context |
A pointer associated with the extra sparsity that can optionally be passed in. More... | |
AugmentSendList * | _augment_send_list |
Function object to call to add extra entries to the send list. More... | |
void(* | _extra_send_list_function )(std::vector< dof_id_type > &, void *) |
A function pointer to a function to call to add extra entries to the send list. More... | |
void * | _extra_send_list_context |
A pointer associated with the extra send list that can optionally be passed in. More... | |
std::unique_ptr< DefaultCoupling > | _default_coupling |
The default coupling GhostingFunctor, used to implement standard libMesh sparsity pattern construction. More... | |
std::unique_ptr< DefaultCoupling > | _default_evaluating |
The default algebraic GhostingFunctor, used to implement standard libMesh send_list construction. More... | |
std::set< GhostingFunctor * > | _algebraic_ghosting_functors |
The list of all GhostingFunctor objects to be used when distributing ghosted vectors. More... | |
std::set< GhostingFunctor * > | _coupling_functors |
The list of all GhostingFunctor objects to be used when coupling degrees of freedom in matrix sparsity patterns. More... | |
std::map< GhostingFunctor *, std::shared_ptr< GhostingFunctor > > | _shared_functors |
Hang on to references to any GhostingFunctor objects we were passed in shared_ptr form. More... | |
bool | need_full_sparsity_pattern |
Default false; set to true if any attached matrix requires a full sparsity pattern. More... | |
std::unique_ptr< SparsityPattern::Build > | _sp |
The sparsity pattern of the global matrix. More... | |
dof_id_type | _n_dfs |
Total number of degrees of freedom. More... | |
dof_id_type | _n_SCALAR_dofs |
The total number of SCALAR dofs associated to all SCALAR variables. More... | |
dof_id_type | _n_old_dfs |
Total number of degrees of freedom on old dof objects. More... | |
std::vector< dof_id_type > | _first_old_df |
First old DOF index on processor p . More... | |
std::vector< dof_id_type > | _end_old_df |
Last old DOF index (plus 1) on processor p . More... | |
std::vector< dof_id_type > | _first_old_scalar_df |
First old DOF index for SCALAR variable v, or garbage for non-SCALAR variable v. More... | |
std::unordered_set< unsigned int > | _dont_p_refine |
A container of variable groups that we should not p-refine. More... | |
DofConstraints | _dof_constraints |
Data structure containing DOF constraints. More... | |
DofConstraints | _stashed_dof_constraints |
DofConstraintValueMap | _primal_constraint_values |
AdjointDofConstraintValues | _adjoint_constraint_values |
NodeConstraints | _node_constraints |
Data structure containing DofObject constraints. More... | |
std::unique_ptr< PeriodicBoundaries > | _periodic_boundaries |
Data structure containing periodic boundaries. More... | |
std::unique_ptr< DirichletBoundaries > | _dirichlet_boundaries |
Data structure containing Dirichlet functions. More... | |
std::vector< std::unique_ptr< DirichletBoundaries > > | _adjoint_dirichlet_boundaries |
Data structure containing Dirichlet functions. More... | |
bool | _implicit_neighbor_dofs_initialized |
Bools to indicate if we override the –implicit_neighbor_dofs commandline options. More... | |
bool | _implicit_neighbor_dofs |
bool | _verify_dirichlet_bc_consistency |
Flag which determines whether we should do some additional checking of the consistency of the DirichletBoundary objects added by the user. More... | |
const StaticCondensation * | _sc |
Static condensation class. More... | |
Friends | |
class | SparsityPattern::Build |
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 119 of file reference_counter.h.
|
private |
|
private |
A member function type like node_ptr()
or elem_ptr()
.
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 127 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 199 of file dof_map.C.
References _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 2535 of file dof_map.C.
References n_nodes.
Referenced by dof_indices().
|
private |
As above except a field_dofs_functor
must be provided.
This method is useful when the caller wants to do more than simply fill a degree of freedom container
field_dofs_functor | This functor has the interface: void field_dofs_functor(const Elem & elem, const unsigned int node_num, const unsigned int var_num, std::vector<dof_id_type> & di, const dof_id_type field_dof) where field_dof represents a field degree of freedom to act on and is associated with node_num and var_num . If the degree of freedom is elemental than node_num will be invalid_uint . di is the degree of freedom container provided to the _dof_indices method |
Definition at line 2543 of file dof_map.h.
References _dont_p_refine, libMesh::Elem::active(), libMesh::Variable::active_on_subdomain(), libMesh::DofObject::dof_number(), libMesh::FEInterface::extra_hanging_dofs(), libMesh::FEType::family, libMesh::Elem::infinite(), libMesh::DofObject::invalid_id, libMesh::invalid_uint, libMesh::Elem::is_vertex(), libMesh::LAGRANGE, libMesh::libmesh_assert(), libMesh::DofObject::n_comp_group(), libMesh::FEInterface::n_dofs(), 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::SUBDIVISION, libMesh::Elem::subdomain_id(), sys_number(), libMesh::Variable::type(), libMesh::Elem::type(), libMesh::DofObject::var_to_vg_and_offset(), and variable_group().
|
private |
Helper function that implements the element-nodal versions of dof_indices and old_dof_indices.
Definition at line 2451 of file dof_map.C.
References _dont_p_refine, libMesh::Elem::active(), libMesh::DofObject::dof_number(), libMesh::FEInterface::extra_hanging_dofs(), libMesh::DofObject::invalid_id, libMesh::Elem::is_vertex(), libMesh::libmesh_assert(), libMesh::DofObject::n_comp_group(), libMesh::FEInterface::n_dofs_at_node(), sys_number(), libMesh::Variable::type(), libMesh::DofObject::var_to_vg_and_offset(), and variable_group().
Referenced by dof_indices(), and old_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 2211 of file dof_map_constraints.C.
References _adjoint_constraint_values, and is_constrained_dof().
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 5414 of file dof_map_constraints.C.
References _adjoint_dirichlet_boundaries.
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 2078 of file dof_map.C.
References _algebraic_ghosting_functors, _mesh, libMesh::MeshBase::add_ghosting_functor(), and libMesh::GhostingFunctor::set_mesh().
Referenced by add_algebraic_ghosting_functor(), add_default_ghosting(), clear(), DofMap(), main(), OverlappingAlgebraicGhostingTest::run_ghosting_test(), SlitMeshRefinedSystemTest::setUp(), PointNeighborCouplingTest::testCoupling(), and EquationSystemsTest::testDisableDefaultGhosting().
|
inline |
Adds a functor which can specify algebraic ghosting requirements for use with distributed vectors.
GhostingFunctor memory when using this method is managed by the shared_ptr mechanism.
Definition at line 405 of file dof_map.h.
References _shared_functors, and add_algebraic_ghosting_functor().
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 2179 of file dof_map_constraints.C.
References _dof_constraints, _primal_constraint_values, is_constrained_dof(), and n_dofs().
Referenced by add_constraint_row(), MyConstraint::constrain(), and process_mesh_constraint_rows().
|
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 1093 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 5307 of file dof_map_constraints.C.
References _dof_constraints, _send_list, libMesh::ParallelObject::comm(), local_index(), TIMPI::Communicator::max(), and libMesh::ParallelObject::n_processors().
Referenced by process_constraints().
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 2053 of file dof_map.C.
References _coupling_functors, _mesh, libMesh::MeshBase::add_ghosting_functor(), and libMesh::GhostingFunctor::set_mesh().
Referenced by add_coupling_functor(), add_default_ghosting(), clear(), DofMap(), NonManifoldCouplingTestBase::init_es(), main(), OverlappingCouplingGhostingTest::run_sparsity_pattern_test(), EquationSystemsTest::testDisableDefaultGhosting(), and SystemsTest::testDofCouplingWithVarGroups().
|
inline |
Adds a functor which can specify coupling requirements for creation of sparse matrices.
GhostingFunctor memory when using this method is managed by the shared_ptr mechanism.
Definition at line 343 of file dof_map.h.
References _shared_functors, and add_coupling_functor().
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 2044 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.
The constraints implied by DirichletBoundary objects are imposed in the same order in which DirichletBoundary objects are added to the DofMap. When multiple DirichletBoundary objects would impose competing constraints on a given DOF, the first DirichletBoundary to constrain the DOF "wins". This distinction is important when e.g. two surfaces (sidesets) intersect. The nodes on the intersection will be constrained according to whichever sideset's DirichletBoundary object was added to the DofMap first.
Definition at line 5408 of file dof_map_constraints.C.
References _dirichlet_boundaries.
Referenced by libMesh::DifferentiableSystem::add_dot_var_dirichlet_bcs(), assemble_and_solve(), HeatSystem::init_data(), SimpleRBConstruction::init_data(), LaplaceSystem::init_dirichlet_bcs(), main(), set_lid_driven_bcs(), set_poiseuille_bcs(), set_stagnation_bcs(), set_system_parameters(), MeshAssignTest::testMeshMoveAssign(), PeriodicBCTest::testPeriodicBC(), and BoundaryInfoTest::testShellFaceConstraints().
|
private |
Adds entries to the _send_list
vector corresponding to DoFs on elements neighboring the current processor.
Definition at line 1736 of file dof_map.C.
References _send_list, algebraic_ghosting_functors_begin(), algebraic_ghosting_functors_end(), coupling_functors_begin(), coupling_functors_end(), dof_indices(), libMesh::DofObject::invalid_id, local_index(), merge_ghost_functor_outputs(), mesh, n_dofs(), libMesh::ParallelObject::n_processors(), n_variables(), and libMesh::ParallelObject::processor_id().
Referenced by distribute_dofs(), and reinit_send_list().
void libMesh::DofMap::add_periodic_boundary | ( | const PeriodicBoundaryBase & | periodic_boundary | ) |
Adds a copy of the specified periodic boundary to the system.
Definition at line 5528 of file dof_map_constraints.C.
References _periodic_boundaries, libMesh::PeriodicBoundaryBase::clone(), libMesh::PeriodicBoundaryBase::INVERSE, libMesh::libmesh_assert(), libMesh::PeriodicBoundaryBase::merge(), libMesh::PeriodicBoundaryBase::myboundary, and libMesh::PeriodicBoundaryBase::pairedboundary.
Referenced by Biharmonic::JR::JR(), main(), and PeriodicBCTest::testPeriodicBC().
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 5555 of file dof_map_constraints.C.
References _periodic_boundaries, libMesh::PeriodicBoundaryBase::clone(), libMesh::PeriodicBoundaryBase::myboundary, and libMesh::PeriodicBoundaryBase::pairedboundary.
|
inline |
Add a static condensation class.
Definition at line 1732 of file dof_map.h.
References _sc.
Referenced by libMesh::ImplicitSystem::create_static_condensation().
void libMesh::DofMap::add_variable_group | ( | 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 _var_to_vg, _variable_group_numbers, _variable_groups, _variables, libMesh::make_range(), and libMesh::VariableGroup::n_variables().
|
inline |
Beginning of range of algebraic ghosting functors.
Definition at line 420 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 426 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 2619 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 3673 of file dof_map_constraints.C.
References _adjoint_constraint_values, _dof_constraints, _node_constraints, _primal_constraint_values, libMesh::as_range(), libMesh::ParallelObject::comm(), libMesh::DofObject::dof_number(), gather_constraints(), TIMPI::Communicator::get_unique_tag(), libMesh::DofObject::id(), libMesh::index_range(), libMesh::DofObject::invalid_id, is_constrained_dof(), is_constrained_node(), libMesh::MeshBase::is_serial(), libMesh::libmesh_assert(), libMesh::libmesh_isnan(), TIMPI::Communicator::max(), mesh, libMesh::DofObject::n_comp(), n_nodes, libMesh::Elem::n_nodes(), libMesh::ParallelObject::n_processors(), n_vars, libMesh::DofObject::n_vars(), libMesh::Elem::node_id(), libMesh::Elem::node_ptr(), libMesh::MeshBase::node_ptr(), libMesh::Elem::node_ref(), libMesh::ParallelObject::processor_id(), libMesh::DofObject::processor_id(), libMesh::Real, TIMPI::Communicator::receive_packed_range(), TIMPI::Communicator::send_packed_range(), and sys_number().
Referenced by process_constraints().
|
private |
Definition at line 1612 of file dof_map.C.
References libMesh::DofObject::invalid_id, mesh, and sys_number().
|
inline |
Attach a function pointer to use as a callback to populate the send_list with extra entries.
Definition at line 482 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 473 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 459 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 444 of file dof_map.h.
References _augment_sparsity_pattern.
void libMesh::DofMap::attach_matrix | ( | SparseMatrix< Number > & | matrix | ) |
Additional matrices may be attached to this DofMap
.
They are initialized to the same sparsity structure as the major matrix.
Definition at line 271 of file dof_map.C.
References _matrices, libMesh::libmesh_assert(), libMesh::SparseMatrix< T >::need_full_sparsity_pattern(), need_full_sparsity_pattern, and update_sparsity_pattern().
Referenced by libMesh::TransientRBConstruction::allocate_data_structures(), libMesh::RBConstruction::allocate_data_structures(), libMesh::ClawSystem::init_data(), libMesh::System::init_matrices(), and libMesh::System::late_matrix_init().
|
inline |
Definition at line 665 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 3429 of file dof_map_constraints.C.
References _dof_constraints, is_constrained_dof(), libMesh::libmesh_assert(), libMesh::DenseMatrixBase< T >::m(), libMesh::DenseMatrixBase< T >::n(), libMesh::DenseMatrix< T >::resize(), and libMesh::DenseMatrix< T >::right_multiply().
Referenced by max_constraint_error().
|
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 heterogeneous 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 3539 of file dof_map_constraints.C.
References _adjoint_constraint_values, _dof_constraints, _primal_constraint_values, is_constrained_dof(), libMesh::libmesh_assert(), 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().
std::unique_ptr< SparsityPattern::Build > libMesh::DofMap::build_sparsity | ( | const MeshBase & | mesh, |
bool | calculate_constrained = false |
||
) | const |
Builds a sparsity pattern for matrices using the current degree-of-freedom numbering and coupling.
By default, ignores constraint equations, for build speed; this is valid for the combination of !need_full_sparsity_pattern and constraints which only come from periodic boundary conditions and adaptive mesh refinement, where matrix constraint adds some matrix entries but removes equally many (or more) other entries.
Can be told to calculate sparsity for the constrained matrix, which may be necessary in the case of spline control node constraints or sufficiently many user constraints.
Definition at line 61 of file dof_map.C.
References _augment_sparsity_pattern, _coupling_functors, _dof_coupling, _extra_sparsity_context, _extra_sparsity_function, libMesh::libmesh_assert(), mesh, n_local_dofs(), need_full_sparsity_pattern, libMesh::out, libMesh::Threads::parallel_reduce(), and use_coupled_neighbor_dofs().
Referenced by compute_sparsity(), process_mesh_constraint_rows(), and libMesh::System::solve_for_unconstrained_dofs().
|
private |
We may have mesh constraint rows with dependent nodes in one subdomain but dependency nodes in another subdomain, and we may have variables whose subdomain restriction includes the dependent subdomain but not the dependency.
In those cases we need to place degrees of freedom on dependency nodes anyway.
The set value for node n will include all subdomain ids of elements with nodes in subdomains constrained by n.
We use a map<set> rather than a multimap here because we expect to be inserting the same subdomain multiple times and we don't need duplicate values.
Definition at line 1305 of file dof_map.C.
References _mesh, and libMesh::MeshBase::get_constraint_rows().
Referenced by distribute_dofs().
void libMesh::DofMap::check_dirichlet_bcid_consistency | ( | const MeshBase & | mesh, |
const DirichletBoundary & | boundary | ||
) | const |
Check that all the ids in dirichlet_bcids are actually present in the mesh.
If not, this will throw an error.
Definition at line 5490 of file dof_map_constraints.C.
References libMesh::DirichletBoundary::b, libMesh::ParallelObject::comm(), libMesh::BoundaryInfo::get_boundary_ids(), libMesh::MeshBase::get_boundary_info(), libMesh::BoundaryInfo::get_edge_boundary_ids(), libMesh::BoundaryInfo::get_node_boundary_ids(), libMesh::libmesh_assert(), TIMPI::Communicator::max(), mesh, and TIMPI::Communicator::verify().
Referenced by create_dof_constraints().
void libMesh::DofMap::check_for_constraint_loops | ( | ) |
Definition at line 4505 of file dof_map_constraints.C.
References _dof_constraints, libMesh::libmesh_assert(), and libMesh::Real.
Referenced by check_for_cyclic_constraints(), and process_constraints().
void libMesh::DofMap::check_for_cyclic_constraints | ( | ) |
Throw an error if we detect any constraint loops, i.e.
A -> B -> C -> A that is, "dof A is constrained in terms of dof B which is constrained in terms of dof C which is constrained in terms of dof A", since these are not supported by libMesh and give erroneous results if they are present.
Definition at line 4499 of file dof_map_constraints.C.
References check_for_constraint_loops().
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 898 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, _shared_functors, _stashed_dof_constraints, _var_to_vg, _variable_group_numbers, _variable_groups, _variables, add_algebraic_ghosting_functor(), add_coupling_functor(), clear_send_list(), clear_sparsity(), libMesh::libmesh_assert(), need_full_sparsity_pattern, libMesh::MeshBase::remove_ghosting_functor(), and use_coupled_neighbor_dofs().
Referenced by libMesh::ReplicatedMesh::clear(), libMesh::DistributedMesh::clear(), and ~DofMap().
|
inline |
Clears the _send_list
vector.
This should be done in order to completely rebuild the send_list from scratch rather than merely adding to the existing send_list.
Definition at line 499 of file dof_map.h.
References _send_list.
Referenced by clear(), distribute_dofs(), and reinit_send_list().
void libMesh::DofMap::clear_sparsity | ( | ) |
Clears the sparsity pattern.
Definition at line 2029 of file dof_map.C.
References _sp.
Referenced by clear(), libMesh::System::reinit(), and OverlappingCouplingGhostingTest::run_sparsity_pattern_test().
|
inlineinherited |
Parallel::Communicator
object used by this mesh. Definition at line 97 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::Partitioner::_find_global_index_by_pid_map(), libMesh::BoundaryInfo::_find_id_maps(), libMesh::PetscLinearSolver< Number >::_petsc_shell_matrix_get_diagonal(), libMesh::SlepcEigenSolver< libMesh::Number >::_petsc_shell_matrix_get_diagonal(), libMesh::PetscLinearSolver< Number >::_petsc_shell_matrix_mult(), libMesh::SlepcEigenSolver< libMesh::Number >::_petsc_shell_matrix_mult(), libMesh::PetscLinearSolver< Number >::_petsc_shell_matrix_mult_add(), libMesh::MeshRefinement::_refine_elements(), libMesh::MeshRefinement::_smooth_flags(), add_constraints_to_send_list(), add_cube_convex_hull_to_mesh(), libMesh::PetscDMWrapper::add_dofs_helper(), libMesh::PetscDMWrapper::add_dofs_to_section(), libMesh::TransientRBConstruction::add_IC_to_RB_space(), libMesh::RBEIMEvaluation::add_interpolation_data(), libMesh::CondensedEigenSystem::add_matrices(), libMesh::EigenSystem::add_matrices(), libMesh::System::add_matrix(), libMesh::RBConstruction::add_scaled_matrix_and_vector(), libMesh::System::add_variable(), libMesh::System::add_variables(), libMesh::System::add_vector(), libMesh::MeshTools::Modification::all_tri(), libMesh::LaplaceMeshSmoother::allgather_graph(), allgather_recursive_constraints(), libMesh::TransientRBConstruction::allocate_data_structures(), libMesh::RBConstruction::allocate_data_structures(), libMesh::TransientRBConstruction::assemble_affine_expansion(), libMesh::AdvectionSystem::assemble_claw_rhs(), libMesh::FEMSystem::assemble_qoi(), libMesh::Nemesis_IO::assert_symmetric_cmaps(), libMesh::MeshCommunication::assign_global_indices(), libMesh::Partitioner::assign_partitioning(), libMesh::MeshTools::Generation::build_extrusion(), libMesh::Partitioner::build_graph(), 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_data(), libMesh::System::calculate_norm(), check_dirichlet_bcid_consistency(), libMesh::RBConstruction::compute_Fq_representor_innerprods(), libMesh::RBConstruction::compute_max_error_bound(), 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::RBConstruction::compute_output_dual_innerprods(), libMesh::RBConstruction::compute_residual_dual_norm_slow(), libMesh::RBSCMConstruction::compute_SCM_bounds_on_training_set(), computed_sparsity_already(), libMesh::Problem_Interface::computeF(), libMesh::Problem_Interface::computeJacobian(), libMesh::Problem_Interface::computePreconditioner(), libMesh::ContinuationSystem::ContinuationSystem(), libMesh::MeshBase::copy_constraint_rows(), libMesh::ExodusII_IO::copy_elemental_solution(), libMesh::ExodusII_IO::copy_nodal_solution(), libMesh::ExodusII_IO::copy_scalar_solution(), libMesh::CondensedEigenSystem::copy_super_to_sub(), libMesh::MeshTools::correct_node_proc_ids(), libMesh::MeshTools::create_bounding_box(), create_dof_constraints(), 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::PetscMatrix< T >::create_submatrix_nosort(), create_wrapped_function(), libMesh::MeshCommunication::delete_remote_elements(), libMesh::RBEIMEvaluation::distribute_bfs(), distribute_dofs(), DMlibMeshFunction(), DMlibMeshJacobian(), DMlibMeshSetSystem_libMesh(), DMVariableBounds_libMesh(), libMesh::DTKSolutionTransfer::DTKSolutionTransfer(), libMesh::MeshRefinement::eliminate_unrefined_patches(), libMesh::RBEIMConstruction::enrich_eim_approximation_on_interiors(), libMesh::RBEIMConstruction::enrich_eim_approximation_on_nodes(), libMesh::RBEIMConstruction::enrich_eim_approximation_on_sides(), libMesh::TransientRBConstruction::enrich_RB_space(), libMesh::EpetraVector< T >::EpetraVector(), AssembleOptimization::equality_constraints(), libMesh::PatchRecoveryErrorEstimator::estimate_error(), libMesh::WeightedPatchRecoveryErrorEstimator::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_error_tolerance(), libMesh::MeshRefinement::flag_elements_by_mean_stddev(), libMesh::MeshRefinement::flag_elements_by_nelem_target(), libMesh::RBEIMEvaluation::gather_bfs(), gather_constraints(), libMesh::MeshfreeInterpolation::gather_remote_data(), libMesh::CondensedEigenSystem::get_eigenpair(), libMesh::RBEIMEvaluation::get_eim_basis_function_node_value(), libMesh::RBEIMEvaluation::get_eim_basis_function_side_value(), libMesh::RBEIMEvaluation::get_eim_basis_function_value(), libMesh::MeshBase::get_info(), libMesh::System::get_info(), get_info(), libMesh::RBEIMEvaluation::get_interior_basis_functions_as_vecs(), libMesh::ImplicitSystem::get_linear_solver(), libMesh::RBEIMConstruction::get_max_abs_value(), libMesh::RBEIMConstruction::get_node_max_abs_value(), libMesh::RBEIMEvaluation::get_parametrized_function_node_value(), libMesh::RBEIMEvaluation::get_parametrized_function_side_value(), libMesh::RBEIMEvaluation::get_parametrized_function_value(), libMesh::RBEIMConstruction::get_random_point(), AssembleOptimization::inequality_constraints(), AssembleOptimization::inequality_constraints_jacobian(), libMesh::LocationMap< T >::init(), libMesh::TimeSolver::init(), libMesh::StaticCondensation::init(), libMesh::SystemSubsetBySubdomain::init(), libMesh::PetscDMWrapper::init_and_attach_petscdm(), libMesh::AdvectionSystem::init_data(), libMesh::ClawSystem::init_data(), libMesh::PetscDMWrapper::init_petscdm(), libMesh::ExodusII_IO_Helper::initialize(), libMesh::OptimizationSystem::initialize_equality_constraints_storage(), libMesh::OptimizationSystem::initialize_inequality_constraints_storage(), libMesh::RBEIMConstruction::initialize_parametrized_functions_in_training_set(), libMesh::RBEIMConstruction::inner_product(), integrate_function(), libMesh::MeshTools::libmesh_assert_consistent_distributed(), libMesh::MeshTools::libmesh_assert_consistent_distributed_nodes(), libMesh::MeshTools::libmesh_assert_contiguous_dof_ids(), libMesh::MeshTools::libmesh_assert_equal_connectivity(), libMesh::MeshTools::libmesh_assert_equal_points(), 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_constraint_rows(), 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_linesearch_shellfunc(), libMesh::libmesh_petsc_preconditioner_apply(), libMesh::libmesh_petsc_recalculate_monitor(), libMesh::libmesh_petsc_snes_fd_residual(), libMesh::libmesh_petsc_snes_jacobian(), libMesh::libmesh_petsc_snes_mffd_interface(), libMesh::libmesh_petsc_snes_mffd_residual(), libMesh::libmesh_petsc_snes_postcheck(), libMesh::libmesh_petsc_snes_precheck(), 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::LinearImplicitSystem::LinearImplicitSystem(), main(), 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_bcids_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::TransientRBConstruction::mass_matrix_scaled_matvec(), libMesh::FEMSystem::mesh_position_set(), libMesh::TriangulatorInterface::MeshedHole::MeshedHole(), LinearElasticityWithContact::move_mesh(), libMesh::DistributedMesh::n_active_elem(), libMesh::MeshTools::n_active_levels(), libMesh::BoundaryInfo::n_boundary_conds(), libMesh::MeshTools::n_connected_components(), n_constrained_dofs(), libMesh::MeshBase::n_constraint_rows(), n_dofs(), n_dofs_per_processor(), libMesh::BoundaryInfo::n_edge_conds(), libMesh::CondensedEigenSystem::n_global_non_condensed_dofs(), libMesh::MeshTools::n_levels(), MixedOrderTest::n_neighbor_links(), libMesh::BoundaryInfo::n_nodeset_conds(), libMesh::SparsityPattern::Build::n_nonzeros(), libMesh::MeshTools::n_p_levels(), libMesh::BoundaryInfo::n_shellface_conds(), libMesh::RBEIMEvaluation::node_distribute_bfs(), libMesh::RBEIMEvaluation::node_gather_bfs(), libMesh::RBEIMConstruction::node_inner_product(), libMesh::MeshBase::operator==(), 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::BoundaryInfo::parallel_sync_node_ids(), libMesh::BoundaryInfo::parallel_sync_side_ids(), libMesh::MeshTools::paranoid_n_levels(), libMesh::Partitioner::partition(), libMesh::Partitioner::partition_unpartitioned_elements(), libMesh::petsc_auto_fieldsplit(), libMesh::System::point_gradient(), libMesh::System::point_hessian(), libMesh::System::point_value(), libMesh::MeshBase::prepare_for_use(), libMesh::MeshBase::print_constraint_rows(), print_dof_constraints(), process_mesh_constraint_rows(), libMesh::Partitioner::processor_pairs_to_interface_nodes(), libMesh::InterMeshProjection::project_system_vectors(), FEMParameters::read(), libMesh::Nemesis_IO::read(), libMesh::XdrIO::read(), libMesh::EquationSystems::read(), libMesh::ExodusII_IO::read_header(), libMesh::CheckpointIO::read_header(), libMesh::XdrIO::read_header(), libMesh::System::read_header(), libMesh::RBEIMEvaluation::read_in_interior_basis_functions(), libMesh::RBEIMEvaluation::read_in_node_basis_functions(), libMesh::RBEIMEvaluation::read_in_side_basis_functions(), libMesh::RBEvaluation::read_in_vectors_from_multiple_files(), libMesh::System::read_legacy_data(), libMesh::TransientRBConstruction::read_riesz_representors_from_files(), libMesh::RBConstruction::read_riesz_representors_from_files(), 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::Nemesis_IO_Helper::read_var_names_impl(), libMesh::MeshBase::recalculate_n_partitions(), libMesh::MeshRefinement::refine_and_coarsen_elements(), libMesh::SimplexRefiner::refine_via_edges(), libMesh::DistributedMesh::renumber_dof_objects(), libMesh::DistributedMesh::renumber_nodes_and_elements(), LinearElasticityWithContact::residual_and_jacobian(), OverlappingAlgebraicGhostingTest::run_ghosting_test(), OverlappingCouplingGhostingTest::run_sparsity_pattern_test(), scale_mesh_and_plot(), scatter_constraints(), libMesh::CheckpointIO::select_split_config(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::send_and_insert_dof_values(), libMesh::TransientRBConstruction::set_error_temporal_data(), libMesh::Partitioner::set_interface_node_processor_ids_BFS(), libMesh::Partitioner::set_interface_node_processor_ids_linear(), libMesh::Partitioner::set_interface_node_processor_ids_petscpartitioner(), libMesh::Partitioner::set_node_processor_ids(), set_nonlocal_dof_objects(), libMesh::Partitioner::set_parent_processor_ids(), libMesh::PetscDMWrapper::set_point_range_in_section(), libMesh::PetscDiffSolver::setup_petsc_data(), libMesh::RBEIMEvaluation::side_distribute_bfs(), libMesh::RBEIMEvaluation::side_gather_bfs(), libMesh::RBEIMConstruction::side_inner_product(), libMesh::Partitioner::single_partition(), libMesh::LaplaceMeshSmoother::smooth(), libMesh::ClawSystem::solve_conservation_law(), libMesh::split_mesh(), libMesh::RBEIMConstruction::store_eim_solutions_for_training_set(), libMesh::MeshBase::subdomain_ids(), libMesh::BoundaryInfo::sync(), ConstraintOperatorTest::test1DCoarseningNewNodes(), ConstraintOperatorTest::test1DCoarseningOperator(), libMesh::MeshRefinement::test_level_one(), MeshfunctionDFEM::test_mesh_function_dfem(), MeshfunctionDFEM::test_mesh_function_dfem_grad(), MeshFunctionTest::test_p_level(), libMesh::MeshRefinement::test_unflagged(), DofMapTest::testBadElemFECombo(), SystemsTest::testBlockRestrictedVarNDofs(), BoundaryInfoTest::testBoundaryOnChildrenErrors(), VolumeTest::testC0PolygonMethods(), ConstraintOperatorTest::testCoreform(), ConnectedComponentsTest::testEdge(), MeshInputTest::testExodusIGASidesets(), MeshTriangulationTest::testFoundCenters(), PointLocatorTest::testLocator(), BoundaryInfoTest::testMesh(), PointLocatorTest::testPlanar(), MeshTriangulationTest::testPoly2TriRefinementBase(), SystemsTest::testProjectCubeWithMeshFunction(), BoundaryInfoTest::testRenumber(), CheckpointIOTest::testSplitter(), MeshInputTest::testTetgenIO(), MeshTriangulationTest::testTriangulatorInterp(), MeshTriangulationTest::testTriangulatorMeshedHoles(), MeshTriangulationTest::testTriangulatorRoundHole(), libMesh::MeshTools::total_weight(), libMesh::RBConstruction::train_reduced_basis_with_POD(), libMesh::MeshFunctionSolutionTransfer::transfer(), libMesh::MeshfreeSolutionTransfer::transfer(), libMesh::Poly2TriTriangulator::triangulate(), libMesh::TransientRBConstruction::truth_assembly(), libMesh::RBConstruction::truth_assembly(), libMesh::MeshRefinement::uniformly_coarsen(), update_current_local_solution(), libMesh::TransientRBConstruction::update_RB_initial_condition_all_N(), libMesh::TransientRBConstruction::update_RB_system_matrices(), libMesh::RBConstruction::update_RB_system_matrices(), libMesh::TransientRBConstruction::update_residual_terms(), libMesh::RBConstruction::update_residual_terms(), libMesh::MeshTools::volume(), libMesh::STLIO::write(), libMesh::NameBasedIO::write(), libMesh::XdrIO::write(), libMesh::VTKIO::write_nodal_data(), libMesh::RBEIMEvaluation::write_out_interior_basis_functions(), libMesh::RBEIMEvaluation::write_out_node_basis_functions(), libMesh::RBEIMEvaluation::write_out_side_basis_functions(), libMesh::RBEvaluation::write_out_vectors(), libMesh::TransientRBConstruction::write_riesz_representors_to_files(), libMesh::RBConstruction::write_riesz_representors_to_files(), 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(), libMesh::XdrIO::write_serialized_nodesets(), libMesh::RBDataSerialization::RBEvaluationSerialization::write_to_file(), libMesh::RBDataSerialization::TransientRBEvaluationSerialization::write_to_file(), libMesh::RBDataSerialization::RBEIMEvaluationSerialization::write_to_file(), and libMesh::RBDataSerialization::RBSCMEvaluationSerialization::write_to_file().
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 2008 of file dof_map.C.
References _constrained_sparsity_construction, _matrices, _sp, build_sparsity(), and need_full_sparsity_pattern.
Referenced by libMesh::System::init_matrices(), libMesh::System::reinit(), and OverlappingCouplingGhostingTest::run_sparsity_pattern_test().
bool libMesh::DofMap::computed_sparsity_already | ( | ) | const |
Returns true iff a sparsity pattern has already been computed.
Definition at line 289 of file dof_map.C.
References _sp, libMesh::ParallelObject::comm(), and TIMPI::Communicator::max().
Referenced by libMesh::System::solve_for_unconstrained_dofs(), and update_sparsity_pattern().
|
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 2437 of file dof_map.h.
Referenced by assemble().
|
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 2411 of file dof_map.h.
Referenced by libMesh::ClawSystem::assemble_advection_matrices(), assemble_mass(), libMesh::ClawSystem::assemble_mass_matrix(), assemble_matrices(), assemble_SchroedingerEquation(), LargeDeformationElasticity::jacobian(), and Biharmonic::JR::residual_and_jacobian().
|
inline |
|
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 2424 of file dof_map.h.
Referenced by libMesh::RBConstruction::add_scaled_matrix_and_vector(), assemble(), LinearElasticity::assemble(), AssembleOptimization::assemble_A_and_F(), assemble_cd(), assemble_elasticity(), assemble_poisson(), assemble_shell(), assemble_stokes(), and LinearElasticityWithContact::residual_and_jacobian().
void libMesh::DofMap::constrain_element_residual | ( | DenseVector< Number > & | rhs, |
std::vector< dof_id_type > & | elem_dofs, | ||
NumericVector< Number > & | solution_local | ||
) | const |
Constrains the element residual.
The element Jacobian is square, and the elem_dofs should correspond to the global DOF indices of both the rows and columns of the element matrix, and the dof constraint should not include any heterogeneous terms.
The residual-constraining version of this method creates linear systems in which heterogeneously constrained degrees of freedom create non-zero residual terms when not at their correct offset values, as would be appropriate for finding a solution to a nonlinear problem in a quasi-Newton solve.
The solution
vector passed in should be a serialized or ghosted primal solution
Definition at line 2762 of file dof_map_constraints.C.
References libMesh::GHOSTED, libMesh::libmesh_assert(), libMesh::DenseMatrixBase< T >::n(), libMesh::SERIAL, libMesh::DenseVector< T >::size(), libMesh::NumericVector< T >::type(), and libMesh::DenseMatrix< T >::vector_mult_transpose().
|
inline |
Constrains the element vector.
Definition at line 2420 of file dof_map.h.
Referenced by LargeDeformationElasticity::residual(), Biharmonic::JR::residual_and_jacobian(), and InfFERadialTest::testRefinement().
|
inline |
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 5349 of file dof_map_constraints.C.
References _dof_constraints, _primal_constraint_values, libMesh::DofObject::dof_number(), libMesh::Elem::is_node_on_side(), libMesh::Elem::is_vertex(), libMesh::DofObject::n_comp(), libMesh::FEInterface::n_dofs_at_node(), n_nodes, libMesh::Elem::n_nodes(), libMesh::Elem::n_sides(), libMesh::Elem::node_ref(), libMesh::Elem::p_level(), libMesh::Threads::spin_mtx, sys_number(), and variable_type().
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::compute_periodic_constraints(), and libMesh::FEGenericBase< FEOutputType< T >::type >::compute_proj_constraints().
|
inline |
Returns true iff the current policy when constructing sparsity patterns is to explicitly account for sparsity entries created by constraint matrix pre- and post- application.
Definition at line 2486 of file dof_map.h.
References _constrained_sparsity_construction.
|
inline |
Definition at line 1101 of file dof_map.h.
References _dof_constraints.
|
inline |
Definition at line 1107 of file dof_map.h.
References _dof_constraints.
|
inline |
Beginning of range of coupling functors.
Definition at line 358 of file dof_map.h.
References _coupling_functors.
Referenced by add_neighbors_to_send_list(), libMesh::SparsityPattern::Build::operator()(), and scatter_constraints().
|
inline |
End of range of coupling functors.
Definition at line 364 of file dof_map.h.
References _coupling_functors.
Referenced by add_neighbors_to_send_list(), libMesh::SparsityPattern::Build::operator()(), and scatter_constraints().
Rebuilds the raw degree of freedom and DofObject constraints, based on attached DirichletBoundary objects and on non-conforming interface in adapted meshes.
A time is specified for use in building time-dependent Dirichlet constraints.
Definition at line 1735 of file dof_map_constraints.C.
References _adjoint_constraint_values, _adjoint_dirichlet_boundaries, _dirichlet_boundaries, _dof_constraints, _node_constraints, _periodic_boundaries, _primal_constraint_values, _verify_dirichlet_bc_consistency, check_dirichlet_bcid_consistency(), libMesh::ParallelObject::comm(), libMesh::MeshBase::get_constraint_rows(), libMesh::index_range(), libMesh::MeshBase::is_prepared(), libMesh::MeshBase::is_serial(), libMesh::libmesh_assert(), libMesh::MeshTools::libmesh_assert_valid_boundary_ids(), TIMPI::Communicator::max(), mesh, libMesh::MeshBase::mesh_dimension(), TIMPI::Communicator::min(), libMesh::MeshBase::n_elem(), n_variables(), n_vars, libMesh::Threads::parallel_for(), process_mesh_constraint_rows(), and libMesh::MeshBase::sub_point_locator().
Referenced by libMesh::System::reinit_constraints().
|
inline |
Default algebraic ghosting functor.
Definition at line 432 of file dof_map.h.
References _default_evaluating.
Referenced by add_default_ghosting(), remove_default_ghosting(), DefaultCouplingTest::testCoupling(), and PointNeighborCouplingTest::testCoupling().
|
inline |
Default coupling functor.
Definition at line 370 of file dof_map.h.
References _default_coupling.
Referenced by add_default_ghosting(), remove_default_ghosting(), and PointNeighborCouplingTest::testCoupling().
|
staticinherited |
Definition at line 100 of file reference_counter.C.
References libMesh::ReferenceCounter::_enable_print_counter.
std::size_t 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 975 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, add_neighbors_to_send_list(), TIMPI::Communicator::allgather(), calculate_constraining_subdomains(), clear_send_list(), libMesh::ParallelObject::comm(), distribute_local_dofs_node_major(), distribute_local_dofs_var_major(), libMesh::DofObject::dof_number(), elem_ptr(), end_dof(), first_dof(), libMesh::OrderWrapper::get_order(), libMesh::DofObject::invalid_id, invalidate_dofs(), libMesh::libmesh_assert(), libMesh::MeshTools::libmesh_assert_valid_dof_ids(), libMesh::make_range(), mesh, libMesh::DofObject::n_comp(), n_dofs(), libMesh::ParallelObject::n_processors(), n_SCALAR_dofs(), n_variables(), libMesh::DofObject::n_vars(), node_ptr(), 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(), libMesh::PetscDMWrapper::init_petscdm(), libMesh::EquationSystems::reinit_solutions(), SystemsTest::testProjectMatrix1D(), SystemsTest::testProjectMatrix2D(), and SystemsTest::testProjectMatrix3D().
|
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.
Uses the provided constraining_subdomains map from calculate_constraining_subdomains() to ensure allocation of all DoFs on constraining nodes.
distribute_local_dofs_var_major
. Definition at line 1339 of file dof_map.C.
References libMesh::Variable::active_on_subdomain(), libMesh::FEType::family, libMesh::DofObject::invalid_id, mesh, libMesh::DofObject::n_comp_group(), n_nodes, libMesh::VariableGroup::n_variables(), libMesh::DofObject::processor_id(), libMesh::SCALAR, libMesh::DofObject::set_vg_dof_base(), libMesh::Variable::type(), 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.
Uses the provided constraining_subdomains map from calculate_constraining_subdomains() to ensure allocation of all DoFs on constraining nodes.
Definition at line 1467 of file dof_map.C.
References libMesh::Variable::active_on_subdomain(), libMesh::FEType::family, libMesh::DofObject::invalid_id, mesh, libMesh::DofObject::n_comp_group(), n_nodes, libMesh::VariableGroup::n_variables(), libMesh::DofObject::processor_id(), libMesh::SCALAR, libMesh::DofObject::set_vg_dof_base(), libMesh::Variable::type(), and libMesh::DofObject::vg_dof_base().
Referenced by distribute_dofs().
|
private |
Definition at line 1588 of file dof_map.C.
References _n_SCALAR_dofs, libMesh::FEType::family, libMesh::OrderWrapper::get_order(), libMesh::make_range(), libMesh::ParallelObject::n_processors(), n_variable_groups(), libMesh::VariableGroup::n_variables(), libMesh::FEType::order, libMesh::ParallelObject::processor_id(), libMesh::SCALAR, libMesh::Variable::type(), and variable_group().
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 2184 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(), libMesh::libmesh_assert(), 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(), libMesh::MeshFunction::_gradient_on_elem(), add_neighbors_to_send_list(), libMesh::HPCoarsenTest::add_projection(), assemble(), LinearElasticity::assemble(), AssembleOptimization::assemble_A_and_F(), libMesh::ClawSystem::assemble_advection_matrices(), libMesh::ClawSystem::assemble_avg_coupling_matrices(), libMesh::ClawSystem::assemble_boundary_condition_matrices(), assemble_cd(), assemble_elasticity(), libMesh::ClawSystem::assemble_jump_coupling_matrix(), assemble_mass(), libMesh::ClawSystem::assemble_mass_matrix(), assemble_matrices(), assemble_poisson(), assemble_SchroedingerEquation(), assemble_shell(), assemble_stokes(), assemble_wave(), Biharmonic::JR::bounds(), 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(), compute_enriched_soln(), compute_jacobian(), libMesh::FEGenericBase< FEOutputType< T >::type >::compute_periodic_constraints(), libMesh::FEGenericBase< FEOutputType< T >::type >::compute_proj_constraints(), compute_residual(), compute_stresses(), LinearElasticityWithContact::compute_stresses(), LinearElasticity::compute_stresses(), LargeDeformationElasticity::compute_stresses(), libMesh::MeshFunction::discontinuous_value(), DMCreateDomainDecomposition_libMesh(), DMCreateFieldDecomposition_libMesh(), dof_indices(), libMesh::AdjointRefinementEstimator::estimate_error(), libMesh::ExactErrorEstimator::estimate_error(), libMesh::DTKEvaluator::evaluate(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::SubFunctor::find_dofs_to_send(), libMesh::MeshFunction::hessian(), libMesh::InfFE< Dim, T_radial, T_map >::inf_compute_constraints(), libMesh::StaticCondensation::init(), libMesh::SystemSubsetBySubdomain::init(), is_evaluable(), libMesh::HDGProblem::jacobian(), LargeDeformationElasticity::jacobian(), libMesh::System::local_dof_indices(), max_constraint_error(), LinearElasticityWithContact::move_mesh(), 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::System::point_value(), libMesh::FEMContext::pre_fe_reinit(), process_mesh_constraint_rows(), libMesh::HDGProblem::residual(), LargeDeformationElasticity::residual(), Biharmonic::JR::residual_and_jacobian(), LinearElasticityWithContact::residual_and_jacobian(), scatter_constraints(), libMesh::HPCoarsenTest::select_refinement(), libMesh::PetscDMWrapper::set_point_range_in_section(), FETestBase< order, family, elem_type, 1 >::setUp(), SolidSystem::side_time_derivative(), libMesh::SparsityPattern::Build::sorted_connected_dofs(), MixedDimensionMeshTest::testDofOrdering(), MixedDimensionRefinedMeshTest::testDofOrdering(), MixedDimensionNonUniformRefinement::testDofOrdering(), MixedDimensionNonUniformRefinementTriangle::testDofOrdering(), MixedDimensionNonUniformRefinement3D::testDofOrdering(), MeshInputTest::testExodusWriteElementDataFromDiscontinuousNodalData(), InfFERadialTest::testRefinement(), BoundaryInfoTest::testShellFaceConstraints(), libMesh::BoundaryVolumeSolutionTransfer::transfer_boundary_volume(), NonManifoldGhostingFunctorTest::verify_send_list_entries_helper(), libMesh::Nemesis_IO_Helper::write_nodal_solution(), 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 2300 of file dof_map.C.
References dof_indices(), and int.
void libMesh::DofMap::dof_indices | ( | const Elem *const | elem, |
std::vector< dof_id_type > & | di, | ||
const unsigned int | vn, | ||
ScalarDofsFunctor | scalar_dofs_functor, | ||
FieldDofsFunctor | field_dofs_functor, | ||
int | p_level = -12345 |
||
) | const |
Retrieves degree of freedom indices for a given elem
and then performs actions for these indices defined by the user-provided functors scalar_dofs_functor
and field_dofs_functor
.
This API is useful when a user wants to do more than simply fill a degree of freedom container
elem | The element to get degrees of freedom for |
di | A container for degrees of freedom. It is up to the provided functors how this gets filled |
vn | The variable number to retrieve degrees of freedom for |
scalar_dofs_functor | The functor that acts on scalar degrees of freedom. This functor has the interface: void scalar_dofs_functor(const Elem & elem, std::vector<dof_id_type> & di, const std::vector<dof_id_type> & scalar_dof_indices) where di is the degree of freedom container described above and scalar_dof_indices are the scalar dof indices available to elem |
field_dofs_functor | The functor that acts on "field" (e.g. non-scalar, non-global) degrees of freedom. This functor has the interface: void field_dofs_functor(const Elem & elem, const unsigned int node_num, const unsigned int var_num, std::vector<dof_id_type> & di, const dof_id_type field_dof) where field_dof represents a field degree of freedom to act on and is associated with node_num and var_num . If the degree of freedom is elemental than node_num will be invalid_uint . di is again the degree of freedom container provided above |
Definition at line 2706 of file dof_map.h.
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 2322 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 2375 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().
void libMesh::DofMap::dof_indices | ( | const Elem & | elem, |
unsigned int | n, | ||
std::vector< dof_id_type > & | di, | ||
const unsigned int | vn | ||
) | const |
Appends to the vector di
the global degree of freedom indices for elem.node_ref(n)
, for one variable vn
.
On hanging nodes with both vertex and non-vertex DoFs, only those indices which are directly supported on elem
are included.
Definition at line 2426 of file dof_map.C.
References _node_dof_indices(), and libMesh::Elem::node_ref().
|
inline |
dof
Definition at line 765 of file dof_map.h.
References _end_df, and libMesh::libmesh_assert().
Referenced by libMesh::PetscDMWrapper::build_sf(), and DofMapTest::testDofOwner().
|
private |
i
from the mesh
. Definition at line 341 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 94 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 756 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(), AssembleOptimization::lower_and_upper_bounds(), main(), libMesh::SparsityPattern::Build::parallel_sync(), libMesh::StaticCondensation::row_stop(), libMesh::System::solve_for_unconstrained_dofs(), DofMapTest::testDofOwner(), NonManifoldGhostingFunctorTest::verify_send_list_entries_helper(), and libMesh::RBConstruction::zero_constrained_dofs_on_vector().
|
inline |
Definition at line 759 of file dof_map.h.
References libMesh::ParallelObject::processor_id().
Referenced by distribute_dofs(), local_index(), n_local_constrained_dofs(), and process_mesh_constraint_rows().
|
inline |
proc
.Analogous to the end() member function of STL containers.
Definition at line 779 of file dof_map.h.
References _end_old_df.
Referenced by libMesh::PetscDMWrapper::init_petscdm(), libMesh::BuildProjectionList::operator()(), SystemsTest::testProjectMatrix1D(), SystemsTest::testProjectMatrix2D(), and SystemsTest::testProjectMatrix3D().
|
inline |
Definition at line 782 of file dof_map.h.
References libMesh::ParallelObject::processor_id().
|
inline |
Heterogeneously 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 2448 of file dof_map.h.
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 2444 of file dof_map.h.
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::CondensedEigenSystem::get_eigenpair(), libMesh::libmesh_petsc_snes_jacobian(), libMesh::libmesh_petsc_snes_residual_helper(), main(), libMesh::ImplicitSystem::sensitivity_solve(), libMesh::NewtonSolver::solve(), libMesh::PetscDiffSolver::solve(), libMesh::RBConstruction::solve_for_matrix_and_rhs(), libMesh::ImplicitSystem::weighted_sensitivity_adjoint_solve(), and libMesh::ImplicitSystem::weighted_sensitivity_solve().
|
inline |
Definition at line 2459 of file dof_map.h.
Referenced by libMesh::libmesh_petsc_snes_jacobian(), and libMesh::libmesh_petsc_snes_residual().
|
inline |
Definition at line 2453 of file dof_map.h.
Referenced by libMesh::libmesh_petsc_snes_fd_residual(), libMesh::libmesh_petsc_snes_mffd_residual(), and libMesh::libmesh_petsc_snes_residual().
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[i] = Ug[dof_indices[i]]
Ue
is properly sized when calling this method. This is because there is no resize()
method in the DenseVectorBase<>
class. Definition at line 2102 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::libmesh_assert(), 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 2875 of file dof_map.C.
References _dof_constraints, is_constrained_dof(), and libMesh::libmesh_assert().
Referenced by libMesh::SparsityPattern::Build::sorted_connected_dofs().
|
inline |
proc
. Definition at line 732 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::StaticCondensation::init(), libMesh::SystemSubsetBySubdomain::init(), libMesh::CondensedEigenSystem::initialize_condensed_dofs(), libMesh::System::local_dof_indices(), AssembleOptimization::lower_and_upper_bounds(), main(), libMesh::SparsityPattern::Build::parallel_sync(), libMesh::StaticCondensation::row_start(), libMesh::System::solve_for_unconstrained_dofs(), DofMapTest::testDofOwner(), NonManifoldGhostingFunctorTest::verify_send_list_entries_helper(), and libMesh::RBConstruction::zero_constrained_dofs_on_vector().
|
inline |
Definition at line 735 of file dof_map.h.
References libMesh::ParallelObject::processor_id().
Referenced by distribute_dofs(), local_index(), n_local_constrained_dofs(), and process_mesh_constraint_rows().
|
inline |
proc
. Definition at line 742 of file dof_map.h.
References _first_old_df.
Referenced by libMesh::PetscDMWrapper::init_petscdm(), libMesh::BuildProjectionList::operator()(), SystemsTest::testProjectMatrix1D(), SystemsTest::testProjectMatrix2D(), and SystemsTest::testProjectMatrix3D().
|
inline |
Definition at line 745 of file dof_map.h.
References libMesh::ParallelObject::processor_id().
|
inline |
Sets need_full_sparsity_pattern to true regardless of the requirements by matrices.
Definition at line 2480 of file dof_map.h.
References need_full_sparsity_pattern.
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 5015 of file dof_map_constraints.C.
References _adjoint_constraint_values, _dof_constraints, _end_df, _primal_constraint_values, libMesh::ParallelObject::comm(), libMesh::DofObject::invalid_id, libMesh::libmesh_assert(), local_index(), TIMPI::Communicator::max(), and libMesh::Real.
Referenced by allgather_recursive_constraints(), and scatter_constraints().
const DirichletBoundaries * libMesh::DofMap::get_adjoint_dirichlet_boundaries | ( | unsigned int | q | ) | const |
Definition at line 5438 of file dof_map_constraints.C.
References _adjoint_dirichlet_boundaries.
DirichletBoundaries * libMesh::DofMap::get_adjoint_dirichlet_boundaries | ( | unsigned int | q | ) |
Definition at line 5446 of file dof_map_constraints.C.
References _adjoint_dirichlet_boundaries.
|
inline |
Definition at line 1573 of file dof_map.h.
References _dirichlet_boundaries.
Referenced by libMesh::DifferentiableSystem::add_dot_var_dirichlet_bcs().
|
inline |
Definition at line 1578 of file dof_map.h.
References _dirichlet_boundaries.
|
inline |
Provide a const accessor to the DofConstraints map.
This allows the user to quickly search the data structure rather than just iterating over it.
Definition at line 1114 of file dof_map.h.
References _dof_constraints.
|
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 2945 of file dof_map.C.
References _dof_constraints, _matrices, _node_constraints, _primal_constraint_values, _sp, libMesh::ParallelObject::comm(), local_index(), TIMPI::Communicator::max(), libMesh::ParallelObject::processor_id(), and TIMPI::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 2278 of file dof_map_constraints.C.
References _adjoint_constraint_values, _adjoint_dirichlet_boundaries, _dof_constraints, _node_constraints, _primal_constraint_values, local_index(), and libMesh::ParallelObject::processor_id().
Referenced by print_dof_constraints().
|
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 534 of file dof_map.h.
References _sp, and libMesh::libmesh_assert().
|
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 547 of file dof_map.h.
References _sp, and libMesh::libmesh_assert().
|
inline |
Definition at line 1520 of file dof_map.h.
References _periodic_boundaries.
Referenced by main().
|
inline |
Definition at line 1525 of file dof_map.h.
References _periodic_boundaries.
|
inline |
Definition at line 2397 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 525 of file dof_map.h.
References _send_list.
Referenced by libMesh::UniformRefinementEstimator::_estimate_error(), libMesh::AdaptiveTimeSolver::adjoint_advance_timestep(), libMesh::UnsteadySolver::adjoint_advance_timestep(), libMesh::NewmarkSolver::advance_timestep(), libMesh::AdaptiveTimeSolver::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(), libMesh::UnsteadySolver::retrieve_timestep(), OverlappingAlgebraicGhostingTest::run_ghosting_test(), OverlappingCouplingGhostingTest::run_sparsity_pattern_test(), MeshFunctionTest::test_p_level(), libMesh::UnsteadySolver::update(), and NonManifoldGhostingFunctorTest::verify_send_list_entries_helper().
|
inline |
If need_full_sparsity_pattern is false, the "sparsity pattern" may only own n_nz and n_oz lists.
Definition at line 562 of file dof_map.h.
References _sp.
Referenced by libMesh::SparseMatrix< ValOut >::attach_dof_map().
|
inline |
add_static_condensation()
Definition at line 2783 of file dof_map.h.
References _sc, and libMesh::libmesh_assert().
Referenced by libMesh::SparsityPattern::Build::sorted_connected_dofs().
bool libMesh::DofMap::has_adjoint_dirichlet_boundaries | ( | unsigned int | q | ) | const |
Definition at line 5428 of file dof_map_constraints.C.
References _adjoint_dirichlet_boundaries.
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 648 of file dof_map.h.
References n_variable_groups(), and n_variables().
Referenced by block_size().
|
inline |
dof
has a heterogeneous constraint for adjoint solution qoi_num
, zero otherwise. Definition at line 2376 of file dof_map.h.
References _adjoint_constraint_values.
Referenced by has_heterogenous_adjoint_constraint().
|
inline |
true
if the system has any heterogeneous constraints for adjoint solution qoi_num
, false
otherwise. Definition at line 2362 of file dof_map.h.
References _adjoint_constraint_values.
Referenced by has_heterogenous_adjoint_constraints().
|
inline |
Backwards compatibility with misspelling.
Definition at line 1190 of file dof_map.h.
References has_heterogeneous_adjoint_constraint().
|
inline |
Backwards compatibility with misspelling.
Definition at line 1174 of file dof_map.h.
References has_heterogeneous_adjoint_constraints().
|
inline |
Checks whether we have static condensation.
Definition at line 1737 of file dof_map.h.
References _sc.
Referenced by libMesh::SparsityPattern::Build::sorted_connected_dofs().
void libMesh::DofMap::heterogeneously_constrain_element_jacobian_and_residual | ( | DenseMatrix< Number > & | matrix, |
DenseVector< Number > & | rhs, | ||
std::vector< dof_id_type > & | elem_dofs, | ||
NumericVector< Number > & | solution_local | ||
) | const |
Constrains the element Jacobian and residual.
The element Jacobian is square, and the elem_dofs should correspond to the global DOF indices of both the rows and columns of the element matrix.
The residual-constraining version of this method creates linear systems in which heterogeneously constrained degrees of freedom create non-zero residual terms when not at their correct offset values, as would be appropriate for finding a solution to a nonlinear problem in a quasi-Newton solve.
Note the sign difference from the linear heterogeneous constraint method: Solving u:=u_in-J has the opposite sign convention from u:=K, and we apply heterogeneous constraints accordingly.
The solution
vector passed in should be a serialized or ghosted primal solution
Definition at line 2619 of file dof_map_constraints.C.
References libMesh::GHOSTED, libMesh::DenseMatrix< T >::left_multiply_transpose(), libMesh::libmesh_assert(), libMesh::DenseMatrixBase< T >::m(), libMesh::make_range(), libMesh::DenseMatrixBase< T >::n(), libMesh::DenseMatrix< T >::right_multiply(), libMesh::SERIAL, libMesh::DenseVector< T >::size(), libMesh::NumericVector< T >::type(), and libMesh::DenseMatrix< T >::vector_mult_transpose().
|
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.
The heterogeneous version of this method creates linear systems in which heterogeneously 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-heterogeneous version of this method creates linear systems in which even heterogeneously 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 heterogeneous 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 2430 of file dof_map.h.
Referenced by heterogenously_constrain_element_matrix_and_vector(), and process_mesh_constraint_rows().
void libMesh::DofMap::heterogeneously_constrain_element_residual | ( | DenseVector< Number > & | rhs, |
std::vector< dof_id_type > & | elem_dofs, | ||
NumericVector< Number > & | solution_local | ||
) | const |
Constrains the element residual.
The element Jacobian is square, and the elem_dofs should correspond to the global DOF indices of both the rows and columns of the element matrix.
The residual-constraining version of this method creates linear systems in which heterogeneously constrained degrees of freedom create non-zero residual terms when not at their correct offset values, as would be appropriate for finding a solution to a nonlinear problem in a quasi-Newton solve.
The solution
vector passed in should be a serialized or ghosted primal solution
Definition at line 2702 of file dof_map_constraints.C.
References libMesh::GHOSTED, libMesh::libmesh_assert(), libMesh::DenseMatrixBase< T >::m(), libMesh::DenseMatrixBase< T >::n(), libMesh::SERIAL, libMesh::DenseVector< T >::size(), libMesh::NumericVector< T >::type(), and libMesh::DenseMatrix< T >::vector_mult_transpose().
|
inline |
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 heterogeneous version of this method creates linear systems in which heterogeneously 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-heterogeneous version of this method creates linear systems in which even heterogeneously 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 heterogeneous constraints are already satisfied.
Note the sign difference from the nonlinear heterogeneous constraint method: Solving u:=K has the opposite sign convention from u:=u_in-J, and we apply heterogeneous constraints accordingly.
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 2434 of file dof_map.h.
Referenced by heterogenously_constrain_element_vector().
|
inline |
Definition at line 1325 of file dof_map.h.
References heterogeneously_constrain_element_matrix_and_vector().
Referenced by assemble_stokes(), and libMesh::System::solve_for_unconstrained_dofs().
|
inline |
Definition at line 1369 of file dof_map.h.
References heterogeneously_constrain_element_vector().
|
inlineprotectednoexceptinherited |
Increments the construction counter.
Should be called in the constructor of any derived class that will be reference counted.
Definition at line 183 of file reference_counter.h.
References libMesh::err, libMesh::BasicOStreamProxy< charT, traits >::get(), libMesh::Quality::name(), and libMesh::Threads::spin_mtx.
Referenced by libMesh::ReferenceCountedObject< RBParametrized >::ReferenceCountedObject().
|
inlineprotectednoexceptinherited |
Increments the destruction counter.
Should be called in the destructor of any derived class that will be reference counted.
Definition at line 207 of file reference_counter.h.
References libMesh::err, libMesh::BasicOStreamProxy< charT, traits >::get(), 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 883 of file dof_map.C.
References mesh, and sys_number().
Referenced by distribute_dofs().
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 326 of file dof_map.C.
References _matrices.
Referenced by libMesh::System::init_matrices(), and OverlappingCouplingGhostingTest::run_sparsity_pattern_test().
|
inline |
true
if the degree of freedom dof is constrained, false
otherwise. Definition at line 2352 of file dof_map.h.
References _dof_constraints.
Referenced by add_adjoint_constraint_row(), add_constraint_row(), allgather_recursive_constraints(), AssembleOptimization::assemble_A_and_F(), build_constraint_matrix(), build_constraint_matrix_and_vector(), libMesh::FEGenericBase< FEOutputType< T >::type >::compute_periodic_constraints(), libMesh::FEGenericBase< FEOutputType< T >::type >::compute_proj_constraints(), extract_local_vector(), find_connected_dofs(), libMesh::InfFE< Dim, T_radial, T_map >::inf_compute_constraints(), libMesh::CondensedEigenSystem::initialize_condensed_dofs(), max_constraint_error(), libMesh::RBSCMConstruction::perform_SCM_greedy(), process_mesh_constraint_rows(), scatter_constraints(), libMesh::System::solve_for_unconstrained_dofs(), BoundaryInfoTest::testShellFaceConstraints(), and libMesh::RBConstruction::zero_constrained_dofs_on_vector().
|
inline |
true
if the Node is constrained, false otherwise. Definition at line 2336 of file dof_map.h.
References _node_constraints.
Referenced by allgather_recursive_constraints(), and scatter_constraints().
template LIBMESH_EXPORT 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 2632 of file dof_map.C.
References all_semilocal_indices(), dof_indices(), libMesh::invalid_uint, and libMesh::ParallelObject::processor_id().
Referenced by libMesh::MeshFunction::check_found_elem(), libMesh::System::point_gradient(), libMesh::System::point_hessian(), libMesh::System::point_value(), DefaultCouplingTest::testCoupling(), and PointNeighborCouplingTest::testCoupling().
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 212 of file dof_map.C.
References _periodic_boundaries.
|
inline |
true
if degree of freedom index dof_index
is a local index. Definition at line 916 of file dof_map.h.
References end_dof(), and first_dof().
Referenced by add_constraints_to_send_list(), add_neighbors_to_send_list(), libMesh::ExodusII_IO::copy_elemental_solution(), libMesh::Nemesis_IO::copy_elemental_solution(), libMesh::Nemesis_IO::copy_nodal_solution(), gather_constraints(), get_info(), get_local_constraints(), local_variable_indices(), libMesh::SparsityPattern::Build::parallel_sync(), process_mesh_constraint_rows(), semilocal_index(), and libMesh::PetscDMWrapper::set_point_range_in_section().
template void libMesh::DofMap::local_variable_indices | ( | T & | idx, |
const MeshBase & | mesh, | ||
unsigned int | var_num | ||
) | const |
If T == dof_id_type, counts, if T == std::vector<dof_id_type>, fills an array of, those dof indices which belong to the given variable number and live on the current processor.
Definition at line 1171 of file dof_map.C.
References libMesh::Variable::active_on_subdomain(), distance(), libMesh::DofObject::dof_number(), libMesh::MeshTools::Generation::Private::idx(), libMesh::libmesh_assert(), 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::PetscDMWrapper::init_petscdm(), n_local_dofs(), libMesh::petsc_auto_fieldsplit(), and SystemsTest::testBlockRestrictedVarNDofs().
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 3351 of file dof_map_constraints.C.
References _dof_constraints, _primal_constraint_values, build_constraint_matrix(), libMesh::NumericVector< T >::closed(), dof_indices(), exact_value(), libMesh::NumericVector< T >::first_local_index(), libMesh::System::get_dof_map(), libMesh::System::get_mesh(), is_constrained_dof(), libMesh::NumericVector< T >::last_local_index(), libMesh::libmesh_assert(), libMesh::DenseMatrixBase< T >::m(), libMesh::make_range(), mesh, libMesh::DenseMatrixBase< T >::n(), libMesh::Real, and libMesh::System::solution.
|
staticprivate |
Definition at line 1634 of file dof_map.C.
References libMesh::Elem::active(), libMesh::Elem::active_family_tree(), libMesh::as_range(), and libMesh::libmesh_assert().
Referenced by add_neighbors_to_send_list(), libMesh::SparsityPattern::Build::operator()(), and scatter_constraints().
dof_id_type libMesh::DofMap::n_constrained_dofs | ( | ) | const |
Definition at line 1713 of file dof_map_constraints.C.
References libMesh::ParallelObject::comm(), n_local_constrained_dofs(), and TIMPI::Communicator::sum().
Referenced by libMesh::CondensedEigenSystem::initialize_condensed_dofs(), ConstraintOperatorTest::test1DCoarseningNewNodes(), ConstraintOperatorTest::test1DCoarseningOperator(), and MeshInputTest::testDynaReadPatch().
|
inline |
Definition at line 996 of file dof_map.h.
References _node_constraints.
|
inline |
Definition at line 673 of file dof_map.h.
References _n_dfs.
Referenced by _dof_indices(), add_constraint_row(), add_neighbors_to_send_list(), distribute_dofs(), libMesh::PetscDMWrapper::init_petscdm(), libMesh::StaticCondensation::m(), libMesh::UnsteadySolver::old_nonlinear_solution(), libMesh::SecondOrderUnsteadySolver::old_solution_accel(), libMesh::SecondOrderUnsteadySolver::old_solution_rate(), prepare_send_list(), process_mesh_constraint_rows(), libMesh::System::solve_for_unconstrained_dofs(), SystemsTest::test100KVariables(), and DofMapTest::testDofOwner().
|
inline |
vn
. Definition at line 679 of file dof_map.h.
References libMesh::ParallelObject::comm(), n_local_dofs(), and TIMPI::Communicator::sum().
|
inline |
proc
. Definition at line 712 of file dof_map.h.
References _end_df, and _first_df.
Referenced by n_local_dofs(), and SystemsTest::testProjectMatrix3D().
|
inline |
vn
. Definition at line 722 of file dof_map.h.
References TIMPI::Communicator::allgather(), libMesh::ParallelObject::comm(), n_local_dofs(), and libMesh::ParallelObject::n_processors().
Referenced by SystemsTest::test100KVariables().
dof_id_type libMesh::DofMap::n_local_constrained_dofs | ( | ) | const |
Definition at line 1723 of file dof_map_constraints.C.
References _dof_constraints, distance(), end_dof(), and first_dof().
Referenced by libMesh::CondensedEigenSystem::copy_sub_to_super(), libMesh::CondensedEigenSystem::copy_super_to_sub(), and n_constrained_dofs().
|
inline |
Definition at line 694 of file dof_map.h.
References n_dofs_on_processor(), and libMesh::ParallelObject::processor_id().
Referenced by libMesh::PetscDMWrapper::build_sf(), build_sparsity(), libMesh::PetscDMWrapper::init_petscdm(), libMesh::SparsityPattern::Build::join(), n_dofs(), n_dofs_per_processor(), libMesh::SparsityPattern::Build::operator()(), libMesh::SparsityPattern::Build::parallel_sync(), process_mesh_constraint_rows(), libMesh::PetscDMWrapper::set_point_range_in_section(), libMesh::System::solve_for_unconstrained_dofs(), SystemsTest::testProjectMatrix1D(), and SystemsTest::testProjectMatrix2D().
|
inline |
vn
. This is an O(N) operation on serialized or O(N/Nproc) operation on distributed meshes. Definition at line 702 of file dof_map.h.
References _mesh, and local_variable_indices().
|
inlinestaticinherited |
Prints the number of outstanding (created, but not yet destroyed) objects.
Definition at line 85 of file reference_counter.h.
References libMesh::ReferenceCounter::_n_objects.
Referenced by libMesh::LibMeshInit::~LibMeshInit().
|
inline |
Definition at line 1630 of file dof_map.h.
References _n_old_dfs.
Referenced by libMesh::BuildProjectionList::operator()(), and SCALAR_dof_indices().
|
inlineinherited |
Definition at line 103 of file parallel_object.h.
References libMesh::ParallelObject::_communicator, libMesh::libmesh_assert(), and TIMPI::Communicator::size().
Referenced by libMesh::Partitioner::_find_global_index_by_pid_map(), libMesh::BoundaryInfo::_find_id_maps(), add_constraints_to_send_list(), libMesh::PetscDMWrapper::add_dofs_to_section(), libMesh::DistributedMesh::add_elem(), add_neighbors_to_send_list(), libMesh::DistributedMesh::add_node(), libMesh::System::add_vector(), libMesh::LaplaceMeshSmoother::allgather_graph(), allgather_recursive_constraints(), libMesh::FEMSystem::assembly(), libMesh::Nemesis_IO::assert_symmetric_cmaps(), libMesh::Partitioner::assign_partitioning(), libMesh::AztecLinearSolver< T >::AztecLinearSolver(), libMesh::Partitioner::build_graph(), libMesh::EquationSystems::build_parallel_elemental_solution_vector(), libMesh::DistributedMesh::clear(), libMesh::DistributedMesh::clear_elems(), libMesh::Nemesis_IO_Helper::compute_border_node_ids(), libMesh::Nemesis_IO_Helper::construct_nemesis_filename(), libMesh::UnstructuredMesh::copy_nodes_and_elements(), libMesh::ExodusII_IO::copy_scalar_solution(), libMesh::Nemesis_IO::copy_scalar_solution(), libMesh::UnstructuredMesh::create_pid_mesh(), libMesh::MeshTools::create_processor_bounding_box(), distribute_dofs(), distribute_scalar_dofs(), libMesh::DistributedMesh::DistributedMesh(), libMesh::EnsightIO::EnsightIO(), libMesh::RBEIMEvaluation::gather_bfs(), libMesh::MeshBase::get_info(), libMesh::SystemSubsetBySubdomain::init(), libMesh::PetscDMWrapper::init_petscdm(), libMesh::Nemesis_IO_Helper::initialize(), libMesh::ExodusII_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(), n_dofs_per_processor(), libMesh::MeshBase::n_elem_on_proc(), libMesh::MeshBase::n_nodes_on_proc(), libMesh::RBEIMEvaluation::node_gather_bfs(), libMesh::Partitioner::partition(), libMesh::MeshBase::partition(), libMesh::Partitioner::partition_unpartitioned_elements(), libMesh::System::point_gradient(), libMesh::System::point_hessian(), libMesh::System::point_value(), prepare_send_list(), libMesh::MeshBase::print_constraint_rows(), print_dof_constraints(), 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(), libMesh::Partitioner::repartition(), OverlappingFunctorTest::run_partitioner_test(), scatter_constraints(), libMesh::DistributedMesh::set_next_unique_id(), set_nonlocal_dof_objects(), libMesh::PetscDMWrapper::set_point_range_in_section(), WriteVecAndScalar::setupTests(), libMesh::RBEIMEvaluation::side_gather_bfs(), DistributedMeshTest::testRemoteElemError(), CheckpointIOTest::testSplitter(), libMesh::MeshRefinement::uniformly_coarsen(), libMesh::DistributedMesh::update_parallel_id_counts(), libMesh::GMVIO::write_binary(), libMesh::GMVIO::write_discontinuous_gmv(), libMesh::ExodusII_IO_Helper::write_nodal_coordinates(), libMesh::VTKIO::write_nodal_data(), libMesh::ExodusII_IO::write_nodal_data(), 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 689 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 627 of file dof_map.h.
References _variable_groups.
Referenced by distribute_scalar_dofs(), dof_indices(), has_blocked_representation(), libMesh::StaticCondensation::init(), old_dof_indices(), and set_nonlocal_dof_objects().
|
inline |
Definition at line 635 of file dof_map.h.
References _variables.
Referenced by add_neighbors_to_send_list(), block_size(), libMesh::FEGenericBase< FEOutputType< T >::type >::coarsened_dof_values(), create_dof_constraints(), distribute_dofs(), DMlibMeshSetSystem_libMesh(), has_blocked_representation(), libMesh::SparsityPattern::Build::operator()(), process_mesh_constraint_rows(), use_coupled_neighbor_dofs(), and var_group_from_var_number().
|
inline |
Definition at line 1149 of file dof_map.h.
References _node_constraints.
|
inline |
Definition at line 1155 of file dof_map.h.
References _node_constraints.
|
private |
i
from the mesh
. Definition at line 334 of file dof_map.C.
References mesh.
Referenced by distribute_dofs().
void libMesh::DofMap::old_dof_indices | ( | const Elem & | elem, |
unsigned int | n, | ||
std::vector< dof_id_type > & | di, | ||
const unsigned int | vn | ||
) | const |
Appends to the vector di
the old global degree of freedom indices for elem.node_ref(n)
, for one variable vn
.
On hanging nodes with both vertex and non-vertex DoFs, only those indices which are directly supported on elem
are included.
Definition at line 2438 of file dof_map.C.
References _node_dof_indices(), libMesh::DofObject::get_old_dof_object_ref(), and libMesh::Elem::node_ref().
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::coarsened_dof_values(), libMesh::BuildProjectionList::operator()(), and libMesh::FEMContext::pre_fe_reinit().
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 2653 of file dof_map.C.
References _dont_p_refine, libMesh::Variable::active_on_subdomain(), libMesh::DofObject::dof_number(), libMesh::FEInterface::extra_hanging_dofs(), libMesh::FEType::family, libMesh::MeshTools::Subdivision::find_one_ring(), libMesh::Elem::get_nodes(), libMesh::DofObject::get_old_dof_object(), libMesh::DofObject::get_old_dof_object_ref(), libMesh::DofObject::has_dofs(), libMesh::Elem::infinite(), int, libMesh::DofObject::invalid_id, libMesh::invalid_uint, libMesh::Elem::JUST_COARSENED, libMesh::Elem::JUST_REFINED, libMesh::libmesh_assert(), 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::FEType::order, libMesh::Elem::p_level(), libMesh::Elem::p_refinement_flag(), libMesh::SCALAR, SCALAR_dof_indices(), libMesh::Elem::subdomain_id(), sys_number(), libMesh::TRI3SUBDIVISION, libMesh::Variable::type(), libMesh::Elem::type(), and variable_group().
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 1884 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::libmesh_assert(), n_dofs(), libMesh::ParallelObject::n_processors(), and libMesh::out.
Referenced by libMesh::EquationSystems::allgather(), libMesh::PetscDMWrapper::init_petscdm(), libMesh::System::reinit_constraints(), reinit_send_list(), and libMesh::EquationSystems::reinit_solutions().
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 2252 of file dof_map_constraints.C.
References libMesh::ParallelObject::comm(), get_local_constraints(), libMesh::ParallelObject::n_processors(), libMesh::ParallelObject::processor_id(), TIMPI::Communicator::receive(), and TIMPI::Communicator::send().
Referenced by main(), and libMesh::System::reinit_constraints().
|
staticinherited |
Prints the reference information, by default to libMesh::out
.
Definition at line 81 of file reference_counter.C.
References libMesh::ReferenceCounter::_enable_print_counter, and libMesh::ReferenceCounter::get_info().
Referenced by libMesh::LibMeshInit::~LibMeshInit().
void libMesh::DofMap::print_info | ( | std::ostream & | os = libMesh::out | ) | const |
Prints summary info about the sparsity bandwidth and constraints.
Definition at line 2938 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 4337 of file dof_map_constraints.C.
References _adjoint_constraint_values, _dof_constraints, _error_on_constraint_loop, _primal_constraint_values, add_constraints_to_send_list(), allgather_recursive_constraints(), check_for_constraint_loops(), libMesh::libmesh_assert(), libMesh::Real, and scatter_constraints().
Referenced by libMesh::System::reinit_constraints(), and reinit_send_list().
|
private |
Adds any spline constraints from the Mesh to our DoF constraints.
If any Dirichlet constraints exist on spline-constrained nodes, l2-projects those constraints onto the spline basis.
Definition at line 1897 of file dof_map_constraints.C.
References _adjoint_constraint_values, _dof_constraints, _periodic_boundaries, _primal_constraint_values, add_constraint_row(), libMesh::LinearSolver< T >::build(), libMesh::SparseMatrix< T >::build(), libMesh::NumericVector< T >::build(), build_sparsity(), libMesh::ParallelObject::comm(), dof_indices(), libMesh::DofObject::dof_number(), libMesh::MeshBase::elem_ptr(), end_dof(), libMesh::FEType::family, first_dof(), libMesh::MeshBase::get_constraint_rows(), heterogeneously_constrain_element_matrix_and_vector(), libMesh::DofObject::id(), libMesh::if(), is_constrained_dof(), libMesh::Parallel::Utils::is_sorted(), libMesh::LAGRANGE, libMesh::libmesh_assert(), local_index(), TIMPI::Communicator::max(), mesh, TIMPI::Communicator::min(), n_dofs(), n_local_dofs(), n_variables(), libMesh::MeshBase::node_ptr(), libMesh::Elem::node_ref(), libMesh::PARALLEL, libMesh::ParallelObject::processor_id(), libMesh::DofObject::processor_id(), libMesh::RATIONAL_BERNSTEIN, sys_number(), libMesh::TOLERANCE, and variable_type().
Referenced by create_dof_constraints().
|
inlineinherited |
Definition at line 114 of file parallel_object.h.
References libMesh::ParallelObject::_communicator, and TIMPI::Communicator::rank().
Referenced by libMesh::BoundaryInfo::_find_id_maps(), libMesh::PetscDMWrapper::add_dofs_to_section(), libMesh::DistributedMesh::add_elem(), libMesh::BoundaryInfo::add_elements(), add_neighbors_to_send_list(), libMesh::DistributedMesh::add_node(), libMesh::MeshTools::Modification::all_tri(), allgather_recursive_constraints(), libMesh::FEMSystem::assembly(), libMesh::Nemesis_IO::assert_symmetric_cmaps(), libMesh::Partitioner::assign_partitioning(), libMesh::Nemesis_IO_Helper::build_element_and_node_maps(), libMesh::Partitioner::build_graph(), libMesh::InfElemBuilder::build_inf_elem(), libMesh::BoundaryInfo::build_node_list_from_side_list(), libMesh::EquationSystems::build_parallel_elemental_solution_vector(), libMesh::EquationSystems::build_parallel_solution_vector(), libMesh::MeshFunction::check_found_elem(), libMesh::DistributedMesh::clear(), libMesh::DistributedMesh::clear_elems(), 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::RBConstruction::compute_max_error_bound(), 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::ExodusII_IO::copy_elemental_solution(), libMesh::ExodusII_IO::copy_nodal_solution(), libMesh::ExodusII_IO::copy_scalar_solution(), libMesh::Nemesis_IO::copy_scalar_solution(), libMesh::MeshTools::correct_node_proc_ids(), libMesh::ExodusII_IO_Helper::create(), libMesh::DistributedMesh::delete_elem(), libMesh::MeshCommunication::delete_remote_elements(), distribute_dofs(), distribute_scalar_dofs(), libMesh::DistributedMesh::DistributedMesh(), end_dof(), end_old_dof(), libMesh::EnsightIO::EnsightIO(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::SubFunctor::find_dofs_to_send(), libMesh::UnstructuredMesh::find_neighbors(), first_dof(), first_old_dof(), libMesh::RBEIMEvaluation::gather_bfs(), 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::RBEIMEvaluation::get_interior_basis_functions_as_vecs(), libMesh::Nemesis_IO_Helper::get_loadbal_param(), get_local_constraints(), libMesh::MeshBase::get_local_constraints(), 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::LaplaceMeshSmoother::init(), libMesh::StaticCondensation::init(), libMesh::SystemSubsetBySubdomain::init(), HeatSystem::init_data(), 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(), libMesh::TransientRBEvaluation::legacy_write_offline_data_to_files(), libMesh::RBSCMEvaluation::legacy_write_offline_data_to_files(), libMesh::RBEvaluation::legacy_write_offline_data_to_files(), 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(), main(), libMesh::MeshRefinement::make_coarsening_compatible(), AugmentSparsityOnInterface::mesh_reinit(), libMesh::TriangulatorInterface::MeshedHole::MeshedHole(), libMesh::MeshBase::n_active_local_elem(), libMesh::BoundaryInfo::n_boundary_conds(), libMesh::MeshTools::n_connected_components(), libMesh::MeshBase::n_constraint_rows(), libMesh::BoundaryInfo::n_edge_conds(), n_local_dofs(), libMesh::MeshBase::n_local_elem(), libMesh::MeshBase::n_local_nodes(), libMesh::BoundaryInfo::n_nodeset_conds(), libMesh::BoundaryInfo::n_shellface_conds(), libMesh::RBEIMEvaluation::node_gather_bfs(), libMesh::DistributedMesh::own_node(), libMesh::BoundaryInfo::parallel_sync_node_ids(), libMesh::BoundaryInfo::parallel_sync_side_ids(), libMesh::System::point_gradient(), libMesh::System::point_hessian(), libMesh::System::point_value(), libMesh::MeshBase::print_constraint_rows(), print_dof_constraints(), process_mesh_constraint_rows(), 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::EquationSystems::read(), libMesh::ExodusII_IO_Helper::read_elem_num_map(), libMesh::ExodusII_IO_Helper::read_global_values(), libMesh::ExodusII_IO::read_header(), libMesh::CheckpointIO::read_header(), libMesh::XdrIO::read_header(), libMesh::System::read_header(), libMesh::System::read_legacy_data(), libMesh::DynaIO::read_mesh(), libMesh::ExodusII_IO_Helper::read_node_num_map(), libMesh::System::read_parallel_data(), libMesh::TransientRBConstruction::read_riesz_representors_from_files(), libMesh::RBConstruction::read_riesz_representors_from_files(), 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::Nemesis_IO_Helper::read_var_names_impl(), libMesh::SimplexRefiner::refine_via_edges(), libMesh::DistributedMesh::renumber_dof_objects(), libMesh::DistributedMesh::renumber_nodes_and_elements(), scatter_constraints(), libMesh::CheckpointIO::select_split_config(), libMesh::DistributedMesh::set_next_unique_id(), set_nonlocal_dof_objects(), libMesh::PetscDMWrapper::set_point_range_in_section(), libMesh::RBEIMEvaluation::side_gather_bfs(), ExodusTest< elem_type >::test_read_gold(), ExodusTest< elem_type >::test_write(), MeshInputTest::testAbaqusRead(), MeshInputTest::testBadGmsh(), MeshInputTest::testCopyElementSolutionImpl(), MeshInputTest::testCopyElementVectorImpl(), MeshInputTest::testCopyNodalSolutionImpl(), DefaultCouplingTest::testCoupling(), PointNeighborCouplingTest::testCoupling(), MeshInputTest::testDynaFileMappings(), MeshInputTest::testDynaNoSplines(), MeshInputTest::testDynaReadElem(), MeshInputTest::testDynaReadPatch(), MeshInputTest::testExodusFileMappings(), MeshInputTest::testExodusIGASidesets(), MeshInputTest::testExodusWriteElementDataFromDiscontinuousNodalData(), MeshInputTest::testGmshBCIDOverlap(), MeshInputTest::testGoodGmsh(), MeshInputTest::testGoodSTL(), MeshInputTest::testGoodSTLBinary(), MeshInputTest::testLowOrderEdgeBlocks(), SystemsTest::testProjectMatrix3D(), BoundaryInfoTest::testShellFaceConstraints(), MeshInputTest::testSingleElementImpl(), WriteVecAndScalar::testSolution(), CheckpointIOTest::testSplitter(), MeshInputTest::testTetgenIO(), libMesh::MeshTools::total_weight(), libMesh::NetGenMeshInterface::triangulate(), libMesh::MeshRefinement::uniformly_coarsen(), libMesh::DistributedMesh::update_parallel_id_counts(), libMesh::DTKAdapter::update_variable_values(), libMesh::MeshTools::volume(), libMesh::STLIO::write(), 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_element_values_element_major(), libMesh::ExodusII_IO_Helper::write_elements(), libMesh::ExodusII_IO_Helper::write_elemset_data(), libMesh::ExodusII_IO_Helper::write_elemsets(), 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::VTKIO::write_nodal_data(), libMesh::ExodusII_IO::write_nodal_data(), libMesh::ExodusII_IO::write_nodal_data_common(), libMesh::ExodusII_IO::write_nodal_data_discontinuous(), libMesh::ExodusII_IO_Helper::write_nodal_values(), libMesh::ExodusII_IO_Helper::write_nodeset_data(), libMesh::Nemesis_IO_Helper::write_nodesets(), libMesh::ExodusII_IO_Helper::write_nodesets(), libMesh::RBEIMEvaluation::write_out_interior_basis_functions(), libMesh::RBEIMEvaluation::write_out_node_basis_functions(), libMesh::RBEIMEvaluation::write_out_side_basis_functions(), write_output_solvedata(), libMesh::System::write_parallel_data(), libMesh::RBConstruction::write_riesz_representors_to_files(), 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::ExodusII_IO_Helper::write_sideset_data(), 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, |
const std::map< const Node *, std::set< subdomain_id_type >> & | constraining_subdomains | ||
) |
Reinitialize the underlying data structures conformal to the current mesh.
Definition at line 500 of file dof_map.C.
References libMesh::Variable::active_on_subdomain(), libMesh::Utility::enum_to_string(), libMesh::err, libMesh::FEInterface::extra_hanging_dofs(), libMesh::FEType::family, libMesh::OrderWrapper::get_order(), int, libMesh::MeshBase::is_prepared(), libMesh::Elem::JUST_REFINED, libMesh::libmesh_assert(), libMesh::FEInterface::max_order(), mesh, libMesh::DofObject::n_comp_group(), libMesh::FEInterface::n_dofs_at_node(), libMesh::FEInterface::n_dofs_per_elem(), libMesh::VariableGroup::n_variables(), libMesh::FEType::order, libMesh::SCALAR, libMesh::DofObject::set_n_comp_group(), libMesh::DofObject::set_vg_dof_base(), libMesh::Variable::type(), and libMesh::DofObject::vg_dof_base().
Referenced by distribute_dofs().
void libMesh::DofMap::reinit_send_list | ( | MeshBase & | mesh | ) |
Clears the _send_list
vector and then rebuilds it.
This may be needed in special situations, for example when an algebraic coupling functor cannot be added to the DofMap
until after it is completely setup. Then this method can be used to rebuild the send_list once the algebraic coupling functor is added. Note that while this will recommunicate constraints with the updated send_list, this does assume no new constraints have been added since the previous reinit_constraints call.
Definition at line 1926 of file dof_map.C.
References add_neighbors_to_send_list(), clear_send_list(), prepare_send_list(), and process_constraints().
Referenced by OverlappingAlgebraicGhostingTest::run_ghosting_test(), and OverlappingCouplingGhostingTest::run_sparsity_pattern_test().
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 5471 of file dof_map_constraints.C.
References _adjoint_dirichlet_boundaries, libMesh::DirichletBoundary::b, libMesh::libmesh_assert(), 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 2090 of file dof_map.C.
References _algebraic_ghosting_functors, _mesh, _shared_functors, and libMesh::MeshBase::remove_ghosting_functor().
Referenced by remove_default_ghosting(), and PointNeighborCouplingTest::testCoupling().
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 2065 of file dof_map.C.
References _coupling_functors, _mesh, _shared_functors, and libMesh::MeshBase::remove_ghosting_functor().
Referenced by remove_default_ghosting(), and PointNeighborCouplingTest::testCoupling().
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 2036 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 5457 of file dof_map_constraints.C.
References _dirichlet_boundaries, libMesh::DirichletBoundary::b, libMesh::libmesh_assert(), 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 2567 of file dof_map.C.
References _first_old_scalar_df, _first_scalar_df, libMesh::OrderWrapper::get_order(), libMesh::DofObject::invalid_id, libMesh::libmesh_assert(), n_old_dofs(), n_SCALAR_dofs(), libMesh::FEType::order, libMesh::SCALAR, libMesh::Variable::type(), and variable().
Referenced by libMesh::ExodusII_IO::copy_scalar_solution(), libMesh::Nemesis_IO::copy_scalar_solution(), dof_indices(), libMesh::StaticCondensation::init(), 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::Nemesis_IO_Helper::write_nodal_solution(), 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 4603 of file dof_map_constraints.C.
References _dof_constraints, _end_df, _node_constraints, _primal_constraint_values, libMesh::as_range(), libMesh::ParallelObject::comm(), coupling_functors_begin(), coupling_functors_end(), dof_indices(), gather_constraints(), TIMPI::Communicator::get_unique_tag(), libMesh::DofObject::id(), libMesh::index_range(), is_constrained_dof(), is_constrained_node(), libMesh::MeshBase::is_serial(), TIMPI::Communicator::max(), merge_ghost_functor_outputs(), mesh, libMesh::ParallelObject::n_processors(), libMesh::MeshBase::node_ptr(), libMesh::ParallelObject::processor_id(), and libMesh::DofObject::processor_id().
Referenced by process_constraints().
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 2603 of file dof_map.C.
References _send_list, and local_index().
Referenced by all_semilocal_indices().
|
inline |
Sets the current policy for constructing sparsity patterns: if use_constraints
is true (for robustness), we explicitly account for sparsity entries created by constraint matrix pre- and post- application.
If use_constraints
is false (for speed), we calculate only the sparsity pattern of an unconstrained matrix. This is false by default, because in nearly all applications our constraints do not increase the number of non-zeros required in a sparse matrix.
Definition at line 2467 of file dof_map.h.
References _constrained_sparsity_construction, and libMesh::libmesh_ignore().
void libMesh::DofMap::set_error_on_constraint_loop | ( | bool | error_on_constraint_loop | ) |
Definition at line 238 of file dof_map.C.
References _error_on_constraint_loop.
Referenced by set_error_on_cyclic_constraint(), and DofMapTest::testConstraintLoopDetection().
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 constraint loops.
If a constraint loop is present then the system constraints are not valid, so if error_on_constraint_loop
is true we will throw an error in this case.
Definition at line 231 of file dof_map.C.
References set_error_on_constraint_loop().
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 1940 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 349 of file dof_map.C.
References libMesh::ParallelObject::comm(), libMesh::DofObject::dof_number(), libMesh::DofObject::id(), libMesh::index_range(), libMesh::DofObject::invalid_id, libMesh::DofObject::invalid_processor_id, libMesh::libmesh_assert(), libMesh::make_range(), 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::DofObject::set_n_comp_group(), libMesh::DofObject::set_vg_dof_base(), sys_number(), and libMesh::DofObject::vg_dof_base().
Referenced by distribute_dofs().
void libMesh::DofMap::set_verify_dirichlet_bc_consistency | ( | bool | val | ) |
Set the _verify_dirichlet_bc_consistency flag.
Definition at line 1946 of file dof_map.C.
References _verify_dirichlet_bc_consistency.
|
inline |
Describe whether the given variable group should be p-refined.
If this API is not called with false
, the default is to p-refine
Definition at line 2496 of file dof_map.h.
References _dont_p_refine, and libMesh::libmesh_ignore().
Referenced by libMesh::EquationSystems::build_parallel_solution_vector(), and libMesh::FEMContext::init_internal_data().
|
inline |
Whether the given variable group should be p-refined.
Definition at line 2513 of file dof_map.h.
References _dont_p_refine, and libMesh::libmesh_ignore().
|
delete |
|
delete |
|
delete |
|
delete |
|
inline |
Whether the given variable should be p-refined.
Definition at line 2531 of file dof_map.h.
References _dont_p_refine, libMesh::libmesh_ignore(), and var_group_from_var_number().
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::compute_proj_constraints(), and libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::ProjectSides::operator()().
|
inline |
Definition at line 1116 of file dof_map.h.
References _dof_constraints, _stashed_dof_constraints, and libMesh::libmesh_assert().
|
inline |
Similar to the stash/unstash_dof_constraints() API, but swaps _dof_constraints and _stashed_dof_constraints without asserting that the source or destination is empty first.
Definition at line 1140 of file dof_map.h.
References _dof_constraints, and _stashed_dof_constraints.
|
inline |
Definition at line 2266 of file dof_map.h.
References _sys_number.
Referenced by _dof_indices(), _node_dof_indices(), allgather_recursive_constraints(), assert_no_nodes_missed(), libMesh::FEGenericBase< FEOutputType< T >::type >::compute_periodic_constraints(), constrain_p_dofs(), distribute_dofs(), dof_indices(), invalidate_dofs(), local_variable_indices(), old_dof_indices(), process_mesh_constraint_rows(), and set_nonlocal_dof_objects().
|
inline |
Definition at line 1122 of file dof_map.h.
References _dof_constraints, _stashed_dof_constraints, and libMesh::libmesh_assert().
void libMesh::DofMap::update_sparsity_pattern | ( | SparseMatrix< Number > & | matrix | ) | const |
Additional matrices may be be temporarily initialized by this DofMap
.
They are initialized to the same sparsity structure as the major matrix.
Definition at line 300 of file dof_map.C.
References _sp, libMesh::SparseMatrix< T >::attach_dof_map(), libMesh::SparseMatrix< T >::attach_sparsity_pattern(), computed_sparsity_already(), libMesh::libmesh_assert(), libMesh::SparseMatrix< T >::need_full_sparsity_pattern(), need_full_sparsity_pattern, and libMesh::SparseMatrix< T >::update_sparsity_pattern().
Referenced by attach_matrix(), and libMesh::System::solve_for_unconstrained_dofs().
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 1952 of file dof_map.C.
References _implicit_neighbor_dofs, _implicit_neighbor_dofs_initialized, libMesh::command_line_next(), libMesh::DISCONTINUOUS, libMesh::FEInterface::get_continuity(), libMesh::make_range(), n_variables(), libMesh::on_command_line(), and variable_type().
Referenced by build_sparsity(), and clear().
Definition at line 2524 of file dof_map.h.
References _var_to_vg, libMesh::libmesh_assert(), and n_variables().
Referenced by libMesh::EquationSystems::build_parallel_solution_vector(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::ProjectInteriors::operator()(), should_p_refine_var(), and EquationSystemsTest::testSelectivePRefine().
c
. Definition at line 2284 of file dof_map.h.
References _variables.
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::compute_proj_constraints(), distribute_dofs(), DMlibMeshSetSystem_libMesh(), local_variable_indices(), libMesh::BoundaryProjectSolution::operator()(), and SCALAR_dof_indices().
|
inline |
VariableGroup
description object for group g
. Definition at line 2274 of file dof_map.h.
References _variable_groups.
Referenced by _dof_indices(), _node_dof_indices(), distribute_scalar_dofs(), dof_indices(), libMesh::System::get_info(), libMesh::StaticCondensation::init(), and old_dof_indices().
VariableGroup
vg
. Definition at line 2304 of file dof_map.h.
References _variable_groups.
VariableGroup
vg
. Definition at line 2324 of file dof_map.h.
References _variable_groups.
c
. Definition at line 2294 of file dof_map.h.
References _variables.
c
. Definition at line 2314 of file dof_map.h.
References _variables.
Referenced by libMesh::ExactSolution::_compute_error(), libMesh::UniformRefinementEstimator::_estimate_error(), libMesh::MeshFunction::_gradient_on_elem(), LinearElasticity::assemble(), AssembleOptimization::assemble_A_and_F(), assemble_elasticity(), assemble_mass(), assemble_matrices(), assemble_poisson(), assemble_SchroedingerEquation(), Biharmonic::JR::bounds(), libMesh::System::calculate_norm(), libMesh::FEGenericBase< FEOutputType< T >::type >::coarsened_dof_values(), libMesh::FEInterface::compute_constraints(), compute_enriched_soln(), compute_jacobian(), libMesh::FEGenericBase< FEOutputType< T >::type >::compute_periodic_constraints(), libMesh::FEInterface::compute_periodic_constraints(), compute_residual(), compute_stresses(), LinearElasticityWithContact::compute_stresses(), LinearElasticity::compute_stresses(), LargeDeformationElasticity::compute_stresses(), constrain_p_dofs(), libMesh::MeshFunction::discontinuous_value(), libMesh::ExactErrorEstimator::estimate_error(), libMesh::MeshFunction::hessian(), libMesh::InfFE< Dim, T_radial, T_map >::inf_compute_constraints(), LargeDeformationElasticity::jacobian(), local_variable_indices(), LinearElasticityWithContact::move_mesh(), libMesh::WeightedPatchRecoveryErrorEstimator::EstimateError::operator()(), libMesh::PatchRecoveryErrorEstimator::EstimateError::operator()(), libMesh::MeshFunction::operator()(), libMesh::System::point_gradient(), libMesh::System::point_hessian(), libMesh::System::point_value(), process_mesh_constraint_rows(), LargeDeformationElasticity::residual(), Biharmonic::JR::residual_and_jacobian(), LinearElasticityWithContact::residual_and_jacobian(), libMesh::HPCoarsenTest::select_refinement(), and use_coupled_neighbor_dofs().
|
friend |
|
private |
Definition at line 2204 of file dof_map.h.
Referenced by add_adjoint_constraint_row(), allgather_recursive_constraints(), build_constraint_matrix_and_vector(), clear(), create_dof_constraints(), gather_constraints(), get_local_constraints(), has_heterogeneous_adjoint_constraint(), has_heterogeneous_adjoint_constraints(), process_constraints(), and process_mesh_constraint_rows().
|
private |
Data structure containing Dirichlet functions.
The ith entry is the constraint matrix row for boundaryid i.
Definition at line 2234 of file dof_map.h.
Referenced by add_adjoint_dirichlet_boundary(), create_dof_constraints(), get_adjoint_dirichlet_boundaries(), get_local_constraints(), has_adjoint_dirichlet_boundaries(), and remove_adjoint_dirichlet_boundary().
|
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 2121 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 2085 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 2068 of file dof_map.h.
Referenced by attach_extra_sparsity_object(), and build_sparsity().
|
protectedinherited |
Definition at line 120 of file parallel_object.h.
Referenced by libMesh::EquationSystems::build_parallel_elemental_solution_vector(), libMesh::EquationSystems::build_parallel_solution_vector(), libMesh::StaticCondensation::close(), libMesh::ParallelObject::comm(), libMesh::CondensedEigenSystem::initialize_condensed_matrices(), libMesh::ParallelObject::n_processors(), libMesh::ParallelObject::operator=(), libMesh::ParallelObject::processor_id(), and libMesh::BoundaryInfo::regenerate_id_sets().
|
private |
This flag indicates whether or not we explicitly take constraint equations into account when computing a sparsity pattern.
Definition at line 2004 of file dof_map.h.
Referenced by compute_sparsity(), constrained_sparsity_construction(), and set_constrained_sparsity_construction().
|
staticprotectedinherited |
Actually holds the data.
Definition at line 124 of file reference_counter.h.
Referenced by libMesh::ReferenceCounter::get_info().
|
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 2134 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 2103 of file dof_map.h.
Referenced by clear(), default_coupling(), DofMap(), 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 2111 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 2228 of file dof_map.h.
Referenced by add_dirichlet_boundary(), create_dof_constraints(), get_dirichlet_boundaries(), and remove_dirichlet_boundary().
|
private |
Data structure containing DOF constraints.
The ith entry is the constraint matrix row for DOF i.
Definition at line 2200 of file dof_map.h.
Referenced by add_constraint_row(), add_constraints_to_send_list(), allgather_recursive_constraints(), build_constraint_matrix(), build_constraint_matrix_and_vector(), check_for_constraint_loops(), clear(), constrain_p_dofs(), constraint_rows_begin(), constraint_rows_end(), create_dof_constraints(), find_connected_dofs(), gather_constraints(), get_dof_constraints(), get_info(), get_local_constraints(), is_constrained_dof(), max_constraint_error(), n_local_constrained_dofs(), process_constraints(), process_mesh_constraint_rows(), scatter_constraints(), stash_dof_constraints(), swap_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 1683 of file dof_map.h.
Referenced by libMesh::RBConstruction::add_scaled_matrix_and_vector(), build_sparsity(), clear(), and main().
|
private |
A container of variable groups that we should not p-refine.
Definition at line 2192 of file dof_map.h.
Referenced by _dof_indices(), _node_dof_indices(), old_dof_indices(), should_p_refine(), and should_p_refine_var().
|
staticprotectedinherited |
Flag to control whether reference count information is printed when print_info is called.
Definition at line 143 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 2051 of file dof_map.h.
Referenced by clear(), distribute_dofs(), dof_owner(), end_dof(), gather_constraints(), n_dofs_on_processor(), and scatter_constraints().
|
private |
Last old DOF index (plus 1) on processor p
.
Definition at line 2181 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 constraint loops, i.e.
cases where the constraint graph is cyclic.
Definition at line 1998 of file dof_map.h.
Referenced by process_constraints(), and set_error_on_constraint_loop().
|
private |
A pointer associated with the extra send list that can optionally be passed in.
Definition at line 2095 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 2090 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 2080 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 2073 of file dof_map.h.
Referenced by attach_extra_sparsity_function(), and build_sparsity().
|
private |
First DOF index on processor p
.
Definition at line 2046 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 2176 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 2187 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 2057 of file dof_map.h.
Referenced by clear(), distribute_dofs(), and SCALAR_dof_indices().
|
private |
Definition at line 2244 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 2243 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 2041 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 2034 of file dof_map.h.
Referenced by add_algebraic_ghosting_functor(), add_coupling_functor(), calculate_constraining_subdomains(), clear(), DofMap(), n_local_dofs(), remove_algebraic_ghosting_functor(), remove_coupling_functor(), and ~DofMap().
|
staticprotectedinherited |
Mutual exclusion object to enable thread-safe reference counting.
Definition at line 137 of file reference_counter.h.
|
private |
Total number of degrees of freedom.
Definition at line 2158 of file dof_map.h.
Referenced by clear(), distribute_dofs(), and n_dofs().
|
staticprotectedinherited |
The number of objects.
Print the reference count information when the number returns to 0.
Definition at line 132 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 2171 of file dof_map.h.
Referenced by clear(), distribute_dofs(), and n_old_dofs().
|
private |
The total number of SCALAR dofs associated to all SCALAR variables.
Definition at line 2164 of file dof_map.h.
Referenced by distribute_scalar_dofs(), and n_SCALAR_dofs().
|
private |
Data structure containing DofObject constraints.
Definition at line 2211 of file dof_map.h.
Referenced by allgather_recursive_constraints(), create_dof_constraints(), get_info(), get_local_constraints(), is_constrained_node(), n_constrained_nodes(), node_constraint_rows_begin(), node_constraint_rows_end(), and scatter_constraints().
|
private |
Data structure containing periodic boundaries.
The ith entry is the constraint matrix row for boundaryid i.
Definition at line 2220 of file dof_map.h.
Referenced by add_periodic_boundary(), create_dof_constraints(), DofMap(), get_periodic_boundaries(), is_periodic_boundary(), and process_mesh_constraint_rows().
|
private |
Definition at line 2202 of file dof_map.h.
Referenced by add_constraint_row(), allgather_recursive_constraints(), build_constraint_matrix_and_vector(), clear(), constrain_p_dofs(), create_dof_constraints(), gather_constraints(), get_info(), get_local_constraints(), get_primal_constraint_values(), max_constraint_error(), process_constraints(), process_mesh_constraint_rows(), and scatter_constraints().
|
private |
Static condensation class.
Definition at line 2259 of file dof_map.h.
Referenced by add_static_condensation(), get_static_condensation(), and has_static_condensation().
|
private |
A list containing all the global DOF indices that affect the solution on my processor.
Definition at line 2063 of file dof_map.h.
Referenced by add_constraints_to_send_list(), add_neighbors_to_send_list(), clear_send_list(), get_send_list(), prepare_send_list(), and semilocal_index().
|
private |
Hang on to references to any GhostingFunctor objects we were passed in shared_ptr form.
Definition at line 2140 of file dof_map.h.
Referenced by add_algebraic_ghosting_functor(), add_coupling_functor(), clear(), remove_algebraic_ghosting_functor(), and remove_coupling_functor().
|
private |
The sparsity pattern of the global matrix.
If need_full_sparsity_pattern is true, we save the entire sparse graph here. Otherwise we save just the n_nz and n_oz vectors.
Definition at line 2153 of file dof_map.h.
Referenced by clear_sparsity(), compute_sparsity(), computed_sparsity_already(), get_info(), get_n_nz(), get_n_oz(), get_sparsity_pattern(), and update_sparsity_pattern().
|
private |
Definition at line 2200 of file dof_map.h.
Referenced by clear(), stash_dof_constraints(), swap_dof_constraints(), and unstash_dof_constraints().
|
private |
The number of the system we manage DOFs for.
Definition at line 2029 of file dof_map.h.
Referenced by sys_number().
A map from variable number to variable group number.
Definition at line 2024 of file dof_map.h.
Referenced by add_variable_group(), clear(), and var_group_from_var_number().
|
private |
The variable group number for each variable.
Definition at line 2019 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 2014 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 2009 of file dof_map.h.
Referenced by add_variable_group(), clear(), n_variables(), variable(), variable_order(), and variable_type().
|
private |
Flag which determines whether we should do some additional checking of the consistency of the DirichletBoundary objects added by the user.
Defaults to true, but can be disabled in cases where you only want to add DirichletBoundary objects "locally" and can guarantee that no repartitioning will be done, since repartitioning could cause processors to own new boundary sides for which they no longer have the proper DirichletBoundary objects stored.
Definition at line 2256 of file dof_map.h.
Referenced by create_dof_constraints(), and set_verify_dirichlet_bc_consistency().
|
private |
Default false; set to true if any attached matrix requires a full sparsity pattern.
Definition at line 2146 of file dof_map.h.
Referenced by attach_matrix(), build_sparsity(), clear(), compute_sparsity(), full_sparsity_pattern_needed(), and update_sparsity_pattern().