libMesh
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Types | Private Attributes | Friends | List of all members
libMesh::Node Class Reference

A Node is like a Point, but with more information. More...

#include <node.h>

Inheritance diagram for libMesh::Node:
[legend]

Public Types

typedef Real value_type
 Helper typedef for C++98 generic programming. More...
 
typedef unsigned int index_type
 Helper typedef for generic index programming. More...
 

Public Member Functions

 Node (const Real x=0, const Real y=0, const Real z=0, const dof_id_type id=invalid_id)
 Constructor. More...
 
 Node (const Node &n)
 "Copy"-constructor: deliberately slices the source Node and only copies its' Point information, since copying anything else would likely be a bug. More...
 
 Node (const Node &n)=delete
 
 Node (const Point &p, const dof_id_type id=invalid_id)
 Copy-constructor from a Point. More...
 
template<typename T , typename = typename boostcopy::enable_if_c<ScalarTraits<T>::value,void>::type>
 Node (const T x)
 Disambiguate constructing from non-Real scalars. More...
 
 ~Node ()
 Destructor. More...
 
Nodeoperator= (const Point &p)
 Assign to a node from a point. More...
 
bool active () const
 
bool operator== (const Node &rhs) const
 
void print_info (std::ostream &os=libMesh::out) const
 Prints relevant information about the node. More...
 
std::string get_info () const
 Prints relevant information about the node to a string. More...
 
unsigned int packed_size () const
 
unsigned int valence () const
 
void set_valence (unsigned int val)
 Sets the number of nodes connected with this node. More...
 
processor_id_type choose_processor_id (processor_id_type pid1, processor_id_type pid2) const
 Return which of pid1 and pid2 would be preferred by the current load-balancing heuristic applied to this node. More...
 
void assign (const TypeVector< T2 > &)
 Assign to this vector without creating a temporary. More...
 
const Realoperator() (const unsigned int i) const
 
Realoperator() (const unsigned int i)
 
const Realslice (const unsigned int i) const
 
Realslice (const unsigned int i)
 
TypeVector< typename CompareTypes< Real, T2 >::supertype > operator+ (const TypeVector< T2 > &) const
 Add two vectors. More...
 
const TypeVector< Real > & operator+= (const TypeVector< T2 > &)
 Add to this vector. More...
 
void add (const TypeVector< T2 > &)
 Add to this vector without creating a temporary. More...
 
void add_scaled (const TypeVector< T2 > &, const Real &)
 Add a scaled value to this vector without creating a temporary. More...
 
TypeVector< typename CompareTypes< Real, T2 >::supertype > operator- (const TypeVector< T2 > &) const
 Subtract from this vector. More...
 
TypeVector< Realoperator- () const
 
const TypeVector< Real > & operator-= (const TypeVector< T2 > &)
 Subtract from this vector. More...
 
void subtract (const TypeVector< T2 > &)
 Subtract from this vector without creating a temporary. More...
 
void subtract_scaled (const TypeVector< T2 > &, const Real &)
 Subtract a scaled value from this vector without creating a temporary. More...
 
boostcopy::enable_if_c< ScalarTraits< Scalar >::value, TypeVector< typename CompareTypes< Real, Scalar >::supertype > >::type operator* (const Scalar &) const
 Multiply this vector by a scalar value. More...
 
CompareTypes< Real, T2 >::supertype operator* (const TypeVector< T2 > &) const
 
const TypeVector< Real > & operator*= (const Real &)
 Multiply this vector by a scalar value. More...
 
boostcopy::enable_if_c< ScalarTraits< Scalar >::value, TypeVector< typename CompareTypes< Real, Scalar >::supertype > >::type operator/ (const Scalar &) const
 Divide each entry of this vector by scalar value. More...
 
const TypeVector< Real > & operator/= (const Real &)
 Divide each entry of this vector by scalar value. More...
 
CompareTypes< Real, T2 >::supertype contract (const TypeVector< T2 > &) const
 
TypeVector< typename CompareTypes< Real, T2 >::supertype > cross (const TypeVector< T2 > &v) const
 
TypeVector< Realunit () const
 
auto norm () const -> decltype(std::norm(Real()))
 
auto norm_sq () const -> decltype(std::norm(Real()))
 
bool is_zero () const
 
void zero ()
 Set all entries of the vector to 0. More...
 
bool relative_fuzzy_equals (const TypeVector< Real > &rhs, Real tol=TOLERANCE) const
 
bool absolute_fuzzy_equals (const TypeVector< Real > &rhs, Real tol=TOLERANCE) const
 
bool operator== (const TypeVector< Real > &rhs) const
 
bool operator!= (const TypeVector< Real > &rhs) const
 
bool operator< (const TypeVector< Real > &rhs) const
 
bool operator< (const TypeVector< Complex > &rhs) const
 
bool operator<= (const TypeVector< Real > &rhs) const
 
bool operator<= (const TypeVector< Complex > &rhs) const
 
bool operator> (const TypeVector< Real > &rhs) const
 
bool operator> (const TypeVector< Complex > &rhs) const
 
bool operator>= (const TypeVector< Real > &rhs) const
 
bool operator>= (const TypeVector< Complex > &rhs) const
 
void print (std::ostream &os=libMesh::out) const
 Formatted print, by default to libMesh::out. More...
 
void write_unformatted (std::ostream &out_stream, const bool newline=true) const
 Unformatted print to the stream out. More...
 
DofObjectget_old_dof_object ()
 Pointer accessor for previously public old_dof_object. More...
 
const DofObjectget_old_dof_object () const
 
DofObjectget_old_dof_object_ref ()
 As above, but do not use in situations where the old_dof_object may be nullptr, since this function asserts that the old_dof_object is valid before returning a reference to it. More...
 
const DofObjectget_old_dof_object_ref () const
 
void clear_old_dof_object ()
 Sets the old_dof_object to nullptr. More...
 
void set_old_dof_object ()
 Sets the old_dof_object to a copy of this. More...
 
void clear_dofs ()
 Clear the DofMap data structures holding degree of freedom data. More...
 
void invalidate_dofs (const unsigned int sys_num=libMesh::invalid_uint)
 Sets all degree of freedom numbers to invalid_id. More...
 
void invalidate_id ()
 Sets the id to invalid_id. More...
 
void invalidate_processor_id ()
 Sets the processor id to invalid_processor_id. More...
 
void invalidate ()
 Invalidates all the indices for this DofObject. More...
 
unsigned int n_dofs (const unsigned int s, const unsigned int var=libMesh::invalid_uint) const
 
dof_id_type id () const
 
dof_id_typeset_id ()
 
void set_id (const dof_id_type dofid)
 Sets the id for this DofObject. More...
 
unique_id_type unique_id () const
 
unique_id_typeset_unique_id ()
 
void set_unique_id (unique_id_type new_id)
 Sets the unique_id for this DofObject. More...
 
bool valid_id () const
 
bool valid_unique_id () const
 
processor_id_type processor_id () const
 
processor_id_typeprocessor_id ()
 
void processor_id (const processor_id_type pid)
 Sets the processor_id for this DofObject. More...
 
bool valid_processor_id () const
 
unsigned int n_systems () const
 
unsigned int n_pseudo_systems () const
 
void set_n_systems (const unsigned int s)
 Sets the number of systems for this DofObject. More...
 
void set_extra_integer (const unsigned int index, const dof_id_type value)
 Sets the value on this object of the extra integer associated with index, which should have been obtained via a call to MeshBase::add_elem_integer or MeshBase::add_node_integer. More...
 
dof_id_type get_extra_integer (const unsigned int index) const
 Gets the value on this object of the extra integer associated with index, which should have been obtained via a call to MeshBase::add_elem_integer or MeshBase::add_node_integer. More...
 
template<typename T >
void set_extra_datum (const unsigned int index, const T value)
 Sets the value on this object of the extra datum associated with index, which should have been obtained via a call to MeshBase::add_elem_datum or MeshBase::add_node_datum using the same type T. More...
 
template<typename T >
get_extra_datum (const unsigned int index) const
 Gets the value on this object of the extra datum associated with index, which should have been obtained via a call to MeshBase::add_elem_datum or MeshBase::add_node_datum using the same type T. More...
 
void add_system ()
 Adds an additional system to the DofObject. More...
 
unsigned int n_var_groups (const unsigned int s) const
 
unsigned int n_vars (const unsigned int s, const unsigned int vg) const
 
unsigned int n_vars (const unsigned int s) const
 
void set_n_vars_per_group (const unsigned int s, const std::vector< unsigned int > &nvpg)
 Sets number of variables in each group associated with system s for this DofObject. More...
 
unsigned int n_comp (const unsigned int s, const unsigned int var) const
 
unsigned int n_comp_group (const unsigned int s, const unsigned int vg) const
 
void set_n_comp (const unsigned int s, const unsigned int var, const unsigned int ncomp)
 Sets the number of components for Variable var of system s associated with this DofObject. More...
 
void set_n_comp_group (const unsigned int s, const unsigned int vg, const unsigned int ncomp)
 Sets the number of components for VariableGroup vg of system s associated with this DofObject. More...
 
dof_id_type dof_number (const unsigned int s, const unsigned int var, const unsigned int comp) const
 
dof_id_type dof_number (const unsigned int s, const unsigned int vg, const unsigned int vig, const unsigned int comp, const unsigned int n_comp) const
 
std::pair< unsigned int, unsigned intvar_to_vg_and_offset (const unsigned int s, const unsigned int var) const
 
void set_dof_number (const unsigned int s, const unsigned int var, const unsigned int comp, const dof_id_type dn)
 Sets the global degree of freedom number for variable var, component comp for system s associated with this DofObject. More...
 
bool has_dofs (const unsigned int s=libMesh::invalid_uint) const
 
void set_vg_dof_base (const unsigned int s, const unsigned int vg, const dof_id_type db)
 VariableGroup DoF indices are indexed as id = base + var_in_vg*ncomp + comp This method allows for direct access to the base. More...
 
dof_id_type vg_dof_base (const unsigned int s, const unsigned int vg) const
 VariableGroup DoF indices are indexed as id = base + var_in_vg*ncomp + comp This method allows for direct access to the base. More...
 
void add_extra_integers (const unsigned int n_integers)
 Assigns a set of extra integers to this DofObject. More...
 
void add_extra_integers (const unsigned int n_integers, const std::vector< dof_id_type > &default_values)
 Assigns a set of extra integers to this DofObject. More...
 
unsigned int n_extra_integers () const
 Returns how many extra integers are associated to the DofObject. More...
 
bool has_extra_integers () const
 Returns whether extra integers are associated to the DofObject. More...
 
unsigned int packed_indexing_size () const
 If we pack our indices into an buffer for communications, how many ints do we need? More...
 
void unpack_indexing (std::vector< largest_id_type >::const_iterator begin)
 A method for creating our index buffer from packed data - basically with our current implementation we investigate the size term and then copy. More...
 
void pack_indexing (std::back_insert_iterator< std::vector< largest_id_type >> target) const
 A method for creating packed data from our index buffer - basically a copy with prepended size with our current implementation. More...
 
void debug_buffer () const
 Print our buffer for debugging. More...
 
void print_dof_info () const
 Print out info for debugging. More...
 
void set_buffer (const std::vector< dof_id_type > &buf)
 

Static Public Member Functions

static std::unique_ptr< Nodebuild (const Node &n)
 
static std::unique_ptr< Nodebuild (const Point &p, const dof_id_type id)
 
static std::unique_ptr< Nodebuild (const Real x, const Real y, const Real z, const dof_id_type id)
 
static unsigned int unpackable_indexing_size (std::vector< largest_id_type >::const_iterator begin)
 If we have indices packed into an buffer for communications, how much of that buffer applies to this dof object? More...
 
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 ()
 
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 ()
 

Static Public Attributes

static const dof_id_type invalid_id = static_cast<dof_id_type>(-1)
 An invalid id to distinguish an uninitialized DofObject. More...
 
static const unique_id_type invalid_unique_id = static_cast<unique_id_type>(-1)
 An invalid unique_id to distinguish an uninitialized DofObject. More...
 
static const processor_id_type invalid_processor_id = static_cast<processor_id_type>(-1)
 An invalid processor_id to distinguish DoFs that have not been assigned to a processor. More...
 

Protected Types

typedef std::map< std::string, std::pair< unsigned int, unsigned int > > Counts
 Data structure to log the information. More...
 
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...
 
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

Real _coords [LIBMESH_DIM]
 The coordinates of the TypeVector. More...
 
std::unique_ptr< DofObjectold_dof_object
 This object on the last mesh. More...
 

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...
 
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 unsigned char valence_idx_t
 Type used to store node valence. More...
 

Private Attributes

valence_idx_t _valence
 The number of nodes connected with this node. More...
 

Friends

class MeshRefinement
 This class need access to the node key information, but no one else should be able to mess with it. More...
 
class Elem
 

Detailed Description

A Node is like a Point, but with more information.

A Node is located in space and is associated with some (x,y,z) coordinates. Additionally, a Node may be enumerated with a global id. Finally, a Node may have an arbitrary number of degrees of freedom associated with it.

Author
Benjamin S. Kirk
Date
2003 A geometric point in (x,y,z) space associated with a DOF.

Definition at line 52 of file node.h.

Member Typedef Documentation

◆ Counts [1/2]

typedef std::map<std::string, std::pair<unsigned int, unsigned int> > libMesh::ReferenceCounter::Counts
protectedinherited

Data structure to log the information.

The log is identified by the class name.

Definition at line 119 of file reference_counter.h.

◆ Counts [2/2]

typedef std::map<std::string, std::pair<unsigned int, unsigned int> > libMesh::ReferenceCounter::Counts
protectedinherited

Data structure to log the information.

The log is identified by the class name.

Definition at line 119 of file reference_counter.h.

◆ index_type

typedef unsigned int libMesh::TypeVector< Real >::index_type
inherited

Helper typedef for generic index programming.

Definition at line 149 of file type_vector.h.

◆ valence_idx_t

typedef unsigned char libMesh::Node::valence_idx_t
private

Type used to store node valence.

Definition at line 212 of file node.h.

◆ value_type

typedef Real libMesh::TypeVector< Real >::value_type
inherited

Helper typedef for C++98 generic programming.

Definition at line 144 of file type_vector.h.

Constructor & Destructor Documentation

◆ Node() [1/5]

libMesh::Node::Node ( const Real  x = 0,
const Real  y = 0,
const Real  z = 0,
const dof_id_type  id = invalid_id 
)
inlineexplicit

Constructor.

By default sets all entries to 0. Gives the point 0 in LIBMESH_DIM dimensions with an id of Node::invalid_id.

Definition at line 240 of file node.h.

References libMesh::DofObject::set_id().

243  :
244  Point(x,y,z)
245 #ifdef LIBMESH_ENABLE_NODE_VALENCE
246  ,
247  _valence(0)
248 #endif
249 {
250  this->set_id() = dofid;
251 }
252 
253 
254 #ifdef LIBMESH_ENABLE_DEPRECATED
255 inline
256 Node::Node (const Node & n) :
257  Point(n),
258  DofObject(), // Deliberately slicing!
260 #ifdef LIBMESH_ENABLE_NODE_VALENCE
261  ,
262  _valence(0)
263 #endif
264 {
265  libmesh_deprecated(); // Cast to Point first!
266 }
267 #endif // LIBMESH_ENABLE_DEPRECATED
268 
269 
270 
271 inline
272 Node::Node (const Point & p,
273  const dof_id_type dofid) :
274  Point(p)
275 #ifdef LIBMESH_ENABLE_NODE_VALENCE
276  ,
277  _valence(0)
278 #endif
279 {
280  // optionally assign the id. We have
281  // to do it like this otherwise
282  // Node n = Point p would erase
283  // the id!
284  if (dofid != invalid_id)
285  this->set_id() = dofid;
286 }
287 
288 
289 
290 inline
291 Node::~Node ()
292 {
293 }
valence_idx_t _valence
The number of nodes connected with this node.
Definition: node.h:219
dof_id_type & set_id()
Definition: dof_object.h:831
Node(const Real x=0, const Real y=0, const Real z=0, const dof_id_type id=invalid_id)
Constructor.
Definition: node.h:240
DofObject()
Constructor.
Definition: dof_object.h:722
Point(const Real x=0., const Real y=0., const Real z=0.)
Constructor.
Definition: point.h:47
uint8_t dof_id_type
Definition: id_types.h:67

◆ Node() [2/5]

libMesh::Node::Node ( const Node n)

"Copy"-constructor: deliberately slices the source Node and only copies its' Point information, since copying anything else would likely be a bug.

◆ Node() [3/5]

libMesh::Node::Node ( const Node n)
delete

◆ Node() [4/5]

libMesh::Node::Node ( const Point p,
const dof_id_type  id = invalid_id 
)
explicit

Copy-constructor from a Point.

Optionally assigned the id.

◆ Node() [5/5]

template<typename T , typename = typename boostcopy::enable_if_c<ScalarTraits<T>::value,void>::type>
libMesh::Node::Node ( const T  x)
inlineexplicit

Disambiguate constructing from non-Real scalars.

Definition at line 94 of file node.h.

References libMesh::DofObject::invalid_id, and libMesh::DofObject::set_id().

94  :
95  Point (x,0,0)
96  { this->set_id() = invalid_id; }
dof_id_type & set_id()
Definition: dof_object.h:831
Point(const Real x=0., const Real y=0., const Real z=0.)
Constructor.
Definition: point.h:47
static const dof_id_type invalid_id
An invalid id to distinguish an uninitialized DofObject.
Definition: dof_object.h:477

◆ ~Node()

libMesh::Node::~Node ( )

Destructor.

Member Function Documentation

◆ absolute_fuzzy_equals()

bool libMesh::TypeVector< Real >::absolute_fuzzy_equals ( const TypeVector< Real > &  rhs,
Real  tol = TOLERANCE 
) const
inlineinherited
Returns
true if two vectors are equal to within an absolute tolerance of tol.

Definition at line 979 of file type_vector.h.

References std::abs().

980 {
981 #if LIBMESH_DIM == 1
982  return (std::abs(_coords[0] - rhs._coords[0])
983  <= tol);
984 #endif
985 
986 #if LIBMESH_DIM == 2
987  return (std::abs(_coords[0] - rhs._coords[0]) +
988  std::abs(_coords[1] - rhs._coords[1])
989  <= tol);
990 #endif
991 
992 #if LIBMESH_DIM == 3
993  return (std::abs(_coords[0] - rhs._coords[0]) +
994  std::abs(_coords[1] - rhs._coords[1]) +
995  std::abs(_coords[2] - rhs._coords[2])
996  <= tol);
997 #endif
998 }
Real _coords[LIBMESH_DIM]
The coordinates of the TypeVector.
Definition: type_vector.h:439
ADRealEigenVector< T, D, asd > abs(const ADRealEigenVector< T, D, asd > &)
Definition: type_vector.h:57

◆ active()

bool libMesh::Node::active ( ) const
inline
Returns
true if the node is active. An active node is defined as one for which id() is not Node::invalid_id. Inactive nodes are nodes that are in the mesh but are not connected to any elements.

Definition at line 345 of file node.h.

References libMesh::DofObject::invalid_id.

346 {
347  return (this->id() != Node::invalid_id);
348 }
static const dof_id_type invalid_id
An invalid id to distinguish an uninitialized DofObject.
Definition: dof_object.h:477

◆ add()

void libMesh::TypeVector< Real >::add ( const TypeVector< T2 > &  p)
inlineinherited

Add to this vector without creating a temporary.

Definition at line 627 of file type_vector.h.

628 {
629 #if LIBMESH_DIM == 1
630  _coords[0] += p._coords[0];
631 #endif
632 
633 #if LIBMESH_DIM == 2
634  _coords[0] += p._coords[0];
635  _coords[1] += p._coords[1];
636 #endif
637 
638 #if LIBMESH_DIM == 3
639  _coords[0] += p._coords[0];
640  _coords[1] += p._coords[1];
641  _coords[2] += p._coords[2];
642 #endif
643 
644 }
Real _coords[LIBMESH_DIM]
The coordinates of the TypeVector.
Definition: type_vector.h:439

◆ add_extra_integers() [1/2]

void libMesh::DofObject::add_extra_integers ( const unsigned int  n_integers)
inherited

Assigns a set of extra integers to this DofObject.

There will now be n_integers associated; this replaces, not augments, any previous count.

Any newly-added values will initially be DofObject::invalid_id

If non-integer data is in the set, each datum of type T should be counted sizeof(T)/sizeof(dof_id_type) times in n_integers.

Definition at line 490 of file dof_object.C.

References libMesh::DofObject::_idx_buf, libMesh::DofObject::invalid_id, and libMesh::DofObject::n_extra_integers().

Referenced by libMesh::ReplicatedMesh::add_elem(), libMesh::DistributedMesh::add_elem(), libMesh::DofObject::add_extra_integers(), libMesh::ReplicatedMesh::add_node(), libMesh::DistributedMesh::add_node(), libMesh::ReplicatedMesh::add_point(), libMesh::UnstructuredMesh::all_first_order(), libMesh::UnstructuredMesh::copy_nodes_and_elements(), libMesh::UnstructuredMesh::create_submesh(), libMesh::ReplicatedMesh::insert_elem(), libMesh::DistributedMesh::insert_elem(), libMesh::ReplicatedMesh::insert_node(), DofObjectTest< Node >::testAddExtraData(), DofObjectTest< Node >::testAddSystemExtraInts(), DofObjectTest< Node >::testSetNSystemsExtraInts(), and DofObjectTest< Node >::testSetNVariableGroupsExtraInts().

