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

          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 "PerformFFT.h"
      11             : #include "DomainAction.h"
      12             : 
      13             : registerMooseObject("SwiftApp", ForwardFFT);
      14             : registerMooseObject("SwiftApp", InverseFFT);
      15             : 
      16             : template <bool forward>
      17             : InputParameters
      18         560 : PerformFFTTempl<forward>::validParams()
      19             : {
      20         560 :   InputParameters params = TensorOperator<>::validParams();
      21         560 :   params.addClassDescription("PerformFFT object.");
      22        1120 :   params.addParam<TensorInputBufferName>("input", "Input buffer name");
      23         560 :   return params;
      24           0 : }
      25             : 
      26             : template <bool forward>
      27         280 : PerformFFTTempl<forward>::PerformFFTTempl(const InputParameters & parameters)
      28         280 :   : TensorOperator<>(parameters), _input(getInputBuffer("input"))
      29             : {
      30         280 : }
      31             : 
      32             : template <bool forward>
      33             : void
      34      191588 : PerformFFTTempl<forward>::computeBuffer()
      35             : {
      36             :   if constexpr (forward)
      37      191484 :     _u = _domain.fft(_input);
      38             :   else
      39         104 :     _u = _domain.ifft(_input);
      40      191588 : }
      41             : 
      42             : template class PerformFFTTempl<true>;
      43             : template class PerformFFTTempl<false>;

Generated by: LCOV version 1.14