LCOV - code coverage report
Current view: top level - src/systems - DisplacedSystem.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 2bf808 Lines: 17 22 77.3 %
Date: 2025-07-17 01:28:37 Functions: 6 7 85.7 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : //* This file is part of the MOOSE framework
       2             : //* https://mooseframework.inl.gov
       3             : //*
       4             : //* All rights reserved, see COPYRIGHT for full restrictions
       5             : //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
       6             : //*
       7             : //* Licensed under LGPL 2.1, please see LICENSE for details
       8             : //* https://www.gnu.org/licenses/lgpl-2.1.html
       9             : 
      10             : #include "DisplacedSystem.h"
      11             : #include "DisplacedProblem.h"
      12             : 
      13             : #include "libmesh/transient_system.h"
      14             : #include "libmesh/explicit_system.h"
      15             : #include "libmesh/default_coupling.h"
      16             : #include "libmesh/dof_map.h"
      17             : 
      18        4126 : DisplacedSystem::DisplacedSystem(DisplacedProblem & problem,
      19             :                                  FEProblemBase & fe_problem,
      20             :                                  SystemBase & undisplaced_system,
      21             :                                  const std::string & name,
      22        4126 :                                  Moose::VarKindType var_kind)
      23             :   : SystemBase(problem, fe_problem, name, var_kind),
      24        4126 :     _undisplaced_system(undisplaced_system),
      25        4126 :     _sys(problem.es().add_system<libMesh::System>(name))
      26             : {
      27        4126 :   if (!problem.defaultGhosting())
      28             :   {
      29        4126 :     auto & dof_map = _sys.get_dof_map();
      30        4126 :     dof_map.remove_algebraic_ghosting_functor(dof_map.default_algebraic_ghosting());
      31        4126 :     dof_map.set_implicit_neighbor_dofs(false);
      32             :   }
      33        4126 : }
      34             : 
      35        8092 : DisplacedSystem::~DisplacedSystem() {}
      36             : 
      37             : NumericVector<Number> &
      38          52 : DisplacedSystem::getVector(const std::string & name)
      39             : {
      40          52 :   if (_sys.have_vector(name))
      41           0 :     return _sys.get_vector(name);
      42             :   else
      43          52 :     return _undisplaced_system.getVector(name);
      44             : }
      45             : 
      46             : const NumericVector<Number> &
      47           0 : DisplacedSystem::getVector(const std::string & name) const
      48             : {
      49           0 :   if (_sys.have_vector(name))
      50           0 :     return _sys.get_vector(name);
      51             :   else
      52           0 :     return _undisplaced_system.getVector(name);
      53             : }
      54             : 
      55             : System &
      56      947500 : DisplacedSystem::system()
      57             : {
      58      947500 :   return _sys;
      59             : }
      60             : 
      61             : const System &
      62   103045473 : DisplacedSystem::system() const
      63             : {
      64   103045473 :   return _sys;
      65             : }

Generated by: LCOV version 1.14