23 #include "libmesh/dof_object.h" 
   44 #ifdef LIBMESH_ENABLE_AMR
 
   45   old_dof_object (nullptr),
 
   47 #ifdef LIBMESH_ENABLE_UNIQUE_ID
 
   48   _unique_id     (dof_obj._unique_id),
 
   52   _idx_buf       (dof_obj._idx_buf)
 
   70       libmesh_assert_equal_to (this->
n_vars(s),       dof_obj.
n_vars(s));
 
   74         libmesh_assert_equal_to (this->
n_vars(s,vg), dof_obj.
n_vars(s,vg));
 
   78           libmesh_assert_equal_to (this->
n_comp(s,v), dof_obj.
n_comp(s,v));
 
   95 #ifdef LIBMESH_ENABLE_AMR 
  102 #ifdef LIBMESH_ENABLE_UNIQUE_ID 
  116       libmesh_assert_equal_to (this->
n_vars(s),       dof_obj.
n_vars(s));
 
  120         libmesh_assert_equal_to (this->
n_vars(s,vg), dof_obj.
n_vars(s,vg));
 
  124           libmesh_assert_equal_to (this->
n_comp(s,v), dof_obj.
n_comp(s,v));
 
  140 #ifdef LIBMESH_ENABLE_AMR 
  167   const unsigned int old_ns = this->
n_systems();
 
  175   const dof_id_type hdr = nei ? -header_size : header_size;
 
  180         cast_int<unsigned int>(
_idx_buf[old_ns]) :
 
  185                 new_buf.begin()+header_size);
 
  187         std::fill(new_buf.begin()+1, new_buf.begin()+ns+1, ns+1);
 
  197   libmesh_assert_equal_to (ns, this->
n_systems());
 
  200       libmesh_assert_equal_to (this->
n_vars(s),       0);
 
  218   const unsigned int ns_orig = this->
n_systems();
 
  220   DofObject::index_buffer_t::iterator it = 
_idx_buf.begin() + ns_orig;
 
  234       for (
unsigned int i=1; i<ns_orig+2; i++)
 
  236           libmesh_assert_less(i, 
_idx_buf.size());
 
  246       for (
unsigned int i=0; i<ns_orig+1; i++)
 
  248           libmesh_assert_less(i, 
_idx_buf.size());
 
  253   libmesh_assert_equal_to (this->
n_systems(), (ns_orig+1));
 
  254   libmesh_assert_equal_to (this->
n_vars(ns_orig), 0);
 
  255   libmesh_assert_equal_to (this->
n_var_groups(ns_orig), 0);
 
  261                                      const std::vector<unsigned int> & nvpg)
 
  263   const unsigned int n_sys = this->
n_systems();
 
  265   libmesh_assert_less (s, n_sys);
 
  268   const unsigned int nvg = cast_int<unsigned int>(nvpg.size());
 
  280       for (
unsigned int vg=0; vg<nvg; vg++)
 
  283           libmesh_assert_equal_to (this->
n_vars(s,vg), nvpg[vg]);
 
  296   old_system_sizes.reserve(n_sys);
 
  297   old_extra_integers.reserve(nei);
 
  299   for (
unsigned int s_ctr=0; s_ctr<n_sys; s_ctr++)
 
  300     old_system_sizes.push_back(this->n_var_groups(s_ctr));
 
  302   for (
unsigned int ei=0; ei != nei; ++ei)
 
  303     old_extra_integers.push_back(this->get_extra_integer(ei));
 
  311       DofObject::index_buffer_t::iterator
 
  319       for (
unsigned int ctr=(s+1); ctr<n_sys; ctr++)
 
  333       libmesh_assert_equal_to (this->
n_var_groups(s_ctr), old_system_sizes[s_ctr]);
 
  337   for (
unsigned int ei=0; ei != nei; ++ei)
 
  348     for (
unsigned int vg=0; vg<nvg; vg++)
 
  350         var_idxs[2*vg    ] = 
