22 template <
typename RangeType>
30 const unsigned int nl_sys_number,
31 const std::vector<unsigned int> & vars,
55 template <typename... Attribs>
74 template <typename RangeType>
76 const
unsigned int nl_sys_number,
77 const
std::vector<
unsigned int> & vars,
83 template <
typename RangeType>
90 template <
typename RangeType>
91 template <
typename... Attribs>
96 for (
const auto var_num : _vars)
101 auto copied_queries = queries;
102 std::vector<INSFVMomentumResidualObject *> var_ros;
103 copied_queries.template condition<AttribVar>(
static_cast<int>(var_num)).
queryInto(var_ros);
104 for (
auto *
const var_ro : var_ros)
105 ros.push_back(var_ro);
109 template <
typename RangeType>
113 for (
auto *
const k : _fv_flux_kernels)
117 template <
typename RangeType>
122 std::vector<INSFVMomentumResidualObject *> bcs;
125 auto queries = this->_fe_problem.theWarehouse()
127 .template condition<AttribSystem>(
"FVFluxBC")
128 .
template condition<AttribSysNum>(this->_nl_system_num)
129 .template condition<AttribDisplaced>(this->_on_displaced)
130 .
template condition<AttribThread>(this->_tid)
131 .template condition<AttribBoundaries>(bnd_id);
132 getVarROs(bcs, queries);
134 for (
auto *
const bc : bcs)
135 bc->gatherRCData(fi);
139 std::vector<INSFVMomentumResidualObject *> iks;
142 auto queries = this->_fe_problem.theWarehouse()
144 .template condition<AttribSystem>(
"FVInterfaceKernel")
145 .
template condition<AttribSysNum>(this->_nl_system_num)
146 .template condition<AttribDisplaced>(this->_on_displaced)
147 .
template condition<AttribThread>(this->_tid)
148 .template condition<AttribBoundaries>(bnd_id);
149 getVarROs(iks, queries);
151 for (
auto *
const ik : iks)
152 ik->gatherRCData(fi);
156 template <
typename RangeType>
163 _fv_flux_kernels.clear();
164 _elem_sub_fv_flux_kernels.clear();
166 std::vector<INSFVMomentumResidualObject *> kernels;
169 auto queries = this->_fe_problem.theWarehouse()
171 .template condition<AttribSysNum>(this->_nl_system_num)
172 .
template condition<AttribSystem>(
"FVFluxKernel")
173 .template condition<AttribDisplaced>(this->_on_displaced)
174 .
template condition<AttribSubdomains>(this->_subdomain)
175 .template condition<AttribThread>(this->_tid);
176 getVarROs(kernels, queries);
178 _elem_sub_fv_flux_kernels =
179 std::set<INSFVMomentumResidualObject *>(kernels.begin(), kernels.end());
181 finalizeContainers();
184 template <
typename RangeType>
191 _fv_flux_kernels.clear();
192 _neigh_sub_fv_flux_kernels.clear();
194 std::vector<INSFVMomentumResidualObject *> kernels;
197 auto queries = this->_fe_problem.theWarehouse()
199 .template condition<AttribSysNum>(this->_nl_system_num)
200 .
template condition<AttribSystem>(
"FVFluxKernel")
201 .template condition<AttribDisplaced>(this->_on_displaced)
202 .
template condition<AttribSubdomains>(this->_neighbor_subdomain)
203 .template condition<AttribThread>(this->_tid);
204 getVarROs(kernels, queries);
206 _neigh_sub_fv_flux_kernels =
207 std::set<INSFVMomentumResidualObject *>(kernels.begin(), kernels.end());
209 finalizeContainers();
212 template <
typename RangeType>
216 const bool same_kernels = _elem_sub_fv_flux_kernels == _neigh_sub_fv_flux_kernels;
218 _fv_flux_kernels = _elem_sub_fv_flux_kernels;
220 std::set_union(_elem_sub_fv_flux_kernels.begin(),
221 _elem_sub_fv_flux_kernels.end(),
222 _neigh_sub_fv_flux_kernels.begin(),
223 _neigh_sub_fv_flux_kernels.end(),
224 std::inserter(_fv_flux_kernels, _fv_flux_kernels.begin()));
void getVarROs(std::vector< INSFVMomentumResidualObject *> &ros, TheWarehouse::QueryCache< Attribs... > &queries)
This determines all the momentum residual objects for all the variables.
void subdomainChanged() override final
std::vector< T *> & queryInto(std::vector< T * > &results, Args &&... args)
std::set< INSFVMomentumResidualObject * > _fv_flux_kernels
The collection of flux kernels that contribute to the momentum equation residuals.
std::set< INSFVMomentumResidualObject * > _elem_sub_fv_flux_kernels
The subset of flux kernels that contribute to the momentum equation residual from the element side of...
GatherRCDataFaceThread(FEProblemBase &fe_problem, const unsigned int nl_sys_number, const std::vector< unsigned int > &vars, bool on_displaced)
A class that gathers 'a' coefficient data from flux kernels, boundary conditions, and interface kerne...
virtual void neighborSubdomainChanged()
void finalizeContainers()
Called at the end of either subdomainChanged or neighborSubdomainChanged, this method computes the fi...
const std::vector< unsigned int > & _vars
The velocity variable numbers.
const std::vector< double > x
boundary_id_type BoundaryID
void onBoundary(const FaceInfo &fi, BoundaryID boundary) override final
All objects that contribute to pressure-based (e.g.
virtual void subdomainChanged()
std::set< INSFVMomentumResidualObject * > _neigh_sub_fv_flux_kernels
The subset of flux kernels that contribute to the momentum equation residual from the neighbor side o...
void join(const ThreadedFaceLoop &y)
void neighborSubdomainChanged() override final
static const std::string k
void onFace(const FaceInfo &fi) override final