LCOV - code coverage report
Current view: top level - src/tensor_computes - ReciprocalLaplacianSquareFactor.C (source / functions) Hit Total Coverage
Test: idaholab/swift: #92 (25e020) with base b3cd84 Lines: 11 12 91.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 "ReciprocalLaplacianSquareFactor.h"
      10             : 
      11             : registerMooseObject("SwiftApp", ReciprocalLaplacianSquareFactor);
      12             : 
      13             : InputParameters
      14          60 : ReciprocalLaplacianSquareFactor::validParams()
      15             : {
      16          60 :   InputParameters params = TensorOperator<>::validParams();
      17          60 :   params.addClassDescription("Reciprocal space Laplacian squared IC.");
      18         120 :   params.addParam<Real>("factor", 1.0, "Prefactor");
      19          60 :   return params;
      20           0 : }
      21             : 
      22          30 : ReciprocalLaplacianSquareFactor::ReciprocalLaplacianSquareFactor(const InputParameters & parameters)
      23          60 :   : TensorOperator<>(parameters), _factor(getParam<Real>("factor")), _k2(_domain.getKSquare())
      24             : {
      25          30 : }
      26             : 
      27             : void
      28          28 : ReciprocalLaplacianSquareFactor::computeBuffer()
      29             : {
      30             :   // ignore the minus which would drop in the next step anyways
      31          84 :   _u = _k2 * _k2 * _factor;
      32          28 : }

Generated by: LCOV version 1.14