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

The DofObject defines an abstract base class for objects that have degrees of freedom associated with them. More...

#include <dof_object.h>

Inheritance diagram for libMesh::DofObject:
[legend]

Public Member Functions

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 and return to a pristine state. 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 ()
 
unique_id_type unique_id () const
 
unique_id_typeset_unique_id ()
 
void set_id (const dof_id_type dofid)
 Sets the 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
 
void set_n_systems (const unsigned int s)
 Sets the number of systems for this DofObject. 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 int > var_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...
 
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 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=libMesh::out)
 Prints the reference information, by default to libMesh::out. More...
 
static unsigned int n_objects ()
 Prints the number of outstanding (created, but not yet destroyed) objects. More...
 
static void enable_print_counter_info ()
 Methods to enable/disable the reference counter output from print_info() More...
 
static void disable_print_counter_info ()
 

Public Attributes

DofObjectold_dof_object
 This object on the last mesh. More...
 

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...
 

Protected Member Functions

 DofObject ()
 Constructor. More...
 
 ~DofObject ()
 Destructor. More...
 
void increment_constructor_count (const std::string &name)
 Increments the construction counter. More...
 
void increment_destructor_count (const std::string &name)
 Increments the destruction counter. 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
 Flag to control whether reference count information is printed when print_info is called. More...
 

Private Types

typedef dof_id_type index_t
 
DoF index information. More...
 
typedef std::vector< index_tindex_buffer_t
 

Private Member Functions

 DofObject (const DofObject &)
 "Copy"-constructor. More...
 
DofObjectoperator= (const DofObject &dof_obj)
 Deep-copying assignment operator. More...
 
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. More...
 
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. More...
 
unsigned int start_idx (const unsigned int s) const
 The starting index for system s. More...
 
unsigned int end_idx (const unsigned int s) const
 The ending index for system s. More...
 

Private Attributes

unique_id_type _unique_id
 A globally unique id, guaranteed not to change as the mesh is repartitioned or adapted. More...
 
dof_id_type _id
 The id of the DofObject. More...
 
processor_id_type _processor_id
 The processor_id of the DofObject. More...
 
index_buffer_t _idx_buf
 

Static Private Attributes

static const index_t ncv_magic = 256
 Above we introduced the chimera ncv, which is a hybrid of the form ncv = ncv_magic*nv + nc where nv are the number of identical variables of a given type, and nc is the number of components for this set of variables. More...
 
static const index_t ncv_magic_exp = 8
 

Detailed Description

The DofObject defines an abstract base class for objects that have degrees of freedom associated with them.

Examples of such objects are the Node and Elem classes. This class can not be instantiated, only derived from.

Author
Benjamin S. Kirk
Date
2003, 2011

Definition at line 51 of file dof_object.h.

Member Typedef Documentation

◆ Counts

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 117 of file reference_counter.h.

◆ index_buffer_t

typedef std::vector<index_t> libMesh::DofObject::index_buffer_t
private

Definition at line 507 of file dof_object.h.

◆ index_t


DoF index information.

This is packed into a contiguous buffer of the following format:

* [ns end_0 end_1 ... end_{ns-1} (ncv_0 idx_0 ncv_1 idx_1 ... ncv_nv idx_nv)_0
*                                (ncv_0 idx_0 ncv_1 idx_1 ... ncv_nv idx_nv)_1
*                                ...
*                                (ncv_0 idx_0 ncv_1 idx_1 ... ncv_nv idx_nv)_ns ]
* 

where 'end_s' is the index past the end of the variable group storage for system s.

Note
We specifically do not store the end for the last system - this always _idx_buf.size().

Specifically, consider the case of 4 systems, with 3, 0, 1, 2 variable groups, respectively. The _idx_buf then looks like:

* [4 10 10 12 () (ncv_0 idx_0 ncv_1 idx_1 ncv_2 idx_2) () (ncv_0 idx_0) (ncv_0 idx_0 ncv_1 idx_1)]
* [0  1  2  3         4     5     6     7     8     9         10    11      12    13    14    15]
* 

The ending index is then given by:

* end_s = _idx_buf.size(), s == (ns-1),
*       = _idx_buf[s+1]    otherwise.
* 

The starting indices are not specifically stored, but rather inferred as follows:

start_s = _idx_buf[s];

Now, the defining characteristic of the VariableGroup is that it supports an arbitrary number of variables of the same type. At the DofObject level, what that means is that each Variable in the VariableGroup will have the same number of nonzero components, and they can all be indexed from the same base number. We use this information in the ncv_# and idx_# entries as follows:

ncv_# = n_vars*ncv_magic + n_comp for variable group # idx_# = base_offset for variable group #

the DoF index for a particular component c of variable v within that group is then given by

idx_var = idx_# + n_comp*v + c

Note
There is a subtlety here - "variable v within that group" usually means nothing to the user. This class is either indexed with variable group numbers, or variable numbers counted within the system. So for a system with 2 variable groups, 4 and 8 variables each, the 5th variable in the system is the 1st variable in 2nd variable group. (Now of course 0-base everything... but you get the idea.)

