Line data Source code
1 : //* This file is part of the MOOSE framework 2 : //* https://www.mooseframework.org 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 "KokkosLinearFVElementalKernel.h" 11 : 12 : namespace Moose::Kokkos 13 : { 14 : 15 : InputParameters 16 2468 : LinearFVElementalKernel::validParams() 17 : { 18 2468 : auto params = LinearFVKernel::validParams(); 19 2468 : params.registerSystemAttributeName("LinearFVElementalKernel"); 20 2468 : return params; 21 0 : } 22 : 23 171 : LinearFVElementalKernel::LinearFVElementalKernel(const InputParameters & parameters) 24 86 : : LinearFVKernel(parameters) 25 : { 26 171 : } 27 : 28 338 : LinearFVElementalKernel::LinearFVElementalKernel(const LinearFVElementalKernel & object) 29 170 : : LinearFVKernel(object) 30 : { 31 338 : } 32 : 33 : void 34 169 : LinearFVElementalKernel::computeRightHandSide() 35 : { 36 169 : Policy policy(0, numKokkosBlockElements()); 37 169 : if (!_rhs_dispatcher) 38 169 : _rhs_dispatcher = DispatcherRegistry::build<RightHandSideLoop>(this, type()); 39 169 : _rhs_dispatcher->parallelFor(policy); 40 169 : } 41 : 42 : void 43 169 : LinearFVElementalKernel::computeMatrix() 44 : { 45 169 : if (DispatcherRegistry::hasUserMethod<MatrixLoop>(type())) 46 : { 47 0 : Policy policy(0, numKokkosBlockElements()); 48 0 : if (!_matrix_dispatcher) 49 0 : _matrix_dispatcher = DispatcherRegistry::build<MatrixLoop>(this, type()); 50 0 : _matrix_dispatcher->parallelFor(policy); 51 0 : } 52 169 : } 53 : 54 : } // namespace Moose::Kokkos