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 : #pragma once 11 : 12 : namespace BndsCalculator 13 : { 14 : 15 : template <typename T> 16 : Real 17 4956430 : computeBndsVariable(const std::vector<T *> & var, unsigned int qp) 18 : { 19 : Real value = 0.0; 20 : 21 35941801 : for (unsigned int i = 0; i < var.size(); ++i) 22 30985371 : value += (*var[i])[qp] * (*var[i])[qp]; 23 : 24 4956430 : return value; 25 : } 26 : 27 : }