libMesh/libmesh: coverage diff

Base 862243 Head #4485 d48e80
Total Total +/- New
Rate 65.60% 65.60% +0.00% 100.00%
Hits 78626 78637 +11 16
Misses 41235 41235 - 0
Filename Stmts Miss Cover
include/mesh/mesh_base.h +2 0 +0.09%
src/mesh/mesh_base.C +9 +1 +0.03%
src/mesh/unstructured_mesh.C 0 -1 +0.10%
TOTAL +11 0 +0.00%
code
coverage unchanged
code
coverage increased
code
coverage decreased
+
line added or modified

include/mesh/mesh_base.h

347  
348  
349  
350 +
351 +
352  
353  
354  
   * User code which adds or changes subdomain names should call this
   * method.
   */
  void unset_has_synched_subdomain_name_map()
  { _preparation.has_synched_subdomain_name_map = false; }

  /**
   * \returns \p true if all elements and nodes of the mesh
1902  
1903  
1904  
1905 +
1906  
1907  
1908  
   * \returns A writable reference to the whole subdomain name map
   */
  std::map<subdomain_id_type, std::string> & set_subdomain_name_map ()
  { this->unset_has_synched_subdomain_name_map(); return _block_id_to_name; }
  const std::map<subdomain_id_type, std::string> & get_subdomain_name_map () const
  { return _block_id_to_name; }

src/mesh/distributed_mesh.C

209  
210  
211  
212 +
213  
214  
215  

  this->set_subdomain_name_map() = other_mesh.get_subdomain_name_map();

  this->_preparation = other_mesh.preparation();

#ifdef LIBMESH_ENABLE_UNIQUE_ID
  _next_unique_id = other_mesh.parallel_max_unique_id() +

src/mesh/mesh_base.C

942  
943  
944  
945 +
946 +
947  
948  
949  
  // name, but distributed mesh generators may only have set names for
  // the part of the mesh they know about, so make sure the map is
  // consistent everywhere.
  if (!_preparation.has_synched_subdomain_name_map)
    this->sync_subdomain_name_map();

  // Search the mesh for elements that have a neighboring element
  // of dim+1 and set that element as the interior parent
1886  
1887  
1888  
1889 +
1890  
1891  
1892  

std::string & MeshBase::subdomain_name(subdomain_id_type id)
{
  this->unset_has_synched_subdomain_name_map();
  return _block_id_to_name[id];
}

2052  
2053  
2054  
2055 +
2056  
2057  
2058  

  this->comm().set_union(_block_id_to_name);

  _preparation.has_synched_subdomain_name_map = true;
}


2819  
2820  
2821  
2822 +
2823 +
2824  
2825  
2826  
  has_removed_remote_elements(false),
  has_removed_orphaned_nodes(false),
  has_boundary_id_sets(false),
  has_reinit_ghosting_functors(false),
  has_synched_subdomain_name_map(false)
{}

MeshBase::Preparation::operator bool() const
2833  
2834  
2835  
2836 +
2837 +
2838  
2839  
2840  
         has_removed_remote_elements &&
         has_removed_orphaned_nodes &&
         has_reinit_ghosting_functors &&
         has_boundary_id_sets &&
         has_synched_subdomain_name_map;
}

MeshBase::Preparation &
2849  
2850  
2851  
2852 +
2853  
2854  
2855  
  has_removed_orphaned_nodes = set_all;
  has_reinit_ghosting_functors = set_all;
  has_boundary_id_sets = set_all;
  has_synched_subdomain_name_map = set_all;

  return *this;
}
2874  
2875  
2876  
2877 +
2878 +
2879  
2880  
2881  
  if (has_reinit_ghosting_functors != other.has_reinit_ghosting_functors)
    return false;
  if (has_boundary_id_sets != other.has_boundary_id_sets)
    return false;
  if (has_synched_subdomain_name_map != other.has_synched_subdomain_name_map)
    return false;

  return true;

src/mesh/replicated_mesh.C

119  
120  
121  
122 +
123  
124  
125  

  this->set_subdomain_name_map() = other_mesh.get_subdomain_name_map();

  this->_preparation = other_mesh.preparation();

  // If other_mesh is distributed, then we've got parts of it on each
  // processor but we're not replicated yet; fix that.

src/mesh/unstructured_mesh.C

1995  
1996  
1997  
1998  
1999  
2000  
2001  

  // We can't even afford any unset neighbor links here.
  if (!this->is_prepared())
    this->find_neighbors();

  // FIXME: make distributed mesh support efficient.
  // Yes, we currently suck.