17 const unsigned int system_num,
18 const std::set<TagID> & vector_tags,
19 const std::set<TagID> & matrix_tags)
20 : _fe_problem(fe_problem),
21 _system_number(system_num),
22 _vector_tags(vector_tags),
23 _matrix_tags(matrix_tags),
26 _system_contrib_objects_ready(false)
33 : _fe_problem(x._fe_problem),
34 _system_number(x._system_number),
35 _vector_tags(x._vector_tags),
36 _matrix_tags(x._matrix_tags),
37 _subdomain(x._subdomain),
38 _old_subdomain(x._old_subdomain),
39 _system_contrib_objects_ready(x._system_contrib_objects_ready)
55 for (
const auto & elem_info : range)
64 const Real elem_volume = elem_info->volume() * elem_info->coordFactor();
69 kernel->setCurrentElemInfo(elem_info);
70 kernel->setCurrentElemVolume(elem_volume);
71 kernel->addMatrixContribution();
72 kernel->addRightHandSideContribution();
87 std::vector<LinearFVElementalKernel *> kernels_after_vectors;
91 .
template condition<AttribSystem>(
"LinearFVElementalKernel")
92 .template condition<AttribThread>(
_tid)
96 std::vector<LinearFVElementalKernel *> kernels_after_matrices;
100 .
template condition<AttribSystem>(
"LinearFVElementalKernel")
101 .template condition<AttribThread>(
_tid)
106 std::vector<LinearFVElementalKernel *> kernels;
110 for (
auto & kernel : kernels)
120 "The system contribution objects need to be set up before we fetch the " 121 "block-restricted objects!");
124 std::vector<LinearFVElementalKernel *> kernels_after_vector;
128 .
template condition<AttribSystem>(
"LinearFVElementalKernel")
129 .template condition<AttribThread>(
_tid)
131 .template condition<AttribSubdomains>(
_subdomain)
132 .queryInto(kernels_after_vector);
134 std::vector<LinearFVElementalKernel *> kernels_after_matrix;
138 .
template condition<AttribSystem>(
"LinearFVElementalKernel")
139 .template condition<AttribThread>(
_tid)
141 .template condition<AttribSubdomains>(
_subdomain)
142 .queryInto(kernels_after_matrix);
157 console <<
"[DBG] Beginning linear finite volume elemental objects loop on " << execute_on
160 mooseDoOnce(console <<
"[DBG] Loop on elements (ElemInfo), objects ordered on each face: " 162 console <<
"[DBG] - linear finite volume kernels" << std::endl;);
172 console <<
"[DBG] Linear FV elemental kernels on block " 176 std::vector<MooseObject *> kernels_to_print;
178 kernels_to_print.push_back(dynamic_cast<MooseObject *>(kernel));
std::string mooseObjectVectorToString(const std::vector< MooseObject *> &objs, const std::string &sep=" ")
Routine to output the name of MooseObjects in a string.
FEProblemBase & _fe_problem
Reference to the problem.
const std::set< TagID > & _matrix_tags
The matrix tags this thread contributes to.
const ExecFlagType & getCurrentExecuteOnFlag() const
Return/set the current execution flag.
SubdomainID _old_subdomain
The subdomain for the last element.
std::vector< T * > & queryInto(std::vector< T *> &results, Args &&... args)
queryInto executes the query and stores the results in the given vector.
void printBlockExecutionInformation() const
Print ordering of objects executed on each block.
void operator()(const ElemInfoRange &range)
Operator which is used to execute the thread over a certain iterator range.
void join(const ComputeLinearFVElementalThread &)
Join threads at the end of the execution.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
const unsigned int _system_number
The number of the linear system we are contributing to.
const std::string & getSubdomainName(SubdomainID subdomain_id) const
Return the name of a block given an id.
StoredRange< MooseMesh::const_elem_info_iterator, const ElemInfo * > ElemInfoRange
SubdomainID _subdomain
The subdomain for the current element.
Adds contributions from volumetric terms discretized using the finite volume method to the matrix and...
const SubdomainID INVALID_BLOCK_ID
void setupSystemContributionObjects()
Setup the contribution objects before we start the loop.
const std::set< TagID > & _vector_tags
The vector tags this thread contributes to.
bool shouldPrintExecution(const THREAD_ID tid) const
Check whether the problem should output execution orders at this time.
bool _system_contrib_objects_ready
Boolean that is used to check if the kernels are ready to start contributing to the system...
TheWarehouse & theWarehouse() const
std::string formatString(std::string message, const std::string &prefix)
Add new lines and prefixes to a string for pretty display in output NOTE: This makes a copy of the st...
const ConsoleStream & console() const
Return console handle.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void getUnion(const std::vector< T > &vector1, const std::vector< T > &vector2, std::vector< T > &common)
Function which takes the union of vector1 and vector2 and copies them to common . ...
void fetchBlockSystemContributionObjects()
Fetch contribution objects that belong to a specific spatial subdomain.
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse...
ComputeLinearFVElementalThread(FEProblemBase &fe_problem, const unsigned int linear_system_num, const std::set< TagID > &vector_tags, const std::set< TagID > &matrix_tags)
Class constructor.
virtual MooseMesh & mesh() override
void printGeneralExecutionInformation() const
Print list of object types executed and in which order.
std::vector< LinearFVElementalKernel * > _fv_kernels
The set of cached elemental kernels which will be executed on a given element.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...