Line data Source code
1 : 2 : //* 3 : //* All rights reserved, see COPYRIGHT for full restrictions 4 : //* https://github.com/idaholab/moose/blob/master/COPYRIGHT 5 : //* 6 : //* Licensed under LGPL 2.1, please see LICENSE for details 7 : //* https://www.gnu.org/licenses/lgpl-2.1.html 8 : 9 : #include "DomainInterface.h" 10 : #include "DomainAction.h" 11 : #include "ActionWarehouse.h" 12 : #include "MooseBase.h" 13 : #include "MooseApp.h" 14 : 15 1408 : DomainInterface::DomainInterface(MooseBase * moose_base) : _domain(getDomain(moose_base)) {} 16 : 17 : const DomainAction & 18 1408 : DomainInterface::getDomain(MooseBase * moose_base) 19 : { 20 1408 : auto actions = moose_base->getMooseApp().actionWarehouse().getActions<DomainAction>(); 21 1408 : if (actions.size() != 1) 22 0 : mooseError("No [Domain] block found in input."); 23 1408 : return *actions[0]; 24 1408 : }