Line data Source code
1 : /**********************************************************************/ 2 : /* DO NOT MODIFY THIS HEADER */ 3 : /* Swift, a Fourier spectral solver for MOOSE */ 4 : /* */ 5 : /* Copyright 2024 Battelle Energy Alliance, LLC */ 6 : /* ALL RIGHTS RESERVED */ 7 : /**********************************************************************/ 8 : 9 : #include "TensorPredictor.h" 10 : #include "TensorBuffer.h" 11 : #include "TensorProblem.h" 12 : #include "DomainAction.h" 13 : 14 : InputParameters 15 0 : TensorPredictor::validParams() 16 : { 17 0 : InputParameters params = MooseObject::validParams(); 18 0 : params.registerBase("TensorPredictor"); 19 0 : params.addPrivateParam<TensorProblem *>("_tensor_problem", nullptr); 20 0 : params.addPrivateParam<const DomainAction *>("_domain", nullptr); 21 0 : params.addClassDescription("TensorPredictor object."); 22 0 : params.addRequiredParam<TensorOutputBufferName>("buffer", 23 : "The buffer this compute is forward predicting"); 24 0 : params.addParam<unsigned int>( 25 0 : "history_size", 1, "How many old states to use (determines time integration order)."); 26 0 : return params; 27 0 : } 28 : 29 0 : TensorPredictor::TensorPredictor(const InputParameters & parameters) 30 : : MooseObject(parameters), 31 0 : _tensor_problem(*getCheckedPointerParam<TensorProblem *>("_tensor_problem")), 32 0 : _domain(*getCheckedPointerParam<const DomainAction *>("_domain")), 33 0 : _u_name(getParam<TensorOutputBufferName>("buffer")), 34 0 : _u(_tensor_problem.getBuffer(_u_name)), 35 0 : _u_old(_tensor_problem.getBufferOld(_u_name, getParam<unsigned int>("history_size"))) 36 : { 37 0 : }