libMesh
dof_map.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2019 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
3 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License, or (at your option) any later version.
8 
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
13 
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 
18 
19 
20 #ifndef LIBMESH_DOF_MAP_H
21 #define LIBMESH_DOF_MAP_H
22 
23 // Local Includes
24 #include "libmesh/libmesh_common.h"
25 #include "libmesh/reference_counted_object.h"
26 #include "libmesh/libmesh.h" // libMesh::invalid_uint
27 #include "libmesh/variable.h"
28 #include "libmesh/threads.h"
29 #include "libmesh/threads_allocators.h"
30 #include "libmesh/elem_range.h"
31 #include "libmesh/ghosting_functor.h"
32 #include "libmesh/sparsity_pattern.h"
33 #include "libmesh/parallel_object.h"
34 #include "libmesh/point.h"
35 
36 #ifdef LIBMESH_FORWARD_DECLARE_ENUMS
37 namespace libMesh
38 {
39 enum Order : int;
40 }
41 #else
42 #include "libmesh/enum_order.h"
43 #endif
44 
45 // C++ Includes
46 #include <algorithm>
47 #include <cstddef>
48 #include <iterator>
49 #include <map>
50 #include <string>
51 #include <vector>
52 #include <memory>
53 
54 namespace libMesh
55 {
56 
57 // Forward Declarations
58 class CouplingMatrix;
59 class DefaultCoupling;
60 class DirichletBoundary;
61 class DirichletBoundaries;
62 class DofMap;
63 class DofObject;
64 class Elem;
65 class FEType;
66 class MeshBase;
67 class PeriodicBoundaryBase;
68 class PeriodicBoundaries;
69 class System;
70 class NonlinearImplicitSystem;
71 template <typename T> class DenseVectorBase;
72 template <typename T> class DenseVector;
73 template <typename T> class DenseMatrix;
74 template <typename T> class SparseMatrix;
75 template <typename T> class NumericVector;
76 
77 
78 
79 // ------------------------------------------------------------
80 // Do we need constraints for anything?
81 
82 #if defined(LIBMESH_ENABLE_AMR) || \
83  defined(LIBMESH_ENABLE_PERIODIC) || \
84  defined(LIBMESH_ENABLE_DIRICHLET)
85 # define LIBMESH_ENABLE_CONSTRAINTS 1
86 #endif
87 
88 // ------------------------------------------------------------
89 // AMR constraint matrix types
90 
91 #ifdef LIBMESH_ENABLE_CONSTRAINTS
92 
95 typedef std::map<dof_id_type, Real,
96  std::less<dof_id_type>,
98 
105 class DofConstraints : public std::map<dof_id_type,
106  DofConstraintRow,
107  std::less<dof_id_type>,
108  Threads::scalable_allocator<std::pair<const dof_id_type, DofConstraintRow>>>
109 {
110 };
111 
118  public std::map<dof_id_type, Number,
119  std::less<dof_id_type>,
120  Threads::scalable_allocator<std::pair<const dof_id_type, Number>>>
121 {
122 };
123 
129  public std::map<unsigned int, DofConstraintValueMap,
130  std::less<unsigned int>,
131  Threads::scalable_allocator
132  <std::pair<const unsigned int, DofConstraintValueMap>>>
133 {
134 };
135 
136 #ifdef LIBMESH_ENABLE_NODE_CONSTRAINTS
137 
143 typedef std::map<const Node *, Real,
144  std::less<const Node *>,
146 
153 class NodeConstraints : public std::map<const Node *,
154  std::pair<NodeConstraintRow,Point>,
155  std::less<const Node *>,
156  Threads::scalable_allocator<std::pair<const Node * const, std::pair<NodeConstraintRow,Point>>>>
157 {
158 };
159 #endif // LIBMESH_ENABLE_NODE_CONSTRAINTS
160 
161 #endif // LIBMESH_ENABLE_CONSTRAINTS
162 
163 
164 
176 class DofMap : public ReferenceCountedObject<DofMap>,
177  public ParallelObject
178 {
179 public:
180 
186  explicit
187  DofMap(const unsigned int sys_number,
188  MeshBase & mesh);
189 
193  ~DofMap();
194 
200  {
201  public:
203 
207  virtual void augment_sparsity_pattern (SparsityPattern::Graph & sparsity,
208  std::vector<dof_id_type> & n_nz,
209  std::vector<dof_id_type> & n_oz) = 0;
210  };
211 
217  {
218  public:
219  virtual ~AugmentSendList () {}
220 
224  virtual void augment_send_list (std::vector<dof_id_type> & send_list) = 0;
225  };
226 
232  void attach_matrix (SparseMatrix<Number> & matrix);
233 
238  bool is_attached (SparseMatrix<Number> & matrix);
239 
245  void distribute_dofs (MeshBase &);
246 
252  void compute_sparsity (const MeshBase &);
253 
257  void clear_sparsity();
258 
273 
278  void add_default_ghosting();
279 
304  void add_coupling_functor(GhostingFunctor & coupling_functor,
305  bool to_mesh = true);
306 
314  void add_coupling_functor(std::shared_ptr<GhostingFunctor> coupling_functor,
315  bool to_mesh = true)
316  { _shared_functors[coupling_functor.get()] = coupling_functor;
317  this->add_coupling_functor(*coupling_functor, to_mesh); }
318 
324  void remove_coupling_functor(GhostingFunctor & coupling_functor);
325 
329  std::set<GhostingFunctor *>::const_iterator coupling_functors_begin() const
330  { return _coupling_functors.begin(); }
331 
335  std::set<GhostingFunctor *>::const_iterator coupling_functors_end() const
336  { return _coupling_functors.end(); }
337 
342 
366  void add_algebraic_ghosting_functor(GhostingFunctor & evaluable_functor,
367  bool to_mesh = true);
368 
376  void add_algebraic_ghosting_functor(std::shared_ptr<GhostingFunctor> evaluable_functor,
377  bool to_mesh = true)
378  { _shared_functors[evaluable_functor.get()] = evaluable_functor;
379  this->add_algebraic_ghosting_functor(*evaluable_functor, to_mesh); }
380 
386  void remove_algebraic_ghosting_functor(GhostingFunctor & evaluable_functor);
387 
391  std::set<GhostingFunctor *>::const_iterator algebraic_ghosting_functors_begin() const
392  { return _algebraic_ghosting_functors.begin(); }
393 
397  std::set<GhostingFunctor *>::const_iterator algebraic_ghosting_functors_end() const
398  { return _algebraic_ghosting_functors.end(); }
399 
404 
416  {
418  }
419 
431  std::vector<dof_id_type> & n_nz,
432  std::vector<dof_id_type> & n_oz,
433  void *),
434  void * context = nullptr)
436 
445  {
446  _augment_send_list = &asl;
447  }
448 
453  void attach_extra_send_list_function(void (*func)(std::vector<dof_id_type> &, void *),
454  void * context = nullptr)
456 
463  void prepare_send_list ();
464 
471  {
472  _send_list.clear();
473  }
474 
484  void reinit_send_list (MeshBase & mesh);
485 
486 
496  const std::vector<dof_id_type> & get_send_list() const { return _send_list; }
497 
505  const std::vector<dof_id_type> & get_n_nz() const
506  {
508  return *_n_nz;
509  }
510 
518  const std::vector<dof_id_type> & get_n_oz() const
519  {
521  return *_n_oz;
522  }
523 
524  // /**
525  // * Add an unknown of order \p order and finite element type
526  // * \p type to the system of equations.
527  // */
528  // void add_variable (const Variable & var);
529 
534  void add_variable_group (const VariableGroup & var_group);
535 
546  void set_error_on_cyclic_constraint(bool error_on_cyclic_constraint);
547  void set_error_on_constraint_loop(bool error_on_constraint_loop);
548 
552  const VariableGroup & variable_group (const unsigned int c) const;
553 
557  const Variable & variable (const unsigned int c) const;
558 
562  Order variable_order (const unsigned int c) const;
563 
567  Order variable_group_order (const unsigned int vg) const;
568 
572  const FEType & variable_type (const unsigned int c) const;
573 
577  const FEType & variable_group_type (const unsigned int vg) const;
578 
584  unsigned int n_variable_groups() const
585  { return cast_int<unsigned int>(_variable_groups.size()); }
586 
592  unsigned int n_variables() const
593  { return cast_int<unsigned int>(_variables.size()); }
594 
601  {
602  return ((this->n_variable_groups() == 1) && (this->n_variables() > 1));
603  }
604 
617  unsigned int block_size() const
618  {
619  return (this->has_blocked_representation() ? this->n_variables() : 1);
620  }
621 
625  dof_id_type n_dofs() const { return _n_dfs; }
626 
631 
636  { return this->n_dofs_on_processor (this->processor_id()); }
637 
641  dof_id_type n_dofs_on_processor(const processor_id_type proc) const
642  {
643  libmesh_assert_less (proc, _first_df.size());
644  return cast_int<dof_id_type>(_end_df[proc] - _first_df[proc]);
645  }
646 
651  { libmesh_assert_less (proc, _first_df.size()); return _first_df[proc]; }
652 
654  { return this->first_dof(this->processor_id()); }
655 
656 #ifdef LIBMESH_ENABLE_AMR
657 
660  dof_id_type first_old_dof(const processor_id_type proc) const
661  { libmesh_assert_less (proc, _first_old_df.size()); return _first_old_df[proc]; }
662 
664  { return this->first_old_dof(this->processor_id()); }
665 
666 #endif //LIBMESH_ENABLE_AMR
667 
674 #ifdef LIBMESH_ENABLE_DEPRECATED
675  dof_id_type last_dof(const processor_id_type proc) const
676  {
677  libmesh_deprecated();
678  libmesh_assert_less (proc, _end_df.size());
679  return cast_int<dof_id_type>(_end_df[proc] - 1);
680  }
681 
683  { return this->last_dof(this->processor_id()); }
684 #endif
685 
692  dof_id_type end_dof(const processor_id_type proc) const
693  { libmesh_assert_less (proc, _end_df.size()); return _end_df[proc]; }
694 
696  { return this->end_dof(this->processor_id()); }
697 
702  { std::vector<dof_id_type>::const_iterator ub =
703  std::upper_bound(_end_df.begin(), _end_df.end(), dof);
704  libmesh_assert (ub != _end_df.end());
705  return cast_int<processor_id_type>(ub - _end_df.begin());
706  }
707 
708 #ifdef LIBMESH_ENABLE_AMR
709 
716  { libmesh_assert_less (proc, _end_old_df.size()); return _end_old_df[proc]; }
717 
719  { return this->end_old_dof(this->processor_id()); }
720 
721 #endif //LIBMESH_ENABLE_AMR
722 
727  void dof_indices (const Elem * const elem,
728  std::vector<dof_id_type> & di) const;
729 
735  void dof_indices (const Elem * const elem,
736  std::vector<dof_id_type> & di,
737  const unsigned int vn,
738  int p_level = -12345) const;
739 
744  void dof_indices (const Node * const node,
745  std::vector<dof_id_type> & di) const;
746 
751  void dof_indices (const Node * const node,
752  std::vector<dof_id_type> & di,
753  const unsigned int vn) const;
754 
761  void dof_indices (const Elem & elem,
762  unsigned int n,
763  std::vector<dof_id_type> & di,
764  const unsigned int vn) const;
765 
766 #ifdef LIBMESH_ENABLE_AMR
767 
774  void old_dof_indices (const Elem & elem,
775  unsigned int n,
776  std::vector<dof_id_type> & di,
777  const unsigned int vn) const;
778 
779 #endif // LIBMESH_ENABLE_AMR
780 
789  void SCALAR_dof_indices (std::vector<dof_id_type> & di,
790  const unsigned int vn,
791  const bool old_dofs=false) const;
792 
800  bool semilocal_index (dof_id_type dof_index) const;
801 
809  bool all_semilocal_indices (const std::vector<dof_id_type> & dof_indices) const;
810 
815  bool local_index (dof_id_type dof_index) const
816  { return (dof_index >= this->first_dof()) && (dof_index < this->end_dof()); }
817 
823  template <typename DofObjectSubclass>
824  bool is_evaluable(const DofObjectSubclass & obj,
825  unsigned int var_num = libMesh::invalid_uint) const;
826 
834  void set_implicit_neighbor_dofs(bool implicit_neighbor_dofs);
835 
842  bool use_coupled_neighbor_dofs(const MeshBase & mesh) const;
843 
855  const std::vector<dof_id_type> & dof_indices,
856  DenseVectorBase<Number> & Ue) const;
857 
862  void local_variable_indices(std::vector<dof_id_type> & idx,
863  const MeshBase & mesh,
864  unsigned int var_num) const;
865 
866 #ifdef LIBMESH_ENABLE_CONSTRAINTS
867 
868  //--------------------------------------------------------------------
869  // Constraint-specific methods
875 
881 
882 #ifdef LIBMESH_ENABLE_NODE_CONSTRAINTS
883 
888  { return cast_int<dof_id_type>(_node_constraints.size()); }
889 #endif // LIBMESH_ENABLE_NODE_CONSTRAINTS
890 
896  void create_dof_constraints (const MeshBase &, Real time=0);
897 
902 
906  void scatter_constraints (MeshBase &);
907 
922  std::set<dof_id_type> & unexpanded_dofs,
923  bool look_for_constrainees);
924 
932  void process_constraints (MeshBase &);
933 
950 
955  void add_constraint_row (const dof_id_type dof_number,
956  const DofConstraintRow & constraint_row,
957  const Number constraint_rhs,
958  const bool forbid_constraint_overwrite);
959 
970  void add_adjoint_constraint_row (const unsigned int qoi_index,
971  const dof_id_type dof_number,
972  const DofConstraintRow & constraint_row,
973  const Number constraint_rhs,
974  const bool forbid_constraint_overwrite);
975 
981  void add_constraint_row (const dof_id_type dof_number,
982  const DofConstraintRow & constraint_row,
983  const bool forbid_constraint_overwrite = true)
984  { add_constraint_row(dof_number, constraint_row, 0., forbid_constraint_overwrite); }
985 
989  DofConstraints::const_iterator constraint_rows_begin() const
990  { return _dof_constraints.begin(); }
991 
995  DofConstraints::const_iterator constraint_rows_end() const
996  { return _dof_constraints.end(); }
997 
999  {
1002  }
1003 
1005  {
1008  }
1009 
1023  {
1025  }
1026 
1027 #ifdef LIBMESH_ENABLE_NODE_CONSTRAINTS
1028 
1031  NodeConstraints::const_iterator node_constraint_rows_begin() const
1032  { return _node_constraints.begin(); }
1033 
1037  NodeConstraints::const_iterator node_constraint_rows_end() const
1038  { return _node_constraints.end(); }
1039 #endif // LIBMESH_ENABLE_NODE_CONSTRAINTS
1040 
1045  bool is_constrained_dof (const dof_id_type dof) const;
1046 
1051  bool has_heterogenous_adjoint_constraints (const unsigned int qoi_num) const;
1052 
1058  Number has_heterogenous_adjoint_constraint (const unsigned int qoi_num,
1059  const dof_id_type dof) const;
1060 
1066 
1071  bool is_constrained_node (const Node * node) const;
1072 
1079  void print_dof_constraints(std::ostream & os=libMesh::out,
1080  bool print_nonlocal=false) const;
1081 
1087  std::string get_local_constraints(bool print_nonlocal=false) const;
1088 
1089 
1098  std::pair<Real, Real> max_constraint_error(const System & system,
1099  NumericVector<Number> * v = nullptr) const;
1100 
1101 #endif // LIBMESH_ENABLE_CONSTRAINTS
1102 
1103  //--------------------------------------------------------------------
1104  // Constraint-specific methods
1105  // Some of these methods are enabled (but inlined away to nothing)
1106  // when constraints are disabled at configure-time. This is to
1107  // increase API compatibility of user code with different library
1108  // builds.
1109 
1124  std::vector<dof_id_type> & elem_dofs,
1125  bool asymmetric_constraint_rows = true) const;
1126 
1134  std::vector<dof_id_type> & row_dofs,
1135  std::vector<dof_id_type> & col_dofs,
1136  bool asymmetric_constraint_rows = true) const;
1137 
1142  std::vector<dof_id_type> & dofs,
1143  bool asymmetric_constraint_rows = true) const;
1144 
1154  DenseVector<Number> & rhs,
1155  std::vector<dof_id_type> & elem_dofs,
1156  bool asymmetric_constraint_rows = true) const;
1157 
1182  DenseVector<Number> & rhs,
1183  std::vector<dof_id_type> & elem_dofs,
1184  bool asymmetric_constraint_rows = true,
1185  int qoi_index = -1) const;
1186 
1209  DenseVector<Number> & rhs,
1210  std::vector<dof_id_type> & elem_dofs,
1211  bool asymmetric_constraint_rows = true,
1212  int qoi_index = -1) const;
1213 
1214 
1215 
1225  DenseVector<Number> & w,
1226  std::vector<dof_id_type> & row_dofs,
1227  bool asymmetric_constraint_rows = true) const;
1228 
1235  void constrain_nothing (std::vector<dof_id_type> & dofs) const;
1236 
1250  void enforce_constraints_exactly (const System & system,
1251  NumericVector<Number> * v = nullptr,
1252  bool homogeneous = false) const;
1253 
1261  unsigned int q) const;
1262 
1264  NumericVector<Number> * rhs,
1265  NumericVector<Number> const * solution,
1266  bool homogeneous = true) const;
1267 
1269  SparseMatrix<Number> * jac) const;
1270 
1271 #ifdef LIBMESH_ENABLE_PERIODIC
1272 
1273  //--------------------------------------------------------------------
1274  // PeriodicBoundary-specific methods
1275 
1279  void add_periodic_boundary (const PeriodicBoundaryBase & periodic_boundary);
1280 
1287  void add_periodic_boundary (const PeriodicBoundaryBase & boundary, const PeriodicBoundaryBase & inverse_boundary);
1288 
1293  bool is_periodic_boundary (const boundary_id_type boundaryid) const;
1294 
1296  {
1297  return _periodic_boundaries.get();
1298  }
1299 
1300 #endif // LIBMESH_ENABLE_PERIODIC
1301 
1302 
1303 #ifdef LIBMESH_ENABLE_DIRICHLET
1304 
1305  //--------------------------------------------------------------------
1306  // DirichletBoundary-specific methods
1307 
1311  void add_dirichlet_boundary (const DirichletBoundary & dirichlet_boundary);
1312 
1318  void add_adjoint_dirichlet_boundary (const DirichletBoundary & dirichlet_boundary,
1319  unsigned int q);
1320 
1324  void remove_dirichlet_boundary (const DirichletBoundary & dirichlet_boundary);
1325 
1330  void remove_adjoint_dirichlet_boundary (const DirichletBoundary & dirichlet_boundary,
1331  unsigned int q);
1332 
1334  {
1335  return _dirichlet_boundaries.get();
1336  }
1337 
1339  {
1340  return _dirichlet_boundaries.get();
1341  }
1342 
1343  bool has_adjoint_dirichlet_boundaries(unsigned int q) const;
1344 
1345  const DirichletBoundaries *
1346  get_adjoint_dirichlet_boundaries(unsigned int q) const;
1347 
1349  get_adjoint_dirichlet_boundaries(unsigned int q);
1350 
1351 #endif // LIBMESH_ENABLE_DIRICHLET
1352 
1353 
1354 #ifdef LIBMESH_ENABLE_AMR
1355 
1356  //--------------------------------------------------------------------
1357  // AMR-specific methods
1358 
1367  // void augment_send_list_for_projection(const MeshBase &);
1368 
1369 #ifdef LIBMESH_ENABLE_AMR
1370 
1377  void old_dof_indices (const Elem * const elem,
1378  std::vector<dof_id_type> & di,
1379  const unsigned int vn = libMesh::invalid_uint) const;
1380 
1384  dof_id_type n_old_dofs() const { return _n_old_dfs; }
1385 
1386 #endif // LIBMESH_ENABLE_AMR
1387 
1393  void constrain_p_dofs (unsigned int var,
1394  const Elem * elem,
1395  unsigned int s,
1396  unsigned int p);
1397 
1398 #endif // LIBMESH_ENABLE_AMR
1399 
1403  void reinit (MeshBase & mesh);
1404 
1409  void clear ();
1410 
1414  void print_info(std::ostream & os=libMesh::out) const;
1415 
1419  std::string get_info() const;
1420 
1435 
1439  unsigned int sys_number() const;
1440 
1441 private:
1442 
1453  void _dof_indices (const Elem & elem,
1454  int p_level,
1455  std::vector<dof_id_type> & di,
1456  const unsigned int vg,
1457  const unsigned int vig,
1458  const Node * const * nodes,
1459  unsigned int n_nodes
1460 #ifdef DEBUG
1461  ,
1462  const unsigned int v,
1463  std::size_t & tot_size
1464 #endif
1465  ) const;
1466 
1471  void _node_dof_indices (const Elem & elem,
1472  unsigned int n,
1473  const DofObject & obj,
1474  std::vector<dof_id_type> & di,
1475  const unsigned int vn) const;
1476 
1480  std::unique_ptr<SparsityPattern::Build> build_sparsity(const MeshBase & mesh) const;
1481 
1485  void invalidate_dofs(MeshBase & mesh) const;
1486 
1490  DofObject * node_ptr(MeshBase & mesh, dof_id_type i) const;
1491 
1495  DofObject * elem_ptr(MeshBase & mesh, dof_id_type i) const;
1496 
1500  typedef DofObject * (DofMap::*dofobject_accessor)
1501  (MeshBase & mesh, dof_id_type i) const;
1502 
1506  template<typename iterator_type>
1507  void set_nonlocal_dof_objects(iterator_type objects_begin,
1508  iterator_type objects_end,
1509  MeshBase & mesh,
1510  dofobject_accessor objects);
1511 
1520  void distribute_local_dofs_var_major (dof_id_type & next_free_dof,
1521  MeshBase & mesh);
1522 
1534  void distribute_local_dofs_node_major (dof_id_type & next_free_dof,
1535  MeshBase & mesh);
1536 
1537  /*
1538  * A utility method for obtaining a set of elements to ghost along
1539  * with merged coupling matrices.
1540  */
1541  static void
1543  std::set<CouplingMatrix *> & temporary_coupling_matrices,
1544  const std::set<GhostingFunctor *>::iterator & gf_begin,
1545  const std::set<GhostingFunctor *>::iterator & gf_end,
1546  const MeshBase::const_element_iterator & elems_begin,
1547  const MeshBase::const_element_iterator & elems_end,
1548  processor_id_type p);
1549 
1555 
1556 #ifdef LIBMESH_ENABLE_CONSTRAINTS
1557 
1569  std::vector<dof_id_type> & elem_dofs,
1570  const bool called_recursively=false) const;
1571 
1588  DenseVector<Number> & H,
1589  std::vector<dof_id_type> & elem_dofs,
1590  int qoi_index = -1,
1591  const bool called_recursively=false) const;
1592 
1597  void find_connected_dofs (std::vector<dof_id_type> & elem_dofs) const;
1598 
1603  void find_connected_dof_objects (std::vector<const DofObject *> & objs) const;
1604 
1611 
1612 #endif // LIBMESH_ENABLE_CONSTRAINTS
1613 
1620 
1624  std::vector<Variable> _variables;
1625 
1629  std::vector<VariableGroup> _variable_groups;
1630 
1634  std::vector<unsigned int> _variable_group_numbers;
1635 
1639  const unsigned int _sys_number;
1640 
1645 
1651  std::vector<SparseMatrix<Number> * > _matrices;
1652 
1656  std::vector<dof_id_type> _first_df;
1657 
1661  std::vector<dof_id_type> _end_df;
1662 
1667  std::vector<dof_id_type> _first_scalar_df;
1668 
1673  std::vector<dof_id_type> _send_list;
1674 
1679 
1684  std::vector<dof_id_type> & n_nz,
1685  std::vector<dof_id_type> & n_oz,
1686  void *);
1691 
1696 
1700  void (*_extra_send_list_function)(std::vector<dof_id_type> &, void *);
1701 
1706 
1713  std::unique_ptr<DefaultCoupling> _default_coupling;
1714 
1721  std::unique_ptr<DefaultCoupling> _default_evaluating;
1722 
1731  std::set<GhostingFunctor *> _algebraic_ghosting_functors;
1732 
1744  std::set<GhostingFunctor *> _coupling_functors;
1745 
1750  std::map<GhostingFunctor *, std::shared_ptr<GhostingFunctor> > _shared_functors;
1751 
1757 
1762  std::unique_ptr<SparsityPattern::Build> _sp;
1763 
1770  std::vector<dof_id_type> * _n_nz;
1771 
1776  std::vector<dof_id_type> * _n_oz;
1777 
1782 
1788 
1789 #ifdef LIBMESH_ENABLE_AMR
1790 
1795 
1799  std::vector<dof_id_type> _first_old_df;
1800 
1804  std::vector<dof_id_type> _end_old_df;
1805 
1810  std::vector<dof_id_type> _first_old_scalar_df;
1811 
1812 #endif
1813 
1814 #ifdef LIBMESH_ENABLE_CONSTRAINTS
1815 
1820 
1822 
1824 #endif
1825 
1826 #ifdef LIBMESH_ENABLE_NODE_CONSTRAINTS
1827 
1831 #endif // LIBMESH_ENABLE_NODE_CONSTRAINTS
1832 
1833 
1834 #ifdef LIBMESH_ENABLE_PERIODIC
1835 
1839  std::unique_ptr<PeriodicBoundaries> _periodic_boundaries;
1840 #endif
1841 
1842 #ifdef LIBMESH_ENABLE_DIRICHLET
1843 
1848  const DirichletBoundary & boundary) const;
1853  std::unique_ptr<DirichletBoundaries> _dirichlet_boundaries;
1854 
1859  std::vector<DirichletBoundaries *> _adjoint_dirichlet_boundaries;
1860 #endif
1861 
1863 
1870 };
1871 
1872 
1873 // ------------------------------------------------------------
1874 // Dof Map inline member functions
1875 inline
1876 unsigned int DofMap::sys_number() const
1877 {
1878  return _sys_number;
1879 }
1880 
1881 
1882 
1883 inline
1884 const VariableGroup & DofMap::variable_group (const unsigned int g) const
1885 {
1886  libmesh_assert_less (g, _variable_groups.size());
1887 
1888  return _variable_groups[g];
1889 }
1890 
1891 
1892 
1893 inline
1894 const Variable & DofMap::variable (const unsigned int c) const
1895 {
1896  libmesh_assert_less (c, _variables.size());
1897 
1898  return _variables[c];
1899 }
1900 
1901 
1902 
1903 inline
1904 Order DofMap::variable_order (const unsigned int c) const
1905 {
1906  libmesh_assert_less (c, _variables.size());
1907 
1908  return _variables[c].type().order;
1909 }
1910 
1911 
1912 
1913 inline
1914 Order DofMap::variable_group_order (const unsigned int vg) const
1915 {
1916  libmesh_assert_less (vg, _variable_groups.size());
1917 
1918  return _variable_groups[vg].type().order;
1919 }
1920 
1921 
1922 
1923 inline
1924 const FEType & DofMap::variable_type (const unsigned int c) const
1925 {
1926  libmesh_assert_less (c, _variables.size());
1927 
1928  return _variables[c].type();
1929 }
1930 
1931 
1932 
1933 inline
1934 const FEType & DofMap::variable_group_type (const unsigned int vg) const
1935 {
1936  libmesh_assert_less (vg, _variable_groups.size());
1937 
1938  return _variable_groups[vg].type();
1939 }
1940 
1941 
1942 #ifdef LIBMESH_ENABLE_CONSTRAINTS
1943 
1944 
1945 inline
1947 #ifdef LIBMESH_ENABLE_NODE_CONSTRAINTS
1948  node
1949 #endif
1950  ) const
1951 {
1952 #ifdef LIBMESH_ENABLE_NODE_CONSTRAINTS
1953  if (_node_constraints.count(node))
1954  return true;
1955 #endif
1956 
1957  return false;
1958 }
1959 
1960 
1961 inline
1963 {
1964  if (_dof_constraints.count(dof))
1965  return true;
1966 
1967  return false;
1968 }
1969 
1970 
1971 inline
1972 bool DofMap::has_heterogenous_adjoint_constraints (const unsigned int qoi_num) const
1973 {
1974  AdjointDofConstraintValues::const_iterator it =
1975  _adjoint_constraint_values.find(qoi_num);
1976  if (it == _adjoint_constraint_values.end())
1977  return false;
1978  if (it->second.empty())
1979  return false;
1980 
1981  return true;
1982 }
1983 
1984 
1985 inline
1987  const dof_id_type dof) const
1988 {
1989  AdjointDofConstraintValues::const_iterator it =
1990  _adjoint_constraint_values.find(qoi_num);
1991  if (it != _adjoint_constraint_values.end())
1992  {
1993  DofConstraintValueMap::const_iterator rhsit =
1994  it->second.find(dof);
1995  if (rhsit == it->second.end())
1996  return 0;
1997  else
1998  return rhsit->second;
1999  }
2000 
2001  return 0;
2002 }
2003 
2004 
2005 
2006 inline
2008 {
2010 }
2011 
2012 
2013 
2014 #else
2015 
2016 //--------------------------------------------------------------------
2017 // Constraint-specific methods get inlined into nothing if
2018 // constraints are disabled, so there's no reason for users not to
2019 // use them.
2020 
2022  std::vector<dof_id_type> &,
2023  bool) const {}
2024 
2026  std::vector<dof_id_type> &,
2027  std::vector<dof_id_type> &,
2028  bool) const {}
2029 
2031  std::vector<dof_id_type> &,
2032  bool) const {}
2033 
2036  std::vector<dof_id_type> &,
2037  bool) const {}
2038 
2041  std::vector<dof_id_type> &, bool, int) const {}
2042 
2045  std::vector<dof_id_type> &, bool, int) const {}
2046 
2049  std::vector<dof_id_type> &,
2050  bool) const {}
2051 
2052 inline void DofMap::constrain_nothing (std::vector<dof_id_type> &) const {}
2053 
2056  bool) const {}
2057 
2059  unsigned int) const {}
2060 
2061 
2065  NumericVector<Number> const *,
2066  bool) const {}
2067 
2070  SparseMatrix<Number> *) const {}
2071 
2072 #endif // LIBMESH_ENABLE_CONSTRAINTS
2073 
2074 } // namespace libMesh
2075 
2076 #endif // LIBMESH_DOF_MAP_H
libMesh::DofMap::_adjoint_constraint_values
AdjointDofConstraintValues _adjoint_constraint_values
Definition: dof_map.h:1823
libMesh::DofConstraints
The constraint matrix storage format.
Definition: dof_map.h:105
libMesh::DofMap::last_dof
dof_id_type last_dof(const processor_id_type proc) const
Definition: dof_map.h:675
libMesh::DofMap::add_algebraic_ghosting_functor
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.
Definition: dof_map.C:1862
libMesh::System
Manages consistently variables, degrees of freedom, and coefficient vectors.
Definition: system.h:100
libMesh::DofMap::_primal_constraint_values
DofConstraintValueMap _primal_constraint_values
Definition: dof_map.h:1821
libMesh::DofMap::add_algebraic_ghosting_functor
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.
Definition: dof_map.h:376
libMesh::Number
Real Number
Definition: libmesh_common.h:195
libMesh::dof_id_type
uint8_t dof_id_type
Definition: id_types.h:67
libMesh::DofMap::attach_extra_send_list_function
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.
Definition: dof_map.h:453
libMesh::DofMap::compute_sparsity
void compute_sparsity(const MeshBase &)
Computes the sparsity pattern for the matrices corresponding to proc_id and sends that data to Linear...
Definition: dof_map.C:1768
libMesh::DofMap::elem_ptr
DofObject * elem_ptr(MeshBase &mesh, dof_id_type i) const
Definition: dof_map.C:325
libMesh::DofMap::swap_dof_constraints
void swap_dof_constraints()
Similar to the stash/unstash_dof_constraints() API, but swaps _dof_constraints and _stashed_dof_const...
Definition: dof_map.h:1022
libMesh::PeriodicBoundaries
We're using a class instead of a typedef to allow forward declarations and future flexibility.
Definition: periodic_boundaries.h:51
libMesh::DofMap::add_variable_group
void add_variable_group(const VariableGroup &var_group)
Definition: dof_map.C:257
libMesh::DofMap::is_evaluable
bool is_evaluable(const DofObjectSubclass &obj, unsigned int var_num=libMesh::invalid_uint) const
Definition: dof_map.C:2553
libMesh::invalid_uint
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value.
Definition: libmesh.h:249
libMesh::DofMap::is_attached
bool is_attached(SparseMatrix< Number > &matrix)
Matrices should not be attached more than once.
Definition: dof_map.C:310
libMesh::DofMap::n_old_dofs
dof_id_type n_old_dofs() const
Definition: dof_map.h:1384
libMesh::DofMap::dofobject_accessor
DofObject *(DofMap::* dofobject_accessor)(MeshBase &mesh, dof_id_type i) const
A member function type like node_ptr() or elem_ptr().
Definition: dof_map.h:1501
libMesh::DofMap::attach_extra_send_list_object
void attach_extra_send_list_object(DofMap::AugmentSendList &asl)
Attach an object to populate the send_list with extra entries.
Definition: dof_map.h:444
libMesh::DofMap::_mesh
MeshBase & _mesh
The mesh that system uses.
Definition: dof_map.h:1644
libMesh::DofMap::AugmentSendList::~AugmentSendList
virtual ~AugmentSendList()
Definition: dof_map.h:219
libMesh::DofMap::_stashed_dof_constraints
DofConstraints _stashed_dof_constraints
Definition: dof_map.h:1819
libMesh::DofMap::build_constraint_matrix
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.
Definition: dof_map_constraints.C:2451
libMesh::DofMap::prepare_send_list
void prepare_send_list()
Takes the _send_list vector (which may have duplicate entries) and sorts it.
Definition: dof_map.C:1651
libMesh::DofMap::_default_coupling
std::unique_ptr< DefaultCoupling > _default_coupling
The default coupling GhostingFunctor, used to implement standard libMesh sparsity pattern constructio...
Definition: dof_map.h:1713
libMesh::DofMap::stash_dof_constraints
void stash_dof_constraints()
Definition: dof_map.h:998
libMesh::DofMap::get_adjoint_dirichlet_boundaries
const DirichletBoundaries * get_adjoint_dirichlet_boundaries(unsigned int q) const
Definition: dof_map_constraints.C:4419
libMesh::DofMap::get_dirichlet_boundaries
const DirichletBoundaries * get_dirichlet_boundaries() const
Definition: dof_map.h:1333
libMesh::DofMap::dof_indices
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.
Definition: dof_map.C:1967
libMesh::DofMap::n_constrained_dofs
dof_id_type n_constrained_dofs() const
Definition: dof_map_constraints.C:1184
libMesh::DofMap::_periodic_boundaries
std::unique_ptr< PeriodicBoundaries > _periodic_boundaries
Data structure containing periodic boundaries.
Definition: dof_map.h:1839
libMesh::DofMap::print_dof_constraints
void print_dof_constraints(std::ostream &os=libMesh::out, bool print_nonlocal=false) const
Prints (from processor 0) all DoF and Node constraints.
Definition: dof_map_constraints.C:1438
libMesh::DofMap::_node_constraints
NodeConstraints _node_constraints
Data structure containing DofObject constraints.
Definition: dof_map.h:1830
libMesh::DofMap::constrain_element_vector
void constrain_element_vector(DenseVector< Number > &rhs, std::vector< dof_id_type > &dofs, bool asymmetric_constraint_rows=true) const
Constrains the element vector.
Definition: dof_map.h:2030
libMesh::DofMap::add_dirichlet_boundary
void add_dirichlet_boundary(const DirichletBoundary &dirichlet_boundary)
Adds a copy of the specified Dirichlet boundary to the system.
Definition: dof_map_constraints.C:4390
libMesh::DofMap::_first_old_df
std::vector< dof_id_type > _first_old_df
First old DOF index on processor p.
Definition: dof_map.h:1799
libMesh::DofMap::n_local_dofs
dof_id_type n_local_dofs() const
Definition: dof_map.h:635
libMesh::DofMap::extract_local_vector
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 ...
Definition: dof_map.C:1885
libMesh::DofMap::n_dofs
dof_id_type n_dofs() const
Definition: dof_map.h:625
libMesh::DofMap::get_n_oz
const std::vector< dof_id_type > & get_n_oz() const
Definition: dof_map.h:518
libMesh::DofMap::has_heterogenous_adjoint_constraints
bool has_heterogenous_adjoint_constraints(const unsigned int qoi_num) const
Definition: dof_map.h:1972
libMesh::DofMap::add_adjoint_constraint_row
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 ...
Definition: dof_map_constraints.C:1393
libMesh::DofMap::_first_old_scalar_df
std::vector< dof_id_type > _first_old_scalar_df
First old DOF index for SCALAR variable v, or garbage for non-SCALAR variable v.
Definition: dof_map.h:1810
libMesh::Threads::scalable_allocator
Scalable allocator to be used in multithreaded code chunks which allocate a lot of dynamic memory.
Definition: threads_allocators.h:56
libMesh::DofMap::_extra_sparsity_function
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.
Definition: dof_map.h:1683
libMesh::DofMap::need_full_sparsity_pattern
bool need_full_sparsity_pattern
Default false; set to true if any attached matrix requires a full sparsity pattern.
Definition: dof_map.h:1756
libMesh::DofMap::~DofMap
~DofMap()
Destructor.
Definition: dof_map.C:206
libMesh::DofMap::has_adjoint_dirichlet_boundaries
bool has_adjoint_dirichlet_boundaries(unsigned int q) const
Definition: dof_map_constraints.C:4409
libMesh::DofMap::is_constrained_node
bool is_constrained_node(const Node *node) const
Definition: dof_map.h:1946
libMesh::DofMap::get_info
std::string get_info() const
Gets summary info about the sparsity bandwidth and constraints.
Definition: dof_map.C:2843
libMesh::DofMap::build_sparsity
std::unique_ptr< SparsityPattern::Build > build_sparsity(const MeshBase &mesh) const
Builds a sparsity pattern.
Definition: dof_map.C:63
libMesh::DofMap::_sys_number
const unsigned int _sys_number
The number of the system we manage DOFs for.
Definition: dof_map.h:1639
libMesh::DofMap::get_primal_constraint_values
DofConstraintValueMap & get_primal_constraint_values()
Definition: dof_map.h:2007
libMesh::ReferenceCountedObject
This class implements reference counting.
Definition: reference_counted_object.h:65
libMesh::DofMap::end_dof
dof_id_type end_dof() const
Definition: dof_map.h:695
libMesh::PeriodicBoundaryBase
The base class for defining periodic boundaries.
Definition: periodic_boundary_base.h:48
libMesh::DofMap::get_periodic_boundaries
PeriodicBoundaries * get_periodic_boundaries()
Definition: dof_map.h:1295
libMesh
The libMesh namespace provides an interface to certain functionality in the library.
Definition: factoryfunction.C:55
libMesh::DofMap::attach_extra_sparsity_object
void attach_extra_sparsity_object(DofMap::AugmentSparsityPattern &asp)
Attach an object to use to populate the sparsity pattern with extra entries.
Definition: dof_map.h:415
libMesh::DofMap::_n_nz
std::vector< dof_id_type > * _n_nz
The number of on-processor nonzeros in my portion of the global matrix.
Definition: dof_map.h:1770
libMesh::DofMap::DofMap
DofMap(const unsigned int sys_number, MeshBase &mesh)
Constructor.
Definition: dof_map.C:135
libMesh::DofMap::_end_old_df
std::vector< dof_id_type > _end_old_df
Last old DOF index (plus 1) on processor p.
Definition: dof_map.h:1804
libMesh::DofMap::remove_coupling_functor
void remove_coupling_functor(GhostingFunctor &coupling_functor)
Removes a functor which was previously added to the set of coupling functors, from both this DofMap a...
Definition: dof_map.C:1849
libMesh::DofMap::n_constrained_nodes
dof_id_type n_constrained_nodes() const
Definition: dof_map.h:887
libMesh::DofMap::distribute_local_dofs_var_major
void distribute_local_dofs_var_major(dof_id_type &next_free_dof, MeshBase &mesh)
Distributes the global degrees of freedom, for dofs on this processor.
Definition: dof_map.C:1310
libMesh::DofMap::use_coupled_neighbor_dofs
bool use_coupled_neighbor_dofs(const MeshBase &mesh) const
Tells other library functions whether or not this problem includes coupling between dofs in neighbori...
Definition: dof_map.C:1711
libMesh::DofMap::AugmentSparsityPattern::~AugmentSparsityPattern
virtual ~AugmentSparsityPattern()
Definition: dof_map.h:202
libMesh::DofMap::semilocal_index
bool semilocal_index(dof_id_type dof_index) const
Definition: dof_map.C:2524
libMesh::DofMap::set_error_on_cyclic_constraint
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.
Definition: dof_map.C:243
libMesh::Order
Order
Definition: enum_order.h:40
libMesh::DofMap::coupling_functors_begin
std::set< GhostingFunctor * >::const_iterator coupling_functors_begin() const
Beginning of range of coupling functors.
Definition: dof_map.h:329
libMesh::DofMap::clear_send_list
void clear_send_list()
Clears the _send_list vector.
Definition: dof_map.h:470
libMesh::DenseMatrix
Defines a dense matrix for use in Finite Element-type computations.
Definition: dof_map.h:73
libMesh::DofMap::n_variables
unsigned int n_variables() const
Definition: dof_map.h:592
libMesh::DofMap::_n_SCALAR_dofs
dof_id_type _n_SCALAR_dofs
The total number of SCALAR dofs associated to all SCALAR variables.
Definition: dof_map.h:1787
libMesh::GhostingFunctor::map_type
std::unordered_map< const Elem *, const CouplingMatrix * > map_type
What elements do we care about and what variables do we care about on each element?
Definition: ghosting_functor.h:171
libMesh::DenseVectorBase
Defines an abstract dense vector base class for use in Finite Element-type computations.
Definition: dof_map.h:71
libMesh::DofMap::process_constraints
void process_constraints(MeshBase &)
Postprocesses any constrained degrees of freedom to be constrained only in terms of unconstrained dof...
Definition: dof_map_constraints.C:3334
libMesh::DofMap::_dof_constraints
DofConstraints _dof_constraints
Data structure containing DOF constraints.
Definition: dof_map.h:1819
libMesh::DofMap::_adjoint_dirichlet_boundaries
std::vector< DirichletBoundaries * > _adjoint_dirichlet_boundaries
Data structure containing Dirichlet functions.
Definition: dof_map.h:1859
mesh
MeshBase & mesh
Definition: mesh_communication.C:1257
libMesh::DofMap::end_old_dof
dof_id_type end_old_dof(const processor_id_type proc) const
Definition: dof_map.h:715
libMesh::DofMap::default_coupling
DefaultCoupling & default_coupling()
Default coupling functor.
Definition: dof_map.h:341
libMesh::DofMap::first_dof
dof_id_type first_dof(const processor_id_type proc) const
Definition: dof_map.h:650
libMesh::DofMap::_variable_group_numbers
std::vector< unsigned int > _variable_group_numbers
The variable group number for each variable.
Definition: dof_map.h:1634
libMesh::DofMap::_first_scalar_df
std::vector< dof_id_type > _first_scalar_df
First DOF index for SCALAR variable v, or garbage for non-SCALAR variable v.
Definition: dof_map.h:1667
libMesh::DofMap::n_variable_groups
unsigned int n_variable_groups() const
Definition: dof_map.h:584
libMesh::DofMap::invalidate_dofs
void invalidate_dofs(MeshBase &mesh) const
Invalidates all active DofObject dofs for this system.
Definition: dof_map.C:819
libMesh::DofMap::has_heterogenous_adjoint_constraint
Number has_heterogenous_adjoint_constraint(const unsigned int qoi_num, const dof_id_type dof) const
Definition: dof_map.h:1986
libMesh::DofMap::is_constrained_dof
bool is_constrained_dof(const dof_id_type dof) const
Definition: dof_map.h:1962
libMesh::boundary_id_type
int8_t boundary_id_type
Definition: id_types.h:51
libMesh::NonlinearImplicitSystem
Manages consistently variables, degrees of freedom, coefficient vectors, matrices and non-linear solv...
Definition: nonlinear_implicit_system.h:54
libMesh::DofObject
The DofObject defines an abstract base class for objects that have degrees of freedom associated with...
Definition: dof_object.h:53
libMesh::SparseMatrix
Generic sparse matrix.
Definition: vector_fe_ex5.C:45
libMesh::DofMap::get_local_constraints
std::string get_local_constraints(bool print_nonlocal=false) const
Gets a string reporting all DoF and Node constraints local to this processor.
Definition: dof_map_constraints.C:1464
libMesh::DirichletBoundaries
We're using a class instead of a typedef to allow forward declarations and future flexibility.
Definition: dirichlet_boundaries.h:207
libMesh::DofMap::check_dirichlet_bcid_consistency
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.
Definition: dof_map_constraints.C:4479
libMesh::DofMap::_send_list
std::vector< dof_id_type > _send_list
A list containing all the global DOF indices that affect the solution on my processor.
Definition: dof_map.h:1673
libMesh::DofMap::_first_df
std::vector< dof_id_type > _first_df
First DOF index on processor p.
Definition: dof_map.h:1656
libMesh::DofMap::check_for_cyclic_constraints
void check_for_cyclic_constraints()
Throw an error if we detect any constraint loops, i.e.
Definition: dof_map_constraints.C:3441
libMesh::DofMap::old_dof_indices
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),...
Definition: dof_map.C:2258
libMesh::DofMap::heterogenously_constrain_element_vector
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
Constrains the element vector.
Definition: dof_map.h:2044
libMesh::NumericVector
Provides a uniform interface to vector storage schemes for different linear algebra libraries.
Definition: vector_fe_ex5.C:43
libMesh::DofMap::set_error_on_constraint_loop
void set_error_on_constraint_loop(bool error_on_constraint_loop)
Definition: dof_map.C:250
libMesh::DofMap::enforce_adjoint_constraints_exactly
void enforce_adjoint_constraints_exactly(NumericVector< Number > &v, unsigned int q) const
Heterogenously constrains the numeric vector v, which represents an adjoint solution defined on the m...
Definition: dof_map.h:2058
libMesh::DofMap::_n_oz
std::vector< dof_id_type > * _n_oz
The number of off-processor nonzeros in my portion of the global matrix; allocated similar to _n_nz.
Definition: dof_map.h:1776
libMesh::DofMap::add_default_ghosting
void add_default_ghosting()
Add the default functor(s) for coupling and algebraic ghosting.
Definition: dof_map.C:1829
libMesh::libmesh_assert
libmesh_assert(ctx)
libMesh::DofMap::reinit
void reinit(MeshBase &mesh)
Reinitialize the underlying data structures conformal to the current mesh.
Definition: dof_map.C:484
libMesh::DofMap::variable_group_type
const FEType & variable_group_type(const unsigned int vg) const
Definition: dof_map.h:1934
libMesh::SparsityPattern::Build
This helper class can be called on multiple threads to compute the sparsity pattern (or graph) of the...
Definition: sparsity_pattern.h:81
libMesh::DofMap::distribute_dofs
void distribute_dofs(MeshBase &)
Distribute dofs on the current mesh.
Definition: dof_map.C:910
libMesh::DofMap::variable_order
Order variable_order(const unsigned int c) const
Definition: dof_map.h:1904
libMesh::MeshBase
This is the MeshBase class.
Definition: mesh_base.h:78
libMesh::DofMap::enforce_constraints_on_residual
void enforce_constraints_on_residual(const NonlinearImplicitSystem &system, NumericVector< Number > *rhs, NumericVector< Number > const *solution, bool homogeneous=true) const
Definition: dof_map.h:2063
libMesh::DofMap::check_for_constraint_loops
void check_for_constraint_loops()
Definition: dof_map_constraints.C:3447
libMesh::DofMap::AugmentSparsityPattern::augment_sparsity_pattern
virtual void augment_sparsity_pattern(SparsityPattern::Graph &sparsity, std::vector< dof_id_type > &n_nz, std::vector< dof_id_type > &n_oz)=0
User-defined function to augment the sparsity pattern.
libMesh::DofConstraintValueMap
Storage for DofConstraint right hand sides for a particular problem.
Definition: dof_map.h:117
libMesh::DofMap::local_variable_indices
void local_variable_indices(std::vector< dof_id_type > &idx, const MeshBase &mesh, unsigned int var_num) const
Fills an array of those dof indices which belong to the given variable number and live on the current...
Definition: dof_map.C:1084
libMesh::DofMap::constrain_element_dyad_matrix
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'.
Definition: dof_map.h:2047
libMesh::DofMap::sys_number
unsigned int sys_number() const
Definition: dof_map.h:1876
libMesh::DofMap::constraint_rows_end
DofConstraints::const_iterator constraint_rows_end() const
Definition: dof_map.h:995
libMesh::DofMap::constrain_nothing
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 funct...
Definition: dof_map.h:2052
libMesh::GhostingFunctor
This abstract base class defines the interface by which library code and user code can report associa...
Definition: ghosting_functor.h:153
libMesh::DofMap::_augment_sparsity_pattern
AugmentSparsityPattern * _augment_sparsity_pattern
Function object to call to add extra entries to the sparsity pattern.
Definition: dof_map.h:1678
libMesh::DofMap::set_implicit_neighbor_dofs
void set_implicit_neighbor_dofs(bool implicit_neighbor_dofs)
Allow the implicit_neighbor_dofs flag to be set programmatically.
Definition: dof_map.C:1704
libMesh::DofMap::_extra_sparsity_context
void * _extra_sparsity_context
A pointer associated with the extra sparsity that can optionally be passed in.
Definition: dof_map.h:1690
libMesh::DofMap::variable
const Variable & variable(const unsigned int c) const
Definition: dof_map.h:1894
libMesh::DofMap::clear
void clear()
Free all new memory associated with the object, but restore its original state, with the mesh pointer...
Definition: dof_map.C:834
libMesh::ParallelObject::processor_id
processor_id_type processor_id() const
Definition: parallel_object.h:106
libMesh::DofMap::enforce_constraints_exactly
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.
Definition: dof_map.h:2054
libMesh::DofMap::remove_adjoint_dirichlet_boundary
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...
Definition: dof_map_constraints.C:4453
libMesh::DofMap::_n_dfs
dof_id_type _n_dfs
Total number of degrees of freedom.
Definition: dof_map.h:1781
libMesh::DofMap::SCALAR_dof_indices
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...
Definition: dof_map.C:2488
libMesh::Variable
This class defines the notion of a variable in the system.
Definition: variable.h:49
libMesh::processor_id_type
uint8_t processor_id_type
Definition: id_types.h:104
libMesh::DofMap::scatter_constraints
void scatter_constraints(MeshBase &)
Sends constraint equations to constraining processors.
Definition: dof_map_constraints.C:3546
libMesh::DofMap::attach_extra_sparsity_function
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.
Definition: dof_map.h:430
libMesh::DofMap::unstash_dof_constraints
void unstash_dof_constraints()
Definition: dof_map.h:1004
libMesh::DofMap::_n_old_dfs
dof_id_type _n_old_dfs
Total number of degrees of freedom on old dof objects.
Definition: dof_map.h:1794
libMesh::DofMap::set_nonlocal_dof_objects
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.
Definition: dof_map.C:333
libMesh::DofMap::get_n_nz
const std::vector< dof_id_type > & get_n_nz() const
Definition: dof_map.h:505
libMesh::DofMap::find_connected_dofs
void find_connected_dofs(std::vector< dof_id_type > &elem_dofs) const
Finds all the DOFS associated with the element DOFs elem_dofs.
Definition: dof_map.C:2773
libMesh::Node
A Node is like a Point, but with more information.
Definition: node.h:52
libMesh::DofMap::node_constraint_rows_begin
NodeConstraints::const_iterator node_constraint_rows_begin() const
Definition: dof_map.h:1031
libMesh::DofMap::_coupling_functors
std::set< GhostingFunctor * > _coupling_functors
The list of all GhostingFunctor objects to be used when coupling degrees of freedom in matrix sparsit...
Definition: dof_map.h:1744
libMesh::MeshTools::Generation::Private::idx
unsigned int idx(const ElemType type, const unsigned int nx, const unsigned int i, const unsigned int j)
A useful inline function which replaces the macros used previously.
Definition: mesh_generation.C:72
libMesh::DofMap::build_constraint_matrix_and_vector
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 ...
Definition: dof_map_constraints.C:2561
libMesh::DofMap::get_dirichlet_boundaries
DirichletBoundaries * get_dirichlet_boundaries()
Definition: dof_map.h:1338
libMesh::DofMap::constrain_p_dofs
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 t...
Definition: dof_map_constraints.C:4325
libMesh::DofMap::add_constraint_row
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...
Definition: dof_map.h:981
libMesh::DofMap::variable_type
const FEType & variable_type(const unsigned int c) const
Definition: dof_map.h:1924
libMesh::DofMap::print_info
void print_info(std::ostream &os=libMesh::out) const
Prints summary info about the sparsity bandwidth and constraints.
Definition: dof_map.C:2836
libMesh::DofMap::AugmentSendList
Abstract base class to be used to add user-defined parallel degree of freedom couplings.
Definition: dof_map.h:216
n_nodes
const dof_id_type n_nodes
Definition: tecplot_io.C:68
libMesh::DofMap::end_old_dof
dof_id_type end_old_dof() const
Definition: dof_map.h:718
libMesh::DofMap::algebraic_ghosting_functors_end
std::set< GhostingFunctor * >::const_iterator algebraic_ghosting_functors_end() const
End of range of algebraic ghosting functors.
Definition: dof_map.h:397
libMesh::DofMap::add_constraints_to_send_list
void add_constraints_to_send_list()
Adds entries to the _send_list vector corresponding to DoFs which are dependencies for constraint equ...
Definition: dof_map_constraints.C:4280
libMesh::DofMap::get_send_list
const std::vector< dof_id_type > & get_send_list() const
Definition: dof_map.h:496
libMesh::DofMap::add_periodic_boundary
void add_periodic_boundary(const PeriodicBoundaryBase &periodic_boundary)
Adds a copy of the specified periodic boundary to the system.
Definition: dof_map_constraints.C:4510
libMesh::DofMap::algebraic_ghosting_functors_begin
std::set< GhostingFunctor * >::const_iterator algebraic_ghosting_functors_begin() const
Beginning of range of algebraic ghosting functors.
Definition: dof_map.h:391
libMesh::MeshBase::const_element_iterator
The definition of the const_element_iterator struct.
Definition: mesh_base.h:1891
libMesh::DofMap::add_coupling_functor
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.
Definition: dof_map.h:314
libMesh::DofMap::has_blocked_representation
bool has_blocked_representation() const
Definition: dof_map.h:600
libMesh::DofMap::_augment_send_list
AugmentSendList * _augment_send_list
Function object to call to add extra entries to the send list.
Definition: dof_map.h:1695
libMesh::DofMap::create_dof_constraints
void create_dof_constraints(const MeshBase &, Real time=0)
Rebuilds the raw degree of freedom and DofObject constraints.
Definition: dof_map_constraints.C:1206
libMesh::DofMap::_variable_groups
std::vector< VariableGroup > _variable_groups
The finite element type for each variable group.
Definition: dof_map.h:1629
libMesh::DofMap::constrain_element_matrix_and_vector
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.
Definition: dof_map.h:2034
libMesh::DofMap::allgather_recursive_constraints
void allgather_recursive_constraints(MeshBase &)
Gathers constraint equation dependencies from other processors.
Definition: dof_map_constraints.C:2700
libMesh::DofMap::reinit_send_list
void reinit_send_list(MeshBase &mesh)
Clears the _send_list vector and then rebuilds it.
Definition: dof_map.C:1690
libMesh::DefaultCoupling
This class implements the default algebraic coupling in libMesh: elements couple to themselves,...
Definition: default_coupling.h:41
libMesh::DofMap::remove_algebraic_ghosting_functor
void remove_algebraic_ghosting_functor(GhostingFunctor &evaluable_functor)
Removes a functor which was previously added to the set of algebraic ghosting functors,...
Definition: dof_map.C:1873
libMesh::DofMap::n_dofs_on_processor
dof_id_type n_dofs_on_processor(const processor_id_type proc) const
Definition: dof_map.h:641
libMesh::DofMap::_matrices
std::vector< SparseMatrix< Number > * > _matrices
Additional matrices handled by this object.
Definition: dof_map.h:1651
libMesh::DofMap::_dirichlet_boundaries
std::unique_ptr< DirichletBoundaries > _dirichlet_boundaries
Data structure containing Dirichlet functions.
Definition: dof_map.h:1853
libMesh::DofMap::find_connected_dof_objects
void find_connected_dof_objects(std::vector< const DofObject * > &objs) const
Finds all the DofObjects associated with the set in objs.
libMesh::DofMap::constrain_element_matrix
void constrain_element_matrix(DenseMatrix< Number > &matrix, std::vector< dof_id_type > &elem_dofs, bool asymmetric_constraint_rows=true) const
Constrains the element matrix.
Definition: dof_map.h:2021
libMesh::DofMap::attach_matrix
void attach_matrix(SparseMatrix< Number > &matrix)
Additional matrices may be handled with this DofMap.
Definition: dof_map.C:274
libMesh::DofMap::local_index
bool local_index(dof_id_type dof_index) const
Definition: dof_map.h:815
libMesh::DofMap::remove_default_ghosting
void remove_default_ghosting()
Remove any default ghosting functor(s).
Definition: dof_map.C:1821
libMesh::DofMap::remove_dirichlet_boundary
void remove_dirichlet_boundary(const DirichletBoundary &dirichlet_boundary)
Removes the specified Dirichlet boundary from the system.
Definition: dof_map_constraints.C:4438
libMesh::DofMap::add_adjoint_dirichlet_boundary
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 d...
Definition: dof_map_constraints.C:4396
libMesh::NodeConstraints
The Node constraint storage format.
Definition: dof_map.h:153
libMesh::DofMap::coupling_functors_end
std::set< GhostingFunctor * >::const_iterator coupling_functors_end() const
End of range of coupling functors.
Definition: dof_map.h:335
libMesh::FEType
class FEType hides (possibly multiple) FEFamily and approximation orders, thereby enabling specialize...
Definition: fe_type.h:178
libMesh::DofMap::max_constraint_error
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...
Definition: dof_map_constraints.C:2373
libMesh::DofMap::_algebraic_ghosting_functors
std::set< GhostingFunctor * > _algebraic_ghosting_functors
The list of all GhostingFunctor objects to be used when distributing ghosted vectors.
Definition: dof_map.h:1731
libMesh::DofMap::heterogenously_constrain_element_matrix_and_vector
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
Constrains the element matrix and vector.
Definition: dof_map.h:2040
libMesh::DofMap
This class handles the numbering of degrees of freedom on a mesh.
Definition: dof_map.h:176
libMesh::DofMap::all_semilocal_indices
bool all_semilocal_indices(const std::vector< dof_id_type > &dof_indices) const
Definition: dof_map.C:2540
libMesh::DofMap::clear_sparsity
void clear_sparsity()
Clears the sparsity pattern.
Definition: dof_map.C:1800
libMesh::DofMap::_end_df
std::vector< dof_id_type > _end_df
Last DOF index (plus 1) on processor p.
Definition: dof_map.h:1661
libMesh::DirichletBoundary
This class allows one to associate Dirichlet boundary values with a given set of mesh boundary ids an...
Definition: dirichlet_boundaries.h:88
libMesh::DofMap::last_dof
dof_id_type last_dof() const
Definition: dof_map.h:682
libMesh::DofMap::enforce_constraints_on_jacobian
void enforce_constraints_on_jacobian(const NonlinearImplicitSystem &system, SparseMatrix< Number > *jac) const
Definition: dof_map.h:2069
libMesh::DofMap::_shared_functors
std::map< GhostingFunctor *, std::shared_ptr< GhostingFunctor > > _shared_functors
Hang on to references to any GhostingFunctor objects we were passed in shared_ptr form.
Definition: dof_map.h:1750
libMesh::AdjointDofConstraintValues
Storage for DofConstraint right hand sides for all adjoint problems.
Definition: dof_map.h:128
libMesh::Elem
This is the base class from which all geometric element types are derived.
Definition: elem.h:100
libMesh::DofMap::node_ptr
DofObject * node_ptr(MeshBase &mesh, dof_id_type i) const
Definition: dof_map.C:318
libMesh::DofMap::distribute_local_dofs_node_major
void distribute_local_dofs_node_major(dof_id_type &next_free_dof, MeshBase &mesh)
Distributes the global degrees of freedom for dofs on this processor.
Definition: dof_map.C:1171
libMesh::DofMap::n_local_constrained_dofs
dof_id_type n_local_constrained_dofs() const
Definition: dof_map_constraints.C:1194
libMesh::DofMap::AugmentSendList::augment_send_list
virtual void augment_send_list(std::vector< dof_id_type > &send_list)=0
User-defined function to augment the send list.
libMesh::DofMap::is_periodic_boundary
bool is_periodic_boundary(const boundary_id_type boundaryid) const
Definition: dof_map.C:224
libMesh::DofMap::default_algebraic_ghosting
DefaultCoupling & default_algebraic_ghosting()
Default algebraic ghosting functor.
Definition: dof_map.h:403
libMesh::DofMap::_default_evaluating
std::unique_ptr< DefaultCoupling > _default_evaluating
The default algebraic GhostingFunctor, used to implement standard libMesh send_list construction.
Definition: dof_map.h:1721
libMesh::DofMap::_implicit_neighbor_dofs
bool _implicit_neighbor_dofs
Definition: dof_map.h:1869
libMesh::DofMap::_dof_coupling
CouplingMatrix * _dof_coupling
Degree of freedom coupling.
Definition: dof_map.h:1434
libMesh::CouplingMatrix
This class defines a coupling matrix.
Definition: coupling_matrix.h:54
libMesh::Real
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Definition: libmesh_common.h:121
libMesh::DofMap::n_SCALAR_dofs
dof_id_type n_SCALAR_dofs() const
Definition: dof_map.h:630
libMesh::ParallelObject
An object whose state is distributed along a set of processors.
Definition: parallel_object.h:55
libMesh::DofMap::add_constraint_row
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 ...
Definition: dof_map_constraints.C:1364
libMesh::DofMap::_error_on_constraint_loop
bool _error_on_constraint_loop
This flag indicates whether or not we do an opt-mode check for the presence of constraint loops,...
Definition: dof_map.h:1619
libMesh::DofMap::dof_owner
processor_id_type dof_owner(const dof_id_type dof) const
Definition: dof_map.h:701
libMesh::DofMap::_variables
std::vector< Variable > _variables
The finite element type for each variable.
Definition: dof_map.h:1624
libMesh::VariableGroup
This class defines a logically grouped set of variables in the system.
Definition: variable.h:172
libMesh::DofMap::block_size
unsigned int block_size() const
Definition: dof_map.h:617
libMesh::DofMap::_dof_indices
void _dof_indices(const Elem &elem, int p_level, std::vector< dof_id_type > &di, const unsigned int vg, const unsigned int vig, const Node *const *nodes, unsigned int n_nodes #ifdef DEBUG, const unsigned int v, std::size_t &tot_size #endif) const
Helper function that gets the dof indices on the current element for a non-SCALAR type variable,...
Definition: dof_map.C:2349
libMesh::out
OStreamProxy out
libMesh::DofMap::first_dof
dof_id_type first_dof() const
Definition: dof_map.h:653
libMesh::DofMap::first_old_dof
dof_id_type first_old_dof(const processor_id_type proc) const
Definition: dof_map.h:660
libMesh::SparsityPattern::Graph
Definition: sparsity_pattern.h:52
libMesh::DofMap::variable_group_order
Order variable_group_order(const unsigned int vg) const
Definition: dof_map.h:1914
libMesh::DofConstraintRow
std::map< dof_id_type, Real, std::less< dof_id_type >, Threads::scalable_allocator< std::pair< const dof_id_type, Real > > > DofConstraintRow
A row of the Dof constraint matrix.
Definition: dof_map.h:97
libMesh::DofMap::node_constraint_rows_end
NodeConstraints::const_iterator node_constraint_rows_end() const
Definition: dof_map.h:1037
libMesh::DofMap::gather_constraints
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.
Definition: dof_map_constraints.C:3985
libMesh::DofMap::first_old_dof
dof_id_type first_old_dof() const
Definition: dof_map.h:663
int
void ErrorVector unsigned int
Definition: adjoints_ex3.C:360
libMesh::DofMap::AugmentSparsityPattern
Abstract base class to be used to add user-defined implicit degree of freedom couplings.
Definition: dof_map.h:199
libMesh::DofMap::_sp
std::unique_ptr< SparsityPattern::Build > _sp
The sparsity pattern of the global matrix, kept around if it might be needed by future additions of t...
Definition: dof_map.h:1762
libMesh::DofMap::_implicit_neighbor_dofs_initialized
bool _implicit_neighbor_dofs_initialized
Bools to indicate if we override the –implicit_neighbor_dofs commandline options.
Definition: dof_map.h:1868
libMesh::DenseVector
Defines a dense vector for use in Finite Element-type computations.
Definition: meshless_interpolation_function.h:39
libMesh::DofMap::_node_dof_indices
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.
Definition: dof_map.C:2272
libMesh::DofMap::_extra_send_list_context
void * _extra_send_list_context
A pointer associated with the extra send list that can optionally be passed in.
Definition: dof_map.h:1705
libMesh::DofMap::variable_group
const VariableGroup & variable_group(const unsigned int c) const
Definition: dof_map.h:1884
libMesh::DofMap::constraint_rows_begin
DofConstraints::const_iterator constraint_rows_begin() const
Definition: dof_map.h:989
libMesh::DofMap::_extra_send_list_function
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.
Definition: dof_map.h:1700
libMesh::DofMap::end_dof
dof_id_type end_dof(const processor_id_type proc) const
Definition: dof_map.h:692
libMesh::DofMap::merge_ghost_functor_outputs
static void merge_ghost_functor_outputs(GhostingFunctor::map_type &elements_to_ghost, std::set< CouplingMatrix * > &temporary_coupling_matrices, const std::set< GhostingFunctor * >::iterator &gf_begin, const std::set< GhostingFunctor * >::iterator &gf_end, const MeshBase::const_element_iterator &elems_begin, const MeshBase::const_element_iterator &elems_end, processor_id_type p)
Definition: dof_map.C:1440
libMesh::NodeConstraintRow
std::map< const Node *, Real, std::less< const Node * >, Threads::scalable_allocator< std::pair< const Node *const, Real > > > NodeConstraintRow
A row of the Node constraint mapping.
Definition: dof_map.h:145
libMesh::DofMap::add_neighbors_to_send_list
void add_neighbors_to_send_list(MeshBase &mesh)
Adds entries to the _send_list vector corresponding to DoFs on elements neighboring the current proce...
Definition: dof_map.C:1507
libMesh::DofMap::add_coupling_functor
void add_coupling_functor(GhostingFunctor &coupling_functor, bool to_mesh=true)
Adds a functor which can specify coupling requirements for creation of sparse matrices.
Definition: dof_map.C:1838