20 "Base class for caching quantities computed between flow channels and heat structures.");
32 _mesh_alignment(*getParam<
MeshAlignment *>(
"_mesh_alignment"))
41 for (
const auto map_ptr : map_ptrs)
48 unsigned int n_qpts =
_qrule->n_points();
54 for (
const auto map_ptr : map_ptrs)
73 const auto other_map_ptrs = fc_hs_uo.getCachedQuantityMaps();
75 for (
unsigned int i = 0; i < map_ptrs.size(); ++i)
76 for (
auto & it : *other_map_ptrs[i])
77 (*map_ptrs[i])[it.first] = it.second;
84 for (
const auto map_ptr : map_ptrs)
88 const std::vector<ADReal> &
91 const std::map<
dof_id_type, std::vector<ADReal>> & elem_id_to_values,
92 const std::string & description)
const 94 Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
96 auto it = elem_id_to_values.find(elem_id);
97 if (it != elem_id_to_values.end())
105 " was requested but not computed.");
virtual void computeQpCachedQuantities()=0
Computes the cached quantities at a quadrature point.
unsigned int _hs_qp
Current heat structure quadrature point index.
void allGatherADVectorMap(const Parallel::Communicator &comm, std::map< dof_id_type, std::vector< ADReal >> &this_map)
Parallel gather of a map of DoF ID to AD vector.
static InputParameters validParams()
virtual void initialize() override
static InputParameters validParams()
const std::vector< ADReal > & getCachedQuantity(dof_id_type elem_id, const std::map< dof_id_type, std::vector< ADReal >> &elem_id_to_values, const std::string &description) const
Gets a cached quantity from a map.
Builds mapping between two aligned subdomains/boundaries.
const Parallel::Communicator & comm() const
virtual void finalize() override
virtual const std::string & name() const
const dof_id_type & getCoupledElemID(const dof_id_type &elem_id) const
Gets the coupled element ID for a given element ID.
virtual void threadJoin(const UserObject &y) override
virtual std::vector< std::map< dof_id_type, std::vector< ADReal > > * > getCachedQuantityMaps()=0
Gets the cached quantity maps.
dof_id_type _fc_elem_id
Current flow channel element ID.
void buildCoupledElemQpIndexMap(Assembly &assembly)
Builds the map used for getting the coupled quadrature point index.
const QBase *const & _qrule
const Elem *const & _current_elem
virtual void execute() override
static InputParameters validParams()
void mooseError(Args &&... args) const
Base class for caching quantities computed between flow channels and heat structures.
MeshAlignment & _mesh_alignment
Mesh alignment object.
unsigned int _fc_qp
Current flow channel quadrature point index.
FlowChannelHeatStructureCouplerUserObject(const InputParameters ¶meters)
unsigned int getCoupledElemQpIndex(const dof_id_type &elem_id, const unsigned int &qp) const
Gets the quadrature point index on the coupled element corresponding to the quadrature point index on...
dof_id_type _hs_elem_id
Current heat structure element ID.