ncv_magic*nvpg[vg] + 0;
 
  354     DofObject::index_buffer_t::iterator it = 
_idx_buf.begin();
 
  355     std::advance(it, this->
end_idx(s));
 
  356     _idx_buf.insert(it, var_idxs.begin(), var_idxs.end());
 
  358     for (
unsigned int ctr=(s+1); ctr<n_sys; ctr++)
 
  372   libmesh_assert_equal_to (this->
n_var_groups(s), nvpg.size());
 
  376       libmesh_assert_equal_to (this->
n_vars(s,vg), nvpg[vg]);
 
  381     libmesh_assert_equal_to (this->
n_comp(s,v), 0);
 
  386       libmesh_assert_equal_to (this->
n_var_groups(s_ctr), old_system_sizes[s_ctr]);
 
  391   for (
unsigned int ei=0; ei != nei; ++ei)
 
  399                            const unsigned int var,
 
  400                            const unsigned int ncomp)
 
  402   libmesh_assert_less (s,   this->
n_systems());
 
  403   libmesh_assert_less (var, this->
n_vars(s));
 
  411                                  const unsigned int vg,
 
  412                                  const unsigned int ncomp)
 
  414   libmesh_assert_less (s,  this->
n_systems());
 
  424       libmesh_error_msg(
"ERROR: ncomp must be less than DofObject::ncv_magic!\n" \
 
  427                         << 
", ncv_magic = "                     \
 
  429                         << 
"\nrecompile and try again!");
 
  435     n_vars_group  = this->
n_vars(s,vg),
 
  436     base_offset   = start_idx_sys + 2*vg;
 
  438   libmesh_assert_less ((base_offset + 1), 
_idx_buf.size());
 
  462   libmesh_assert_equal_to (ncomp, this->
n_comp_group(s,vg));
 
  468                                const unsigned int var,
 
  469                                const unsigned int comp,
 
  472   libmesh_assert_less (s,    this->
n_systems());
 
  473   libmesh_assert_less (var,  this->
n_vars(s));
 
  474   libmesh_assert_less (comp, this->
n_comp(s,var));
 
  484   libmesh_assert_less ((start_idx_sys + 2*vg + 1), 
_idx_buf.size());
 
  491                     (dn == base_idx + vig*ncg + comp));
 
  497   libmesh_assert_equal_to (this->
dof_number(s, var, comp), dn);
 
  523           if (n_integers != old_n_integers)
 
  538           DofObject::index_buffer_t::iterator it = 
_idx_buf.begin() + hdr;
 
  543           for (
int i=1; i<hdr; i++)
 
  557     cast_int<unsigned int> (
 
  558 #ifdef LIBMESH_ENABLE_AMR
 
  571 #ifdef LIBMESH_ENABLE_AMR 
  572   const bool has_old_dof_object = cast_int<bool>(*begin++);
 
  574   static const int dof_header_size = 2;
 
  576   static const bool has_old_dof_object = 
false;
 
  577   static const int dof_header_size = 1;
 
  582   return cast_int<unsigned int>
 
  583     (dof_header_size + this_indexing_size +
 
  584      (has_old_dof_object ?
 
  593 #ifdef LIBMESH_ENABLE_AMR 
  595   const bool has_old_dof_object = cast_int<bool>(*begin++);
 
  600   std::copy(begin, begin+size, back_inserter(
_idx_buf));
 
  605                   cast_int<dof_id_signed_type>(
_idx_buf.size())));
 
  610       const unsigned int ns = hdr >= 0 ? hdr : (-hdr-1);
 
  611       for (
unsigned int i=1; i < ns; ++i)
 
  617       if (hdr < 0 && ns > 0)
 
  625 #ifdef LIBMESH_ENABLE_AMR 
  626   if (has_old_dof_object)
 
  638 #ifdef LIBMESH_ENABLE_AMR 
  646 #ifdef LIBMESH_ENABLE_AMR