LCOV - code coverage report
Current view: top level - src/tensor_computes - LBMComputeSurfaceForces.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 "LBMComputeSurfaceForces.h"
      10             : 
      11             : using namespace torch::indexing;
      12             : 
      13             : registerMooseObject("SwiftApp", LBMComputeSurfaceForces);
      14             : 
      15             : InputParameters
      16           0 : LBMComputeSurfaceForces::validParams()
      17             : {
      18           0 :   InputParameters params = LatticeBoltzmannOperator::validParams();
      19             : 
      20           0 :   params.addRequiredParam<TensorInputBufferName>("chemical_potential",
      21             :                                                  "Macroscopic chemical potential");
      22           0 :   params.addRequiredParam<TensorInputBufferName>("grad_phi", "Gradient of phase field");
      23             : 
      24           0 :   params.addClassDescription("Compute object for LB surface forces");
      25           0 :   return params;
      26           0 : }
      27             : 
      28           0 : LBMComputeSurfaceForces::LBMComputeSurfaceForces(const InputParameters & parameters)
      29             :   : LatticeBoltzmannOperator(parameters),
      30           0 :     _chemical_potential(getInputBuffer("chemical_potential")),
      31           0 :     _grad_phi(getInputBuffer("grad_phi"))
      32             : {
      33           0 : }
      34             : 
      35             : void
      36           0 : LBMComputeSurfaceForces::computeBuffer()
      37             : {
      38           0 :   _u = _chemical_potential.unsqueeze(-1) * _grad_phi;
      39           0 :   _lb_problem.maskedFillSolids(_u, 0);
      40           0 : }

Generated by: LCOV version 1.14