https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
18
24
25void
27{
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
41void
45
46void
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}
void join(const ComputeFVInitialConditionThread &)
ComputeFVInitialConditionThread(FEProblemBase &fe_problem)
StoredRange< MooseMesh::const_elem_info_iterator, const ElemInfo * > ElemInfoRange
void operator()(const ElemInfoRange &range)
void printGeneralExecutionInformation() const
Print information about the loop, mostly order of execution of objects.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
const ExecFlagType & getCurrentExecuteOnFlag() const
Return/set the current execution flag.
bool shouldPrintExecution(const THREAD_ID tid) const
Check whether the problem should output execution orders at this time.
const FVInitialConditionWarehouse & getFVInitialConditionWarehouse() const
Return FVInitialCondition storage.
Warehouse for storing finite volume initial conditions.
const std::map< SubdomainID, std::vector< std::shared_ptr< T > > > & getActiveBlockObjects(THREAD_ID tid=0) const
bool hasActiveBlockObjects(THREAD_ID tid=0) const
const ConsoleStream & console() const
Return console handle.
Definition Problem.h:48