LCOV - code coverage report
Current view: top level - src/ics - VectorConstantIC.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 2bf808 Lines: 14 15 93.3 %
Date: 2025-07-17 01:28:37 Functions: 3 3 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 "VectorConstantIC.h"
      11             : #include "libmesh/point.h"
      12             : 
      13             : registerMooseObject("MooseApp", VectorConstantIC);
      14             : 
      15             : InputParameters
      16       14557 : VectorConstantIC::validParams()
      17             : {
      18       14557 :   InputParameters params = VectorInitialCondition::validParams();
      19       14557 :   params.addRequiredParam<Real>("x_value", "The x value to be set in IC");
      20       14557 :   params.addParam<Real>("y_value", 0, "The y value to be set in IC");
      21       14557 :   params.addParam<Real>("z_value", 0, "The z value to be set in IC");
      22             : 
      23       14557 :   params.addClassDescription("Sets constant component values for a vector field variable.");
      24       14557 :   return params;
      25           0 : }
      26             : 
      27         152 : VectorConstantIC::VectorConstantIC(const InputParameters & parameters)
      28             :   : VectorInitialCondition(parameters),
      29         152 :     _x_value(getParam<Real>("x_value")),
      30         152 :     _y_value(getParam<Real>("y_value")),
      31         304 :     _z_value(getParam<Real>("z_value"))
      32             : {
      33         152 : }
      34             : 
      35             : RealVectorValue
      36        8000 : VectorConstantIC::value(const Point & /*p*/)
      37             : {
      38        8000 :   return {_x_value, _y_value, _z_value};
      39             : }

Generated by: LCOV version 1.14