LCOV - code coverage report
Current view: top level - src/auxkernels - PotentialToFieldAux.C (source / functions) Hit Total Coverage
Test: idaholab/moose electromagnetics: #31405 (292dce) with base fef103 Lines: 12 12 100.0 %
Date: 2025-09-04 07:52:56 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 "PotentialToFieldAux.h"
      11             : 
      12             : registerMooseObject("ElectromagneticsApp", PotentialToFieldAux);
      13             : 
      14             : InputParameters
      15         246 : PotentialToFieldAux::validParams()
      16             : {
      17         246 :   InputParameters params = VariableGradientComponent::validParams();
      18         246 :   params.addClassDescription("An AuxKernel that calculates the electrostatic electric field given "
      19             :                              "the electrostatic potential.");
      20         492 :   MooseEnum sign("positive=1 negative=-1", "negative");
      21         492 :   params.addParam<MooseEnum>("sign", sign, "Sign of potential gradient.");
      22         246 :   return params;
      23         246 : }
      24             : 
      25         132 : PotentialToFieldAux::PotentialToFieldAux(const InputParameters & parameters)
      26         264 :   : VariableGradientComponent(parameters), _sign(getParam<MooseEnum>("sign"))
      27             : {
      28         132 : }
      29             : 
      30             : Real
      31    34809864 : PotentialToFieldAux::computeValue()
      32             : {
      33    34809864 :   return _sign * VariableGradientComponent::computeValue();
      34             : }

Generated by: LCOV version 1.14