Definition at line 506 of file dof_object.h.

Constructor & Destructor Documentation

◆ DofObject() [1/2]

libMesh::DofObject::DofObject ( )
protected

Constructor.

Protected so that you can't instantiate one of these except as a part of a Node or Elem.

Definition at line 545 of file dof_object.h.

References invalidate().

545  :
546 #ifdef LIBMESH_ENABLE_AMR
547  old_dof_object(nullptr),
548 #endif
549 #ifdef LIBMESH_ENABLE_UNIQUE_ID
551 #endif
552  _id (invalid_id),
554 {
555  this->invalidate();
556 }
dof_id_type _id
The id of the DofObject.
Definition: dof_object.h:442
void invalidate()
Invalidates all the indices for this DofObject.
Definition: dof_object.h:611
unique_id_type _unique_id
A globally unique id, guaranteed not to change as the mesh is repartitioned or adapted.
Definition: dof_object.h:436
static const unique_id_type invalid_unique_id
An invalid unique_id to distinguish an uninitialized DofObject.
Definition: dof_object.h:352
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:358
static const dof_id_type invalid_id
An invalid id to distinguish an uninitialized DofObject.
Definition: dof_object.h:347
DofObject * old_dof_object
This object on the last mesh.
Definition: dof_object.h:79
processor_id_type _processor_id
The processor_id of the DofObject.
Definition: dof_object.h:453

◆ ~DofObject()

libMesh::DofObject::~DofObject ( )
protected

Destructor.

Protected so that you can't destroy one of these except as a part of a Node or Elem.

Definition at line 563 of file dof_object.h.

References clear_dofs(), and clear_old_dof_object().

564 {
565  // Free all memory.
566 #ifdef LIBMESH_ENABLE_AMR
567  this->clear_old_dof_object ();
568 #endif
569  this->clear_dofs ();
570 }
void clear_dofs()
Clear the DofMap data structures and return to a pristine state.
Definition: dof_object.h:621
void clear_old_dof_object()
Sets the old_dof_object to nullptr.

◆ DofObject() [2/2]

libMesh::DofObject::DofObject ( const DofObject )
private

"Copy"-constructor.

Does not copy old_dof_object, but leaves it null in the new object.

Member Function Documentation

◆ add_system()

void libMesh::DofObject::add_system ( )

Adds an additional system to the DofObject.

◆ clear_dofs()

void libMesh::DofObject::clear_dofs ( )

Clear the DofMap data structures and return to a pristine state.

Definition at line 621 of file dof_object.h.

References _idx_buf, and n_systems().

Referenced by ~DofObject().

622 {
623  // vector swap trick to force deallocation
624  index_buffer_t().swap(_idx_buf);
625 
626  libmesh_assert_equal_to (this->n_systems(), 0);
627  libmesh_assert (_idx_buf.empty());
628 }
unsigned int n_systems() const
Definition: dof_object.h:749
std::vector< index_t > index_buffer_t
Definition: dof_object.h:507
index_buffer_t _idx_buf
Definition: dof_object.h:508

◆ clear_old_dof_object()

void libMesh::DofObject::clear_old_dof_object ( )

Sets the old_dof_object to nullptr.

Referenced by ~DofObject().

◆ debug_buffer()

void libMesh::DofObject::debug_buffer ( ) const

Print our buffer for debugging.

◆ disable_print_counter_info()

static void libMesh::ReferenceCounter::disable_print_counter_info ( )
staticinherited

◆ dof_number() [1/2]

dof_id_type libMesh::DofObject::dof_number ( const unsigned int  s,
const unsigned int  var,
const unsigned int  comp 
) const
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 833 of file dof_object.h.

References n_comp(), n_comp_group(), n_systems(), n_vars(), and var_to_vg_and_offset().

Referenced by libMesh::OldSolutionValue< Output, point_output >::eval_at_node(), DofObjectTest< DerivedClass >::testJensEftangBug(), and DofObjectTest< DerivedClass >::testManualDofCalculation().

836 {
837  libmesh_assert_less (s, this->n_systems());
838  libmesh_assert_less (var, this->n_vars(s));
839  libmesh_assert_less (comp, this->n_comp(s,var));
840 
841  const std::pair<unsigned int, unsigned int>
842  vg_vig = this->var_to_vg_and_offset(s,var);
843 
844  const unsigned int
845  n_comp = this->n_comp_group(s,vg_vig.first);
846 
847  return this->dof_number(s, vg_vig.first, vg_vig.second,
848  comp, n_comp);
849 }
dof_id_type dof_number(const unsigned int s, const unsigned int var, const unsigned int comp) const
Definition: dof_object.h:833
unsigned int n_comp(const unsigned int s, const unsigned int var) const
Definition: dof_object.h:803
unsigned int n_vars(const unsigned int s, const unsigned int vg) const
Definition: dof_object.h:768
unsigned int n_systems() const
Definition: dof_object.h:749
std::pair< unsigned int, unsigned int > var_to_vg_and_offset(const unsigned int s, const unsigned int var) const
Definition: dof_object.h:887
unsigned int n_comp_group(const unsigned int s, const unsigned int vg) const
Definition: dof_object.h:816