491 {
492  if (_idx_buf.empty())
493  {
494  if (n_integers)
495  {
496  _idx_buf.resize(n_integers+1, DofObject::invalid_id);
497  _idx_buf[0] = dof_id_type(-1);
498  }
499  return;
500  }
501  else
502  {
503  const int hdr = dof_id_signed_type(_idx_buf[0]);
504 
505  // We already have some extra integers, but may need more or
506  // less now.
507  if (hdr < 0)
508  {
509  const unsigned int old_n_integers = this->n_extra_integers();
510  if (n_integers != old_n_integers)
511  {
512  // Make or remove space as needed by count change
513  _idx_buf.resize(_idx_buf.size()+n_integers-old_n_integers, DofObject::invalid_id);
514 
515  // The start index for the extra integers is unchanged.
516  }
517  }
518  else if (n_integers)
519  // We had no extra integers, but need to add some
520  {
521  // Mark the DofObject as holding extra integers
522  _idx_buf[0] = dof_id_type(-hdr-1);
523 
524  // Insert the integer start position
525  DofObject::index_buffer_t::iterator it = _idx_buf.begin() + hdr;
526  _idx_buf.insert(it, _idx_buf.size()+1);
527 
528  // Increment the previous system start positions to account
529  // for the new header entry creating an offset
530  for (int i=1; i<hdr; i++)
531  _idx_buf[i]++;
532 
533  // Append space for extra integers
534  _idx_buf.resize(_idx_buf.size()+n_integers, DofObject::invalid_id);
535  }
536  }
537 }
static const dof_id_type invalid_id
An invalid id to distinguish an uninitialized DofObject.
Definition: dof_object.h:477
int8_t dof_id_signed_type
Definition: id_types.h:68
unsigned int n_extra_integers() const
Returns how many extra integers are associated to the DofObject.
Definition: dof_object.h:1163
index_buffer_t _idx_buf
Definition: dof_object.h:675
uint8_t dof_id_type
Definition: id_types.h:67

◆ add_extra_integers() [2/2]

void libMesh::DofObject::add_extra_integers ( const unsigned int  n_integers,
const std::vector< dof_id_type > &  default_values 
)
inherited

Assigns a set of extra integers to this DofObject.

There will now be n_integers associated; this replaces, not augments, any previous count.

Any newly-added values will be copied from default_values.

If non-integer data is in the set, each datum of type T should be counted sizeof(T)/sizeof(dof_id_type) times in n_integers, and its data should be expressed in default_values as per memcpy.

Definition at line 542 of file dof_object.C.

References libMesh::DofObject::_idx_buf, libMesh::DofObject::add_extra_integers(), and libMesh::DofObject::n_extra_integers().

544 {
545  libmesh_assert_equal_to(n_integers, default_values.size());
546 
547  const unsigned int n_old_integers = this->n_extra_integers();
548  this->add_extra_integers(n_integers);
549  if (n_integers > n_old_integers)
550  {
551  const unsigned int n_more_integers = n_integers - n_old_integers;
552  std::copy(default_values.begin()+n_old_integers,
553  default_values.end(),
554  _idx_buf.end()-n_more_integers);
555  }
556 }
void add_extra_integers(const unsigned int n_integers)
Assigns a set of extra integers to this DofObject.
Definition: dof_object.C:490
unsigned int n_extra_integers() const
Returns how many extra integers are associated to the DofObject.
Definition: dof_object.h:1163
index_buffer_t _idx_buf
Definition: dof_object.h:675

◆ add_scaled()

void libMesh::TypeVector< Real >::add_scaled ( const TypeVector< T2 > &  p,
const Real &  factor 
)
inlineinherited

Add a scaled value to this vector without creating a temporary.

Definition at line 651 of file type_vector.h.

652 {
653 #if LIBMESH_DIM == 1
654  _coords[0] += factor*p(0);
655 #endif
656 
657 #if LIBMESH_DIM == 2
658  _coords[0] += factor*p(0);
659  _coords[1] += factor*p(1);
660 #endif
661 
662 #if LIBMESH_DIM == 3
663  _coords[0] += factor*p(0);
664  _coords[1] += factor*p(1);
665  _coords[2] += factor*p(2);
666 #endif
667 
668 }
Real _coords[LIBMESH_DIM]
The coordinates of the TypeVector.
Definition: type_vector.h:439

◆ add_system()

void libMesh::DofObject::add_system ( )
inherited

Adds an additional system to the DofObject.

Definition at line 195 of file dof_object.C.

References libMesh::DofObject::_idx_buf, libMesh::DofObject::has_extra_integers(), libMesh::DofObject::n_systems(), libMesh::DofObject::n_var_groups(), libMesh::DofObject::n_vars(), and libMesh::DofObject::set_n_systems().

Referenced by DofObjectTest< Node >::testAddSystemExtraInts().

196 {
197  // quick return?
198  if (this->n_systems() == 0)
199  {
200  this->set_n_systems(1);
201  return;
202  }
203 
204  // cache this value before we screw it up!
205  const unsigned int ns_orig = this->n_systems();
206 
207  DofObject::index_buffer_t::iterator it = _idx_buf.begin() + ns_orig;
208 
209  // Create the entry for the new system indicating 0 variables.
210  //
211  // increment the number of systems and the offsets for each of
212  // the systems including the new one we just added.
213  if (this->has_extra_integers())
214  {
215  // this inserts the extra_integers' start position as the start
216  // position for the new system. We'll increment all those
217  // counts in one sweep next, to account for header expansion.
218  _idx_buf.insert(it, *it);
219 
220  _idx_buf[0]--;
221  for (unsigned int i=1; i<ns_orig+2; i++)
222  {
223  libmesh_assert_less(i, _idx_buf.size());
224  _idx_buf[i]++;
225  }
226  }
227  else
228  {
229  // this inserts the current vector size at the position for the
230  // new system
231  _idx_buf.insert(it, cast_int<dof_id_type>(_idx_buf.size()));
232 
233  for (unsigned int i=0; i<ns_orig+1; i++)
234  {
235  libmesh_assert_less(i, _idx_buf.size());
236  _idx_buf[i]++;
237  }
238  }
239 
240  libmesh_assert_equal_to (this->n_systems(), (ns_orig+1));
241  libmesh_assert_equal_to (this->n_vars(ns_orig), 0);
242  libmesh_assert_equal_to (this->n_var_groups(ns_orig), 0);
243 }
unsigned int n_var_groups(const unsigned int s) const
Definition: dof_object.h:950
unsigned int n_vars(const unsigned int s, const unsigned int vg) const
Definition: dof_object.h:960
unsigned int n_systems() const
Definition: dof_object.h:930
bool has_extra_integers() const
Returns whether extra integers are associated to the DofObject.
Definition: dof_object.h:1181
void set_n_systems(const unsigned int s)
Sets the number of systems for this DofObject.
Definition: dof_object.C:150
index_buffer_t _idx_buf
Definition: dof_object.h:675

◆ assign()

void libMesh::TypeVector< Real >::assign ( const TypeVector< T2 > &  p)
inlineinherited

Assign to this vector without creating a temporary.

Definition at line 556 of file type_vector.h.

557 {
558  for (unsigned int i=0; i<LIBMESH_DIM; i++)
559  _coords[i] = p._coords[i];
560 }
Real _coords[LIBMESH_DIM]
The coordinates of the TypeVector.
Definition: type_vector.h:439

◆ build() [1/3]

std::unique_ptr< Node > libMesh::Node::build ( const Node n)
inlinestatic
Returns
A Node copied from n and wrapped in a smart pointer.

Definition at line 315 of file node.h.

Referenced by libMesh::ReplicatedMesh::add_point(), libMesh::DistributedMesh::add_point(), libMesh::MeshTools::Generation::build_extrusion(), libMesh::InfElemBuilder::build_inf_elem(), libMesh::XdrIO::read_serialized_connectivity(), and VolumeTest::test_elem().

316 {
317  libmesh_deprecated();
318  return std::make_unique<Node>(n);
319 }

◆ build() [2/3]

std::unique_ptr< Node > libMesh::Node::build ( const Point p,
const dof_id_type  id 
)
inlinestatic
Returns
A Node copied from p with id == id and wrapped in a smart pointer.

Definition at line 325 of file node.h.

References libMesh::DofObject::id().

327 {
328  return std::make_unique<Node>(p,id);
329 }
dof_id_type id() const
Definition: dof_object.h:823

◆ build() [3/3]

std::unique_ptr< Node > libMesh::Node::build ( const Real  x,
const Real  y,
const Real  z,
const dof_id_type  id 
)
inlinestatic
Returns
A Node created from the specified (x,y,z) positions with id == id and wrapped in a smart pointer.

Definition at line 334 of file node.h.

References libMesh::DofObject::id().

338 {
339  return std::make_unique<Node>(x,y,z,id);
340 }
dof_id_type id() const
Definition: dof_object.h:823

◆ choose_processor_id()

processor_id_type libMesh::Node::choose_processor_id ( processor_id_type  pid1,
processor_id_type  pid2 
) const

Return which of pid1 and pid2 would be preferred by the current load-balancing heuristic applied to this node.

Definition at line 78 of file node.C.

References libMesh::DofObject::invalid_processor_id, and libMesh::on_command_line().

Referenced by libMesh::MeshTools::correct_node_proc_ids(), and libMesh::Partitioner::set_node_processor_ids().

