Line data Source code
1 : /********************************************************************/ 2 : /* SOFTWARE COPYRIGHT NOTIFICATION */ 3 : /* Cardinal */ 4 : /* */ 5 : /* (c) 2021 UChicago Argonne, LLC */ 6 : /* ALL RIGHTS RESERVED */ 7 : /* */ 8 : /* Prepared by UChicago Argonne, LLC */ 9 : /* Under Contract No. DE-AC02-06CH11357 */ 10 : /* With the U. S. Department of Energy */ 11 : /* */ 12 : /* Prepared by Battelle Energy Alliance, LLC */ 13 : /* Under Contract No. DE-AC07-05ID14517 */ 14 : /* With the U. S. Department of Energy */ 15 : /* */ 16 : /* See LICENSE for full restrictions */ 17 : /********************************************************************/ 18 : 19 : #ifdef ENABLE_NEK_COUPLING 20 : 21 : #include "NekSideIntegral.h" 22 : 23 : registerMooseObject("CardinalApp", NekSideIntegral); 24 : 25 : InputParameters 26 3487 : NekSideIntegral::validParams() 27 : { 28 3487 : InputParameters params = NekSideFieldPostprocessor::validParams(); 29 3487 : params.addClassDescription("Integral of a field over a boundary of the NekRS mesh"); 30 3487 : return params; 31 0 : } 32 : 33 1159 : NekSideIntegral::NekSideIntegral(const InputParameters & parameters) 34 1159 : : NekSideFieldPostprocessor(parameters) 35 : { 36 1158 : } 37 : 38 : Real 39 18049 : NekSideIntegral::getValue() const 40 : { 41 18049 : if (_field == field::velocity_component) 42 : { 43 64 : Real vx = nekrs::sideIntegral(_boundary, field::velocity_x, _pp_mesh); 44 64 : Real vy = nekrs::sideIntegral(_boundary, field::velocity_y, _pp_mesh); 45 64 : Real vz = nekrs::sideIntegral(_boundary, field::velocity_z, _pp_mesh); 46 : Point velocity(vx, vy, vz); 47 : return _velocity_direction * velocity; 48 : } 49 : 50 17985 : return nekrs::sideIntegral(_boundary, _field, _pp_mesh); 51 : } 52 : 53 : #endif