libMesh/libmesh: coverage diff

Base e7717b Head #4493 1fc31f
Total Total +/- New
Rate 65.64% 65.64% +0.01% 100.00%
Hits 78730 78737 +7 13
Misses 41214 41208 -6 0
Filename Stmts Miss Cover
include/fe/fe_type.h -1 0 -0.06%
src/fe/fe_xyz.C 0 -4 +2.00%
src/mesh/distributed_mesh.C 0 -2 +0.25%
src/systems/equation_systems.C +2 0 +0.05%
TOTAL +1 -6 +0.01%
code
coverage unchanged
code
coverage increased
code
coverage decreased
+
line added or modified

src/fe/fe_xyz.C

50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
  switch (totalorder)
    {
      // Constant shape functions
    case CONSTANT:
      {
        libmesh_assert_equal_to (elem_soln.size(), 1);

        std::fill(nodal_soln.begin(), nodal_soln.end(), elem_soln[0]);

        return;
      }


src/mesh/distributed_mesh.C

1546  
1547  
1548  
1549  
1550  
1551  
1552  
1553  
1554  
1555  
1556  
1557  
1558  
1559  
                      sender_could_become_owner)
                    {
                      if (it != repartitioned_node_pids.end() &&
                          pid < it->second)
                        it->second = pid;
                      else
                        repartitioned_node_pids[n] = pid;
                    }
                  else
                    if (it == repartitioned_node_pids.end())
                      repartitioned_node_pids[n] =
                        DofObject::invalid_processor_id;

                  repartitioned_node_sets_to_push[pid].insert(n);

src/mesh/exodusII_io.C

1193  
1194  
1195  
1196 +
1197  
1198  
1199  
  // NOTE: Currently, this reader is capable of reading only individual components of vector types,
  //       and each must be written out to its own scalar elemental data variable.
  const auto & var_type = system.variable_type(var_num);
  libmesh_error_msg_if(!EquationSystems::is_elemental_data_fe_type(var_type),
                       "Error! Trying to copy elemental solution into a variable that is not elemental data.");

  const MeshBase & mesh = MeshInput<MeshBase>::mesh();
1499  
1500  
1501  
1502 +
1503  
1504 +
1505 +
1506  
1507  
1508  
  // Get a subset of all variable names that can be written directly
  // as elemental data. We treat those slightly differently since they
  // truly only have a single value per Elem.
  std::vector<std::string> elemental_var_names;
  if (!_output_variables.empty())
    elemental_var_names.assign(_output_variables.begin(), _output_variables.end());
  es.build_elemental_data_variable_names(elemental_var_names, system_names);

  // Remove all names from var_names that are not in _output_variables.
  // Note: This approach avoids errors when the user provides invalid
1695  
1696  
1697  
1698 +
1699  
1700  
1701  
      const std::string & orig_name = name_and_id.first;

      // Was the original name an elemental data variable?
      if (std::count(elemental_var_names.begin(),
                     elemental_var_names.end(),
                     orig_name))
        {
1728  
1729  
1730  
1731 +
1732  
1733  
1734  
  {
    std::vector<std::string> derived_var_names_edited;
    std::vector<std::set<subdomain_id_type>> derived_vars_active_subdomains_edited;
    std::vector<unsigned int> found_first(elemental_var_names.size());

    for (auto i : index_range(derived_var_names))
      {
1738  
1739  
1740  
1741 +
1742 +
1743  
1744  
1745  
        // Determine whether we will keep this derived variable name in
        // the final container.
        bool keep = true;
        for (auto j : index_range(elemental_var_names))
          if (derived_var_name == elemental_var_names[j])
            {
              if (!found_first[j])
                found_first[j] = 1;

src/mesh/nemesis_io.C

1487  
1488  
1489  
1490 +
1491  
1492  
1493  
  if (var_nums.empty())
    {
      if (_verbose)
        libMesh::out << "No elemental data variables to be written." << std::endl;
      return;
    }

1743  
1744  
1745  
1746 +
1747  
1748  
1749  

  const unsigned int var_num = system.variable_number(system_var_name);
  const auto & var_type = system.variable_type(var_num);
  libmesh_error_msg_if(!EquationSystems::is_elemental_data_fe_type(var_type) ||
                       FEInterface::field_type(var_type) == TYPE_VECTOR,
                       "Error! Trying to copy elemental solution into a variable that is not scalar elemental data.");

src/systems/equation_systems.C

582  
583  
584  
585 +
586 +
587 +
588  
589  
590  
bool EquationSystems::is_elemental_data_fe_type (const FEType & type)
{
  return type.order == CONSTANT &&
         (type.family == MONOMIAL ||
          type.family == MONOMIAL_VEC ||
          type.family == XYZ);
}