◆ 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
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 854 of file dof_object.h.

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

859 {
860  libmesh_assert_less (s, this->n_systems());
861  libmesh_assert_less (vg, this->n_var_groups(s));
862  libmesh_assert_less (vig, this->n_vars(s,vg));
863 
864  const unsigned int
865  start_idx_sys = this->start_idx(s);
866 
867  libmesh_assert_less ((start_idx_sys + 2*vg + 1), _idx_buf.size());
868 
869  const dof_id_type
870  base_idx = _idx_buf[start_idx_sys + 2*vg + 1];
871 
872  // if the first component is invalid, they
873  // are all invalid
874  if (base_idx == invalid_id)
875  return invalid_id;
876 
877  // otherwise the index is the first component
878  // index augmented by the component number
879  else
880  return cast_int<dof_id_type>(base_idx + vig*n_comp + comp);
881 }
unsigned int n_comp(const unsigned int s, const unsigned int var) const
Definition: dof_object.h:803
unsigned int n_var_groups(const unsigned int s) const
Definition: dof_object.h:758
unsigned int n_vars(const unsigned int s, const unsigned int vg) const
Definition: dof_object.h:768
unsigned int n_systems() const
Definition: dof_object.h:749
static const dof_id_type invalid_id
An invalid id to distinguish an uninitialized DofObject.
Definition: dof_object.h:347
unsigned int start_idx(const unsigned int s) const
The starting index for system s.
Definition: dof_object.h:936
index_buffer_t _idx_buf
Definition: dof_object.h:508
uint8_t dof_id_type
Definition: id_types.h:64

◆ enable_print_counter_info()

static void libMesh::ReferenceCounter::enable_print_counter_info ( )
staticinherited

Methods to enable/disable the reference counter output from print_info()

◆ end_idx()

unsigned int libMesh::DofObject::end_idx ( const unsigned int  s) const
private

The ending index for system s.

Definition at line 947 of file dof_object.h.

References _idx_buf, and n_systems().

Referenced by n_var_groups().

948 {
949  libmesh_assert_less (s, this->n_systems());
950  libmesh_assert_less (s, _idx_buf.size());
951 
952  return ((s+1) == this->n_systems()) ?
953  cast_int<unsigned int>(_idx_buf.size()) :
954  cast_int<unsigned int>(_idx_buf[s+1]);
955 }
unsigned int n_systems() const
Definition: dof_object.h:749
index_buffer_t _idx_buf
Definition: dof_object.h:508

◆ get_info()

static std::string libMesh::ReferenceCounter::get_info ( )
staticinherited

Gets a string containing the reference information.

◆ has_dofs()

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

Definition at line 913 of file dof_object.h.

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

914 {
915  if (sys == libMesh::invalid_uint)
916  {
917  for (unsigned int s=0; s<this->n_systems(); s++)
918  if (this->n_vars(s))
919  return true;
920  }
921 
922  else
923  {
924  libmesh_assert_less (sys, this->n_systems());
925 
926  if (this->n_vars(sys))
927  return true;
928  }
929 
930  return false;
931 }
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value.
Definition: libmesh.h:245
unsigned int n_vars(const unsigned int s, const unsigned int vg) const
Definition: dof_object.h:768
unsigned int n_systems() const
Definition: dof_object.h:749

◆ id()

dof_id_type libMesh::DofObject::id ( ) const

◆ increment_constructor_count()

void libMesh::ReferenceCounter::increment_constructor_count ( const std::string &  name)
protectedinherited

Increments the construction counter.

Should be called in the constructor of any derived class that will be reference counted.

Definition at line 181 of file reference_counter.h.

References libMesh::ReferenceCounter::_counts, libMesh::Quality::name(), and libMesh::Threads::spin_mtx.

Referenced by libMesh::ReferenceCountedObject< RBParametrized >::ReferenceCountedObject().

182 {
183  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
184  std::pair<unsigned int, unsigned int> & p = _counts[name];
185 
186  p.first++;
187 }
std::string name(const ElemQuality q)
static Counts _counts
Actually holds the data.
spin_mutex spin_mtx
A convenient spin mutex object which can be used for obtaining locks.

◆ increment_destructor_count()

void libMesh::ReferenceCounter::increment_destructor_count ( const std::string &  name)
protectedinherited

Increments the destruction counter.

Should be called in the destructor of any derived class that will be reference counted.

Definition at line 194 of file reference_counter.h.

References libMesh::ReferenceCounter::_counts, libMesh::Quality::name(), and libMesh::Threads::spin_mtx.

Referenced by libMesh::ReferenceCountedObject< RBParametrized >::~ReferenceCountedObject().