79 {
81  return pid2;
82 
83  // Do we want the new load-balanced node partitioning heuristic
84  // instead of the default partitioner-friendlier heuristic?
85  static bool load_balanced_nodes =
86  libMesh::on_command_line ("--load-balanced-nodes");
87 
88  // For better load balancing, we can use the min
89  // even-numberered nodes and the max for odd-numbered.
90  if (load_balanced_nodes)
91  {
92  if (this->id() % 2 &&
94  return std::max(pid1, pid2);
95  else
96  return std::min(pid1, pid2);
97  }
98 
99  // Our default behavior, which puts too many nodes on lower MPI
100  // ranks but which keeps elements' nodes on the same partition more
101  // often, is simply:
102  return std::min(pid1, pid2);
103 }
static const processor_id_type invalid_processor_id
An invalid processor_id to distinguish DoFs that have not been assigned to a processor.
Definition: dof_object.h:488
bool on_command_line(std::string arg)
Definition: libmesh.C:924

◆ clear_dofs()

void libMesh::DofObject::clear_dofs ( )
inlineinherited

Clear the DofMap data structures holding degree of freedom data.

If any extra integers are associated with this DofObject, their count and values are unchanged.

Definition at line 793 of file dof_object.h.

References libMesh::DofObject::set_n_systems().

794 {
795  this->set_n_systems(0);
796 }
void set_n_systems(const unsigned int s)
Sets the number of systems for this DofObject.
Definition: dof_object.C:150

◆ clear_old_dof_object()

void libMesh::DofObject::clear_old_dof_object ( )
inherited

Sets the old_dof_object to nullptr.

Definition at line 128 of file dof_object.C.

References libMesh::DofObject::old_dof_object.

Referenced by libMesh::DofObject::operator=(), libMesh::DofObject::set_old_dof_object(), and libMesh::DofObject::unpack_indexing().

129 {
130  this->old_dof_object.reset(nullptr);
131 }
std::unique_ptr< DofObject > old_dof_object
This object on the last mesh.
Definition: dof_object.h:88

◆ contract()

CompareTypes< Real , T2 >::supertype libMesh::TypeVector< Real >::contract ( const TypeVector< T2 > &  p) const
inlineinherited
Returns
The result of TypeVector::operator*().

Definition at line 896 of file type_vector.h.

897 {
898  return (*this)*(p);
899 }

◆ cross()

TypeVector< typename CompareTypes< Real , T2 >::supertype > libMesh::TypeVector< Real >::cross ( const TypeVector< T2 > &  v) const
inherited
Returns
The cross product of this vector with v.

Definition at line 906 of file type_vector.h.

References libMesh::libmesh_ignore().

907 {
908  typedef typename CompareTypes<T, T2>::supertype TS;
909  libmesh_assert_equal_to (LIBMESH_DIM, 3);
910 
911  // | i j k |
912  // |(*this)(0) (*this)(1) (*this)(2)|
913  // | p(0) p(1) p(2) |
914 
915 #if LIBMESH_DIM == 3
916  return TypeVector<TS>( _coords[1]*p._coords[2] - _coords[2]*p._coords[1],
917  -_coords[0]*p._coords[2] + _coords[2]*p._coords[0],
918  _coords[0]*p._coords[1] - _coords[1]*p._coords[0]);
919 #else
920  libmesh_ignore(p);
921  return TypeVector<TS>(0);
922 #endif
923 }
Real _coords[LIBMESH_DIM]
The coordinates of the TypeVector.
Definition: type_vector.h:439
void libmesh_ignore(const Args &...)

◆ debug_buffer()

void libMesh::DofObject::debug_buffer ( ) const
inherited

Print our buffer for debugging.

Definition at line 660 of file dof_object.C.

References libMesh::DofObject::_idx_buf, libMesh::MeshTools::Generation::Private::idx(), and libMesh::out.

661 {
662  libMesh::out << " [ ";
663  for (const auto & idx : _idx_buf)
664  libMesh::out << idx << " ";
665  libMesh::out << "]\n";
666 }
OStreamProxy out
index_buffer_t _idx_buf
Definition: dof_object.h:675
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.

◆ disable_print_counter_info() [1/2]

void libMesh::ReferenceCounter::disable_print_counter_info ( )
staticinherited

Definition at line 100 of file reference_counter.C.

References libMesh::ReferenceCounter::_enable_print_counter.

101 {
102  _enable_print_counter = false;
103  return;
104 }
static bool _enable_print_counter
Flag to control whether reference count information is printed when print_info is called...

◆ disable_print_counter_info() [2/2]

void libMesh::ReferenceCounter::disable_print_counter_info ( )
staticinherited

Definition at line 100 of file reference_counter.C.

References libMesh::ReferenceCounter::_enable_print_counter.

101 {
102  _enable_print_counter = false;
103  return;
104 }
static bool _enable_print_counter
Flag to control whether reference count information is printed when print_info is called...

◆ dof_number() [1/2]

dof_id_type libMesh::DofObject::dof_number ( const unsigned int  s,
const unsigned int  var,
const unsigned int  comp 
) const
inlineinherited
Returns
The global degree of freedom number for variable var, component comp for system s associated with this DofObject

When partitioning and DoF numbering have been performed by libMesh, every current DoF on this DofObject will belong to its processor.

Definition at line 1025 of file dof_object.h.

References libMesh::DofObject::n_comp(), libMesh::DofObject::n_comp_group(), libMesh::DofObject::n_systems(), libMesh::DofObject::n_vars(), and libMesh::DofObject::var_to_vg_and_offset().

Referenced by libMesh::DofMap::_dof_indices(), libMesh::DofMap::_node_dof_indices(), libMesh::DofMap::allgather_recursive_constraints(), assemble_matrix_and_rhs(), assemble_shell(), libMesh::FEGenericBase< FEOutputType< T >::type >::compute_periodic_constraints(), libMesh::DofMap::constrain_p_dofs(), libMesh::ExodusII_IO::copy_elemental_solution(), libMesh::Nemesis_IO::copy_elemental_solution(), libMesh::ExodusII_IO::copy_nodal_solution(), libMesh::Nemesis_IO::copy_nodal_solution(), libMesh::DofMap::distribute_dofs(), libMesh::DofMap::dof_indices(), libMesh::DofObject::DofObject(), libMesh::OldSolutionCoefs< Output, point_output >::eval_at_node(), libMesh::OldSolutionValue< Output, point_output >::eval_at_node(), libMesh::OldSolutionCoefs< Output, point_output >::eval_mixed_derivatives(), libMesh::OldSolutionValue< Output, point_output >::eval_mixed_derivatives(), libMesh::OldSolutionCoefs< Output, point_output >::eval_old_dofs(), libMesh::OldSolutionValue< Output, point_output >::eval_old_dofs(), fill_dirichlet_bc(), get_info(), libMesh::Elem::get_info(), libMesh::DofMap::local_variable_indices(), main(), libMesh::DofMap::old_dof_indices(), libMesh::BuildProjectionList::operator()(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::ProjectVertices::operator()(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::ProjectEdges::operator()(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::ProjectSides::operator()(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::ProjectInteriors::operator()(), libMesh::DofObject::operator=(), libMesh::DofObject::print_dof_info(), libMesh::DofMap::process_mesh_constraint_rows(), LinearElasticityWithContact::residual_and_jacobian(), libMesh::HPCoarsenTest::select_refinement(), libMesh::DofObject::set_dof_number(), libMesh::DofMap::set_nonlocal_dof_objects(), ParsedFEMFunctionTest::setUp(), DofObjectTest< Node >::testJensEftangBug(), DofObjectTest< Node >::testManualDofCalculation(), libMesh::BoundaryVolumeSolutionTransfer::transfer_boundary_volume(), libMesh::DTKAdapter::update_variable_values(), and libMesh::Nemesis_IO_Helper::write_nodal_solution().

1028 {
1029  libmesh_assert_less (s, this->n_systems());
1030  libmesh_assert_less (var, this->n_vars(s));
1031  libmesh_assert_less (comp, this->n_comp(s,var));
1032 
1033  const std::pair<unsigned int, unsigned int>
1034  vg_vig = this->var_to_vg_and_offset(s,var);
1035 
1036  const unsigned int
1037  n_comp = this->n_comp_group(s,vg_vig.first);
1038 
1039  return this->dof_number(s, vg_vig.first, vg_vig.second,
1040  comp, n_comp);
1041 }
dof_id_type dof_number(const unsigned int s, const unsigned int var, const unsigned int comp) const
Definition: dof_object.h:1025
unsigned int n_comp(const unsigned int s, const unsigned int var) const
Definition: dof_object.h:995
unsigned int n_vars(const unsigned int s, const unsigned int vg) const
Definition: dof_object.h:960
unsigned int n_systems() const
Definition: dof_object.h:930
std::pair< unsigned int, unsigned int > var_to_vg_and_offset(const unsigned int s, const unsigned int var) const
Definition: dof_object.h:1193
unsigned int n_comp_group(const unsigned int s, const unsigned int vg) const
Definition: dof_object.h:1008

◆ dof_number() [2/2]

dof_id_type libMesh::DofObject::dof_number ( const unsigned int  s,
const unsigned int  vg,
const unsigned int  vig,
const unsigned int  comp,
const unsigned int  n_comp 
) const
inlineinherited
Returns
The global degree of freedom number for variable group vg, variable index vig within the group, component comp out of n_comp, for system s on this DofObject

Even users who need to call dof_number from user code probably don't want to call this overload.

Definition at line 1046 of file dof_object.h.

References libMesh::DofObject::_idx_buf, libMesh::DofObject::invalid_id, libMesh::DofObject::n_comp(), libMesh::DofObject::n_systems(), libMesh::DofObject::n_var_groups(), libMesh::DofObject::n_vars(), and libMesh::DofObject::start_idx().

1051 {
1052  libmesh_assert_less (s, this->n_systems());
1053  libmesh_assert_less (vg, this->n_var_groups(s));
1054  libmesh_assert_less (vig, this->n_vars(s,vg));
1055 
1056  const unsigned int
1057  start_idx_sys = this->start_idx(s);
1058 
1059  libmesh_assert_less ((start_idx_sys + 2*vg + 1), _idx_buf.size());
1060 
1061  const dof_id_type
1062  base_idx = _idx_buf[start_idx_sys + 2*vg + 1];
1063 
1064  // if the first component is invalid, they
1065  // are all invalid
1066  if (base_idx == invalid_id)
1067  return invalid_id;
1068 
1069  // otherwise the index is the first component
1070  // index augmented by the component number
1071  else
1072  return cast_int<dof_id_type>(base_idx + vig*n_comp + comp);
1073 }
unsigned int n_comp(const unsigned int s, const unsigned int var) const
Definition: dof_object.h:995
unsigned int n_var_groups(const unsigned int s) const
Definition: dof_object.h:950
unsigned int n_vars(const unsigned int s, const unsigned int vg) const
Definition: dof_object.h:960
unsigned int n_systems() const
Definition: dof_object.h:930
static const dof_id_type invalid_id
An invalid id to distinguish an uninitialized DofObject.
Definition: dof_object.h:477
unsigned int start_idx(const unsigned int s) const
The starting index for system s.
Definition: dof_object.h:1242
index_buffer_t _idx_buf
Definition: dof_object.h:675
uint8_t dof_id_type
Definition: id_types.h:67

◆ enable_print_counter_info() [1/2]

void libMesh::ReferenceCounter::enable_print_counter_info ( )
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.

95 {
96  _enable_print_counter = true;
97  return;
98 }
static bool _enable_print_counter
Flag to control whether reference count information is printed when print_info is called...

◆ enable_print_counter_info() [2/2]

void libMesh::ReferenceCounter::enable_print_counter_info ( )
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.

95 {
96  _enable_print_counter = true;
97  return;
98 }
static bool _enable_print_counter
Flag to control whether reference count information is printed when print_info is called...

◆ get_extra_datum()

template<typename T >
T libMesh::DofObject::get_extra_datum ( const unsigned int  index) const
inlineinherited

Gets the value on this object of the extra datum associated with index, which should have been obtained via a call to MeshBase::add_elem_datum or MeshBase::add_node_datum using the same type T.

Definition at line 1139 of file dof_object.h.

References libMesh::DofObject::_idx_buf, libMesh::DofObject::n_extra_integers(), libMesh::DofObject::n_systems(), and libMesh::DofObject::start_idx_ints().

Referenced by libMesh::Elem::get_info(), libMesh::VTKIO::nodes_to_vtk(), libMesh::rational_fe_shape(), libMesh::rational_fe_shape_deriv(), libMesh::rational_fe_shape_second_deriv(), libMesh::rational_fe_weighted_shapes(), libMesh::rational_fe_weighted_shapes_derivs(), and DofObjectTest< Node >::testAddExtraData().

1140 {
1141 #ifndef NDEBUG
1142  const unsigned int n_more_integers = (sizeof(T)-1)/sizeof(dof_id_type);
1143 #endif
1144  libmesh_assert_less(index+n_more_integers, this->n_extra_integers());
1145  libmesh_assert_less(this->n_systems(), _idx_buf.size());
1146 
1147  const unsigned int start_idx_i = this->start_idx_ints();
1148 
1149  libmesh_assert_less(start_idx_i+index+n_more_integers, _idx_buf.size());
1150  T returnval;
1151  std::memcpy(&returnval, &_idx_buf[start_idx_i+index], sizeof(T));
1152  return returnval;
1153 }
unsigned int start_idx_ints() const
The starting index for an extra_integers pseudosystem.
Definition: dof_object.h:1266
unsigned int n_systems() const
Definition: dof_object.h:930
unsigned int n_extra_integers() const
Returns how many extra integers are associated to the DofObject.
Definition: dof_object.h:1163
index_buffer_t _idx_buf
Definition: dof_object.h:675
uint8_t dof_id_type
Definition: id_types.h:67

◆ get_extra_integer()

dof_id_type libMesh::DofObject::get_extra_integer ( const unsigned int  index) const
inlineinherited

Gets the value on this object of the extra integer associated with index, which should have been obtained via a call to MeshBase::add_elem_integer or MeshBase::add_node_integer.

Definition at line 1095 of file dof_object.h.

References libMesh::DofObject::_idx_buf, libMesh::DofObject::n_extra_integers(), libMesh::DofObject::n_systems(), and libMesh::DofObject::start_idx_ints().

Referenced by libMesh::MeshTools::Modification::all_tri(), WriteElemsetData::checkByCentroid(), libMesh::MeshTools::Modification::flatten(), libMesh::SyncElementIntegers::gather_data(), libMesh::XdrIO::pack_element(), libMesh::CheckpointIO::read_connectivity(), libMesh::DofObject::set_n_vars_per_group(), DofObjectTest< Node >::testAddExtraData(), DofObjectTest< Node >::testAddSystemExtraInts(), ExtraIntegersTest::testExtraIntegersExodusReading(), DofObjectTest< Node >::testSetNSystemsExtraInts(), DofObjectTest< Node >::testSetNVariableGroupsExtraInts(), and libMesh::XdrIO::write_serialized_nodes().

1096 {
1097  libmesh_assert_less(index, this->n_extra_integers());
1098  libmesh_assert_less(this->n_systems(), _idx_buf.size());
1099 
1100  const unsigned int start_idx_i = this->start_idx_ints();
1101 
1102  libmesh_assert_less(start_idx_i+index, _idx_buf.size());
1103  return _idx_buf[start_idx_i+index];
1104 }
unsigned int start_idx_ints() const
The starting index for an extra_integers pseudosystem.
Definition: dof_object.h:1266
unsigned int n_systems() const
Definition: dof_object.h:930
unsigned int n_extra_integers() const
Returns how many extra integers are associated to the DofObject.
Definition: dof_object.h:1163
index_buffer_t _idx_buf
Definition: dof_object.h:675

◆ get_info() [1/3]

std::string libMesh::ReferenceCounter::get_info ( )
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().

48 {
49 #if defined(LIBMESH_ENABLE_REFERENCE_COUNTING) && defined(DEBUG)
50 
51  std::ostringstream oss;
52 
53  oss << '\n'
54  << " ---------------------------------------------------------------------------- \n"
55  << "| Reference count information |\n"
56  << " ---------------------------------------------------------------------------- \n";
57 
58  for (const auto & [name, cd] : _counts)
59  oss << "| " << name << " reference count information:\n"
60  << "| Creations: " << cd.first << '\n'
61  << "| Destructions: " << cd.second << '\n';
62 
63  oss << " ---------------------------------------------------------------------------- \n";
64 
65  return oss.str();
66 
67 #else
68 
69  return "";
70 
71 #endif
72 }
std::string name(const ElemQuality q)
This function returns a string containing some name for q.
Definition: elem_quality.C:42
static Counts _counts
Actually holds the data.

◆ get_info() [2/3]

std::string libMesh::ReferenceCounter::get_info ( )
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().

48 {
49 #if defined(LIBMESH_ENABLE_REFERENCE_COUNTING) && defined(DEBUG)
50 
51  std::ostringstream oss;
52 
53  oss << '\n'
54  << " ---------------------------------------------------------------------------- \n"
55  << "| Reference count information |\n"
56  << " ---------------------------------------------------------------------------- \n";
57 
58  for (const auto & [name, cd] : _counts)
59  oss << "| " << name << " reference count information:\n"
60  << "| Creations: " << cd.first << '\n'
61  << "| Destructions: " << cd.second << '\n';
62 
63  oss << " ---------------------------------------------------------------------------- \n";
64 
65  return oss.str();
66 
67 #else
68 
69  return "";
70 
71 #endif
72 }
std::string name(const ElemQuality q)
This function returns a string containing some name for q.
Definition: elem_quality.C:42
static Counts _counts
Actually holds the data.

◆ get_info() [3/3]

std::string libMesh::Node::get_info ( ) const

Prints relevant information about the node to a string.

Definition at line 53 of file node.C.

References libMesh::DofObject::dof_number(), libMesh::DofObject::id(), libMesh::make_range(), libMesh::DofObject::n_comp(), libMesh::DofObject::n_systems(), libMesh::DofObject::n_vars(), libMesh::DofObject::processor_id(), and libMesh::DofObject::valid_id().

Referenced by print_info().

54 {
55  std::ostringstream oss;
56 
57  oss << " Node id()=";
58 
59  if (this->valid_id())
60  oss << this->id();
61  else
62  oss << "invalid";
63 
64  oss << ", processor_id()=" << this->processor_id() <<
65  ", Point=" << *static_cast<const Point *>(this) << '\n';
66 
67  oss << " DoFs=";
68  for (auto s : make_range(this->n_systems()))
69  for (auto v : make_range(this->n_vars(s)))
70  for (auto c : make_range(this->n_comp(s,v)))
71  oss << '(' << s << '/' << v << '/' << this->dof_number(s,v,c) << ") ";
72 
73  return oss.str();
74 }
dof_id_type dof_number(const unsigned int s, const unsigned int var, const unsigned int comp) const
Definition: dof_object.h:1025
unsigned int n_comp(const unsigned int s, const unsigned int var) const
Definition: dof_object.h:995
Point(const Real x=0., const Real y=0., const Real z=0.)
Constructor.
Definition: point.h:47
dof_id_type id() const
Definition: dof_object.h:823
unsigned int n_vars(const unsigned int s, const unsigned int vg) const
Definition: dof_object.h:960
unsigned int n_systems() const
Definition: dof_object.h:930
bool valid_id() const
Definition: dof_object.h:878
IntRange< T > make_range(T beg, T end)
The 2-parameter make_range() helper function returns an IntRange<T> when both input parameters are of...
Definition: int_range.h:134
processor_id_type processor_id() const
Definition: dof_object.h:898

◆ get_old_dof_object() [1/2]

DofObject* libMesh::DofObject::get_old_dof_object ( )
inlineinherited

◆ get_old_dof_object() [2/2]

const DofObject* libMesh::DofObject::get_old_dof_object ( ) const
inlineinherited

Definition at line 97 of file dof_object.h.

References libMesh::DofObject::old_dof_object.

97 { return old_dof_object.get(); }
std::unique_ptr< DofObject > old_dof_object
This object on the last mesh.
Definition: dof_object.h:88

◆ get_old_dof_object_ref() [1/2]

DofObject& libMesh::DofObject::get_old_dof_object_ref ( )
inlineinherited

As above, but do not use in situations where the old_dof_object may be nullptr, since this function asserts that the old_dof_object is valid before returning a reference to it.

Definition at line 104 of file dof_object.h.

References libMesh::libmesh_assert(), and libMesh::DofObject::old_dof_object.

Referenced by libMesh::OldSolutionCoefs< Output, point_output >::eval_old_dofs(), libMesh::OldSolutionValue< Output, point_output >::eval_old_dofs(), and libMesh::DofMap::old_dof_indices().

105  {
107  return *old_dof_object;
108  }
libmesh_assert(ctx)
std::unique_ptr< DofObject > old_dof_object
This object on the last mesh.
Definition: dof_object.h:88

◆ get_old_dof_object_ref() [2/2]

const DofObject& libMesh::DofObject::get_old_dof_object_ref ( ) const
inlineinherited

Definition at line 110 of file dof_object.h.

References libMesh::libmesh_assert(), and libMesh::DofObject::old_dof_object.

111  {
113  return *old_dof_object;
114  }
libmesh_assert(ctx)
std::unique_ptr< DofObject > old_dof_object
This object on the last mesh.
Definition: dof_object.h:88

◆ has_dofs()

bool libMesh::DofObject::has_dofs ( const unsigned int  s = libMesh::invalid_uint) const
inlineinherited
Returns
true if any system has variables which have been assigned, false otherwise.

Definition at line 1219 of file dof_object.h.

References libMesh::invalid_uint, libMesh::make_range(), libMesh::DofObject::n_systems(), and libMesh::DofObject::n_vars().

Referenced by libMesh::DofMap::old_dof_indices().

1220 {
1221  if (sys == libMesh::invalid_uint)
1222  {
1223  for (auto s : make_range(this->n_systems()))
1224  if (this->n_vars(s))
1225  return true;
1226  }
1227 
1228  else
1229  {
1230  libmesh_assert_less (sys, this->n_systems());
1231 
1232  if (this->n_vars(sys))
1233  return true;
1234  }
1235 
1236  return false;
1237 }
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value for an unsigned int...
Definition: libmesh.h:286
unsigned int n_vars(const unsigned int s, const unsigned int vg) const
Definition: dof_object.h:960
unsigned int n_systems() const
Definition: dof_object.h:930
IntRange< T > make_range(T beg, T end)
The 2-parameter make_range() helper function returns an IntRange<T> when both input parameters are of...
Definition: int_range.h:134

◆ has_extra_integers()

bool libMesh::DofObject::has_extra_integers ( ) const
inlineinherited

◆ id()

dof_id_type libMesh::DofObject::id ( ) const
inlineinherited
Returns
The id for this DofObject

Definition at line 823 of file dof_object.h.

References libMesh::DofObject::_id.

Referenced by libMesh::UniformRefinementEstimator::_estimate_error(), libMesh::BoundaryInfo::_find_id_maps(), libMesh::MeshTools::Subdivision::add_boundary_ghosts(), add_cube_convex_hull_to_mesh(), libMesh::ReplicatedMesh::add_elem(), libMesh::DistributedMesh::add_elem(), libMesh::BoundaryInfo::add_elements(), libMesh::TopologyMap::add_node(), libMesh::ReplicatedMesh::add_node(), libMesh::DistributedMesh::add_node(), libMesh::DistributedMesh::add_point(), libMesh::MeshTools::Modification::all_tri(), libMesh::DofMap::allgather_recursive_constraints(), assemble_ellipticdg(), build(), libMesh::MeshTools::Generation::build_cube(), libMesh::Partitioner::build_graph(), libMesh::InfElemBuilder::build_inf_elem(), libMesh::EquationSystems::build_parallel_solution_vector(), compute_jacobian(), libMesh::FEGenericBase< FEOutputType< T >::type >::compute_periodic_constraints(), libMesh::FEAbstract::compute_periodic_node_constraints(), compute_residual(), libMesh::InfFE< Dim, T_radial, T_map >::compute_shape_functions(), libMesh::FEMap::compute_single_point_map(), libMesh::connect_families(), libMesh::MeshBase::copy_constraint_rows(), libMesh::MeshRefinement::create_parent_error_vector(), libMesh::ReplicatedMesh::delete_elem(), libMesh::DistributedMesh::delete_elem(), libMesh::ReplicatedMesh::delete_node(), libMesh::DistributedMesh::delete_node(), libMesh::MeshCommunication::delete_remote_elements(), libMesh::DTKAdapter::DTKAdapter(), libMesh::UNVIO::elements_out(), libMesh::JumpErrorEstimator::estimate_error(), libMesh::AdjointRefinementEstimator::estimate_error(), libMesh::ExactErrorEstimator::estimate_error(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::SubFunctor::find_dofs_to_send(), libMesh::UnstructuredMesh::find_neighbors(), libMesh::MeshTools::find_nodal_neighbors(), libMesh::MeshRefinement::flag_elements_by_elem_fraction(), libMesh::MeshRefinement::flag_elements_by_error_fraction(), libMesh::MeshRefinement::flag_elements_by_error_tolerance(), libMesh::MeshTools::Modification::flatten(), libMesh::ReplicatedMesh::get_boundary_points(), libMesh::ReplicatedMesh::get_disconnected_subdomains(), get_info(), libMesh::Elem::get_info(), libMesh::MeshBase::get_info(), libMesh::ParmetisPartitioner::initialize(), libMesh::TreeNode< N >::insert(), libMesh::TriangulatorInterface::insert_any_extra_boundary_points(), libMesh::ReplicatedMesh::insert_elem(), libMesh::DistributedMesh::insert_elem(), libMesh::ReplicatedMesh::insert_node(), libMesh::Poly2TriTriangulator::insert_refinement_points(), EIM_F::interior_assembly(), AssemblyEIM::interior_assembly(), libMesh::Elem::interior_parent(), libMesh::FEMap::inverse_map(), libMesh::MeshTools::libmesh_assert_valid_amr_elem_ids(), libMesh::MeshTools::libmesh_assert_valid_constraint_rows(), libMesh::MeshTools::libmesh_assert_valid_neighbors(), libMesh::Tri3Subdivision::local_node_number(), main(), ExodusTest< elem_type >::meshes_equal_enough(), LinearElasticityWithContact::move_mesh(), libMesh::Elem::node_id(), libMesh::TriangulatorInterface::nodes_to_segments(), libMesh::VTKIO::nodes_to_vtk(), libMesh::CompareElemIdsByLevel::operator()(), libMesh::GhostPointNeighbors::operator()(), libMesh::WeightedPatchRecoveryErrorEstimator::EstimateError::operator()(), libMesh::PatchRecoveryErrorEstimator::EstimateError::operator()(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::ProjectVertices::operator()(), libMesh::CompareDofObjectsByID::operator()(), libMesh::CompareDofObjectsByPIDAndThenID::operator()(), libMesh::BoundaryInfo::operator==(), libMesh::DistributedMesh::own_node(), libMesh::DistributedMesh::parallel_max_elem_id(), libMesh::DistributedMesh::parallel_max_node_id(), libMesh::MetisPartitioner::partition_range(), libMesh::DofObject::print_dof_info(), libMesh::DofMap::process_mesh_constraint_rows(), libMesh::DistributedMesh::query_elem_ptr(), libMesh::query_ghosting_functors(), libMesh::DistributedMesh::query_node_ptr(), libMesh::Nemesis_IO::read(), libMesh::ExodusII_IO::read(), libMesh::EquationSystems::redundant_added_side(), libMesh::DistributedMesh::renumber_elem(), libMesh::DistributedMesh::renumber_node(), libMesh::DistributedMesh::renumber_nodes_and_elements(), libMesh::DofMap::scatter_constraints(), libMesh::Partitioner::set_node_processor_ids(), libMesh::DofMap::set_nonlocal_dof_objects(), FETestBase< order, family, elem_type, 1 >::setUp(), libMesh::MeshTools::Modification::smooth(), libMesh::BoundaryInfo::sync(), libMesh::Parallel::sync_dofobject_data_by_id(), libMesh::Parallel::sync_element_data_by_parent_id(), libMesh::Parallel::sync_node_data_by_element_id_once(), ElemTest< elem_type >::test_orient_elements(), DefaultCouplingTest::testCoupling(), MixedDimensionMeshTest::testPointLocatorTree(), InfFERadialTest::testRefinement(), DofObjectTest< Node >::testSetId(), libMesh::Elem::topologically_equal(), libMesh::TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole(), libMesh::Poly2TriTriangulator::triangulate_current_points(), libMesh::GmshIO::write_mesh(), libMesh::ExodusII_IO_Helper::write_nodal_coordinates(), and libMesh::XdrIO::write_serialized_nodes().

824 {
825  return _id;
826 }
dof_id_type _id
The id of the DofObject.
Definition: dof_object.h:578

◆ increment_constructor_count() [1/2]

void libMesh::ReferenceCounter::increment_constructor_count ( const std::string &  name)
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().

184 {
185  libmesh_try
186  {
187  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
188  std::pair<unsigned int, unsigned int> & p = _counts[name];
189  p.first++;
190  }
191  libmesh_catch (...)
192  {
193  auto stream = libMesh::err.get();
194  stream->exceptions(stream->goodbit); // stream must not throw
195  libMesh::err << "Encountered unrecoverable error while calling "
196  << "ReferenceCounter::increment_constructor_count() "
197  << "for a(n) " << name << " object." << std::endl;
198  std::terminate();
199  }
200 }
std::string name(const ElemQuality q)
This function returns a string containing some name for q.
Definition: elem_quality.C:42
OStreamProxy err
static Counts _counts
Actually holds the data.
streamT * get()
Rather than implement every ostream/ios/ios_base function, we&#39;ll be lazy and make esoteric uses go th...
spin_mutex spin_mtx
A convenient spin mutex object which can be used for obtaining locks.
Definition: threads.C:30

◆ increment_constructor_count() [2/2]

void libMesh::ReferenceCounter::increment_constructor_count ( const std::string &  name)
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().

184 {
185  libmesh_try
186  {
187  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
188  std::pair<unsigned int, unsigned int> & p = _counts[name];
189  p.first++;
190  }
191  libmesh_catch (...)
192  {
193  auto stream = libMesh::err.get();
194  stream->exceptions(stream->goodbit); // stream must not throw
195  libMesh::err << "Encountered unrecoverable error while calling "
196  << "ReferenceCounter::increment_constructor_count() "
197  << "for a(n) " << name << " object." << std::endl;
198  std::terminate();
199  }
200 }
std::string name(const ElemQuality q)
This function returns a string containing some name for q.
Definition: elem_quality.C:42
OStreamProxy err
static Counts _counts
Actually holds the data.
streamT * get()
Rather than implement every ostream/ios/ios_base function, we&#39;ll be lazy and make esoteric uses go th...
spin_mutex spin_mtx
A convenient spin mutex object which can be used for obtaining locks.
Definition: threads.C:30

◆ increment_destructor_count() [1/2]

void libMesh::ReferenceCounter::increment_destructor_count ( const std::string &  name)
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().

208 {
209  libmesh_try
210  {
211  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
212  std::pair<unsigned int, unsigned int> & p = _counts[name];
213  p.second++;
214  }
215  libmesh_catch (...)
216  {
217  auto stream = libMesh::err.get();
218  stream->exceptions(stream->goodbit); // stream must not throw
219  libMesh::err << "Encountered unrecoverable error while calling "
220  << "ReferenceCounter::increment_destructor_count() "
221  << "for a(n) " << name << " object." << std::endl;
222  std::terminate();
223  }
224 }
std::string name(const ElemQuality q)
This function returns a string containing some name for q.
Definition: elem_quality.C:42
OStreamProxy err
static Counts _counts
Actually holds the data.
streamT * get()
Rather than implement every ostream/ios/ios_base function, we&#39;ll be lazy and make esoteric uses go th...
spin_mutex spin_mtx
A convenient spin mutex object which can be used for obtaining locks.
Definition: threads.C:30

◆ increment_destructor_count() [2/2]

void libMesh::ReferenceCounter::increment_destructor_count ( const std::string &  name)
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().

208 {
209  libmesh_try
210  {
211  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
212  std::pair<unsigned int, unsigned int> & p = _counts[name];
213  p.second++;
214  }
215  libmesh_catch (...)
216  {
217  auto stream = libMesh::err.get();
218  stream->exceptions(stream->goodbit); // stream must not throw
219  libMesh::err << "Encountered unrecoverable error while calling "
220  << "ReferenceCounter::increment_destructor_count() "
221  << "for a(n) " << name << " object." << std::endl;
222  std::terminate();
223  }
224 }
std::string name(const ElemQuality q)
This function returns a string containing some name for q.
Definition: elem_quality.C:42
OStreamProxy err
static Counts _counts
Actually holds the data.
streamT * get()
Rather than implement every ostream/ios/ios_base function, we&#39;ll be lazy and make esoteric uses go th...
spin_mutex spin_mtx
A convenient spin mutex object which can be used for obtaining locks.
Definition: threads.C:30

◆ invalidate()

void libMesh::DofObject::invalidate ( )
inlineinherited

Invalidates all the indices for this DofObject.

Definition at line 783 of file dof_object.h.

References libMesh::DofObject::invalidate_dofs(), libMesh::DofObject::invalidate_id(), and libMesh::DofObject::invalidate_processor_id().

Referenced by libMesh::DofObject::DofObject().

784 {
785  this->invalidate_dofs ();
786  this->invalidate_id ();
787  this->invalidate_processor_id ();
788 }
void invalidate_id()
Sets the id to invalid_id.
Definition: dof_object.h:767
void invalidate_processor_id()
Sets the processor id to invalid_processor_id.
Definition: dof_object.h:775
void invalidate_dofs(const unsigned int sys_num=libMesh::invalid_uint)
Sets all degree of freedom numbers to invalid_id.
Definition: dof_object.h:746

◆ invalidate_dofs()

void libMesh::DofObject::invalidate_dofs ( const unsigned int  sys_num = libMesh::invalid_uint)
inlineinherited

Sets all degree of freedom numbers to invalid_id.

Definition at line 746 of file dof_object.h.

References libMesh::DofObject::invalid_id, libMesh::make_range(), libMesh::DofObject::n_comp_group(), libMesh::DofObject::n_systems(), libMesh::DofObject::n_var_groups(), and libMesh::DofObject::set_vg_dof_base().

Referenced by libMesh::DofObject::invalidate().

747 {
748  const unsigned int n_sys = this->n_systems();
749  // If the user does not specify the system number...
750  if (sys_num >= n_sys)
751  {
752  for (auto s : make_range(n_sys))
753  for (auto vg : make_range(this->n_var_groups(s)))
754  if (this->n_comp_group(s,vg))
755  this->set_vg_dof_base(s,vg,invalid_id);
756  }
757  // ...otherwise invalidate the dofs for all systems
758  else
759  for (auto vg : make_range(this->n_var_groups(sys_num)))
760  if (this->n_comp_group(sys_num,vg))
761  this->set_vg_dof_base(sys_num,vg,invalid_id);
762 }
unsigned int n_var_groups(const unsigned int s) const
Definition: dof_object.h:950
void set_vg_dof_base(const unsigned int s, const unsigned int vg, const dof_id_type db)
VariableGroup DoF indices are indexed as id = base + var_in_vg*ncomp + comp This method allows for di...
Definition: dof_object.h:1290
unsigned int n_systems() const
Definition: dof_object.h:930
static const dof_id_type invalid_id
An invalid id to distinguish an uninitialized DofObject.
Definition: dof_object.h:477
IntRange< T > make_range(T beg, T end)
The 2-parameter make_range() helper function returns an IntRange<T> when both input parameters are of...
Definition: int_range.h:134
unsigned int n_comp_group(const unsigned int s, const unsigned int vg) const
Definition: dof_object.h:1008

◆ invalidate_id()

void libMesh::DofObject::invalidate_id ( )
inlineinherited

Sets the id to invalid_id.

Definition at line 767 of file dof_object.h.

References libMesh::DofObject::invalid_id, and libMesh::DofObject::set_id().

Referenced by libMesh::DofObject::invalidate(), and DofObjectTest< Node >::testInvalidateId().

768 {
769  this->set_id (invalid_id);
770 }
dof_id_type & set_id()
Definition: dof_object.h:831
static const dof_id_type invalid_id
An invalid id to distinguish an uninitialized DofObject.
Definition: dof_object.h:477

◆ invalidate_processor_id()

void libMesh::DofObject::invalidate_processor_id ( )
inlineinherited

Sets the processor id to invalid_processor_id.

Definition at line 775 of file dof_object.h.

References libMesh::DofObject::invalid_processor_id, and libMesh::DofObject::processor_id().

Referenced by libMesh::DofObject::invalidate(), libMesh::Partitioner::set_parent_processor_ids(), and DofObjectTest< Node >::testInvalidateProcId().

776 {
778 }
static const processor_id_type invalid_processor_id
An invalid processor_id to distinguish DoFs that have not been assigned to a processor.
Definition: dof_object.h:488
processor_id_type processor_id() const
Definition: dof_object.h:898

◆ is_zero()

bool libMesh::TypeVector< Real >::is_zero ( ) const
inlineinherited
Returns
True if all values in the vector are zero

Definition at line 969 of file type_vector.h.

970 {
971  for (const auto & val : _coords)
972  if (val != T(0))
973  return false;
974  return true;
975 }
Real _coords[LIBMESH_DIM]
The coordinates of the TypeVector.
Definition: type_vector.h:439

◆ n_comp()

unsigned int libMesh::DofObject::n_comp ( const unsigned int  s,
const unsigned int  var 
) const
inlineinherited
Returns
The number of components for variable var of system s associated with this DofObject. For example, the HIERARCHIC shape functions may have multiple DoFs associated with one node. Another example is the MONOMIALs, where only the elements hold the DoFs. For the different spatial directions, and orders, see FE.

Definition at line 995 of file dof_object.h.

References libMesh::DofObject::n_comp_group(), libMesh::DofObject::n_systems(), libMesh::DofObject::n_vars(), and libMesh::DofObject::var_to_vg().

Referenced by libMesh::DofMap::allgather_recursive_constraints(), libMesh::FEGenericBase< FEOutputType< T >::type >::compute_periodic_constraints(), libMesh::DofMap::constrain_p_dofs(), libMesh::ExodusII_IO::copy_elemental_solution(), libMesh::Nemesis_IO::copy_elemental_solution(), libMesh::ExodusII_IO::copy_nodal_solution(), libMesh::Nemesis_IO::copy_nodal_solution(), libMesh::DofMap::distribute_dofs(), libMesh::DofObject::dof_number(), libMesh::DofObject::DofObject(), libMesh::OldSolutionCoefs< Output, point_output >::eval_at_node(), libMesh::OldSolutionValue< Output, point_output >::eval_at_node(), libMesh::OldSolutionCoefs< Output, point_output >::eval_mixed_derivatives(), libMesh::OldSolutionValue< Output, point_output >::eval_mixed_derivatives(), get_info(), libMesh::Elem::get_info(), libMesh::DofMap::local_variable_indices(), main(), libMesh::DofObject::n_dofs(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::ProjectVertices::operator()(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::ProjectSides::operator()(), libMesh::DofObject::operator=(), libMesh::DofObject::print_dof_info(), libMesh::DofObject::set_dof_number(), libMesh::DofObject::set_n_vars_per_group(), libMesh::DofMap::set_nonlocal_dof_objects(), and libMesh::Nemesis_IO_Helper::write_nodal_solution().

997 {
998  libmesh_assert_less (s, this->n_systems());
999  libmesh_assert_less (var, this->n_vars(s));
1000 
1001  return this->n_comp_group(s,this->var_to_vg(s,var));
1002 }
unsigned int var_to_vg(const unsigned int s, const unsigned int var) const
Utility function - for variable var in system s, figure out what variable group it lives in...
Definition: dof_object.h:1334
unsigned int n_vars(const unsigned int s, const unsigned int vg) const
Definition: dof_object.h:960
unsigned int n_systems() const
Definition: dof_object.h:930
unsigned int n_comp_group(const unsigned int s, const unsigned int vg) const
Definition: dof_object.h:1008

◆ n_comp_group()

unsigned int libMesh::DofObject::n_comp_group ( const unsigned int  s,
const unsigned int  vg 
) const
inlineinherited
Returns
The number of components for VariableGroup vg of system s associated with this DofObject. For example, the HIERARCHIC shape functions may have multiple DoFs associated with one node. Another example is the MONOMIALs, where only the elements hold the DoFs. For the different spatial directions, and orders, see FE.

Definition at line 1008 of file dof_object.h.

References libMesh::DofObject::_idx_buf, libMesh::DofObject::n_systems(), libMesh::DofObject::n_var_groups(), libMesh::DofObject::ncv_magic, and libMesh::DofObject::start_idx().

Referenced by libMesh::DofMap::_dof_indices(), libMesh::DofMap::_node_dof_indices(), libMesh::DofMap::distribute_local_dofs_node_major(), libMesh::DofMap::distribute_local_dofs_var_major(), libMesh::DofMap::dof_indices(), libMesh::DofObject::dof_number(), libMesh::OldSolutionCoefs< Output, point_output >::eval_old_dofs(), libMesh::OldSolutionValue< Output, point_output >::eval_old_dofs(), libMesh::DofObject::invalidate_dofs(), libMesh::DofObject::n_comp(), libMesh::DofMap::old_dof_indices(), libMesh::BuildProjectionList::operator()(), libMesh::DofMap::reinit(), libMesh::DofObject::set_dof_number(), libMesh::DofObject::set_n_comp_group(), libMesh::DofObject::set_n_vars_per_group(), and libMesh::DofMap::set_nonlocal_dof_objects().

1010 {
1011  libmesh_assert_less (s, this->n_systems());
1012  libmesh_assert_less (vg, this->n_var_groups(s));
1013 
1014  const unsigned int
1015  start_idx_sys = this->start_idx(s);
1016 
1017  libmesh_assert_less ((start_idx_sys + 2*vg), _idx_buf.size());
1018 
1019  return (_idx_buf[start_idx_sys + 2*vg] % ncv_magic);
1020 }
unsigned int n_var_groups(const unsigned int s) const
Definition: dof_object.h:950
unsigned int n_systems() const
Definition: dof_object.h:930
unsigned int start_idx(const unsigned int s) const
The starting index for system s.
Definition: dof_object.h:1242
index_buffer_t _idx_buf
Definition: dof_object.h:675
static const index_t ncv_magic
Above we introduced the chimera ncv, which is a hybrid of the form ncv = ncv_magic*nv + nc where nv a...
Definition: dof_object.h:686

◆ n_dofs()

unsigned int libMesh::DofObject::n_dofs ( const unsigned int  s,
const unsigned int  var = libMesh::invalid_uint 
) const
inlineinherited
Returns
The number of degrees of freedom associated with system s for this object. Optionally only counts degrees of freedom for variable number var

Definition at line 801 of file dof_object.h.

References libMesh::invalid_uint, libMesh::make_range(), libMesh::DofObject::n_comp(), libMesh::DofObject::n_systems(), and libMesh::DofObject::n_vars().

Referenced by libMesh::PetscDMWrapper::add_dofs_helper(), and libMesh::EquationSystems::build_parallel_solution_vector().

803 {
804  libmesh_assert_less (s, this->n_systems());
805 
806  unsigned int num = 0;
807 
808  // Count all variables
809  if (var == libMesh::invalid_uint)
810  for (auto v : make_range(this->n_vars(s)))
811  num += this->n_comp(s,v);
812 
813  // Only count specified variable
814  else
815  num = this->n_comp(s,var);
816 
817  return num;
818 }
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value for an unsigned int...
Definition: libmesh.h:286
unsigned int n_comp(const unsigned int s, const unsigned int var) const
Definition: dof_object.h:995
unsigned int n_vars(const unsigned int s, const unsigned int vg) const
Definition: dof_object.h:960
unsigned int n_systems() const
Definition: dof_object.h:930
IntRange< T > make_range(T beg, T end)
The 2-parameter make_range() helper function returns an IntRange<T> when both input parameters are of...
Definition: int_range.h:134

◆ n_extra_integers()

unsigned int libMesh::DofObject::n_extra_integers ( ) const
inlineinherited

Returns how many extra integers are associated to the DofObject.

If non-integer data has been associated, each datum of type T counts for sizeof(T)/sizeof(dof_id_type) times in the return value.

Definition at line 1163 of file dof_object.h.

References libMesh::DofObject::_idx_buf, and libMesh::DofObject::start_idx_ints().

Referenced by libMesh::DofObject::add_extra_integers(), libMesh::MeshTools::Modification::all_tri(), libMesh::MeshTools::Modification::flatten(), libMesh::DofObject::get_extra_datum(), libMesh::DofObject::get_extra_integer(), libMesh::CheckpointIO::read_connectivity(), libMesh::CheckpointIO::read_nodes(), libMesh::XdrIO::read_serialized_connectivity(), libMesh::Elem::refine(), libMesh::DofObject::set_extra_datum(), libMesh::DofObject::set_extra_integer(), libMesh::DofObject::set_n_systems(), libMesh::DofObject::set_n_vars_per_group(), DofObjectTest< Node >::testAddExtraData(), DofObjectTest< Node >::testAddSystemExtraInts(), DofObjectTest< Node >::testSetNSystemsExtraInts(), and DofObjectTest< Node >::testSetNVariableGroupsExtraInts().

1164 {
1165  if (_idx_buf.empty())
1166  return 0;
1167 
1168  const int hdr = dof_id_signed_type(_idx_buf[0]);
1169  if (hdr >= 0)
1170  return 0;
1171 
1172  const unsigned int start_idx_i = this->start_idx_ints();
1173 
1174  return _idx_buf.size() - start_idx_i;
1175 }
unsigned int start_idx_ints() const
The starting index for an extra_integers pseudosystem.
Definition: dof_object.h:1266
int8_t dof_id_signed_type
Definition: id_types.h:68
index_buffer_t _idx_buf
Definition: dof_object.h:675

◆ n_objects() [1/2]

static unsigned int libMesh::ReferenceCounter::n_objects ( )
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().

86  { return _n_objects; }
static Threads::atomic< unsigned int > _n_objects
The number of objects.

◆ n_objects() [2/2]

static unsigned int libMesh::ReferenceCounter::n_objects ( )
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().

86  { return _n_objects; }
static Threads::atomic< unsigned int > _n_objects
The number of objects.

◆ n_pseudo_systems()

unsigned int libMesh::DofObject::n_pseudo_systems ( ) const
inlineinherited
Returns
The total number of pseudo-systems associated with this DofObject : n_systems(), plus one iff this->has_extra_integers()

Definition at line 940 of file dof_object.h.

References libMesh::DofObject::_idx_buf, and std::abs().

Referenced by libMesh::DofObject::end_idx(), libMesh::DofObject::set_extra_datum(), and libMesh::DofObject::set_extra_integer().

941 {
942  const int hdr = _idx_buf.empty() ?
943  0 : cast_int<int>(dof_id_signed_type(_idx_buf[0]));
944  return std::abs(hdr);
945 }
ADRealEigenVector< T, D, asd > abs(const ADRealEigenVector< T, D, asd > &)
Definition: type_vector.h:57
int8_t dof_id_signed_type
Definition: id_types.h:68
index_buffer_t _idx_buf
Definition: dof_object.h:675

◆ n_systems()

unsigned int libMesh::DofObject::n_systems ( ) const
inlineinherited
Returns
The number of systems associated with this DofObject

Definition at line 930 of file dof_object.h.

References libMesh::DofObject::_idx_buf.

Referenced by libMesh::DofMap::_dof_indices(), libMesh::DofObject::add_system(), libMesh::DofObject::dof_number(), libMesh::DofObject::DofObject(), libMesh::DofObject::end_idx(), libMesh::OldSolutionCoefs< Output, point_output >::eval_old_dofs(), libMesh::OldSolutionValue< Output, point_output >::eval_old_dofs(), libMesh::DofObject::get_extra_datum(), libMesh::DofObject::get_extra_integer(), get_info(), libMesh::Elem::get_info(), libMesh::DofObject::has_dofs(), libMesh::DofObject::invalidate_dofs(), libMesh::DofObject::n_comp(), libMesh::DofObject::n_comp_group(), libMesh::DofObject::n_dofs(), libMesh::DofObject::n_var_groups(), libMesh::DofObject::n_vars(), libMesh::DofMap::old_dof_indices(), libMesh::DofObject::operator=(), libMesh::DofObject::print_dof_info(), libMesh::Elem::refine(), libMesh::DofObject::set_dof_number(), libMesh::DofObject::set_n_comp(), libMesh::DofObject::set_n_comp_group(), libMesh::DofObject::set_n_systems(), libMesh::DofObject::set_n_vars_per_group(), libMesh::DofObject::set_vg_dof_base(), libMesh::DofObject::start_idx(), libMesh::DofObject::start_idx_ints(), DofObjectTest< Node >::testAddSystemExtraInts(), DofObjectTest< Node >::testSetNSystems(), DofObjectTest< Node >::testSetNSystemsExtraInts(), and libMesh::DofObject::vg_dof_base().

931 {
932  const int hdr = _idx_buf.empty() ?
933  0 : cast_int<int>(dof_id_signed_type(_idx_buf[0]));
934  return hdr >= 0 ? hdr : (-hdr-1);
935 }
int8_t dof_id_signed_type
Definition: id_types.h:68
index_buffer_t _idx_buf
Definition: dof_object.h:675

◆ n_var_groups()

unsigned int libMesh::DofObject::n_var_groups ( const unsigned int  s) const
inlineinherited

◆ n_vars() [1/2]

unsigned int libMesh::DofObject::n_vars ( const unsigned int  s,
const unsigned int  vg 
) const
inlineinherited
Returns
The number of Variable variables associated with VariableGroup vg in system s for this DofObject

Definition at line 960 of file dof_object.h.

References libMesh::DofObject::_idx_buf, libMesh::DofObject::n_systems(), libMesh::DofObject::n_var_groups(), libMesh::DofObject::ncv_magic_exp, and libMesh::DofObject::start_idx().

Referenced by libMesh::DofObject::add_system(), libMesh::DofMap::allgather_recursive_constraints(), libMesh::DofMap::distribute_dofs(), libMesh::DofObject::dof_number(), libMesh::DofObject::DofObject(), libMesh::OldSolutionCoefs< Output, point_output >::eval_at_node(), libMesh::OldSolutionValue< Output, point_output >::eval_at_node(), libMesh::OldSolutionCoefs< Output, point_output >::eval_mixed_derivatives(), libMesh::OldSolutionValue< Output, point_output >::eval_mixed_derivatives(), get_info(), libMesh::Elem::get_info(), libMesh::DofObject::has_dofs(), libMesh::DofObject::n_comp(), libMesh::DofObject::n_dofs(), libMesh::DofObject::n_vars(), libMesh::BuildProjectionList::operator()(), libMesh::DofObject::operator=(), libMesh::DofObject::print_dof_info(), libMesh::DofObject::set_dof_number(), libMesh::DofObject::set_n_comp(), libMesh::DofObject::set_n_comp_group(), libMesh::DofObject::set_n_systems(), libMesh::DofObject::set_n_vars_per_group(), libMesh::DofMap::set_nonlocal_dof_objects(), libMesh::DofObject::system_var_to_vg_var(), DofObjectTest< Node >::testAddSystemExtraInts(), DofObjectTest< Node >::testSetNVariableGroups(), DofObjectTest< Node >::testSetNVariableGroupsExtraInts(), libMesh::DofObject::var_to_vg(), and libMesh::DofObject::var_to_vg_and_offset().

962 {
963  libmesh_assert_less (s, this->n_systems());
964  libmesh_assert_less (vg, this->n_var_groups(s));
965 
966  const unsigned int start_idx_sys = this->start_idx(s);
967 
968  libmesh_assert_less ((start_idx_sys + 2*vg), _idx_buf.size());
969 
970  return (cast_int<unsigned int>
971  (_idx_buf[start_idx_sys + 2*vg]) >> ncv_magic_exp);
972 }
unsigned int n_var_groups(const unsigned int s) const
Definition: dof_object.h:950
unsigned int n_systems() const
Definition: dof_object.h:930
unsigned int start_idx(const unsigned int s) const
The starting index for system s.
Definition: dof_object.h:1242
index_buffer_t _idx_buf
Definition: dof_object.h:675
static const index_t ncv_magic_exp
Definition: dof_object.h:687

◆ n_vars() [2/2]

unsigned int libMesh::DofObject::n_vars ( const unsigned int  s) const
inlineinherited
Returns
The number of Variable variables associated with system s for this DofObject

Definition at line 977 of file dof_object.h.

References libMesh::DofObject::n_systems(), libMesh::DofObject::n_var_groups(), and libMesh::DofObject::n_vars().

978 {
979  libmesh_assert_less (s, this->n_systems());
980 
981  const unsigned int nvg = this->n_var_groups(s);
982 
983  unsigned int val=0;
984 
985  for (unsigned int vg=0; vg<nvg; vg++)
986  val += this->n_vars(s,vg);
987 
988  return val;
989 }
unsigned int n_var_groups(const unsigned int s) const
Definition: dof_object.h:950
unsigned int n_vars(const unsigned int s, const unsigned int vg) const
Definition: dof_object.h:960
unsigned int n_systems() const
Definition: dof_object.h:930

◆ norm()

auto libMesh::TypeVector< Real >::norm ( ) const-> decltype(std::norm(Real ()))
inlineinherited
Returns
The magnitude of the vector, i.e. the square-root of the sum of the elements squared.

Definition at line 929 of file type_vector.h.

References libMesh::TensorTools::norm_sq(), and std::sqrt().

930 {
931  return std::sqrt(this->norm_sq());
932 }
ADRealEigenVector< T, D, asd > sqrt(const ADRealEigenVector< T, D, asd > &)
Definition: type_vector.h:53
auto norm_sq() const -> decltype(std::norm(Real()))
Definition: type_vector.h:948

◆ norm_sq()

auto libMesh::TypeVector< Real >::norm_sq ( ) const-> decltype(std::norm(Real ()))
inlineinherited
Returns
The magnitude of the vector squared, i.e. the sum of the element magnitudes squared.

Definition at line 948 of file type_vector.h.

References libMesh::TensorTools::norm_sq().

949 {
950 #if LIBMESH_DIM == 1
951  return (TensorTools::norm_sq(_coords[0]));
952 #endif
953 
954 #if LIBMESH_DIM == 2
955  return (TensorTools::norm_sq(_coords[0]) +
957 #endif
958 
959 #if LIBMESH_DIM == 3
960  return (TensorTools::norm_sq(_coords[0]) +
963 #endif
964 }
Real _coords[LIBMESH_DIM]
The coordinates of the TypeVector.
Definition: type_vector.h:439
auto norm_sq(const T &a) -> decltype(std::norm(a))
Definition: tensor_tools.h:104

◆ operator!=()

bool libMesh::TypeVector< Real >::operator!= ( const TypeVector< Real > &  rhs) const
inlineinherited
Returns
!(*this == rhs)

Definition at line 1051 of file type_vector.h.

1052 {
1053  return (!(*this == rhs));
1054 }

◆ operator()() [1/2]

const Real & libMesh::TypeVector< Real >::operator() ( const unsigned int  i) const
inlineinherited
Returns
A const reference to the \( i^{th} \) entry of the vector.

Definition at line 566 of file type_vector.h.

567 {
568  libmesh_assert_less (i, LIBMESH_DIM);
569 
570  return _coords[i];
571 }
Real _coords[LIBMESH_DIM]
The coordinates of the TypeVector.
Definition: type_vector.h:439

◆ operator()() [2/2]

Real & libMesh::TypeVector< Real >::operator() ( const unsigned int  i)
inlineinherited
Returns
A writable reference to the \( i^{th} \) entry of the vector.

Definition at line 577 of file type_vector.h.

578 {
579  libmesh_assert_less (i, LIBMESH_DIM);
580 
581  return _coords[i];
582 }
Real _coords[LIBMESH_DIM]
The coordinates of the TypeVector.
Definition: type_vector.h:439

◆ operator*() [1/2]

boostcopy::enable_if_c< ScalarTraits< Scalar >::value, TypeVector< typename CompareTypes< Real , Scalar >::supertype > >::type libMesh::TypeVector< Real >::operator* ( const Scalar &  factor) const
inlineinherited

Multiply this vector by a scalar value.

Returns
A copy of the result, this vector is unchanged.

Definition at line 763 of file type_vector.h.

764 {
765  typedef typename CompareTypes<T, Scalar>::supertype SuperType;
766 
767 #if LIBMESH_DIM == 1
768  return TypeVector<SuperType>(_coords[0]*factor);
769 #endif
770 
771 #if LIBMESH_DIM == 2
772  return TypeVector<SuperType>(_coords[0]*factor,
773  _coords[1]*factor);
774 #endif
775 
776 #if LIBMESH_DIM == 3
777  return TypeVector<SuperType>(_coords[0]*factor,
778  _coords[1]*factor,
779  _coords[2]*factor);
780 #endif
781 }
Real _coords[LIBMESH_DIM]
The coordinates of the TypeVector.
Definition: type_vector.h:439

◆ operator*() [2/2]

CompareTypes< Real , T2 >::supertype libMesh::TypeVector< Real >::operator* ( const TypeVector< T2 > &  p) const
inlineinherited
Returns
The dot-product of this vector with another vector.
Note
The complex conjugate is not taken in the complex-valued case.
The vectors may contain different numeric types.

Definition at line 874 of file type_vector.h.

875 {
876 #if LIBMESH_DIM == 1
877  return _coords[0]*p._coords[0];
878 #endif
879 
880 #if LIBMESH_DIM == 2
881  return (_coords[0]*p._coords[0] +
882  _coords[1]*p._coords[1]);
883 #endif
884 
885 #if LIBMESH_DIM == 3
886  return (_coords[0]*p(0) +
887  _coords[1]*p(1) +
888  _coords[2]*p(2));
889 #endif
890 }
Real _coords[LIBMESH_DIM]
The coordinates of the TypeVector.
Definition: type_vector.h:439

◆ operator*=()

const TypeVector< Real > & libMesh::TypeVector< Real >::operator*= ( const Real &  factor)
inlineinherited

Multiply this vector by a scalar value.

Returns
A reference to *this.

Definition at line 800 of file type_vector.h.

801 {
802 #if LIBMESH_DIM == 1
803  _coords[0] *= factor;
804 #endif
805 
806 #if LIBMESH_DIM == 2
807  _coords[0] *= factor;
808  _coords[1] *= factor;
809 #endif
810 
811 #if LIBMESH_DIM == 3
812  _coords[0] *= factor;
813  _coords[1] *= factor;
814  _coords[2] *= factor;
815 #endif
816 
817  return *this;
818 }
Real _coords[LIBMESH_DIM]
The coordinates of the TypeVector.
Definition: type_vector.h:439

◆ operator+()

TypeVector< typename CompareTypes< Real , T2 >::supertype > libMesh::TypeVector< Real >::operator+ ( const TypeVector< T2 > &  p) const
inlineinherited

Add two vectors.

Returns
A copy of the result, this vector is unchanged.

Definition at line 590 of file type_vector.h.

591 {
592  typedef typename CompareTypes<T, T2>::supertype TS;
593 #if LIBMESH_DIM == 1
594  return TypeVector<TS> (_coords[0] + p._coords[0]);
595 #endif
596 
597 #if LIBMESH_DIM == 2
598  return TypeVector<TS> (_coords[0] + p._coords[0],
599  _coords[1] + p._coords[1]);
600 #endif
601 
602 #if LIBMESH_DIM == 3
603  return TypeVector<TS> (_coords[0] + p._coords[0],
604  _coords[1] + p._coords[1],
605  _coords[2] + p._coords[2]);
606 #endif
607 
608 }
Real _coords[LIBMESH_DIM]
The coordinates of the TypeVector.
Definition: type_vector.h:439

◆ operator+=()

const TypeVector< Real > & libMesh::TypeVector< Real >::operator+= ( const TypeVector< T2 > &  p)
inlineinherited

Add to this vector.

Returns
A reference to *this.

Definition at line 615 of file type_vector.h.

616 {
617  this->add (p);
618 
619  return *this;
620 }
void add(const TypeVector< T2 > &)
Add to this vector without creating a temporary.
Definition: type_vector.h:627

◆ operator-() [1/2]

TypeVector< typename CompareTypes< Real , T2 >::supertype > libMesh::TypeVector< Real >::operator- ( const TypeVector< T2 > &  p) const
inlineinherited

Subtract from this vector.

Returns
A copy of the result, this vector is unchanged.

Definition at line 676 of file type_vector.h.

677 {
678  typedef typename CompareTypes<T, T2>::supertype TS;
679 
680 #if LIBMESH_DIM == 1
681  return TypeVector<TS>(_coords[0] - p._coords[0]);
682 #endif
683 
684 #if LIBMESH_DIM == 2
685  return TypeVector<TS>(_coords[0] - p._coords[0],
686  _coords[1] - p._coords[1]);
687 #endif
688 
689 #if LIBMESH_DIM == 3
690  return TypeVector<TS>(_coords[0] - p._coords[0],
691  _coords[1] - p._coords[1],
692  _coords[2] - p._coords[2]);
693 #endif
694 
695 }
Real _coords[LIBMESH_DIM]
The coordinates of the TypeVector.
Definition: type_vector.h:439

◆ operator-() [2/2]

TypeVector< Real > libMesh::TypeVector< Real >::operator- ( ) const
inlineinherited
Returns
The negative of this vector in a separate copy.

Definition at line 735 of file type_vector.h.

736 {
737 
738 #if LIBMESH_DIM == 1
739  return TypeVector(-_coords[0]);
740 #endif
741 
742 #if LIBMESH_DIM == 2
743  return TypeVector(-_coords[0],
744  -_coords[1]);
745 #endif
746 
747 #if LIBMESH_DIM == 3
748  return TypeVector(-_coords[0],
749  -_coords[1],
750  -_coords[2]);
751 #endif
752 
753 }
Real _coords[LIBMESH_DIM]
The coordinates of the TypeVector.
Definition: type_vector.h:439
TypeVector()
Empty constructor.
Definition: type_vector.h:451

◆ operator-=()

const TypeVector< Real > & libMesh::TypeVector< Real >::operator-= ( const TypeVector< T2 > &  p)
inlineinherited

Subtract from this vector.

Returns
A reference to *this.

Definition at line 702 of file type_vector.h.

703 {
704  this->subtract (p);
705 
706  return *this;
707 }
void subtract(const TypeVector< T2 > &)
Subtract from this vector without creating a temporary.
Definition: type_vector.h:714

◆ operator/()

boostcopy::enable_if_c< ScalarTraits< Scalar >::value, TypeVector< typename CompareTypes< Real , Scalar >::supertype > >::type libMesh::TypeVector< Real >::operator/ ( const Scalar &  factor) const
inlineinherited

Divide each entry of this vector by scalar value.

Returns
A copy of the result, this vector is unchanged.

Definition at line 828 of file type_vector.h.

829 {
830  libmesh_assert_not_equal_to (factor, static_cast<T>(0.));
831 
832  typedef typename CompareTypes<T, Scalar>::supertype TS;
833 
834 #if LIBMESH_DIM == 1
835  return TypeVector<TS>(_coords[0]/factor);
836 #endif
837 
838 #if LIBMESH_DIM == 2
839  return TypeVector<TS>(_coords[0]/factor,
840  _coords[1]/factor);
841 #endif
842 
843 #if LIBMESH_DIM == 3
844  return TypeVector<TS>(_coords[0]/factor,
845  _coords[1]/factor,
846  _coords[2]/factor);
847 #endif
848 
849 }
Real _coords[LIBMESH_DIM]
The coordinates of the TypeVector.
Definition: type_vector.h:439

◆ operator/=()

const TypeVector< Real > & libMesh::TypeVector< Real >::operator/= ( const Real &  factor)
inlineinherited

Divide each entry of this vector by scalar value.

Returns
A reference to *this.

Definition at line 857 of file type_vector.h.

858 {
859  libmesh_assert_not_equal_to (factor, static_cast<T>(0.));
860 
861  for (unsigned int i=0; i<LIBMESH_DIM; i++)
862  _coords[i] /= factor;
863 
864  return *this;
865 }
Real _coords[LIBMESH_DIM]
The coordinates of the TypeVector.
Definition: type_vector.h:439

◆ operator<() [1/2]

bool libMesh::TypeVector< Complex >::operator< ( const TypeVector< Complex > &  rhs) const
inherited

Definition at line 148 of file type_vector.C.

References std::imag(), and std::real().

149 {
150  for (unsigned int i=0; i<LIBMESH_DIM; i++)
151  {
152  if ((*this)(i).real() < rhs(i).real())
153  return true;
154  if ((*this)(i).real() > rhs(i).real())
155  return false;
156  if ((*this)(i).imag() < rhs(i).imag())
157  return true;
158  if ((*this)(i).imag() > rhs(i).imag())
159  return false;
160  }
161  return false;
162 }
boost::multiprecision::float128 real(const boost::multiprecision::float128 in)
boost::multiprecision::float128 imag(const boost::multiprecision::float128)

◆ operator<() [2/2]

bool libMesh::TypeVector< Real >::operator< ( const TypeVector< Real > &  rhs) const
inherited
Returns
true if this vector is "less" than rhs.

Useful for sorting. Also used for choosing some arbitrary basis function orientations.

Definition at line 90 of file type_vector.C.

91 {
92  for (unsigned int i=0; i<LIBMESH_DIM; i++)
93  {
94  if ((*this)(i) < rhs(i))
95  return true;
96  if ((*this)(i) > rhs(i))
97  return false;
98  }
99  return false;
100 }

◆ operator<=() [1/2]

bool libMesh::TypeVector< Complex >::operator<= ( const TypeVector< Complex > &  rhs) const
inherited

Definition at line 167 of file type_vector.C.

References std::imag(), and std::real().

168 {
169  for (unsigned int i=0; i<LIBMESH_DIM; i++)
170  {
171  if ((*this)(i).real() < rhs(i).real())
172  return true;
173  if ((*this)(i).real() > rhs(i).real())
174  return false;
175  if ((*this)(i).imag() < rhs(i).imag())
176  return true;
177  if ((*this)(i).imag() > rhs(i).imag())
178  return false;
179  }
180  return true;
181 }
boost::multiprecision::float128 real(const boost::multiprecision::float128 in)
boost::multiprecision::float128 imag(const boost::multiprecision::float128)

◆ operator<=() [2/2]

bool libMesh::TypeVector< Real >::operator<= ( const TypeVector< Real > &  rhs) const
inherited
Returns
true if this vector is <= to rhs.

Useful for sorting. Also used for choosing some arbitrary constraint equation directions.

Definition at line 104 of file type_vector.C.

105 {
106  for (unsigned int i=0; i<LIBMESH_DIM; i++)
107  {
108  if ((*this)(i) < rhs(i))
109  return true;
110  if ((*this)(i) > rhs(i))
111  return false;
112  }
113  return true;
114 }

◆ operator=()

Node & libMesh::Node::operator= ( const Point p)
inline

Assign to a node from a point.

Definition at line 298 of file node.h.

299 {
300  (*this)(0) = p(0);
301 #if LIBMESH_DIM > 1
302  (*this)(1) = p(1);
303 #endif
304 #if LIBMESH_DIM > 2
305  (*this)(2) = p(2);
306 #endif
307 
308  return *this;
309 }

◆ operator==() [1/2]

bool libMesh::Node::operator== ( const Node rhs) const
Returns
true if this node equals rhs, false otherwise.

Definition at line 37 of file node.C.

References libMesh::TypeVector< Real >::operator==().

38 {
39  // Explicitly calling the operator== defined in Point
40  return this->Point::operator==(rhs);
41 }
bool operator==(const TypeVector< Real > &rhs) const
Definition: type_vector.h:1029

◆ operator==() [2/2]

bool libMesh::TypeVector< Real >::operator== ( const TypeVector< Real > &  rhs) const
inlineinherited
Returns
true if this(i)==rhs(i) for each component of the vector.
Note
For floating point types T, the function absolute_fuzzy_equals() may be a more appropriate choice.

Definition at line 1029 of file type_vector.h.

Referenced by operator==().

1030 {
1031 #if LIBMESH_DIM == 1
1032  return (_coords[0] == rhs._coords[0]);
1033 #endif
1034 
1035 #if LIBMESH_DIM == 2
1036  return (_coords[0] == rhs._coords[0] &&
1037  _coords[1] == rhs._coords[1]);
1038 #endif
1039 
1040 #if LIBMESH_DIM == 3
1041  return (_coords[0] == rhs._coords[0] &&
1042  _coords[1] == rhs._coords[1] &&
1043  _coords[2] == rhs._coords[2]);
1044 #endif
1045 }
Real _coords[LIBMESH_DIM]
The coordinates of the TypeVector.
Definition: type_vector.h:439

◆ operator>() [1/2]

bool libMesh::TypeVector< Complex >::operator> ( const TypeVector< Complex > &  rhs) const
inherited

Definition at line 186 of file type_vector.C.

References std::imag(), and std::real().

187 {
188  for (unsigned int i=0; i<LIBMESH_DIM; i++)
189  {
190  if ((*this)(i).real() > rhs(i).real())
191  return true;
192  if ((*this)(i).real() < rhs(i).real())
193  return false;
194  if ((*this)(i).imag() > rhs(i).imag())
195  return true;
196  if ((*this)(i).imag() < rhs(i).imag())
197  return false;
198  }
199  return false;
200 }
boost::multiprecision::float128 real(const boost::multiprecision::float128 in)
boost::multiprecision::float128 imag(const boost::multiprecision::float128)

◆ operator>() [2/2]

bool libMesh::TypeVector< Real >::operator> ( const TypeVector< Real > &  rhs) const
inherited
Returns
true if this vector is "greater" than rhs.

Useful for sorting. Also used for choosing some arbitrary basis function orientations.

Definition at line 119 of file type_vector.C.

120 {
121  for (unsigned int i=0; i<LIBMESH_DIM; i++)
122  {
123  if ((*this)(i) > rhs(i))
124  return true;
125  if ((*this)(i) < rhs(i))
126  return false;
127  }
128  return false;
129 }

◆ operator>=() [1/2]

bool libMesh::TypeVector< Complex >::operator>= ( const TypeVector< Complex > &  rhs) const
inherited

Definition at line 205 of file type_vector.C.

References std::imag(), and std::real().

206 {
207  for (unsigned int i=0; i<LIBMESH_DIM; i++)
208  {
209  if ((*this)(i).real() > rhs(i).real())
210  return true;
211  if ((*this)(i).real() < rhs(i).real())
212  return false;
213  if ((*this)(i).imag() > rhs(i).imag())
214  return true;
215  if ((*this)(i).imag() < rhs(i).imag())
216  return false;
217  }
218  return true;
219 }
boost::multiprecision::float128 real(const boost::multiprecision::float128 in)
boost::multiprecision::float128 imag(const boost::multiprecision::float128)

◆ operator>=() [2/2]

bool libMesh::TypeVector< Real >::operator>= ( const TypeVector< Real > &  rhs) const
inherited
Returns
true if this vector is >= rhs.

Useful for sorting. Also used for choosing some arbitrary constraint equation directions.

Definition at line 133 of file type_vector.C.

134 {
135  for (unsigned int i=0; i<LIBMESH_DIM; i++)
136  {
137  if ((*this)(i) > rhs(i))
138  return true;
139  if ((*this)(i) < rhs(i))
140  return false;
141  }
142  return true;
143 }

◆ pack_indexing()

void libMesh::DofObject::pack_indexing ( std::back_insert_iterator< std::vector< largest_id_type >>  target) const
inherited

A method for creating packed data from our index buffer - basically a copy with prepended size with our current implementation.

Definition at line 642 of file dof_object.C.

References libMesh::DofObject::_idx_buf, and libMesh::DofObject::old_dof_object.

643 {
644 #ifdef LIBMESH_ENABLE_AMR
645  // We might need to pack old_dof_object too
646  *target++ = (old_dof_object == nullptr) ? 0 : 1;
647 #endif
648 
649  *target++ = _idx_buf.size();
650  std::copy(_idx_buf.begin(), _idx_buf.end(), target);
651 
652 #ifdef LIBMESH_ENABLE_AMR
653  if (old_dof_object)
654  old_dof_object->pack_indexing(target);
655 #endif
656 }
std::unique_ptr< DofObject > old_dof_object
This object on the last mesh.
Definition: dof_object.h:88
index_buffer_t _idx_buf
Definition: dof_object.h:675

◆ packed_indexing_size()

unsigned int libMesh::DofObject::packed_indexing_size ( ) const
inherited

If we pack our indices into an buffer for communications, how many ints do we need?

Definition at line 560 of file dof_object.C.

References libMesh::DofObject::_idx_buf, and libMesh::DofObject::old_dof_object.

Referenced by packed_size().

561 {
562  return
563  cast_int<unsigned int> (
564 #ifdef LIBMESH_ENABLE_AMR
565  ((old_dof_object == nullptr) ? 0 : old_dof_object->packed_indexing_size()) + 2 +
566 #else
567  1 +
568 #endif
569  _idx_buf.size());
570 }
std::unique_ptr< DofObject > old_dof_object
This object on the last mesh.
Definition: dof_object.h:88
index_buffer_t _idx_buf
Definition: dof_object.h:675

◆ packed_size()

unsigned int libMesh::Node::packed_size ( ) const
inline

Definition at line 159 of file node.h.

References libMesh::DofObject::packed_indexing_size(), and libMesh::Real.

160  {
161  const unsigned int header_size = 2;
162 
163  // use "(a+b-1)/b" trick to get a/b to round up
164  static const unsigned int idtypes_per_Real =
165  (sizeof(Real) + sizeof(largest_id_type) - 1) / sizeof(largest_id_type);
166 
167  return header_size + LIBMESH_DIM*idtypes_per_Real +
168  this->packed_indexing_size();
169  }
uint64_t largest_id_type
Definition: id_types.h:148
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
unsigned int packed_indexing_size() const
If we pack our indices into an buffer for communications, how many ints do we need?
Definition: dof_object.C:560

◆ print()

void libMesh::TypeVector< Real >::print ( std::ostream &  os = libMesh::out) const
inherited

Formatted print, by default to libMesh::out.

Definition at line 47 of file type_vector.C.

48 {
49 #if LIBMESH_DIM == 1
50 
51  os << "x=" << (*this)(0);
52 
53 #endif
54 #if LIBMESH_DIM == 2
55 
56  os << "(x,y)=("
57  << std::setw(8) << (*this)(0) << ", "
58  << std::setw(8) << (*this)(1) << ")";
59 
60 #endif
61 #if LIBMESH_DIM == 3
62 
63  os << "(x,y,z)=("
64  << std::setw(8) << (*this)(0) << ", "
65  << std::setw(8) << (*this)(1) << ", "
66  << std::setw(8) << (*this)(2) << ")";
67 #endif
68 }

◆ print_dof_info()

void libMesh::DofObject::print_dof_info ( ) const
inherited

Print out info for debugging.

Definition at line 670 of file dof_object.C.

References libMesh::DofObject::dof_number(), libMesh::DofObject::id(), libMesh::make_range(), libMesh::DofObject::n_comp(), libMesh::DofObject::n_systems(), libMesh::DofObject::n_vars(), and libMesh::out.

671 {
672  libMesh::out << this->id() << " [ ";
673 
674  for (auto s : make_range(this->n_systems()))
675  {
676  libMesh::out << "s:" << s << " ";
677  for (auto var : make_range(this->n_vars(s)))
678  {
679  libMesh::out << "v:" << var << " ";
680  for (auto comp : make_range(this->n_comp(s,var)))
681  {
682  libMesh::out << "c:" << comp << " dof:" << this->dof_number(s,var,comp) << " ";
683  }
684  }
685  }
686 
687  libMesh::out << "]\n";
688 }
dof_id_type dof_number(const unsigned int s, const unsigned int var, const unsigned int comp) const
Definition: dof_object.h:1025
unsigned int n_comp(const unsigned int s, const unsigned int var) const
Definition: dof_object.h:995
dof_id_type id() const
Definition: dof_object.h:823
unsigned int n_vars(const unsigned int s, const unsigned int vg) const
Definition: dof_object.h:960
unsigned int n_systems() const
Definition: dof_object.h:930
OStreamProxy out
IntRange< T > make_range(T beg, T end)
The 2-parameter make_range() helper function returns an IntRange<T> when both input parameters are of...
Definition: int_range.h:134

◆ print_info() [1/3]

void libMesh::ReferenceCounter::print_info ( std::ostream &  out_stream = libMesh::out)
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().

82 {
84  out_stream << ReferenceCounter::get_info();
85 }
static std::string get_info()
Gets a string containing the reference information.
static bool _enable_print_counter
Flag to control whether reference count information is printed when print_info is called...

◆ print_info() [2/3]

void libMesh::ReferenceCounter::print_info ( std::ostream &  out_stream = libMesh::out)
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().

82 {
84  out_stream << ReferenceCounter::get_info();
85 }
static std::string get_info()
Gets a string containing the reference information.
static bool _enable_print_counter
Flag to control whether reference count information is printed when print_info is called...

◆ print_info() [3/3]

void libMesh::Node::print_info ( std::ostream &  os = libMesh::out) const

Prints relevant information about the node.

Definition at line 45 of file node.C.

References get_info().

Referenced by libMesh::operator<<().

46 {
47  os << this->get_info()
48  << std::endl;
49 }
std::string get_info() const
Prints relevant information about the node to a string.
Definition: node.C:53

◆ processor_id() [1/3]

processor_id_type libMesh::DofObject::processor_id ( ) const
inlineinherited
Returns
The processor that this DofObject belongs to.

When partitioning and DoF numbering have been performed by libMesh, every current DoF on this DofObject will belong to its processor.

Definition at line 898 of file dof_object.h.

References libMesh::DofObject::_processor_id.

Referenced by libMesh::BoundaryInfo::_find_id_maps(), libMesh::DistributedMesh::add_elem(), libMesh::BoundaryInfo::add_elements(), libMesh::DistributedMesh::add_node(), libMesh::MeshRefinement::add_node(), libMesh::ReplicatedMesh::add_point(), libMesh::DistributedMesh::add_point(), libMesh::RBConstruction::add_scaled_matrix_and_vector(), libMesh::UnstructuredMesh::all_first_order(), libMesh::MeshTools::Modification::all_tri(), libMesh::DofMap::allgather_recursive_constraints(), libMesh::Patch::build_around_element(), libMesh::InfElemBuilder::build_inf_elem(), libMesh::BoundaryInfo::build_node_list_from_side_list(), libMesh::Nemesis_IO_Helper::compute_num_global_nodesets(), libMesh::Nemesis_IO_Helper::compute_num_global_sidesets(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::SubProjector::construct_projection(), libMesh::MeshBase::copy_constraint_rows(), libMesh::ExodusII_IO::copy_nodal_solution(), libMesh::UnstructuredMesh::copy_nodes_and_elements(), libMesh::DistributedMesh::delete_elem(), libMesh::MeshCommunication::delete_remote_elements(), libMesh::DofMap::distribute_dofs(), libMesh::DofMap::distribute_local_dofs_node_major(), libMesh::DofMap::distribute_local_dofs_var_major(), libMesh::Elem::Elem(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::SubFunctor::find_dofs_to_send(), libMesh::MeshFunction::find_element(), libMesh::UnstructuredMesh::find_neighbors(), libMesh::MeshTools::Modification::flatten(), get_info(), libMesh::Elem::get_info(), libMesh::RBEIMConstruction::initialize_qp_data(), libMesh::DistributedMesh::insert_elem(), libMesh::DofObject::invalidate_processor_id(), libMesh::MeshTools::libmesh_assert_consistent_distributed(), libMesh::MeshTools::libmesh_assert_consistent_distributed_nodes(), 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< Elem >(), libMesh::MeshTools::libmesh_assert_valid_amr_elem_ids(), libMesh::MeshTools::libmesh_assert_valid_neighbors(), libMesh::DofMap::local_variable_indices(), libMesh::MeshRefinement::make_coarsening_compatible(), libMesh::MeshCommunication::make_new_node_proc_ids_parallel_consistent(), AugmentSparsityOnInterface::mesh_reinit(), ExodusTest< elem_type >::meshes_equal_enough(), libMesh::PeriodicBoundaries::neighbor(), libMesh::RBEIMEvaluation::node_distribute_bfs(), OverlappingCouplingFunctor::operator()(), AugmentSparsityOnInterface::operator()(), AugmentSparsityOnNodes::operator()(), libMesh::GhostPointNeighbors::operator()(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::SortAndCopy::operator()(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::ProjectVertices::operator()(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::ProjectEdges::operator()(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::ProjectSides::operator()(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::ProjectInteriors::operator()(), libMesh::CompareDofObjectsByPIDAndThenID::operator()(), libMesh::DistributedMesh::own_node(), libMesh::XdrIO::pack_element(), libMesh::LinearPartitioner::partition_range(), libMesh::SFCPartitioner::partition_range(), libMesh::CentroidPartitioner::partition_range(), libMesh::System::point_gradient(), libMesh::System::point_hessian(), libMesh::System::point_value(), libMesh::DofMap::process_mesh_constraint_rows(), libMesh::DofObject::processor_id(), libMesh::CheckpointIO::read_connectivity(), libMesh::DistributedMesh::renumber_nodes_and_elements(), libMesh::DofMap::scatter_constraints(), 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(), libMesh::DofMap::set_nonlocal_dof_objects(), libMesh::Partitioner::set_parent_processor_ids(), ParsedFEMFunctionTest::setUp(), libMesh::Partitioner::single_partition_range(), libMesh::Parallel::sync_dofobject_data_by_id(), libMesh::Parallel::sync_element_data_by_parent_id(), libMesh::Parallel::sync_node_data_by_element_id_once(), DefaultCouplingTest::testCoupling(), PointNeighborCouplingTest::testCoupling(), DofObjectTest< Node >::testInvalidateProcId(), EquationSystemsTest::testPostInitAddElem(), DofObjectTest< Node >::testSetProcId(), BoundaryInfoTest::testShellFaceConstraints(), DofObjectTest< Node >::testValidProcId(), libMesh::DTKAdapter::update_variable_values(), libMesh::GmshIO::write_mesh(), and libMesh::Nemesis_IO_Helper::write_sidesets().

899 {
900  return _processor_id;
901 }
processor_id_type _processor_id
The processor_id of the DofObject.
Definition: dof_object.h:589

◆ processor_id() [2/3]

processor_id_type & libMesh::DofObject::processor_id ( )
inlineinherited
Returns
The processor that this DofObject belongs to as a writable reference.

Definition at line 906 of file dof_object.h.

References libMesh::DofObject::_processor_id.

907 {
908  return _processor_id;
909 }
processor_id_type _processor_id
The processor_id of the DofObject.
Definition: dof_object.h:589

◆ processor_id() [3/3]

void libMesh::DofObject::processor_id ( const processor_id_type  pid)
inlineinherited

Sets the processor_id for this DofObject.

Definition at line 914 of file dof_object.h.

References libMesh::DofObject::processor_id().

915 {
916  this->processor_id() = pid;
917 }
processor_id_type processor_id() const
Definition: dof_object.h:898

◆ relative_fuzzy_equals()

bool libMesh::TypeVector< Real >::relative_fuzzy_equals ( const TypeVector< Real > &  rhs,
Real  tol = TOLERANCE 
) const
inlineinherited
Returns
true if two vectors are equal to within a relative tolerance of tol.

Definition at line 1004 of file type_vector.h.

References std::abs().

1005 {
1006 #if LIBMESH_DIM == 1
1007  return this->absolute_fuzzy_equals(rhs, tol *
1008  (std::abs(_coords[0]) + std::abs(rhs._coords[0])));
1009 #endif
1010 
1011 #if LIBMESH_DIM == 2
1012  return this->absolute_fuzzy_equals(rhs, tol *
1013  (std::abs(_coords[0]) + std::abs(rhs._coords[0]) +
1014  std::abs(_coords[1]) + std::abs(rhs._coords[1])));
1015 #endif
1016 
1017 #if LIBMESH_DIM == 3
1018  return this->absolute_fuzzy_equals(rhs, tol *
1019  (std::abs(_coords[0]) + std::abs(rhs._coords[0]) +
1020  std::abs(_coords[1]) + std::abs(rhs._coords[1]) +
1021  std::abs(_coords[2]) + std::abs(rhs._coords[2])));
1022 #endif
1023 }
Real _coords[LIBMESH_DIM]
The coordinates of the TypeVector.
Definition: type_vector.h:439
ADRealEigenVector< T, D, asd > abs(const ADRealEigenVector< T, D, asd > &)
Definition: type_vector.h:57
bool absolute_fuzzy_equals(const TypeVector< Real > &rhs, Real tol=TOLERANCE) const
Definition: type_vector.h:979

◆ set_buffer()

void libMesh::DofObject::set_buffer ( const std::vector< dof_id_type > &  buf)
inlineinherited

Definition at line 712 of file dof_object.h.

References libMesh::DofObject::_idx_buf.

Referenced by DofObjectTest< Node >::testJensEftangBug().

713  { _idx_buf = buf; }
index_buffer_t _idx_buf
Definition: dof_object.h:675

◆ set_dof_number()

void libMesh::DofObject::set_dof_number ( const unsigned int  s,
const unsigned int  var,
const unsigned int  comp,
const dof_id_type  dn 
)
inherited

Sets the global degree of freedom number for variable var, component comp for system s associated with this DofObject.

Definition at line 454 of file dof_object.C.

References libMesh::DofObject::_idx_buf, libMesh::DofObject::dof_number(), libMesh::DofObject::invalid_id, libMesh::libmesh_assert(), libMesh::DofObject::n_comp(), libMesh::DofObject::n_comp_group(), libMesh::DofObject::n_systems(), libMesh::DofObject::n_vars(), libMesh::DofObject::start_idx(), libMesh::DofObject::system_var_to_vg_var(), and libMesh::DofObject::var_to_vg().

458 {
459  libmesh_assert_less (s, this->n_systems());
460  libmesh_assert_less (var, this->n_vars(s));
461  libmesh_assert_less (comp, this->n_comp(s,var));
462 
463  const unsigned int
464  vg = this->var_to_vg(s,var),
465 #ifndef NDEBUG
466  ncg = this->n_comp_group(s,vg),
467 #endif
468  vig = this->system_var_to_vg_var(s,vg,var),
469  start_idx_sys = this->start_idx(s);
470 
471  libmesh_assert_less ((start_idx_sys + 2*vg + 1), _idx_buf.size());
472 
473  dof_id_type & base_idx = _idx_buf[start_idx_sys + 2*vg + 1];
474 
475  // We intend to change all dof numbers together or not at all
476  if (comp || vig)
477  libmesh_assert ((dn == invalid_id && base_idx == invalid_id) ||
478  (dn == base_idx + vig*ncg + comp));
479 
480  // only explicitly store the base index for vig==0, comp==0
481  else
482  base_idx = dn;
483 
484  libmesh_assert_equal_to (this->dof_number(s, var, comp), dn);
485 }
unsigned int system_var_to_vg_var(const unsigned int s, const unsigned int vg, const unsigned int var) const
Utility function - for variable var in system s, figure out what variable group it lives in...
Definition: dof_object.h:1352
dof_id_type dof_number(const unsigned int s, const unsigned int var, const unsigned int comp) const
Definition: dof_object.h:1025
unsigned int n_comp(const unsigned int s, const unsigned int var) const
Definition: dof_object.h:995
unsigned int var_to_vg(const unsigned int s, const unsigned int var) const
Utility function - for variable var in system s, figure out what variable group it lives in...
Definition: dof_object.h:1334
unsigned int n_vars(const unsigned int s, const unsigned int vg) const
Definition: dof_object.h:960
unsigned int n_systems() const
Definition: dof_object.h:930
libmesh_assert(ctx)
static const dof_id_type invalid_id
An invalid id to distinguish an uninitialized DofObject.
Definition: dof_object.h:477
unsigned int start_idx(const unsigned int s) const
The starting index for system s.
Definition: dof_object.h:1242
index_buffer_t _idx_buf
Definition: dof_object.h:675
unsigned int n_comp_group(const unsigned int s, const unsigned int vg) const
Definition: dof_object.h:1008
uint8_t dof_id_type
Definition: id_types.h:67

◆ set_extra_datum()

template<typename T >
void libMesh::DofObject::set_extra_datum ( const unsigned int  index,
const T  value 
)
inlineinherited

Sets the value on this object of the extra datum associated with index, which should have been obtained via a call to MeshBase::add_elem_datum or MeshBase::add_node_datum using the same type T.

Definition at line 1119 of file dof_object.h.

References libMesh::DofObject::_idx_buf, libMesh::DofObject::n_extra_integers(), libMesh::DofObject::n_pseudo_systems(), libMesh::DofObject::start_idx_ints(), and value.

Referenced by libMesh::ExodusII_IO::read(), libMesh::DynaIO::read_mesh(), and DofObjectTest< Node >::testAddExtraData().

1121 {
1122 #ifndef NDEBUG
1123  const unsigned int n_more_integers = (sizeof(T)-1)/sizeof(dof_id_type);
1124 #endif
1125  libmesh_assert_less(index+n_more_integers, this->n_extra_integers());
1126  libmesh_assert_less(this->n_pseudo_systems(), _idx_buf.size());
1127 
1128  const unsigned int start_idx_i = this->start_idx_ints();
1129 
1130  libmesh_assert_less(start_idx_i+index+n_more_integers, _idx_buf.size());
1131  std::memcpy(&_idx_buf[start_idx_i+index], &value, sizeof(T));
1132 }
unsigned int n_pseudo_systems() const
Definition: dof_object.h:940
unsigned int start_idx_ints() const
The starting index for an extra_integers pseudosystem.
Definition: dof_object.h:1266
static const bool value
Definition: xdr_io.C:54
unsigned int n_extra_integers() const
Returns how many extra integers are associated to the DofObject.
Definition: dof_object.h:1163
index_buffer_t _idx_buf
Definition: dof_object.h:675
uint8_t dof_id_type
Definition: id_types.h:67

◆ set_extra_integer()

void libMesh::DofObject::set_extra_integer ( const unsigned int  index,
const dof_id_type  value 
)
inlineinherited

Sets the value on this object of the extra integer associated with index, which should have been obtained via a call to MeshBase::add_elem_integer or MeshBase::add_node_integer.

Definition at line 1079 of file dof_object.h.

References libMesh::DofObject::_idx_buf, libMesh::DofObject::n_extra_integers(), libMesh::DofObject::n_pseudo_systems(), libMesh::DofObject::start_idx_ints(), and value.

Referenced by libMesh::SyncElementIntegers::act_on_data(), libMesh::BoundaryInfo::add_elements(), libMesh::UnstructuredMesh::all_first_order(), libMesh::UnstructuredMesh::create_submesh(), libMesh::ExodusII_IO::read(), libMesh::CheckpointIO::read_connectivity(), libMesh::CheckpointIO::read_nodes(), libMesh::XdrIO::read_serialized_connectivity(), libMesh::XdrIO::read_serialized_nodes(), libMesh::Elem::refine(), DofObjectTest< Node >::testAddExtraData(), DofObjectTest< Node >::testAddSystemExtraInts(), DofObjectTest< Node >::testSetNSystemsExtraInts(), and DofObjectTest< Node >::testSetNVariableGroupsExtraInts().

1081 {
1082  libmesh_assert_less(index, this->n_extra_integers());
1083  libmesh_assert_less(this->n_pseudo_systems(), _idx_buf.size());
1084 
1085  const unsigned int start_idx_i = this->start_idx_ints();
1086 
1087  libmesh_assert_less(start_idx_i+index, _idx_buf.size());
1088  _idx_buf[start_idx_i+index] = value;
1089 }
unsigned int n_pseudo_systems() const
Definition: dof_object.h:940
unsigned int start_idx_ints() const
The starting index for an extra_integers pseudosystem.
Definition: dof_object.h:1266
static const bool value
Definition: xdr_io.C:54
unsigned int n_extra_integers() const
Returns how many extra integers are associated to the DofObject.
Definition: dof_object.h:1163
index_buffer_t _idx_buf
Definition: dof_object.h:675

◆ set_id() [1/2]

dof_id_type & libMesh::DofObject::set_id ( )
inlineinherited

◆ set_id() [2/2]

void libMesh::DofObject::set_id ( const dof_id_type  dofid)
inlineinherited

Sets the id for this DofObject.

Definition at line 196 of file dof_object.h.

References libMesh::DofObject::set_id().

197  { this->set_id() = dofid; }
dof_id_type & set_id()
Definition: dof_object.h:831

◆ set_n_comp()

void libMesh::DofObject::set_n_comp ( const unsigned int  s,
const unsigned int  var,
const unsigned int  ncomp 
)
inherited

Sets the number of components for Variable var of system s associated with this DofObject.

Definition at line 385 of file dof_object.C.

References libMesh::DofObject::n_systems(), libMesh::DofObject::n_vars(), libMesh::DofObject::set_n_comp_group(), and libMesh::DofObject::var_to_vg().

388 {
389  libmesh_assert_less (s, this->n_systems());
390  libmesh_assert_less (var, this->n_vars(s));
391 
392  this->set_n_comp_group(s, this->var_to_vg(s,var), ncomp);
393 }
unsigned int var_to_vg(const unsigned int s, const unsigned int var) const
Utility function - for variable var in system s, figure out what variable group it lives in...
Definition: dof_object.h:1334
unsigned int n_vars(const unsigned int s, const unsigned int vg) const
Definition: dof_object.h:960
unsigned int n_systems() const
Definition: dof_object.h:930
void set_n_comp_group(const unsigned int s, const unsigned int vg, const unsigned int ncomp)
Sets the number of components for VariableGroup vg of system s associated with this DofObject...
Definition: dof_object.C:397

◆ set_n_comp_group()

void libMesh::DofObject::set_n_comp_group ( const unsigned int  s,
const unsigned int  vg,
const unsigned int  ncomp 
)
inherited

Sets the number of components for VariableGroup vg of system s associated with this DofObject.

Definition at line 397 of file dof_object.C.

References libMesh::DofObject::_idx_buf, libMesh::DofObject::invalid_id, libMesh::DofObject::n_comp_group(), libMesh::DofObject::n_systems(), libMesh::DofObject::n_var_groups(), libMesh::DofObject::n_vars(), libMesh::DofObject::ncv_magic, and libMesh::DofObject::start_idx().

Referenced by libMesh::DofMap::reinit(), libMesh::DofObject::set_n_comp(), libMesh::DofObject::set_n_vars_per_group(), libMesh::DofMap::set_nonlocal_dof_objects(), and DofObjectTest< Node >::testManualDofCalculation().

400 {
401  libmesh_assert_less (s, this->n_systems());
402  libmesh_assert_less (vg, this->n_var_groups(s));
403 
404  // Check for trivial return
405  if (ncomp == this->n_comp_group(s,vg)) return;
406 
407 #ifndef NDEBUG
408  if (ncomp >= ncv_magic)
409  {
410  const index_t ncvm = ncv_magic;
411  libmesh_error_msg("ERROR: ncomp must be less than DofObject::ncv_magic!\n" \
412  << "ncomp = " \
413  << ncomp \
414  << ", ncv_magic = " \
415  << ncvm \
416  << "\nrecompile and try again!");
417  }
418 #endif
419 
420  const unsigned int
421  start_idx_sys = this->start_idx(s),
422  n_vars_group = this->n_vars(s,vg),
423  base_offset = start_idx_sys + 2*vg;
424 
425  libmesh_assert_less ((base_offset + 1), _idx_buf.size());
426 
427  // if (ncomp)
428  // libMesh::out << "s,vg,ncomp="
429  // << s << ","
430  // << vg << ","
431  // << ncomp << '\n';
432 
433  // set the number of components, maintaining the number
434  // of variables in the group
435  _idx_buf[base_offset] = ncv_magic*n_vars_group + ncomp;
436 
437  // We use (invalid_id - 1) to signify no
438  // components for this object
439  _idx_buf[base_offset + 1] = (ncomp == 0) ? invalid_id - 1 : invalid_id;
440 
441  // this->debug_buffer();
442  // libMesh::out << "s,vg = " << s << "," << vg << '\n'
443  // << "base_offset=" << base_offset << '\n'
444  // << "this->n_comp(s,vg)=" << this->n_comp(s,vg) << '\n'
445  // << "this->n_comp_group(s,vg)=" << this->n_comp_group(s,vg) << '\n'
446  // << "this->n_vars(s,vg)=" << this->n_vars(s,vg) << '\n'
447  // << "this->n_var_groups(s)=" << this->n_var_groups(s) << '\n';
448 
449  libmesh_assert_equal_to (ncomp, this->n_comp_group(s,vg));
450 }
unsigned int n_var_groups(const unsigned int s) const
Definition: dof_object.h:950
dof_id_type index_t
DoF index information.
Definition: dof_object.h:673
unsigned int n_vars(const unsigned int s, const unsigned int vg) const
Definition: dof_object.h:960
unsigned int n_systems() const
Definition: dof_object.h:930
static const dof_id_type invalid_id
An invalid id to distinguish an uninitialized DofObject.
Definition: dof_object.h:477
unsigned int start_idx(const unsigned int s) const
The starting index for system s.
Definition: dof_object.h:1242
index_buffer_t _idx_buf
Definition: dof_object.h:675
unsigned int n_comp_group(const unsigned int s, const unsigned int vg) const
Definition: dof_object.h:1008
static const index_t ncv_magic
Above we introduced the chimera ncv, which is a hybrid of the form ncv = ncv_magic*nv + nc where nv a...
Definition: dof_object.h:686

◆ set_n_systems()

void libMesh::DofObject::set_n_systems ( const unsigned int  s)
inherited

Sets the number of systems for this DofObject.

If this number is a change, also clears all variable count and DoF indexing associated with this DofObject.

If any extra integers are associated with this DofObject, their count and values are unchanged.

Definition at line 150 of file dof_object.C.

References libMesh::DofObject::_idx_buf, libMesh::make_range(), libMesh::DofObject::n_extra_integers(), libMesh::DofObject::n_systems(), libMesh::DofObject::n_var_groups(), libMesh::DofObject::n_vars(), and libMesh::DofObject::start_idx_ints().

Referenced by libMesh::DofObject::add_system(), libMesh::DofObject::clear_dofs(), libMesh::Elem::refine(), DofObjectTest< Node >::testManualDofCalculation(), DofObjectTest< Node >::testSetNSystems(), DofObjectTest< Node >::testSetNSystemsExtraInts(), DofObjectTest< Node >::testSetNVariableGroups(), and DofObjectTest< Node >::testSetNVariableGroupsExtraInts().

151 {
152  const unsigned int old_ns = this->n_systems();
153 
154  // Check for trivial return
155  if (ns == old_ns)
156  return;
157 
158  const unsigned int nei = this->n_extra_integers();
159  const dof_id_type header_size = ns + bool(nei);
160  const dof_id_type hdr = nei ?
161  static_cast<dof_id_type>(-static_cast<std::ptrdiff_t>(header_size))
162  : header_size;
163  index_buffer_t new_buf(header_size + nei, hdr);
164  if (nei)
165  {
166  const unsigned int start_idx_ints = old_ns ?
167  cast_int<unsigned int>(_idx_buf[old_ns]) :
168  1;
169  libmesh_assert_less(start_idx_ints, _idx_buf.size());
170  std::copy(_idx_buf.begin()+start_idx_ints,
171  _idx_buf.end(),
172  new_buf.begin()+header_size);
173  if (ns)
174  std::fill(new_buf.begin()+1, new_buf.begin()+ns+1, ns+1);
175  }
176 
177  // vector swap trick to force deallocation when shrinking
178  new_buf.swap(_idx_buf);
179 
180 #ifdef DEBUG
181  libmesh_assert_equal_to(nei, this->n_extra_integers());
182 
183  // check that all systems now exist and that they have 0 size
184  libmesh_assert_equal_to (ns, this->n_systems());
185  for (auto s : make_range(this->n_systems()))
186  {
187  libmesh_assert_equal_to (this->n_vars(s), 0);
188  libmesh_assert_equal_to (this->n_var_groups(s), 0);
189  }
190 #endif
191 }
unsigned int n_var_groups(const unsigned int s) const
Definition: dof_object.h:950
unsigned int start_idx_ints() const
The starting index for an extra_integers pseudosystem.
Definition: dof_object.h:1266
unsigned int n_vars(const unsigned int s, const unsigned int vg) const
Definition: dof_object.h:960
unsigned int n_systems() const
Definition: dof_object.h:930
std::vector< index_t > index_buffer_t
Definition: dof_object.h:674
IntRange< T > make_range(T beg, T end)
The 2-parameter make_range() helper function returns an IntRange<T> when both input parameters are of...
Definition: int_range.h:134
unsigned int n_extra_integers() const
Returns how many extra integers are associated to the DofObject.
Definition: dof_object.h:1163
index_buffer_t _idx_buf
Definition: dof_object.h:675
uint8_t dof_id_type
Definition: id_types.h:67

◆ set_n_vars_per_group()

void libMesh::DofObject::set_n_vars_per_group ( const unsigned int  s,
const std::vector< unsigned int > &  nvpg 
)
inherited

Sets number of variables in each group associated with system s for this DofObject.

Implicit in this is also setting the number of VariableGroup variable groups for the system. Has the effect of setting the number of components to 0 even when called even with (nvg == this->n_var_groups(s)).

Definition at line 247 of file dof_object.C.

References libMesh::DofObject::_idx_buf, libMesh::DofObject::end_idx(), libMesh::DofObject::get_extra_integer(), libMesh::DofObject::has_extra_integers(), libMesh::DofObject::invalid_id, libMesh::make_range(), libMesh::DofObject::n_comp(), libMesh::DofObject::n_comp_group(), libMesh::DofObject::n_extra_integers(), libMesh::DofObject::n_systems(), libMesh::DofObject::n_var_groups(), libMesh::DofObject::n_vars(), libMesh::DofObject::ncv_magic, libMesh::DofObject::set_n_comp_group(), and libMesh::DofObject::start_idx().

Referenced by DofObjectTest< Node >::testManualDofCalculation(), DofObjectTest< Node >::testSetNVariableGroups(), and DofObjectTest< Node >::testSetNVariableGroupsExtraInts().

249 {
250  const unsigned int n_sys = this->n_systems();
251 
252  libmesh_assert_less (s, n_sys);
253 
254  // number of variable groups for this system - inferred
255  const unsigned int nvg = cast_int<unsigned int>(nvpg.size());
256 
257  // BSK - note that for compatibility with the previous implementation
258  // calling this method when (nvars == this->n_vars()) requires that
259  // we invalidate the DOF indices and set the number of components to 0.
260  // Note this was a bit of a surprise to me - there was no quick return in
261  // the old method, which caused removal and readdition of the DOF indices
262  // even in the case of (nvars == this->n_vars()), resulting in n_comp(s,v)
263  // implicitly becoming 0 regardless of any previous value.
264  // quick return?
265  if (nvg == this->n_var_groups(s))
266  {
267  for (unsigned int vg=0; vg<nvg; vg++)
268  {
269  this->set_n_comp_group(s,vg,0);
270  libmesh_assert_equal_to (this->n_vars(s,vg), nvpg[vg]);
271  }
272  return;
273  }
274 
275  const bool hei = this->has_extra_integers();
276 
277  // since there is ample opportunity to screw up other systems, let us
278  // cache their current sizes and later assert that they are unchanged.
279 #ifdef DEBUG
280  const unsigned int nei = this->n_extra_integers();
281 
282  DofObject::index_buffer_t old_system_sizes, old_extra_integers;
283  old_system_sizes.reserve(n_sys);
284  old_extra_integers.reserve(nei);
285 
286  for (unsigned int s_ctr=0; s_ctr<n_sys; s_ctr++)
287  old_system_sizes.push_back(this->n_var_groups(s_ctr));
288 
289  for (unsigned int ei=0; ei != nei; ++ei)
290  old_extra_integers.push_back(this->get_extra_integer(ei));
291 #endif
292 
293  // remove current indices if we have some
294  if (this->n_var_groups(s) != 0)
295  {
296  const unsigned int old_nvg_s = this->n_var_groups(s);
297 
298  DofObject::index_buffer_t::iterator
299  it = _idx_buf.begin(),
300  end = _idx_buf.begin();
301 
302  std::advance(it, this->start_idx(s));
303  std::advance(end, this->end_idx(s));
304  _idx_buf.erase(it,end);
305 
306  for (unsigned int ctr=(s+1); ctr<n_sys; ctr++)
307  _idx_buf[ctr] -= 2*old_nvg_s;
308 
309  if (hei)
310  _idx_buf[n_sys] -= 2*old_nvg_s;
311  }
312 
313  // better not have any now!
314  libmesh_assert_equal_to (this->n_var_groups(s), 0);
315 
316  // Make sure we didn't screw up any of our sizes!
317 #ifdef DEBUG
318  for (auto s_ctr : make_range(this->n_systems()))
319  if (s_ctr != s)
320  libmesh_assert_equal_to (this->n_var_groups(s_ctr), old_system_sizes[s_ctr]);
321 
322  libmesh_assert_equal_to (nei, this->n_extra_integers());
323 
324  for (unsigned int ei=0; ei != nei; ++ei)
325  libmesh_assert_equal_to(old_extra_integers[ei], this->get_extra_integer(ei));
326 #endif
327 
328  // OK, if the user requested 0 that is what we have
329  if (nvg == 0)
330  return;
331 
332  {
333  // array to hold new indices
334  DofObject::index_buffer_t var_idxs(2*nvg);
335  for (unsigned int vg=0; vg<nvg; vg++)
336  {
337  var_idxs[2*vg ] = ncv_magic*nvpg[vg] + 0;
338  var_idxs[2*vg + 1] = invalid_id - 1;
339  }
340 
341  DofObject::index_buffer_t::iterator it = _idx_buf.begin();
342  std::advance(it, this->end_idx(s));
343  _idx_buf.insert(it, var_idxs.begin(), var_idxs.end());
344 
345  for (unsigned int ctr=(s+1); ctr<n_sys; ctr++)
346  _idx_buf[ctr] += 2*nvg;
347 
348  if (hei)
349  _idx_buf[n_sys] += 2*nvg;
350 
351  // resize _idx_buf to fit so no memory is wasted.
353  }
354 
355  libmesh_assert_equal_to (nvg, this->n_var_groups(s));
356 
357 #ifdef DEBUG
358 
359  libmesh_assert_equal_to (this->n_var_groups(s), nvpg.size());
360 
361  for (auto vg : make_range(this->n_var_groups(s)))
362  {
363  libmesh_assert_equal_to (this->n_vars(s,vg), nvpg[vg]);
364  libmesh_assert_equal_to (this->n_comp_group(s,vg), 0);
365  }
366 
367  for (auto v : make_range(this->n_vars(s)))
368  libmesh_assert_equal_to (this->n_comp(s,v), 0);
369 
370  // again, all other system sizes should be unchanged!
371  for (auto s_ctr : make_range(this->n_systems()))
372  if (s_ctr != s)
373  libmesh_assert_equal_to (this->n_var_groups(s_ctr), old_system_sizes[s_ctr]);
374 
375  // Extra integers count and values should also be unchanged!
376  libmesh_assert_equal_to (nei, this->n_extra_integers());
377 
378  for (unsigned int ei=0; ei != nei; ++ei)
379  libmesh_assert_equal_to(old_extra_integers[ei], this->get_extra_integer(ei));
380 #endif
381 }
unsigned int n_comp(const unsigned int s, const unsigned int var) const
Definition: dof_object.h:995
unsigned int n_var_groups(const unsigned int s) const
Definition: dof_object.h:950
unsigned int end_idx(const unsigned int s) const
The ending index for system s.
Definition: dof_object.h:1253
unsigned int n_vars(const unsigned int s, const unsigned int vg) const
Definition: dof_object.h:960
unsigned int n_systems() const
Definition: dof_object.h:930
static const dof_id_type invalid_id
An invalid id to distinguish an uninitialized DofObject.
Definition: dof_object.h:477
bool has_extra_integers() const
Returns whether extra integers are associated to the DofObject.
Definition: dof_object.h:1181
std::vector< index_t > index_buffer_t
Definition: dof_object.h:674
void set_n_comp_group(const unsigned int s, const unsigned int vg, const unsigned int ncomp)
Sets the number of components for VariableGroup vg of system s associated with this DofObject...
Definition: dof_object.C:397
unsigned int start_idx(const unsigned int s) const
The starting index for system s.
Definition: dof_object.h:1242
IntRange< T > make_range(T beg, T end)
The 2-parameter make_range() helper function returns an IntRange<T> when both input parameters are of...
Definition: int_range.h:134
unsigned int n_extra_integers() const
Returns how many extra integers are associated to the DofObject.
Definition: dof_object.h:1163
index_buffer_t _idx_buf
Definition: dof_object.h:675
unsigned int n_comp_group(const unsigned int s, const unsigned int vg) const
Definition: dof_object.h:1008
dof_id_type get_extra_integer(const unsigned int index) const
Gets the value on this object of the extra integer associated with index, which should have been obta...
Definition: dof_object.h:1095
static const index_t ncv_magic
Above we introduced the chimera ncv, which is a hybrid of the form ncv = ncv_magic*nv + nc where nv a...
Definition: dof_object.h:686

◆ set_old_dof_object()

void libMesh::DofObject::set_old_dof_object ( )
inherited

Sets the old_dof_object to a copy of this.

Definition at line 135 of file dof_object.C.

References libMesh::DofObject::clear_old_dof_object(), libMesh::DofObject::construct(), libMesh::libmesh_assert(), and libMesh::DofObject::old_dof_object.

136 {
137  this->clear_old_dof_object();
138 
140 
141  // Make a new DofObject, assign a copy of \p this.
142  // Make sure the copy ctor for DofObject works!!
143  this->old_dof_object = this->construct(this);
144 }
std::unique_ptr< DofObject > construct(const DofObject *other=nullptr)
Convenient factory function that calls either the (deep) copy constructor or the default constructor ...
Definition: dof_object.h:736
void clear_old_dof_object()
Sets the old_dof_object to nullptr.
Definition: dof_object.C:128
libmesh_assert(ctx)
std::unique_ptr< DofObject > old_dof_object
This object on the last mesh.
Definition: dof_object.h:88

◆ set_unique_id() [1/2]

unique_id_type & libMesh::DofObject::set_unique_id ( )
inlineinherited
Returns
The globally unique_id for this DofObject as a writable reference. Deprecated; use the API taking an input instead.

Definition at line 852 of file dof_object.h.

References libMesh::DofObject::_unique_id.

Referenced by libMesh::ReplicatedMesh::add_elem(), libMesh::DistributedMesh::add_elem(), libMesh::ReplicatedMesh::add_node(), libMesh::DistributedMesh::add_node(), libMesh::ReplicatedMesh::add_point(), libMesh::UnstructuredMesh::all_first_order(), libMesh::UnstructuredMesh::create_submesh(), libMesh::ReplicatedMesh::insert_elem(), libMesh::DistributedMesh::insert_elem(), libMesh::ReplicatedMesh::insert_node(), ExodusTest< elem_type >::meshes_equal_enough(), libMesh::Nemesis_IO::read(), libMesh::CheckpointIO::read_nodes(), and libMesh::XdrIO::read_serialized_nodes().

853 {
854 #ifdef LIBMESH_ENABLE_UNIQUE_ID
855  libmesh_deprecated();
856  return _unique_id;
857 #else
858  libmesh_not_implemented();
859 #endif
860 }
unique_id_type _unique_id
A globally unique id, guaranteed not to change as the mesh is repartitioned or adapted.
Definition: dof_object.h:572

◆ set_unique_id() [2/2]

void libMesh::DofObject::set_unique_id ( unique_id_type  new_id)
inlineinherited

Sets the unique_id for this DofObject.

Definition at line 865 of file dof_object.h.

References libMesh::DofObject::_unique_id, and libMesh::libmesh_ignore().

866 {
867 #ifdef LIBMESH_ENABLE_UNIQUE_ID
868  _unique_id = new_id;
869 #else
870  libmesh_ignore(new_id);
871  libmesh_not_implemented();
872 #endif
873 }
unique_id_type _unique_id
A globally unique id, guaranteed not to change as the mesh is repartitioned or adapted.
Definition: dof_object.h:572
void libmesh_ignore(const Args &...)

◆ set_valence()

void libMesh::Node::set_valence ( unsigned int  val)
inline

Sets the number of nodes connected with this node.

Definition at line 355 of file node.h.

References _valence.

356 {
357  _valence = cast_int<valence_idx_t>(val);
358 }
valence_idx_t _valence
The number of nodes connected with this node.
Definition: node.h:219

◆ set_vg_dof_base()

void libMesh::DofObject::set_vg_dof_base ( const unsigned int  s,
const unsigned int  vg,
const dof_id_type  db 
)
inlineinherited

VariableGroup DoF indices are indexed as id = base + var_in_vg*ncomp + comp This method allows for direct access to the base.

Definition at line 1290 of file dof_object.h.

References libMesh::DofObject::_idx_buf, libMesh::DofObject::n_systems(), libMesh::DofObject::n_var_groups(), libMesh::DofObject::start_idx(), and libMesh::DofObject::vg_dof_base().

Referenced by libMesh::DofMap::distribute_local_dofs_node_major(), libMesh::DofMap::distribute_local_dofs_var_major(), libMesh::DofObject::invalidate_dofs(), libMesh::DofMap::reinit(), libMesh::DofMap::set_nonlocal_dof_objects(), and DofObjectTest< Node >::testManualDofCalculation().

1293 {
1294  libmesh_assert_less (s, this->n_systems());
1295  libmesh_assert_less (vg, this->n_var_groups(s));
1296 
1297  const unsigned int
1298  start_idx_sys = this->start_idx(s);
1299 
1300  libmesh_assert_less ((start_idx_sys + 2*vg + 1), _idx_buf.size());
1301 
1302  _idx_buf[start_idx_sys + 2*vg + 1] = db;
1303 
1304  libmesh_assert_equal_to (this->vg_dof_base(s,vg), db);
1305 }
dof_id_type vg_dof_base(const unsigned int s, const unsigned int vg) const
VariableGroup DoF indices are indexed as id = base + var_in_vg*ncomp + comp This method allows for di...
Definition: dof_object.h:1310
unsigned int n_var_groups(const unsigned int s) const
Definition: dof_object.h:950
unsigned int n_systems() const
Definition: dof_object.h:930
unsigned int start_idx(const unsigned int s) const
The starting index for system s.
Definition: dof_object.h:1242
index_buffer_t _idx_buf
Definition: dof_object.h:675

◆ slice() [1/2]

const Real & libMesh::TypeVector< Real >::slice ( const unsigned int  i) const
inlineinherited

Definition at line 187 of file type_vector.h.

187 { return (*this)(i); }

◆ slice() [2/2]

Real & libMesh::TypeVector< Real >::slice ( const unsigned int  i)
inlineinherited

Definition at line 193 of file type_vector.h.

193 { return (*this)(i); }

◆ subtract()

void libMesh::TypeVector< Real >::subtract ( const TypeVector< T2 > &  p)
inlineinherited

Subtract from this vector without creating a temporary.

Definition at line 714 of file type_vector.h.

715 {
716  for (unsigned int i=0; i<LIBMESH_DIM; i++)
717  _coords[i] -= p._coords[i];
718 }
Real _coords[LIBMESH_DIM]
The coordinates of the TypeVector.
Definition: type_vector.h:439

◆ subtract_scaled()

void libMesh::TypeVector< Real >::subtract_scaled ( const TypeVector< T2 > &  p,
const Real &  factor 
)
inlineinherited

Subtract a scaled value from this vector without creating a temporary.

Definition at line 725 of file type_vector.h.

726 {
727  for (unsigned int i=0; i<LIBMESH_DIM; i++)
728  _coords[i] -= factor*p(i);
729 }
Real _coords[LIBMESH_DIM]
The coordinates of the TypeVector.
Definition: type_vector.h:439

◆ unique_id()

unique_id_type libMesh::DofObject::unique_id ( ) const
inlineinherited
Returns
The globally unique_id for this DofObject

Definition at line 839 of file dof_object.h.

References libMesh::DofObject::_unique_id, libMesh::DofObject::invalid_unique_id, libMesh::libmesh_assert(), and libMesh::DofObject::valid_unique_id().

Referenced by libMesh::ReplicatedMesh::add_elem(), libMesh::DistributedMesh::add_elem(), libMesh::ReplicatedMesh::add_node(), libMesh::DistributedMesh::add_node(), libMesh::ReplicatedMesh::add_point(), libMesh::MeshTools::Modification::all_tri(), libMesh::MeshTools::Modification::flatten(), libMesh::Elem::get_info(), libMesh::ReplicatedMesh::insert_elem(), libMesh::DistributedMesh::insert_elem(), libMesh::ReplicatedMesh::insert_node(), libMesh::XdrIO::pack_element(), libMesh::ExodusII_IO::read_elemental_variable(), SlitMeshRefinedSystemTest::testRestart(), and libMesh::XdrIO::write_serialized_nodes().

840 {
841 #ifdef LIBMESH_ENABLE_UNIQUE_ID
843  return _unique_id;
844 #else
845  return invalid_unique_id;
846 #endif
847 }
unique_id_type _unique_id
A globally unique id, guaranteed not to change as the mesh is repartitioned or adapted.
Definition: dof_object.h:572
static const unique_id_type invalid_unique_id
An invalid unique_id to distinguish an uninitialized DofObject.
Definition: dof_object.h:482
libmesh_assert(ctx)
bool valid_unique_id() const
Definition: dof_object.h:886

◆ unit()

TypeVector< Real > libMesh::TypeVector< Real >::unit ( ) const
inlineinherited
Returns
A unit vector in the direction of *this.

Definition at line 1120 of file type_vector.h.

References std::norm().

1121 {
1122 
1123  auto && length = norm();
1124 
1125  libmesh_assert_not_equal_to (length, static_cast<Real>(0.));
1126 
1127 #if LIBMESH_DIM == 1
1128  return TypeVector<T>(_coords[0]/length);
1129 #endif
1130 
1131 #if LIBMESH_DIM == 2
1132  return TypeVector<T>(_coords[0]/length,
1133  _coords[1]/length);
1134 #endif
1135 
1136 #if LIBMESH_DIM == 3
1137  return TypeVector<T>(_coords[0]/length,
1138  _coords[1]/length,
1139  _coords[2]/length);
1140 #endif
1141 
1142 }
Real _coords[LIBMESH_DIM]
The coordinates of the TypeVector.
Definition: type_vector.h:439
auto norm() const -> decltype(std::norm(Real()))
Definition: type_vector.h:929

◆ unpack_indexing()

void libMesh::DofObject::unpack_indexing ( std::vector< largest_id_type >::const_iterator  begin)
inherited

A method for creating our index buffer from packed data - basically with our current implementation we investigate the size term and then copy.

Definition at line 595 of file dof_object.C.

References libMesh::DofObject::_idx_buf, std::abs(), libMesh::DofObject::clear_old_dof_object(), libMesh::DofObject::construct(), libMesh::libmesh_assert(), and libMesh::DofObject::old_dof_object.

596 {
597  _idx_buf.clear();
598 
599 #ifdef LIBMESH_ENABLE_AMR
600  this->clear_old_dof_object();
601  const bool has_old_dof_object = cast_int<bool>(*begin++);
602 #endif
603 
604  const largest_id_type size = *begin++;
605  _idx_buf.reserve(size);
606  std::copy(begin, begin+size, back_inserter(_idx_buf));
607 
608  // Check as best we can for internal consistency now
609  libmesh_assert(_idx_buf.empty() ||
611  cast_int<dof_id_signed_type>(_idx_buf.size())));
612 #ifdef DEBUG
613  if (!_idx_buf.empty())
614  {
615  const int hdr = cast_int<int>(dof_id_signed_type(_idx_buf[0]));
616  const unsigned int ns = hdr >= 0 ? hdr : (-hdr-1);
617  for (unsigned int i=1; i < ns; ++i)
618  {
619  if (hdr > 0 || i > 1)
620  libmesh_assert_greater_equal (_idx_buf[i], _idx_buf[i-1]);
621  else
622  libmesh_assert_greater_equal (_idx_buf[i], ns);
623  libmesh_assert_equal_to ((_idx_buf[i] - _idx_buf[i-1])%2, 0);
624  libmesh_assert_less_equal (_idx_buf[i], _idx_buf.size());
625  }
626  if (hdr < 0 && ns > 0)
627  libmesh_assert_less_equal(_idx_buf[ns], _idx_buf.size());
628  }
629 #endif
630 
631 #ifdef LIBMESH_ENABLE_AMR
632  if (has_old_dof_object)
633  {
634  this->old_dof_object = this->construct();
635  this->old_dof_object->unpack_indexing(begin+size);
636  }
637 #endif
638 }
std::unique_ptr< DofObject > construct(const DofObject *other=nullptr)
Convenient factory function that calls either the (deep) copy constructor or the default constructor ...
Definition: dof_object.h:736
uint64_t largest_id_type
Definition: id_types.h:148
ADRealEigenVector< T, D, asd > abs(const ADRealEigenVector< T, D, asd > &)
Definition: type_vector.h:57
void clear_old_dof_object()
Sets the old_dof_object to nullptr.
Definition: dof_object.C:128
libmesh_assert(ctx)
int8_t dof_id_signed_type
Definition: id_types.h:68
std::unique_ptr< DofObject > old_dof_object
This object on the last mesh.
Definition: dof_object.h:88
index_buffer_t _idx_buf
Definition: dof_object.h:675

◆ unpackable_indexing_size()

unsigned int libMesh::DofObject::unpackable_indexing_size ( std::vector< largest_id_type >::const_iterator  begin)
staticinherited

If we have indices packed into an buffer for communications, how much of that buffer applies to this dof object?

Definition at line 575 of file dof_object.C.

576 {
577 #ifdef LIBMESH_ENABLE_AMR
578  const bool has_old_dof_object = cast_int<bool>(*begin++);
579 
580  static const int dof_header_size = 2;
581 #else
582  static const bool has_old_dof_object = false;
583  static const int dof_header_size = 1;
584 #endif
585 
586  const largest_id_type this_indexing_size = *begin++;
587 
588  return cast_int<unsigned int>
589  (dof_header_size + this_indexing_size +
590  (has_old_dof_object ?
591  unpackable_indexing_size(begin+this_indexing_size) : 0));
592 }
static unsigned int unpackable_indexing_size(std::vector< largest_id_type >::const_iterator begin)
If we have indices packed into an buffer for communications, how much of that buffer applies to this ...
Definition: dof_object.C:575
uint64_t largest_id_type
Definition: id_types.h:148

◆ valence()

unsigned int libMesh::Node::valence ( ) const
inline
Returns
The number of nodes connected with this node. Currently, this value is invalid (zero) except for subdivision meshes.

Definition at line 178 of file node.h.

References _valence, and libMesh::invalid_uint.

Referenced by libMesh::Tri3Subdivision::get_ordered_valence().

179  {
180 #ifdef LIBMESH_ENABLE_NODE_VALENCE
181  return _valence;
182 #else
183  libmesh_not_implemented();
184  return libMesh::invalid_uint;
185 #endif
186  }
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value for an unsigned int...
Definition: libmesh.h:286
valence_idx_t _valence
The number of nodes connected with this node.
Definition: node.h:219

◆ valid_id()

bool libMesh::DofObject::valid_id ( ) const
inlineinherited

◆ valid_processor_id()

bool libMesh::DofObject::valid_processor_id ( ) const
inlineinherited
Returns
true if this DofObject has a valid id set, false otherwise.

Definition at line 922 of file dof_object.h.

References libMesh::DofObject::_processor_id, and libMesh::DofObject::invalid_processor_id.

Referenced by DofObjectTest< Node >::testInvalidateProcId(), and DofObjectTest< Node >::testValidProcId().

923 {
925 }
static const processor_id_type invalid_processor_id
An invalid processor_id to distinguish DoFs that have not been assigned to a processor.
Definition: dof_object.h:488
processor_id_type _processor_id
The processor_id of the DofObject.
Definition: dof_object.h:589

◆ valid_unique_id()

bool libMesh::DofObject::valid_unique_id ( ) const
inlineinherited
Returns
true if this DofObject has a valid unique_id set, false otherwise.

Definition at line 886 of file dof_object.h.

References libMesh::DofObject::_unique_id, and libMesh::DofObject::invalid_unique_id.

Referenced by libMesh::ReplicatedMesh::add_elem(), libMesh::DistributedMesh::add_elem(), libMesh::ReplicatedMesh::add_node(), libMesh::DistributedMesh::add_node(), libMesh::ReplicatedMesh::add_point(), libMesh::Elem::get_info(), libMesh::ReplicatedMesh::insert_elem(), libMesh::DistributedMesh::insert_elem(), libMesh::ReplicatedMesh::insert_node(), and libMesh::DofObject::unique_id().

887 {
888 #ifdef LIBMESH_ENABLE_UNIQUE_ID
890 #else
891  return false;
892 #endif
893 }
unique_id_type _unique_id
A globally unique id, guaranteed not to change as the mesh is repartitioned or adapted.
Definition: dof_object.h:572
static const unique_id_type invalid_unique_id
An invalid unique_id to distinguish an uninitialized DofObject.
Definition: dof_object.h:482

◆ var_to_vg_and_offset()

std::pair< unsigned int, unsigned int > libMesh::DofObject::var_to_vg_and_offset ( const unsigned int  s,
const unsigned int  var 
) const
inlineinherited
Returns
A pair consisting of the variable group number and the offset index from the start of that group for variable var on system s associated with this DofObject

Definition at line 1193 of file dof_object.h.

References libMesh::DofObject::n_var_groups(), and libMesh::DofObject::n_vars().

Referenced by libMesh::DofMap::_dof_indices(), libMesh::DofMap::_node_dof_indices(), libMesh::DofObject::dof_number(), libMesh::OldSolutionCoefs< Output, point_output >::eval_old_dofs(), and libMesh::OldSolutionValue< Output, point_output >::eval_old_dofs().

1195 {
1196  std::pair<unsigned int, unsigned int> returnval(0,0);
1197 
1198  unsigned int & vg = returnval.first;
1199  unsigned int & offset = returnval.second;
1200 
1201  unsigned int vg_start = 0;
1202  for (; ; vg++)
1203  {
1204  libmesh_assert_less(vg, this->n_var_groups(s));
1205 
1206  const unsigned int vg_end = vg_start + this->n_vars(s,vg);
1207  if (var < vg_end)
1208  {
1209  offset = var - vg_start;
1210  return returnval;
1211  }
1212  vg_start = vg_end;
1213  }
1214 }
unsigned int n_var_groups(const unsigned int s) const
Definition: dof_object.h:950
unsigned int n_vars(const unsigned int s, const unsigned int vg) const
Definition: dof_object.h:960

◆ vg_dof_base()

dof_id_type libMesh::DofObject::vg_dof_base ( const unsigned int  s,
const unsigned int  vg 
) const
inlineinherited

VariableGroup DoF indices are indexed as id = base + var_in_vg*ncomp + comp This method allows for direct access to the base.

Definition at line 1310 of file dof_object.h.

References libMesh::DofObject::_idx_buf, libMesh::DofObject::n_systems(), libMesh::DofObject::n_var_groups(), and libMesh::DofObject::start_idx().

Referenced by libMesh::DofMap::distribute_local_dofs_node_major(), libMesh::DofMap::distribute_local_dofs_var_major(), libMesh::DofMap::reinit(), libMesh::DofMap::set_nonlocal_dof_objects(), libMesh::DofObject::set_vg_dof_base(), and DofObjectTest< Node >::testManualDofCalculation().

1312 {
1313  libmesh_assert_less (s, this->n_systems());
1314  libmesh_assert_less (vg, this->n_var_groups(s));
1315 
1316  const unsigned int
1317  start_idx_sys = this->start_idx(s);
1318 
1319  libmesh_assert_less ((start_idx_sys + 2*vg + 1), _idx_buf.size());
1320 
1321  // #ifdef DEBUG
1322  // std::cout << " [ ";
1323  // for (auto i : _idx_buf)
1324  // std::cout << i << " ";
1325  // std::cout << "]\n";
1326  // #endif
1327 
1328  return _idx_buf[start_idx_sys + 2*vg + 1];
1329 }
unsigned int n_var_groups(const unsigned int s) const
Definition: dof_object.h:950
unsigned int n_systems() const
Definition: dof_object.h:930
unsigned int start_idx(const unsigned int s) const
The starting index for system s.
Definition: dof_object.h:1242
index_buffer_t _idx_buf
Definition: dof_object.h:675

◆ write_unformatted()

void libMesh::TypeVector< Real >::write_unformatted ( std::ostream &  out_stream,
const bool  newline = true 
) const
inherited

Unformatted print to the stream out.

Simply prints the elements of the vector separated by spaces. Also prints a newline by default, however, this behavior can be controlled with the newline parameter.

Definition at line 75 of file type_vector.C.

77 {
78  os << std::setiosflags(std::ios::showpoint)
79  << (*this)(0) << " "
80  << (*this)(1) << " "
81  << (*this)(2) << " ";
82 
83  if (newline)
84  os << '\n';
85 }

◆ zero()

void libMesh::TypeVector< Real >::zero ( )
inlineinherited

Set all entries of the vector to 0.

Definition at line 938 of file type_vector.h.

939 {
940  for (unsigned int i=0; i<LIBMESH_DIM; i++)
941  _coords[i] = 0.;
942 }
Real _coords[LIBMESH_DIM]
The coordinates of the TypeVector.
Definition: type_vector.h:439

Friends And Related Function Documentation

◆ Elem

friend class Elem
friend

Definition at line 206 of file node.h.

◆ MeshRefinement

friend class MeshRefinement
friend

This class need access to the node key information, but no one else should be able to mess with it.

Definition at line 205 of file node.h.

Member Data Documentation

◆ _coords

Real libMesh::TypeVector< Real >::_coords[LIBMESH_DIM]
protectedinherited

The coordinates of the TypeVector.

Definition at line 439 of file type_vector.h.

◆ _counts [1/2]

ReferenceCounter::Counts libMesh::ReferenceCounter::_counts
staticprotectedinherited

Actually holds the data.

Definition at line 124 of file reference_counter.h.

Referenced by libMesh::ReferenceCounter::get_info().

◆ _counts [2/2]

ReferenceCounter::Counts libMesh::ReferenceCounter::_counts
staticprotectedinherited

Actually holds the data.

Definition at line 124 of file reference_counter.h.

Referenced by libMesh::ReferenceCounter::get_info().

◆ _enable_print_counter [1/2]

bool libMesh::ReferenceCounter::_enable_print_counter = true
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().

◆ _enable_print_counter [2/2]

bool libMesh::ReferenceCounter::_enable_print_counter = true
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().

◆ _mutex [1/2]

Threads::spin_mutex libMesh::ReferenceCounter::_mutex
staticprotectedinherited

Mutual exclusion object to enable thread-safe reference counting.

Definition at line 137 of file reference_counter.h.

◆ _mutex [2/2]

Threads::spin_mutex libMesh::ReferenceCounter::_mutex
staticprotectedinherited

Mutual exclusion object to enable thread-safe reference counting.

Definition at line 137 of file reference_counter.h.

◆ _n_objects [1/2]

Threads::atomic< unsigned int > libMesh::ReferenceCounter::_n_objects
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().

◆ _n_objects [2/2]

Threads::atomic< unsigned int > libMesh::ReferenceCounter::_n_objects
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().

◆ _valence

valence_idx_t libMesh::Node::_valence
private

The number of nodes connected with this node.

Currently, this value is invalid (zero) except for subdivision meshes.

Definition at line 219 of file node.h.

Referenced by set_valence(), and valence().

◆ invalid_id

const dof_id_type libMesh::DofObject::invalid_id = static_cast<dof_id_type>(-1)
staticinherited

An invalid id to distinguish an uninitialized DofObject.

Definition at line 477 of file dof_object.h.

Referenced by libMesh::DofMap::_dof_indices(), libMesh::DofMap::_node_dof_indices(), active(), libMesh::MeshBase::add_elem_datum(), libMesh::MeshBase::add_elem_integers(), libMesh::DofObject::add_extra_integers(), libMesh::DofMap::add_neighbors_to_send_list(), libMesh::TopologyMap::add_node(), libMesh::MeshRefinement::add_node(), libMesh::MeshBase::add_node_datum(), libMesh::MeshBase::add_node_integers(), libMesh::ReplicatedMesh::add_point(), libMesh::MeshTools::Modification::all_tri(), libMesh::DofMap::allgather_recursive_constraints(), libMesh::DofMap::assert_no_nodes_missed(), libMesh::Elem::bracketing_nodes(), ExtraIntegersTest::checkpoint_helper(), libMesh::FEGenericBase< FEOutputType< T >::type >::compute_periodic_constraints(), libMesh::FEGenericBase< FEOutputType< T >::type >::compute_proj_constraints(), libMesh::DofMap::distribute_dofs(), libMesh::DofMap::distribute_local_dofs_node_major(), libMesh::DofMap::distribute_local_dofs_var_major(), libMesh::DofMap::dof_indices(), libMesh::DofObject::dof_number(), libMesh::RBEIMConstruction::enrich_eim_approximation_on_interiors(), libMesh::RBEIMConstruction::enrich_eim_approximation_on_nodes(), libMesh::RBEIMConstruction::enrich_eim_approximation_on_sides(), libMesh::OldSolutionValue< Output, point_output >::eval_old_dofs(), libMesh::TopologyMap::find(), libMesh::DofMap::gather_constraints(), libMesh::MeshBase::get_elemset_code(), libMesh::ReplicatedMesh::insert_node(), libMesh::Poly2TriTriangulator::insert_refinement_points(), libMesh::Elem::interior_parent(), libMesh::DofObject::invalidate_dofs(), libMesh::DofObject::invalidate_id(), libMesh::MeshTools::libmesh_assert_valid_neighbors(), libMesh::DistributedMesh::libmesh_assert_valid_parallel_object_ids(), Node(), libMesh::Elem::node_id(), libMesh::DofMap::old_dof_indices(), libMesh::DistributedMesh::own_node(), libMesh::XdrIO::pack_element(), libMesh::SFCPartitioner::partition_range(), libMesh::Elem::point(), libMesh::ExodusII_IO::read(), libMesh::System::read_legacy_data(), libMesh::DynaIO::read_mesh(), libMesh::System::read_parallel_data(), libMesh::XdrIO::read_serialized_connectivity(), libMesh::DofMap::SCALAR_dof_indices(), libMesh::DofObject::set_dof_number(), libMesh::DofObject::set_n_comp_group(), libMesh::DofObject::set_n_vars_per_group(), libMesh::DofMap::set_nonlocal_dof_objects(), libMesh::Parallel::sync_node_data_by_element_id_once(), ExtraIntegersTest::test_and_set_initial_data(), DofObjectTest< Node >::testAddExtraData(), DofObjectTest< Node >::testAddSystemExtraInts(), NodalNeighborsTest::testEdge2(), NodalNeighborsTest::testEdge3(), NodalNeighborsTest::testEdge4(), ExtraIntegersTest::testExtraIntegersExodusReading(), InfFERadialTest::testRefinement(), DofObjectTest< Node >::testSetNSystemsExtraInts(), DofObjectTest< Node >::testSetNVariableGroupsExtraInts(), DofObjectTest< Node >::testValidId(), WriteElemsetData::testWriteImpl(), libMesh::Poly2TriTriangulator::triangulate_current_points(), libMesh::DofObject::valid_id(), libMesh::System::write_parallel_data(), and libMesh::XdrIO::write_serialized_connectivity().

◆ invalid_processor_id

const processor_id_type libMesh::DofObject::invalid_processor_id = static_cast<processor_id_type>(-1)
staticinherited

An invalid processor_id to distinguish DoFs that have not been assigned to a processor.

Definition at line 488 of file dof_object.h.

Referenced by libMesh::BoundaryInfo::_find_id_maps(), libMesh::DistributedMesh::add_elem(), libMesh::DistributedMesh::add_node(), libMesh::MeshRefinement::add_node(), libMesh::MeshCommunication::allgather(), choose_processor_id(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::SubProjector::construct_projection(), libMesh::MeshTools::correct_node_proc_ids(), libMesh::MeshTools::create_bounding_box(), libMesh::MeshTools::create_nodal_bounding_box(), libMesh::MeshCommunication::delete_remote_elements(), libMesh::Elem::Elem(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::SubFunctor::find_dofs_to_send(), libMesh::MeshCommunication::find_global_indices(), libMesh::MeshBase::get_info(), libMesh::DistributedMesh::insert_elem(), libMesh::DofObject::invalidate_processor_id(), libMesh::MeshTools::libmesh_assert_consistent_distributed(), libMesh::MeshTools::libmesh_assert_consistent_distributed_nodes(), libMesh::DistributedMesh::libmesh_assert_valid_parallel_object_ids(), libMesh::MeshCommunication::make_new_node_proc_ids_parallel_consistent(), libMesh::DistributedMesh::n_active_elem(), libMesh::MeshBase::n_elem_on_proc(), libMesh::MeshBase::n_nodes_on_proc(), libMesh::MeshBase::n_unpartitioned_elem(), libMesh::MeshBase::n_unpartitioned_nodes(), libMesh::SparsityPattern::Build::operator()(), libMesh::Partitioner::processor_pairs_to_interface_nodes(), libMesh::Nemesis_IO_Helper::read_var_names_impl(), libMesh::DistributedMesh::renumber_dof_objects(), libMesh::DistributedMesh::renumber_nodes_and_elements(), OverlappingFunctorTest::run_coupling_functor_test(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::send_and_insert_dof_values(), libMesh::Partitioner::set_node_processor_ids(), libMesh::DofMap::set_nonlocal_dof_objects(), libMesh::Partitioner::set_parent_processor_ids(), libMesh::LaplaceMeshSmoother::smooth(), libMesh::Parallel::sync_dofobject_data_by_id(), libMesh::Parallel::sync_dofobject_data_by_xyz(), libMesh::Parallel::sync_element_data_by_parent_id(), libMesh::Parallel::sync_node_data_by_element_id_once(), DofObjectTest< Node >::testValidProcId(), libMesh::MeshTools::total_weight(), libMesh::DofObject::valid_processor_id(), and libMesh::CheckpointIO::write().

◆ invalid_unique_id

const unique_id_type libMesh::DofObject::invalid_unique_id = static_cast<unique_id_type>(-1)
staticinherited

An invalid unique_id to distinguish an uninitialized DofObject.

Definition at line 482 of file dof_object.h.

Referenced by libMesh::DistributedMesh::renumber_dof_objects(), libMesh::DofObject::unique_id(), and libMesh::DofObject::valid_unique_id().

◆ old_dof_object

std::unique_ptr<DofObject> libMesh::DofObject::old_dof_object
protectedinherited

This object on the last mesh.

Useful for projecting solutions from one mesh to another.

Public access to old_dof_object is now officially deprecated and will be removed in future libMesh versions. Use the get_old_dof_object() accessor instead.

Definition at line 88 of file dof_object.h.

Referenced by libMesh::DofObject::clear_old_dof_object(), libMesh::DofObject::get_old_dof_object(), libMesh::DofObject::get_old_dof_object_ref(), libMesh::DofObject::operator=(), libMesh::DofObject::pack_indexing(), libMesh::DofObject::packed_indexing_size(), libMesh::DofObject::set_old_dof_object(), and libMesh::DofObject::unpack_indexing().


The documentation for this class was generated from the following files: