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 "ComputeBoundaryInitialConditionThread.h" 11 : 12 : // MOOSE includes 13 : #include "Assembly.h" 14 : #include "InitialCondition.h" 15 : #include "MooseVariableFE.h" 16 : #include "SystemBase.h" 17 : 18 58403 : ComputeBoundaryInitialConditionThread::ComputeBoundaryInitialConditionThread( 19 58403 : FEProblemBase & fe_problem) 20 58403 : : ThreadedNodeLoop<ConstBndNodeRange, ConstBndNodeRange::const_iterator>(fe_problem) 21 : { 22 58403 : } 23 : 24 5231 : ComputeBoundaryInitialConditionThread::ComputeBoundaryInitialConditionThread( 25 5231 : ComputeBoundaryInitialConditionThread & x, Threads::split split) 26 5231 : : ThreadedNodeLoop<ConstBndNodeRange, ConstBndNodeRange::const_iterator>(x, split) 27 : { 28 5231 : } 29 : 30 : void 31 4164539 : ComputeBoundaryInitialConditionThread::onNode(ConstBndNodeRange::const_iterator & nd) 32 : { 33 4164539 : const BndNode * bnode = *nd; 34 : 35 4164539 : Node * node = bnode->_node; 36 4164539 : BoundaryID boundary_id = bnode->_bnd_id; 37 : 38 8283101 : for (const auto nl_sys_num : make_range(_fe_problem.numNonlinearSystems())) 39 4118562 : _fe_problem.assembly(_tid, nl_sys_num).reinit(node); 40 : 41 4164539 : const InitialConditionWarehouse & warehouse = _fe_problem.getInitialConditionWarehouse(); 42 : 43 4164539 : if (warehouse.hasActiveBoundaryObjects(boundary_id, _tid)) 44 : { 45 110 : const auto & ics = warehouse.getActiveBoundaryObjects(boundary_id, _tid); 46 220 : for (const auto & ic : ics) 47 110 : if (node->processor_id() == _fe_problem.processor_id()) 48 90 : ic->computeNodal(*node); 49 : } 50 4164539 : } 51 : 52 : void 53 5231 : ComputeBoundaryInitialConditionThread::join(const ComputeBoundaryInitialConditionThread & /*y*/) 54 : { 55 5231 : }