195 {
196  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
197  std::pair<unsigned int, unsigned int> & p = _counts[name];
198 
199  p.second++;
200 }
std::string name(const ElemQuality q)
static Counts _counts
Actually holds the data.
spin_mutex spin_mtx
A convenient spin mutex object which can be used for obtaining locks.

◆ invalidate()

void libMesh::DofObject::invalidate ( )

Invalidates all the indices for this DofObject.

Definition at line 611 of file dof_object.h.

References invalidate_dofs(), invalidate_id(), and invalidate_processor_id().

Referenced by DofObject().

612 {
613  this->invalidate_dofs ();
614  this->invalidate_id ();
615  this->invalidate_processor_id ();
616 }
void invalidate_id()
Sets the id to invalid_id.
Definition: dof_object.h:595
void invalidate_processor_id()
Sets the processor id to invalid_processor_id.
Definition: dof_object.h:603
void invalidate_dofs(const unsigned int sys_num=libMesh::invalid_uint)
Sets all degree of freedom numbers to invalid_id.
Definition: dof_object.h:575

◆ invalidate_dofs()

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

Sets all degree of freedom numbers to invalid_id.

Definition at line 575 of file dof_object.h.

References invalid_id, n_comp_group(), n_systems(), n_var_groups(), and set_vg_dof_base().

Referenced by invalidate().

576 {
577  // If the user does not specify the system number...
578  if (sys_num >= this->n_systems())
579  {
580  for (unsigned int s=0; s<this->n_systems(); s++)
581  for (unsigned int vg=0; vg<this->n_var_groups(s); vg++)
582  if (this->n_comp_group(s,vg))
583  this->set_vg_dof_base(s,vg,invalid_id);
584  }
585  // ...otherwise invalidate the dofs for all systems
586  else
587  for (unsigned int vg=0; vg<this->n_var_groups(sys_num); vg++)
588  if (this->n_comp_group(sys_num,vg))
589  this->set_vg_dof_base(sys_num,vg,invalid_id);
590 }
unsigned int n_var_groups(const unsigned int s) const
Definition: dof_object.h:758
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:960
unsigned int n_systems() const
Definition: dof_object.h:749
static const dof_id_type invalid_id
An invalid id to distinguish an uninitialized DofObject.
Definition: dof_object.h:347
unsigned int n_comp_group(const unsigned int s, const unsigned int vg) const
Definition: dof_object.h:816

◆ invalidate_id()

void libMesh::DofObject::invalidate_id ( )

Sets the id to invalid_id.

Definition at line 595 of file dof_object.h.

References invalid_id, and set_id().

Referenced by invalidate(), and DofObjectTest< DerivedClass >::testInvalidateId().

596 {
597  this->set_id (invalid_id);
598 }
dof_id_type & set_id()
Definition: dof_object.h:664
static const dof_id_type invalid_id
An invalid id to distinguish an uninitialized DofObject.
Definition: dof_object.h:347

◆ invalidate_processor_id()

void libMesh::DofObject::invalidate_processor_id ( )

Sets the processor id to invalid_processor_id.

Definition at line 603 of file dof_object.h.

References invalid_processor_id, and processor_id().

Referenced by invalidate(), and DofObjectTest< DerivedClass >::testInvalidateProcId().

604 {
606 }
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:358
processor_id_type processor_id() const
Definition: dof_object.h:717

◆ n_comp()

unsigned int libMesh::DofObject::n_comp ( const unsigned int  s,
const unsigned int  var 
) const
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 803 of file dof_object.h.

References n_comp_group(), n_systems(), n_vars(), and var_to_vg().

Referenced by dof_number(), libMesh::OldSolutionValue< Output, point_output >::eval_at_node(), and n_dofs().

805 {
806  libmesh_assert_less (s, this->n_systems());
807  libmesh_assert_less (var, this->n_vars(s));
808 
809  return this->n_comp_group(s,this->var_to_vg(s,var));
810 }
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:1004
unsigned int n_vars(const unsigned int s, const unsigned int vg) const
Definition: dof_object.h:768
unsigned int n_systems() const
Definition: dof_object.h:749
unsigned int n_comp_group(const unsigned int s, const unsigned int vg) const
Definition: dof_object.h:816

◆ n_comp_group()

unsigned int libMesh::DofObject::n_comp_group ( const unsigned int  s,
const unsigned int  vg 
) const
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 816 of file dof_object.h.

References _idx_buf, n_systems(), n_var_groups(), ncv_magic, and start_idx().

Referenced by dof_number(), invalidate_dofs(), and n_comp().

818 {
819  libmesh_assert_less (s, this->n_systems());
820  libmesh_assert_less (vg, this->n_var_groups(s));
821 
822  const unsigned int
823  start_idx_sys = this->start_idx(s);
824 
825  libmesh_assert_less ((start_idx_sys + 2*vg), _idx_buf.size());
826 
827  return (_idx_buf[start_idx_sys + 2*vg] % ncv_magic);
828 }
unsigned int n_var_groups(const unsigned int s) const
Definition: dof_object.h:758
unsigned int n_systems() const
Definition: dof_object.h:749
unsigned int start_idx(const unsigned int s) const
The starting index for system s.
Definition: dof_object.h:936
index_buffer_t _idx_buf
Definition: dof_object.h:508
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:519

