LCOV - code coverage report
Current view: top level - src/loops - ResetDisplacedMeshThread.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 2bf808 Lines: 18 18 100.0 %
Date: 2025-07-17 01:28:37 Functions: 4 4 100.0 %
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 "ResetDisplacedMeshThread.h"
      11             : #include "DisplacedProblem.h"
      12             : #include "MooseMesh.h"
      13             : 
      14             : #include "SubProblem.h"
      15             : 
      16         579 : ResetDisplacedMeshThread::ResetDisplacedMeshThread(FEProblemBase & fe_problem,
      17         579 :                                                    DisplacedProblem & displaced_problem)
      18             :   : ThreadedNodeLoop<NodeRange, NodeRange::const_iterator>(fe_problem),
      19         579 :     _displaced_problem(displaced_problem),
      20         579 :     _ref_mesh(_displaced_problem.refMesh())
      21             : {
      22         579 : }
      23             : 
      24          62 : ResetDisplacedMeshThread::ResetDisplacedMeshThread(ResetDisplacedMeshThread & x,
      25          62 :                                                    Threads::split split)
      26             :   : ThreadedNodeLoop<NodeRange, NodeRange::const_iterator>(x, split),
      27          62 :     _displaced_problem(x._displaced_problem),
      28          62 :     _ref_mesh(x._ref_mesh)
      29             : {
      30          62 : }
      31             : 
      32             : void
      33      401345 : ResetDisplacedMeshThread::onNode(NodeRange::const_iterator & nd)
      34             : {
      35      401345 :   Node & displaced_node = **nd;
      36             : 
      37             :   // Get the same node from the reference mesh.
      38      401345 :   Node & reference_node = _ref_mesh.nodeRef(displaced_node.id());
      39             : 
      40             :   // Undisplace the node
      41     1605380 :   for (const auto i : make_range(Moose::dim))
      42     1204035 :     displaced_node(i) = reference_node(i);
      43      401345 : }
      44             : 
      45             : void
      46          62 : ResetDisplacedMeshThread::join(const ResetDisplacedMeshThread & /*y*/)
      47             : {
      48          62 : }

Generated by: LCOV version 1.14