Line data Source code
1 : 2 : /**********************************************************************/ 3 : /* DO NOT MODIFY THIS HEADER */ 4 : /* Swift, a Fourier spectral solver for MOOSE */ 5 : /* */ 6 : /* Copyright 2024 Battelle Energy Alliance, LLC */ 7 : /* ALL RIGHTS RESERVED */ 8 : /**********************************************************************/ 9 : 10 : #include "ComputeGroupExecutionCount.h" 11 : #include "ComputeGroup.h" 12 : #include "TensorProblem.h" 13 : 14 : registerMooseObject("SwiftApp", ComputeGroupExecutionCount); 15 : 16 : InputParameters 17 8 : ComputeGroupExecutionCount::validParams() 18 : { 19 8 : InputParameters params = GeneralPostprocessor::validParams(); 20 8 : params.addClassDescription( 21 : "Return the number of computeBuffer() calls issued to the given compute group object."); 22 16 : params.addParam<TensorComputeName>( 23 : "compute_group", "root", "ComputeGroup TensorCompute object to get execution count from."); 24 8 : return params; 25 0 : } 26 : 27 4 : ComputeGroupExecutionCount::ComputeGroupExecutionCount(const InputParameters & parameters) 28 : : GeneralPostprocessor(parameters), 29 8 : _tensor_problem(TensorProblem::cast(this, this->_fe_problem)), 30 4 : _compute_group( 31 8 : _tensor_problem.getCompute<ComputeGroup>(getParam<TensorComputeName>("compute_group"))) 32 : { 33 4 : } 34 : 35 : PostprocessorValue 36 8 : ComputeGroupExecutionCount::getValue() const 37 : { 38 8 : return _compute_group.getComputeCount(); 39 : }