https://mooseframework.inl.gov
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 
20  public ADFunctorInterface
21 {
22 public:
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 
41 protected:
45  const std::vector<ADReal> &
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>> *>
55  getCachedQuantityMaps() const = 0;
56 
62  unsigned int _fc_qp;
64  unsigned int _hs_qp;
65 
66 private:
69 
73  virtual void computeQpCachedQuantities() = 0;
74 
75 public:
77 };
virtual void computeQpCachedQuantities()=0
Computes the cached quantities at a quadrature point.
unsigned int _hs_qp
Current heat structure quadrature point index.
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.
Definition: MeshAlignment.h:24
const std::vector< double > y
const dof_id_type & getCoupledElemID(const dof_id_type &elem_id) const
Gets the coupled element ID for a given element ID.
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 _fc_elem_id
Current flow channel element ID.
Base class for caching quantities computed between flow channels and heat structures.
const InputParameters & parameters() const
unsigned int _fc_qp
Current flow channel quadrature point index.
FlowChannelHeatStructureCouplerUserObject(const InputParameters &parameters)
uint8_t dof_id_type
dof_id_type _hs_elem_id
Current heat structure element ID.