LCOV - code coverage report
Current view: top level - include/userobjects - ConstantGrainForceAndTorque.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 "GeneralUserObject.h"
      13             : #include "GrainForceAndTorqueInterface.h"
      14             : 
      15             : // Forward Declarations
      16             : 
      17             : /**
      18             :  * This class is here to get the force and torque acting on a grain
      19             :  */
      20             : class ConstantGrainForceAndTorque : public GrainForceAndTorqueInterface, public GeneralUserObject
      21             : {
      22             : public:
      23             :   static InputParameters validParams();
      24             : 
      25             :   ConstantGrainForceAndTorque(const InputParameters & parameters);
      26             : 
      27             :   virtual void initialize();
      28         986 :   virtual void execute() {}
      29         986 :   virtual void finalize() {}
      30             : 
      31             :   virtual const std::vector<RealGradient> & getForceValues() const;
      32             :   virtual const std::vector<RealGradient> & getTorqueValues() const;
      33             :   virtual const std::vector<Real> & getForceCJacobians() const;
      34             :   virtual const std::vector<std::vector<Real>> & getForceEtaJacobians() const;
      35             : 
      36             : protected:
      37             :   /// Applied force on particles, size should be 3 times no. of grains
      38             :   std::vector<Real> _F;
      39             :   /// Applied torque on particles, size should be 3 times no. of grains
      40             :   std::vector<Real> _M;
      41             : 
      42             :   unsigned int _grain_num;
      43             :   unsigned int _ncomp;
      44             : 
      45             :   ///@{ providing grain forces, torques and their jacobians w. r. t c
      46             :   std::vector<RealGradient> _force_values;
      47             :   std::vector<RealGradient> _torque_values;
      48             :   std::vector<Real> _c_jacobians;
      49             :   std::vector<std::vector<Real>> _eta_jacobians;
      50             :   ///@}
      51             : };

Generated by: LCOV version 1.14