◆ n_dofs()

unsigned int libMesh::DofObject::n_dofs ( const unsigned int  s,
const unsigned int  var = libMesh::invalid_uint 
) const
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 633 of file dof_object.h.

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

635 {
636  libmesh_assert_less (s, this->n_systems());
637 
638  unsigned int num = 0;
639 
640  // Count all variables
641  if (var == libMesh::invalid_uint)
642  for (unsigned int v=0; v<this->n_vars(s); v++)
643  num += this->n_comp(s,v);
644 
645  // Only count specified variable
646  else
647  num = this->n_comp(s,var);
648 
649  return num;
650 }
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value.
Definition: libmesh.h:245
unsigned int n_comp(const unsigned int s, const unsigned int var) const
Definition: dof_object.h:803
unsigned int n_vars(const unsigned int s, const unsigned int vg) const
Definition: dof_object.h:768
unsigned int n_systems() const
Definition: dof_object.h:749

◆ n_objects()

static unsigned int libMesh::ReferenceCounter::n_objects ( )
staticinherited

Prints the number of outstanding (created, but not yet destroyed) objects.

Definition at line 83 of file reference_counter.h.

References libMesh::ReferenceCounter::_n_objects.

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

◆ n_systems()

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

Definition at line 749 of file dof_object.h.

References _idx_buf.

Referenced by clear_dofs(), dof_number(), end_idx(), has_dofs(), invalidate_dofs(), n_comp(), n_comp_group(), n_dofs(), n_var_groups(), n_vars(), set_vg_dof_base(), start_idx(), DofObjectTest< DerivedClass >::testSetNSystems(), and vg_dof_base().

750 {
751  return _idx_buf.empty() ?
752  0 : cast_int<unsigned int>(_idx_buf[0]);
753 }
index_buffer_t _idx_buf
Definition: dof_object.h:508

◆ n_var_groups()

unsigned int libMesh::DofObject::n_var_groups ( const unsigned int  s) const
Returns
The number of VariableGroup variable groups associated with system s for this DofObject

Definition at line 758 of file dof_object.h.

References end_idx(), n_systems(), and start_idx().

Referenced by dof_number(), invalidate_dofs(), n_comp_group(), n_vars(), set_vg_dof_base(), DofObjectTest< DerivedClass >::testSetNVariableGroups(), var_to_vg(), var_to_vg_and_offset(), and vg_dof_base().

759 {
760  libmesh_assert_less (s, this->n_systems());
761 
762  return (this->end_idx(s) - this->start_idx(s)) / 2;
763 }
unsigned int end_idx(const unsigned int s) const
The ending index for system s.
Definition: dof_object.h:947
unsigned int n_systems() const
Definition: dof_object.h:749
unsigned int start_idx(const unsigned int s) const
The starting index for system s.
Definition: dof_object.h:936

◆ n_vars() [1/2]

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

Definition at line 768 of file dof_object.h.

References _idx_buf, n_systems(), n_var_groups(), ncv_magic_exp, and start_idx().

Referenced by dof_number(), libMesh::OldSolutionValue< Output, point_output >::eval_at_node(), has_dofs(), n_comp(), n_dofs(), n_vars(), system_var_to_vg_var(), DofObjectTest< DerivedClass >::testSetNVariableGroups(), var_to_vg(), and var_to_vg_and_offset().

770 {
771  libmesh_assert_less (s, this->n_systems());
772  libmesh_assert_less (vg, this->n_var_groups(s));
773 
774  const unsigned int start_idx_sys = this->start_idx(s);
775 
776  libmesh_assert_less ((start_idx_sys + 2*vg), _idx_buf.size());
777 
778  return (cast_int<unsigned int>
779  (_idx_buf[start_idx_sys + 2*vg]) >> ncv_magic_exp);
780 }
unsigned int n_var_groups(const unsigned int s) const
Definition: dof_object.h:758
unsigned int n_systems() const
Definition: dof_object.h:749
unsigned int start_idx(const unsigned int s) const
The starting index for system s.
Definition: dof_object.h:936
index_buffer_t _idx_buf
Definition: dof_object.h:508
static const index_t ncv_magic_exp
Definition: dof_object.h:520

◆ n_vars() [2/2]

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

Definition at line 785 of file dof_object.h.

References n_systems(), n_var_groups(), and n_vars().

786 {
787  libmesh_assert_less (s, this->n_systems());
788 
789  const unsigned int nvg = this->n_var_groups(s);
790 
791  unsigned int val=0;
792 
793  for (unsigned int vg=0; vg<nvg; vg++)
794  val += this->n_vars(s,vg);
795 
796  return val;
797 }
unsigned int n_var_groups(const unsigned int s) const
Definition: dof_object.h:758
unsigned int n_vars(const unsigned int s, const unsigned int vg) const
Definition: dof_object.h:768
unsigned int n_systems() const
Definition: dof_object.h:749

