LCOV - code coverage report
Current view: top level - src/tensor_computes - RankTwoIdentity.C (source / functions) Hit Total Coverage
Test: idaholab/swift: #92 (25e020) with base b3cd84 Lines: 0 12 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 "RankTwoIdentity.h"
      10             : #include "SwiftUtils.h"
      11             : #include "DomainAction.h"
      12             : 
      13             : registerMooseObject("SwiftApp", RankTwoIdentity);
      14             : 
      15             : InputParameters
      16           0 : RankTwoIdentity::validParams()
      17             : {
      18           0 :   InputParameters params = TensorOperator<>::validParams();
      19           0 :   params.addClassDescription("Rank two identity tensor in real space.");
      20           0 :   return params;
      21           0 : }
      22             : 
      23           0 : RankTwoIdentity::RankTwoIdentity(const InputParameters & parameters)
      24           0 :   : TensorOperator(parameters), _dim(_domain.getDim())
      25             : {
      26           0 : }
      27             : 
      28             : void
      29           0 : RankTwoIdentity::computeBuffer()
      30             : {
      31           0 :   const auto full = _domain.getValueShape({_dim, _dim});
      32           0 :   _u = torch::eye(_dim, MooseTensor::floatTensorOptions()).expand(full);
      33           0 : }

Generated by: LCOV version 1.14