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 "GeneralVectorPostprocessor.h" 13 : 14 : // Forward Declarations 15 : class GrainForceAndTorqueInterface; 16 : 17 : /** 18 : * GrainForcesPostprocessor is a type of VectorPostprocessor that outputs the 19 : * force and torque values calculated in UserObjects. 20 : */ 21 : class GrainForcesPostprocessor : public GeneralVectorPostprocessor 22 : { 23 : public: 24 : static InputParameters validParams(); 25 : 26 : GrainForcesPostprocessor(const InputParameters & parameters); 27 : 28 334 : virtual ~GrainForcesPostprocessor() {} 29 : virtual void initialize(); 30 : virtual void execute(); 31 : 32 : protected: 33 : /// The VectorPostprocessorValue object where the results are stored 34 : VectorPostprocessorValue & _grain_force_torque_vector; 35 : 36 : /// UserobjectInterface for getting force and torque values from UserObjects 37 : const GrainForceAndTorqueInterface & _grain_force_torque; 38 : /// Extracting forces from Userobject 39 : const std::vector<RealGradient> & _grain_forces; 40 : /// Extracting torques from Userobject 41 : const std::vector<RealGradient> & _grain_torques; 42 : /// total no. of grains 43 : unsigned int _grain_num; 44 : };