https://mooseframework.inl.gov
ComputeFVInitialConditionThread.C
Go to the documentation of this file.
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 
11 #include "FEProblem.h"
13 
15  : _fe_problem(fe_problem)
16 {
17 }
18 
21  : _fe_problem(x._fe_problem)
22 {
23 }
24 
25 void
27 {
28  ParallelUniqueId puid;
29  _tid = puid.id;
30 
33 
34  // Iterate over all the elements in the range
35  for (const auto & elem_info : range)
36  if (warehouse.hasActiveBlockObjects(elem_info->subdomain_id(), _tid))
37  for (auto ic : warehouse.getActiveBlockObjects(elem_info->subdomain_id(), _tid))
38  ic->computeElement(*elem_info);
39 }
40 
41 void
43 {
44 }
45 
46 void
48 {
49  const auto & ic_wh = _fe_problem.getFVInitialConditionWarehouse();
50  if (_fe_problem.shouldPrintExecution(_tid) && ic_wh.hasActiveObjects())
51  {
52  const auto & console = _fe_problem.console();
53  const auto & execute_on = _fe_problem.getCurrentExecuteOnFlag();
54  console << "[DBG] Executing initial conditions on elements on " << execute_on << std::endl;
55  console << "[DBG] Unordered list:" << std::endl;
56  console << ic_wh.activeObjectsToFormattedString() << std::endl;
57  console << "[DBG] The order of execution is defined by dependency resolution on every element"
58  << std::endl;
59  }
60 }
bool hasActiveBlockObjects(THREAD_ID tid=0) const
const std::map< SubdomainID, std::vector< std::shared_ptr< T > > > & getActiveBlockObjects(THREAD_ID tid=0) const
const ExecFlagType & getCurrentExecuteOnFlag() const
Return/set the current execution flag.
ComputeFVInitialConditionThread(FEProblemBase &fe_problem)
Warehouse for storing finite volume initial conditions.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
bool shouldPrintExecution(const THREAD_ID tid) const
Check whether the problem should output execution orders at this time.
void operator()(const ElemInfoRange &range)
void printGeneralExecutionInformation() const
Print information about the loop, mostly order of execution of objects.
const FVInitialConditionWarehouse & getFVInitialConditionWarehouse() const
Return FVInitialCondition storage.
const ConsoleStream & console() const
Return console handle.
Definition: Problem.h:48
StoredRange< MooseMesh::const_elem_info_iterator, const ElemInfo * > ElemInfoRange
void join(const ComputeFVInitialConditionThread &)