LCOV - code coverage report
Current view: top level - src/base - constraint_elimination_dof_map.C (source / functions) Hit Total Coverage
Test: libMesh/libmesh: #4624 (b6265e) with base 1fb77f Lines: 9 11 81.8 %
Date: 2026-11-03 16:49:57 Functions: 7 9 77.8 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : // The libMesh Finite Element Library.
       2             : // Copyright (C) 2002-2026 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
       3             : 
       4             : // This library is free software; you can redistribute it and/or
       5             : // modify it under the terms of the GNU Lesser General Public
       6             : // License as published by the Free Software Foundation; either
       7             : // version 2.1 of the License, or (at your option) any later version.
       8             : 
       9             : // This library is distributed in the hope that it will be useful,
      10             : // but WITHOUT ANY WARRANTY; without even the implied warranty of
      11             : // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      12             : // Lesser General Public License for more details.
      13             : 
      14             : // You should have received a copy of the GNU Lesser General Public
      15             : // License along with this library; if not, write to the Free Software
      16             : // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
      17             : 
      18             : #include "libmesh/constraint_elimination_dof_map.h"
      19             : 
      20             : #include "libmesh/dof_map.h"
      21             : 
      22             : namespace libMesh
      23             : {
      24          42 : ConstraintEliminationDofMap::ConstraintEliminationDofMap(MeshBase & mesh,
      25             :                                                          System & system,
      26          42 :                                                          const DofMap & dof_map)
      27          42 :   : ReducedDofMap(mesh, system, dof_map, "constraint_eliminated")
      28             : {
      29             :   libmesh_experimental();
      30          42 : }
      31             : 
      32          28 : ConstraintEliminationDofMap::~ConstraintEliminationDofMap() = default;
      33             : 
      34       11451 : bool ConstraintEliminationDofMap::retain_field_dof(const Elem &,
      35             :                                                    unsigned int,
      36             :                                                    unsigned int,
      37             :                                                    const dof_id_type field_dof) const
      38             : {
      39       11451 :   return this->is_unconstrained(field_dof);
      40             : }
      41             : 
      42           0 : bool ConstraintEliminationDofMap::retain_scalar_dof(const dof_id_type scalar_dof) const
      43             : {
      44           0 :   return this->is_unconstrained(scalar_dof);
      45             : }
      46             : 
      47       11451 : bool ConstraintEliminationDofMap::is_unconstrained(const dof_id_type dof) const
      48             : {
      49             : #ifdef LIBMESH_ENABLE_CONSTRAINTS
      50       11451 :   return !_dof_map.is_constrained_dof(dof);
      51             : #else
      52             :   libmesh_ignore(dof);
      53             :   return true;
      54             : #endif
      55             : }
      56             : }

Generated by: LCOV version 1.14