◆ operator=()

DofObject& libMesh::DofObject::operator= ( const DofObject dof_obj)
private

Deep-copying assignment operator.

◆ pack_indexing()

void libMesh::DofObject::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.

◆ packed_indexing_size()

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

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

Referenced by libMesh::Node::packed_size().

◆ print_dof_info()

void libMesh::DofObject::print_dof_info ( ) const

Print out info for debugging.

◆ print_info()

static void libMesh::ReferenceCounter::print_info ( std::ostream &  out = libMesh::out)
staticinherited

Prints the reference information, by default to libMesh::out.

◆ processor_id() [1/3]

processor_id_type libMesh::DofObject::processor_id ( ) const
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 717 of file dof_object.h.

References _processor_id.

Referenced by libMesh::Elem::Elem(), invalidate_processor_id(), processor_id(), libMesh::Parallel::sync_dofobject_data_by_id(), libMesh::Parallel::sync_element_data_by_parent_id(), DofObjectTest< DerivedClass >::testInvalidateProcId(), DofObjectTest< DerivedClass >::testSetProcId(), and DofObjectTest< DerivedClass >::testValidProcId().

718 {
719  return _processor_id;
720 }
processor_id_type _processor_id
The processor_id of the DofObject.
Definition: dof_object.h:453

◆ processor_id() [2/3]

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

Definition at line 725 of file dof_object.h.

References _processor_id.

726 {
727  return _processor_id;
728 }
processor_id_type _processor_id
The processor_id of the DofObject.
Definition: dof_object.h:453

◆ processor_id() [3/3]

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

Sets the processor_id for this DofObject.

Definition at line 733 of file dof_object.h.

References processor_id().

734 {
735  this->processor_id() = pid;
736 }
processor_id_type processor_id() const
Definition: dof_object.h:717

◆ set_buffer()

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

Definition at line 535 of file dof_object.h.

References _idx_buf.

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

536  { _idx_buf = buf; }
index_buffer_t _idx_buf
Definition: dof_object.h:508

◆ 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 
)

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

◆ set_id() [1/2]

dof_id_type & libMesh::DofObject::set_id ( )
Returns
The id for this DofObject as a writable reference.

Definition at line 664 of file dof_object.h.

References _id.

Referenced by invalidate_id(), libMesh::Node::Node(), libMesh::RemoteElem::RemoteElem(), set_id(), DofObjectTest< DerivedClass >::testInvalidateId(), DofObjectTest< DerivedClass >::testSetId(), and DofObjectTest< DerivedClass >::testValidId().

665 {
666  return _id;
667 }
dof_id_type _id
The id of the DofObject.
Definition: dof_object.h:442

◆ set_id() [2/2]

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

Sets the id for this DofObject.

Definition at line 151 of file dof_object.h.

References set_id().

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

◆ set_n_comp()

void libMesh::DofObject::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.

◆ set_n_comp_group()

void libMesh::DofObject::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.

Referenced by DofObjectTest< DerivedClass >::testManualDofCalculation().

◆ set_n_systems()

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

◆ set_n_vars_per_group()

void libMesh::DofObject::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.

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)).

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

◆ set_old_dof_object()

void libMesh::DofObject::set_old_dof_object ( )

Sets the old_dof_object to a copy of this.

◆ set_unique_id()

unique_id_type & libMesh::DofObject::set_unique_id ( )
Returns
The globally unique_id for this DofObject as a writable reference.

Definition at line 685 of file dof_object.h.

References _unique_id.

686 {
687 #ifdef LIBMESH_ENABLE_UNIQUE_ID
688  return _unique_id;
689 #else
690  libmesh_not_implemented();
691 #endif
692 }
unique_id_type _unique_id
A globally unique id, guaranteed not to change as the mesh is repartitioned or adapted.
Definition: dof_object.h:436

◆ set_vg_dof_base()

void libMesh::DofObject::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.

Definition at line 960 of file dof_object.h.

References _idx_buf, n_systems(), n_var_groups(), start_idx(), and vg_dof_base().

Referenced by invalidate_dofs(), and DofObjectTest< DerivedClass >::testManualDofCalculation().

963 {
964  libmesh_assert_less (s, this->n_systems());
965  libmesh_assert_less (vg, this->n_var_groups(s));
966 
967  const unsigned int
968  start_idx_sys = this->start_idx(s);
969 
970  libmesh_assert_less ((start_idx_sys + 2*vg + 1), _idx_buf.size());
971 
972  _idx_buf[start_idx_sys + 2*vg + 1] = db;
973 
974  libmesh_assert_equal_to (this->vg_dof_base(s,vg), db);
975 }
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:980
unsigned int n_var_groups(const unsigned int s) const
Definition: dof_object.h:758
unsigned int n_systems() const
Definition: dof_object.h:749
unsigned int start_idx(const unsigned int s) const
The starting index for system s.
Definition: dof_object.h:936
index_buffer_t _idx_buf
Definition: dof_object.h:508

