LCOV - code coverage report
Current view: top level - include/userobjects - MaskedGrainForceAndTorque.h (source / functions) Hit Total Coverage
Test: idaholab/moose phase_field: #31405 (292dce) with base fef103 Lines: 2 2 100.0 %
Date: 2025-09-04 07:55:36 Functions: 2 2 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             : #pragma once
      11             : 
      12             : #include "GrainForceAndTorqueInterface.h"
      13             : #include "GeneralUserObject.h"
      14             : 
      15             : // Forward Declarations
      16             : 
      17             : /**
      18             :  * This class is here to get the force and torque acting on a grain
      19             :  * from different userobjects and sum them all
      20             :  */
      21             : class MaskedGrainForceAndTorque : public GrainForceAndTorqueInterface, public GeneralUserObject
      22             : {
      23             : public:
      24             :   static InputParameters validParams();
      25             : 
      26             :   MaskedGrainForceAndTorque(const InputParameters & parameters);
      27             : 
      28             :   virtual void initialize();
      29         117 :   virtual void execute(){};
      30         117 :   virtual void finalize(){};
      31             : 
      32             :   virtual const std::vector<RealGradient> & getForceValues() const;
      33             :   virtual const std::vector<RealGradient> & getTorqueValues() const;
      34             :   virtual const std::vector<Real> & getForceCJacobians() const;
      35             :   virtual const std::vector<std::vector<Real>> & getForceEtaJacobians() const;
      36             : 
      37             : protected:
      38             :   const GrainForceAndTorqueInterface & _grain_force_torque_input;
      39             :   const std::vector<RealGradient> & _grain_forces_input;
      40             :   const std::vector<RealGradient> & _grain_torques_input;
      41             :   const std::vector<Real> & _grain_force_c_jacobians_input;
      42             :   const std::vector<std::vector<Real>> & _grain_force_eta_jacobians_input;
      43             : 
      44             :   std::vector<unsigned int> _pinned_grains;
      45             :   unsigned int _num_pinned_grains;
      46             :   unsigned int _grain_num;
      47             : 
      48             :   ///@{ providing grain forces, torques and their jacobians w. r. t c
      49             :   std::vector<RealGradient> _force_values;
      50             :   std::vector<RealGradient> _torque_values;
      51             :   std::vector<Real> _c_jacobians;
      52             :   std::vector<std::vector<Real>> _eta_jacobians;
      53             :   ///@}
      54             : };

Generated by: LCOV version 1.14