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 53691 : ComputeBoundaryInitialConditionThread::ComputeBoundaryInitialConditionThread( 19 53691 : FEProblemBase & fe_problem) 20 53691 : : ThreadedNodeLoop<ConstBndNodeRange, ConstBndNodeRange::const_iterator>(fe_problem) 21 : { 22 53691 : } 23 : 24 5207 : ComputeBoundaryInitialConditionThread::ComputeBoundaryInitialConditionThread( 25 5207 : ComputeBoundaryInitialConditionThread & x, Threads::split split) 26 5207 : : ThreadedNodeLoop<ConstBndNodeRange, ConstBndNodeRange::const_iterator>(x, split) 27 : { 28 5207 : } 29 : 30 : void 31 3797732 : ComputeBoundaryInitialConditionThread::onNode(ConstBndNodeRange::const_iterator & nd) 32 : { 33 3797732 : const BndNode * bnode = *nd; 34 : 35 3797732 : Node * node = bnode->_node; 36 3797732 : BoundaryID boundary_id = bnode->_bnd_id; 37 : 38 7553393 : for (const auto nl_sys_num : make_range(_fe_problem.numNonlinearSystems())) 39 3755661 : _fe_problem.assembly(_tid, nl_sys_num).reinit(node); 40 : 41 3797732 : const InitialConditionWarehouse & warehouse = _fe_problem.getInitialConditionWarehouse(); 42 : 43 3797732 : if (warehouse.hasActiveBoundaryObjects(boundary_id, _tid)) 44 : { 45 100 : const auto & ics = warehouse.getActiveBoundaryObjects(boundary_id, _tid); 46 200 : for (const auto & ic : ics) 47 100 : if (node->processor_id() == _fe_problem.processor_id()) 48 80 : ic->computeNodal(*node); 49 : } 50 3797732 : } 51 : 52 : void 53 5207 : ComputeBoundaryInitialConditionThread::join(const ComputeBoundaryInitialConditionThread & /*y*/) 54 : { 55 5207 : }