◆ start_idx()

unsigned int libMesh::DofObject::start_idx ( const unsigned int  s) const
private

The starting index for system s.

Definition at line 936 of file dof_object.h.

References _idx_buf, and n_systems().

Referenced by dof_number(), n_comp_group(), n_var_groups(), n_vars(), set_vg_dof_base(), and vg_dof_base().

937 {
938  libmesh_assert_less (s, this->n_systems());
939  libmesh_assert_less (s, _idx_buf.size());
940 
941  return cast_int<unsigned int>(_idx_buf[s]);
942 }
unsigned int n_systems() const
Definition: dof_object.h:749
index_buffer_t _idx_buf
Definition: dof_object.h:508

◆ system_var_to_vg_var()

unsigned int libMesh::DofObject::system_var_to_vg_var ( const unsigned int  s,
const unsigned int  vg,
const unsigned int  var 
) const
private

Utility function - for variable var in system s, figure out what variable group it lives in.

Definition at line 1022 of file dof_object.h.

References n_vars().

1025 {
1026  unsigned int accumulated_sum=0;
1027 
1028  for (unsigned int vgc=0; vgc<vg; vgc++)
1029  accumulated_sum += this->n_vars(s,vgc);
1030 
1031  libmesh_assert_less_equal (accumulated_sum, var);
1032 
1033  return (var - accumulated_sum);
1034 }
unsigned int n_vars(const unsigned int s, const unsigned int vg) const
Definition: dof_object.h:768

◆ unique_id()

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

Definition at line 672 of file dof_object.h.

References _unique_id, invalid_unique_id, and valid_unique_id().

673 {
674 #ifdef LIBMESH_ENABLE_UNIQUE_ID
675  libmesh_assert (this->valid_unique_id());
676  return _unique_id;
677 #else
678  return invalid_unique_id;
679 #endif
680 }
unique_id_type _unique_id
A globally unique id, guaranteed not to change as the mesh is repartitioned or adapted.
Definition: dof_object.h:436
static const unique_id_type invalid_unique_id
An invalid unique_id to distinguish an uninitialized DofObject.
Definition: dof_object.h:352
bool valid_unique_id() const
Definition: dof_object.h:705

◆ unpack_indexing()

void libMesh::DofObject::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.

◆ unpackable_indexing_size()

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

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

◆ valid_id()

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

Definition at line 697 of file dof_object.h.

References _id, and invalid_id.

Referenced by id(), DofObjectTest< DerivedClass >::testInvalidateId(), and DofObjectTest< DerivedClass >::testValidId().

698 {
699  return (DofObject::invalid_id != _id);
700 }
dof_id_type _id
The id of the DofObject.
Definition: dof_object.h:442
static const dof_id_type invalid_id
An invalid id to distinguish an uninitialized DofObject.
Definition: dof_object.h:347

◆ valid_processor_id()

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

Definition at line 741 of file dof_object.h.

References _processor_id, and invalid_processor_id.

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

742 {
744 }
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:358
processor_id_type _processor_id
The processor_id of the DofObject.
Definition: dof_object.h:453

◆ valid_unique_id()

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

Definition at line 705 of file dof_object.h.

References _unique_id, and invalid_unique_id.

Referenced by unique_id().

706 {
707 #ifdef LIBMESH_ENABLE_UNIQUE_ID
709 #else
710  return false;
711 #endif
712 }
unique_id_type _unique_id
A globally unique id, guaranteed not to change as the mesh is repartitioned or adapted.
Definition: dof_object.h:436
static const unique_id_type invalid_unique_id
An invalid unique_id to distinguish an uninitialized DofObject.
Definition: dof_object.h:352

◆ var_to_vg()

unsigned int libMesh::DofObject::var_to_vg ( const unsigned int  s,
const unsigned int  var 
) const
private

Utility function - for variable var in system s, figure out what variable group it lives in.

Definition at line 1004 of file dof_object.h.

References n_var_groups(), and n_vars().

Referenced by n_comp().

1006 {
1007  const unsigned int
1008  nvg = this->n_var_groups(s);
1009 
1010  for (unsigned int vg=0, vg_end=0; vg<nvg; vg++)
1011  {
1012  vg_end += this->n_vars(s,vg);
1013  if (var < vg_end) return vg;
1014  }
1015 
1016  libmesh_error_msg("Error: could not map variable " << var << " to variable group.");
1017 }
unsigned int n_var_groups(const unsigned int s) const
Definition: dof_object.h:758
unsigned int n_vars(const unsigned int s, const unsigned int vg) const
Definition: dof_object.h:768

◆ 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
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 887 of file dof_object.h.

References n_var_groups(), and n_vars().

Referenced by dof_number().

