LCOV - code coverage report
Current view: top level - src/postprocessors - SolutionChangeNorm.C (source / functions) Hit Total Coverage
Test: coverage.info Lines: 5 16 31.2 %
Date: 2025-07-12 01:09:23 Functions: 1 4 25.0 %

          Line data    Source code
       1             : //* This file is part of the RACCOON application
       2             : //* being developed at Dolbow lab at Duke University
       3             : //* http://dolbow.pratt.duke.edu
       4             : 
       5             : #include "SolutionChangeNorm.h"
       6             : #include "MathUtils.h"
       7             : 
       8             : registerMooseObject("raccoonApp", SolutionChangeNorm);
       9             : 
      10             : InputParameters
      11         136 : SolutionChangeNorm::validParams()
      12             : {
      13         136 :   InputParameters params = ElementIntegralPostprocessor::validParams();
      14         136 :   params.addClassDescription(
      15             :       "This class computes the solution change (L2) norm of selected variables.");
      16         272 :   params.addRequiredCoupledVar("variable",
      17             :                                "The names of the variables that this object operates on");
      18         136 :   return params;
      19           0 : }
      20             : 
      21           0 : SolutionChangeNorm::SolutionChangeNorm(const InputParameters & parameters)
      22             :   : ElementIntegralPostprocessor(parameters),
      23           0 :     _us(coupledValues("variable")),
      24           0 :     _us_old(coupledValuesOld("variable"))
      25             : {
      26           0 : }
      27             : 
      28             : Real
      29           0 : SolutionChangeNorm::getValue() const
      30             : {
      31           0 :   return std::sqrt(ElementIntegralPostprocessor::getValue());
      32             : }
      33             : 
      34             : Real
      35           0 : SolutionChangeNorm::computeQpIntegral()
      36             : {
      37             :   Real value = 0;
      38           0 :   for (unsigned int i = 0; i < _us.size(); i++)
      39           0 :     value += MathUtils::pow((*_us[i])[_qp] - (*_us_old[i])[_qp], 2);
      40           0 :   return value;
      41             : }

Generated by: LCOV version 1.16