https://mooseframework.inl.gov
Loading...
Searching...
No Matches
FlowChannelHeatStructureCouplerUserObject.h
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
10#pragma once
11
12#include "ElementUserObject.h"
13#include "MeshAlignment.h"
14#include "ADFunctorInterface.h"
15
21{
22public:
24
25 virtual void initialize() override;
26 virtual void execute() override;
27 virtual void finalize() override;
28 virtual void threadJoin(const UserObject & y) override;
29
36 const dof_id_type & getNearestElem(dof_id_type elem_id) const
37 {
38 return _mesh_alignment.getCoupledElemID(elem_id);
39 }
40
41protected:
45 const std::vector<ADReal> &
46 getCachedQuantity(dof_id_type elem_id,
47 const std::map<dof_id_type, std::vector<ADReal>> & elem_id_to_values,
48 const std::string & description) const;
49
53 virtual std::vector<std::map<dof_id_type, std::vector<ADReal>> *> getCachedQuantityMaps() = 0;
54 virtual std::vector<const std::map<dof_id_type, std::vector<ADReal>> *>
56
58 dof_id_type _fc_elem_id;
60 dof_id_type _hs_elem_id;
62 unsigned int _fc_qp;
64 unsigned int _hs_qp;
65
66private:
69
73 virtual void computeQpCachedQuantities() = 0;
74
75public:
77};
const std::vector< double > y
Base class for caching quantities computed between flow channels and heat structures.
const dof_id_type & getNearestElem(dof_id_type elem_id) const
Get the nearest element ID for given element ID, for either heat structure or flow channel.
virtual std::vector< std::map< dof_id_type, std::vector< ADReal > > * > getCachedQuantityMaps()=0
Gets the cached quantity maps.
dof_id_type _hs_elem_id
Current heat structure element ID.
unsigned int _hs_qp
Current heat structure quadrature point index.
virtual std::vector< const std::map< dof_id_type, std::vector< ADReal > > * > getCachedQuantityMaps() const =0
unsigned int _fc_qp
Current flow channel quadrature point index.
virtual void computeQpCachedQuantities()=0
Computes the cached quantities at a quadrature point.
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 dof_id_type & getCoupledElemID(const dof_id_type &elem_id) const
Gets the coupled element ID for a given element ID.
const InputParameters & parameters() const