889 {
890  std::pair<unsigned int, unsigned int> returnval(0,0);
891 
892  unsigned int & vg = returnval.first;
893  unsigned int & offset = returnval.second;
894 
895  unsigned int vg_start = 0;
896  for (; ; vg++)
897  {
898  libmesh_assert_less(vg, this->n_var_groups(s));
899 
900  const unsigned int vg_end = vg_start + this->n_vars(s,vg);
901  if (var < vg_end)
902  {
903  offset = var - vg_start;
904  return returnval;
905  }
906  vg_start = vg_end;
907  }
908 }
unsigned int n_var_groups(const unsigned int s) const
Definition: dof_object.h:758
unsigned int n_vars(const unsigned int s, const unsigned int vg) const
Definition: dof_object.h:768

◆ vg_dof_base()

dof_id_type libMesh::DofObject::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.

Definition at line 980 of file dof_object.h.

References _idx_buf, n_systems(), n_var_groups(), and start_idx().

Referenced by set_vg_dof_base(), and DofObjectTest< DerivedClass >::testManualDofCalculation().

982 {
983  libmesh_assert_less (s, this->n_systems());
984  libmesh_assert_less (vg, this->n_var_groups(s));
985 
986  const unsigned int
987  start_idx_sys = this->start_idx(s);
988 
989  libmesh_assert_less ((start_idx_sys + 2*vg + 1), _idx_buf.size());
990 
991  // #ifdef DEBUG
992  // std::cout << " [ ";
993  // for (std:size_t i=0; i<_idx_buf.size(); i++)
994  // std::cout << _idx_buf[i] << " ";
995  // std::cout << "]\n";
996  // #endif
997 
998  return _idx_buf[start_idx_sys + 2*vg + 1];
999 }
unsigned int n_var_groups(const unsigned int s) const
Definition: dof_object.h:758
unsigned int n_systems() const
Definition: dof_object.h:749
unsigned int start_idx(const unsigned int s) const
The starting index for system s.
Definition: dof_object.h:936
index_buffer_t _idx_buf
Definition: dof_object.h:508

Member Data Documentation

◆ _counts

Counts libMesh::ReferenceCounter::_counts
staticprotectedinherited

◆ _enable_print_counter

bool libMesh::ReferenceCounter::_enable_print_counter
staticprotectedinherited

Flag to control whether reference count information is printed when print_info is called.

Definition at line 141 of file reference_counter.h.

◆ _id

dof_id_type libMesh::DofObject::_id
private

The id of the DofObject.

Definition at line 442 of file dof_object.h.

Referenced by id(), set_id(), and valid_id().

◆ _idx_buf

index_buffer_t libMesh::DofObject::_idx_buf
private

◆ _mutex

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

Mutual exclusion object to enable thread-safe reference counting.

Definition at line 135 of file reference_counter.h.

◆ _n_objects

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 130 of file reference_counter.h.

Referenced by libMesh::ReferenceCounter::n_objects(), libMesh::ReferenceCounter::ReferenceCounter(), and libMesh::ReferenceCounter::~ReferenceCounter().

◆ _processor_id

processor_id_type libMesh::DofObject::_processor_id
private

The processor_id of the DofObject.

Degrees of freedom are wholly owned by processors, however they may be duplicated on other processors.

This is stored as an unsigned short int since we cannot expect to be solving on 65000+ processors any time soon, can we??

Definition at line 453 of file dof_object.h.

Referenced by processor_id(), and valid_processor_id().

◆ _unique_id

unique_id_type libMesh::DofObject::_unique_id
private

A globally unique id, guaranteed not to change as the mesh is repartitioned or adapted.

Definition at line 436 of file dof_object.h.

Referenced by set_unique_id(), unique_id(), and valid_unique_id().

◆ invalid_id

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

◆ invalid_processor_id

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

◆ invalid_unique_id

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

An invalid unique_id to distinguish an uninitialized DofObject.

Definition at line 352 of file dof_object.h.

Referenced by unique_id(), and valid_unique_id().

◆ ncv_magic

const index_t libMesh::DofObject::ncv_magic = 256
staticprivate

Above we introduced the chimera ncv, which is a hybrid of the form ncv = ncv_magic*nv + nc where nv are the number of identical variables of a given type, and nc is the number of components for this set of variables.

It is hoped that by setting this to a power of two, an optimizing compiler will recognize later that #/ncv_magic is simply a bitshift

Definition at line 519 of file dof_object.h.

Referenced by n_comp_group().

◆ ncv_magic_exp

const index_t libMesh::DofObject::ncv_magic_exp = 8
staticprivate

Definition at line 520 of file dof_object.h.

Referenced by n_vars().

◆ old_dof_object

DofObject* libMesh::DofObject::old_dof_object

This object on the last mesh.

Useful for projecting solutions from one mesh to another.

Definition at line 79 of file dof_object.h.

Referenced by libMesh::OldSolutionBase< Output, point_output >::check_old_context(), and libMesh::OldSolutionValue< Output, point_output >::eval_at_node().


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