LCOV - code coverage report
Current view: top level - src/bcs - FluidFreeSurfaceBC.C (source / functions) Hit Total Coverage
Test: idaholab/moose fsi: #31405 (292dce) with base fef103 Lines: 15 16 93.8 %
Date: 2025-09-04 07:53:22 Functions: 4 4 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : //* This file is part of the MOOSE framework
       2             : //* https://mooseframework.inl.gov
       3             : //*
       4             : //* All rights reserved, see COPYRIGHT for full restrictions
       5             : //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
       6             : //*
       7             : //* Licensed under LGPL 2.1, please see LICENSE for details
       8             : //* https://www.gnu.org/licenses/lgpl-2.1.html
       9             : 
      10             : #include "FluidFreeSurfaceBC.h"
      11             : 
      12             : registerMooseObject("FsiApp", FluidFreeSurfaceBC);
      13             : 
      14             : InputParameters
      15          41 : FluidFreeSurfaceBC::validParams()
      16             : {
      17          41 :   InputParameters params = IntegratedBC::validParams();
      18          41 :   params.addClassDescription("Applies a mixed Dirichlet-Neumann BC on the fluid surface.");
      19         123 :   params.addRangeCheckedParam<Real>(
      20          82 :       "alpha", 0.1, "alpha>0", "Inverse of the acceleration due to gravity.");
      21          41 :   return params;
      22           0 : }
      23             : 
      24          22 : FluidFreeSurfaceBC::FluidFreeSurfaceBC(const InputParameters & parameters)
      25             :   : IntegratedBC(parameters),
      26          22 :     _alpha(getParam<Real>("alpha")),
      27          22 :     _u_dotdot(dotDot()),
      28          44 :     _du_dotdot_du(dotDotDu())
      29             : {
      30          22 : }
      31             : 
      32             : Real
      33     5198400 : FluidFreeSurfaceBC::computeQpResidual()
      34             : {
      35     5198400 :   return _test[_i][_qp] * _alpha * _u_dotdot[_qp];
      36             : }
      37             : 
      38             : Real
      39    20793600 : FluidFreeSurfaceBC::computeQpJacobian()
      40             : {
      41    20793600 :   return _test[_i][_qp] * _alpha * _du_dotdot_du[_qp] * _phi[_j][_qp];
      42             : }

Generated by: LCOV version 1.14