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 "KokkosNodalL2Norm.h" 11 : 12 363195 : registerKokkosUserObject("MooseApp", KokkosNodalL2Norm); 13 : 14 : InputParameters 15 2132 : KokkosNodalL2Norm::validParams() 16 : { 17 2132 : InputParameters params = KokkosNodalSum::validParams(); 18 2132 : params.addClassDescription( 19 : "Computes the nodal L2-norm of the coupled variable, which is defined by summing the square " 20 : "of its value at every node and taking the square root."); 21 2132 : return params; 22 0 : } 23 : 24 17 : KokkosNodalL2Norm::KokkosNodalL2Norm(const InputParameters & parameters) 25 9 : : KokkosNodalSum(parameters) 26 : { 27 17 : } 28 : 29 : Real 30 30 : KokkosNodalL2Norm::getValue() const 31 : { 32 60 : return std::sqrt(_reduction_buffer(0)); 33 : }