LCOV - code coverage report
Current view: top level - src/tensor_computes - LBMMicroscopicZeroGradientBC.C (source / functions) Hit Total Coverage
Test: idaholab/swift: #92 (25e020) with base b3cd84 Lines: 0 38 0.0 %
Date: 2025-09-10 17:10:32 Functions: 0 5 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 "LBMMicroscopicZeroGradientBC.h"
      10             : #include "LatticeBoltzmannProblem.h"
      11             : #include "LatticeBoltzmannStencilBase.h"
      12             : 
      13             : using namespace torch::indexing;
      14             : 
      15             : registerMooseObject("SwiftApp", LBMMicroscopicZeroGradientBC);
      16             : 
      17             : InputParameters
      18           0 : LBMMicroscopicZeroGradientBC::validParams()
      19             : {
      20           0 :   InputParameters params = LBMBoundaryCondition::validParams();
      21           0 :   params.addClassDescription("LBMMicroscopicZeroGradientBC object");
      22           0 :   return params;
      23           0 : }
      24             : 
      25           0 : LBMMicroscopicZeroGradientBC::LBMMicroscopicZeroGradientBC(const InputParameters & parameters)
      26           0 :   : LBMBoundaryCondition(parameters)
      27             : {
      28           0 : }
      29             : 
      30             : void
      31           0 : LBMMicroscopicZeroGradientBC::leftBoundary()
      32             : {
      33           0 :   _u.index_put_({0, Slice(), Slice(), Slice()}, _u.index({1, Slice(), Slice(), Slice()}));
      34           0 : }
      35             : 
      36             : void
      37           0 : LBMMicroscopicZeroGradientBC::rightBoundary()
      38             : {
      39           0 :   _u.index_put_({_grid_size[0] - 1, Slice(), Slice(), Slice()},
      40           0 :                 _u.index({_grid_size[0] - 2, Slice(), Slice(), Slice()}));
      41           0 : }
      42             : 
      43             : void
      44           0 : LBMMicroscopicZeroGradientBC::computeBuffer()
      45             : {
      46             :   // do not overwrite previous
      47           0 :   _u = _u.clone();
      48             : 
      49           0 :   switch (_boundary)
      50             :   {
      51           0 :     case Boundary::top:
      52           0 :       mooseError("Top boundary is not implemented");
      53             :       break;
      54           0 :     case Boundary::bottom:
      55           0 :       mooseError("Bottom boundary is not implemented");
      56             :       break;
      57           0 :     case Boundary::left:
      58           0 :       leftBoundary();
      59           0 :       break;
      60           0 :     case Boundary::right:
      61           0 :       rightBoundary();
      62           0 :       break;
      63           0 :     case Boundary::front:
      64           0 :       mooseError("Front boundary is not implemented");
      65             :       break;
      66           0 :     case Boundary::back:
      67           0 :       mooseError("Back boundary is not implemented");
      68             :       break;
      69           0 :     case Boundary::wall:
      70           0 :       mooseError("Wall boundary is not implemented");
      71             :       break;
      72           0 :     default:
      73           0 :       mooseError("Undefined boundary names");
      74             :   }
      75           0 :   _lb_problem.maskedFillSolids(_u, 0);
      76           0 : }

Generated by: LCOV version 1.14