LCOV - code coverage report
Current view: top level - src/tensor_computes - SwiftHohenbergLinear.C (source / functions) Hit Total Coverage
Test: idaholab/swift: #92 (25e020) with base b3cd84 Lines: 0 15 0.0 %
Date: 2025-09-10 17:10:32 Functions: 0 3 0.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 "SwiftHohenbergLinear.h"
      10             : 
      11             : registerMooseObject("SwiftApp", SwiftHohenbergLinear);
      12             : 
      13             : InputParameters
      14           0 : SwiftHohenbergLinear::validParams()
      15             : {
      16           0 :   InputParameters params = TensorOperator<>::validParams();
      17           0 :   params.addClassDescription("Reciprocal space linear term in the semi-implicit time integration "
      18             :                              "of the Swift-Hohenberg equation IC.");
      19           0 :   params.addParam<Real>("r", -0.5, "Phase field crystal parameter r");
      20           0 :   params.addParam<Real>("alpha", 1.0, "Regularization factor <=1");
      21           0 :   return params;
      22           0 : }
      23             : 
      24           0 : SwiftHohenbergLinear::SwiftHohenbergLinear(const InputParameters & parameters)
      25             :   : TensorOperator<>(parameters),
      26           0 :     _r(getParam<Real>("r")),
      27           0 :     _alpha(getParam<Real>("alpha")),
      28           0 :     _k2(_domain.getKSquare())
      29             : {
      30           0 : }
      31             : 
      32             : void
      33           0 : SwiftHohenbergLinear::computeBuffer()
      34             : {
      35           0 :   _u = (_r - _alpha * _alpha * (1.0 - _k2) * (1.0 - _k2));
      36           0 : }

Generated by: LCOV version 1.14