LCOV - code coverage report
Current view: top level - src/actions - AddTensorBufferAction.C (source / functions) Hit Total Coverage
Test: idaholab/swift: #92 (25e020) with base b3cd84 Lines: 13 15 86.7 %
Date: 2025-09-10 17:10:32 Functions: 3 3 100.0 %
Legend: Lines: hit not hit

          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 "AddTensorBufferAction.h"
      10             : #include "TensorProblem.h"
      11             : 
      12             : registerMooseAction("SwiftApp", AddTensorBufferAction, "add_tensor_buffer");
      13             : 
      14             : InputParameters
      15         340 : AddTensorBufferAction::validParams()
      16             : {
      17         340 :   InputParameters params = MooseObjectAction::validParams();
      18         340 :   params.addClassDescription("Add a TensorBuffer object to the simulation.");
      19         340 :   params.set<std::string>("type") = "PlainTensorBuffer";
      20         340 :   return params;
      21           0 : }
      22             : 
      23         340 : AddTensorBufferAction::AddTensorBufferAction(const InputParameters & parameters)
      24         340 :   : MooseObjectAction(parameters)
      25             : {
      26         340 : }
      27             : 
      28             : void
      29         340 : AddTensorBufferAction::act()
      30             : {
      31         340 :   auto tensor_problem = std::dynamic_pointer_cast<TensorProblem>(_problem);
      32         340 :   if (!tensor_problem)
      33           0 :     mooseError("Tensor Buffers are only supported if the problem class is set to `TensorProblem`");
      34             : 
      35         340 :   tensor_problem->addTensorBuffer(_type, _name, _moose_object_pars);
      36         340 : }

Generated by: LCOV version 1.14