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 "AddRayBCAction.h" 11 : 12 : #include "RayBoundaryConditionBase.h" 13 : #include "PeriodicRayBC.h" 14 : #include "SetupPeriodicRayBCAction.h" 15 : 16 : registerMooseAction("RayTracingApp", AddRayBCAction, "add_ray_boundary_condition"); 17 : 18 : InputParameters 19 2063 : AddRayBCAction::validParams() 20 : { 21 2063 : auto params = AddRayTracingObjectAction::validParams(); 22 2063 : params.addClassDescription("Adds a RayBC for use in ray tracing to the simulation."); 23 2063 : return params; 24 0 : } 25 : 26 2063 : AddRayBCAction::AddRayBCAction(const InputParameters & params) : AddRayTracingObjectAction(params) 27 : { 28 2063 : } 29 : 30 : void 31 2039 : AddRayBCAction::addRayTracingObject() 32 : { 33 : // Special case for the PeriodicRayBC, which needs to have geometric 34 : // ghosting and periodic boundaries setup before the object is constructed. 35 : // A SetupPeriodicRayBCAction will exist for every RayBC, and if this 36 : // is a PeriodicRayBC, will setup the periodic boundaries early 37 2039 : if (PeriodicRayBC::isPeriodicRayBC(_moose_object_pars)) 38 27 : _app.actionWarehouse().getAction<SetupPeriodicRayBCAction>(name()).setupPeriodicRayBC( 39 : _moose_object_pars); 40 : 41 2039 : _problem->addObject<RayBoundaryConditionBase>(_type, _name, _moose_object_pars); 42 2039 : }