17 const unsigned int system_num,
19 const std::set<TagID> & vector_tags,
20 const std::set<TagID> & matrix_tags)
21 : _fe_problem(fe_problem),
22 _system_number(system_num),
24 _vector_tags(vector_tags),
25 _matrix_tags(matrix_tags),
26 _system_contrib_objects_ready(false)
33 : _fe_problem(x._fe_problem),
34 _system_number(x._system_number),
36 _vector_tags(x._vector_tags),
37 _matrix_tags(x._matrix_tags),
38 _system_contrib_objects_ready(x._system_contrib_objects_ready)
55 for (
const auto & face_info : range)
59 face_info->neighborPtr() ? face_info->neighbor().subdomain_id() :
_subdomain;
66 const Real face_area = face_info->faceArea() * face_info->faceCoord();
72 kernel->setupFaceData(face_info);
73 kernel->setCurrentFaceArea(face_area);
74 kernel->addMatrixContribution();
75 kernel->addRightHandSideContribution();
90 std::vector<LinearFVFluxKernel *> kernels_after_vectors;
94 .
template condition<AttribSystem>(
"LinearFVFluxKernel")
95 .template condition<AttribThread>(
_tid)
99 std::vector<LinearFVFluxKernel *> kernels_after_matrices;
103 .
template condition<AttribSystem>(
"LinearFVFluxKernel")
104 .template condition<AttribThread>(
_tid)
109 std::vector<LinearFVFluxKernel *> kernels;
113 for (
auto & kernel : kernels)
123 "The system contribution objects need to be set up before we fetch the " 124 "block-restricted objects!");
131 std::vector<LinearFVFluxKernel *> kernels_after_vector;
135 .
template condition<AttribSystem>(
"LinearFVFluxKernel")
136 .template condition<AttribThread>(
_tid)
138 .template condition<AttribSubdomains>(
_subdomain)
139 .queryInto(kernels_after_vector);
140 std::vector<LinearFVFluxKernel *> kernels_after_matrix;
144 .
template condition<AttribSystem>(
"LinearFVFluxKernel")
145 .template condition<AttribThread>(
_tid)
147 .template condition<AttribSubdomains>(
_subdomain)
148 .queryInto(kernels_after_matrix);
159 std::vector<LinearFVFluxKernel *> kernels_after_vector;
163 .
template condition<AttribSystem>(
"LinearFVFluxKernel")
164 .template condition<AttribThread>(
_tid)
167 .queryInto(kernels_after_vector);
168 std::vector<LinearFVFluxKernel *> kernels_after_matrix;
172 .
template condition<AttribSystem>(
"LinearFVFluxKernel")
173 .template condition<AttribThread>(
_tid)
176 .queryInto(kernels_after_matrix);
192 console <<
"[DBG] Beginning linear finite volume flux objects loop on " << execute_on
194 mooseDoOnce(console <<
"[DBG] Loop on faces (FaceInfo), objects ordered on each face: " 196 console <<
"[DBG] - linear finite volume flux kernels" << std::endl);
207 console <<
"[DBG] Linear flux kernels on block " 213 console <<
" with no neighbor block" << std::endl;
216 std::vector<MooseObject *> kernels_to_print;
218 kernels_to_print.push_back(dynamic_cast<MooseObject *>(kernel));
void operator()(const FaceInfoRange &range)
Operator which is used to execute the thread over a certain iterator range.
StoredRange< MooseMesh::const_face_info_iterator, const FaceInfo * > FaceInfoRange
std::string mooseObjectVectorToString(const std::vector< MooseObject *> &objs, const std::string &sep=" ")
Routine to output the name of MooseObjects in a string.
SubdomainID _old_neighbor_subdomain
The subdomain for the last neighbor.
const unsigned int _system_number
The number of the linear system we are contributing to.
std::vector< LinearFVFluxKernel * > _fv_flux_kernels_elem
Kernels which will only contribute to a matrix from the element-side of the face. ...
SubdomainID _old_subdomain
The subdomain for the last element.
void fetchBlockSystemContributionObjects()
Fetch LinearFVFluxKernels for a given block.
const ExecFlagType & getCurrentExecuteOnFlag() const
Return/set the current execution flag.
std::vector< T * > & queryInto(std::vector< T *> &results, Args &&... args)
queryInto executes the query and stores the results in the given vector.
ComputeLinearFVFaceThread(FEProblemBase &fe_problem, const unsigned int linear_system_num, const Moose::FV::LinearFVComputationMode mode, const std::set< TagID > &vector_tags, const std::set< TagID > &matrix_tags)
Class constructor.
void setupSystemContributionObjects()
Setup the contribution objects before we start the loop.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
const std::string & getSubdomainName(SubdomainID subdomain_id) const
Return the name of a block given an id.
const SubdomainID INVALID_BLOCK_ID
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...
std::vector< LinearFVFluxKernel * > _fv_flux_kernels_neighbor
Kernels which will only contribute to a matrix from the neighbor-side of the face.
SubdomainID _subdomain
The subdomain for the current element.
FEProblemBase & _fe_problem
Reference to the problem.
void printBlockExecutionInformation() const
Print ordering of objects executed on each block.
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 join(const ComputeLinearFVFaceThread &)
Join threads at the end of the execution.
std::set< LinearFVFluxKernel * > _fv_flux_kernels
Combined LinearFVFluxKernels which will be used to contribute to a system.
Query query()
query creates and returns an initialized a query object for querying objects from the warehouse...
virtual MooseMesh & mesh() override
SubdomainID _neighbor_subdomain
The subdomain for the current neighbor.
void printGeneralExecutionInformation() const
Print list of executed object types together with the execution order.
Adds contributions from face terms discretized using the finite volume method to the matrix and right...
const std::set< TagID > & _matrix_tags
The matrix tags this thread contributes to.
const std::set< TagID > & _vector_tags
The vector tags this thread contributes to.