https://mooseframework.inl.gov
ADFlowJunctionUserObject.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 "SideUserObject.h"
13 
18 {
19 public:
21 
22  virtual void finalize() override;
23 
29  virtual const std::vector<ADReal> & getFlux(const unsigned int & connection_index) const = 0;
30 
34  unsigned int getNumberOfConnections() const { return _n_connections; }
35 
36 protected:
41  unsigned int getBoundaryIDIndex();
42 
48  void checkValidConnectionIndex(const unsigned int & connection_index) const;
49 
55  const std::vector<BoundaryID> _bnd_ids_vector;
56  const unsigned int _n_bnd_ids;
57  std::map<std::pair<const Elem *, const unsigned short int>, unsigned int>
59 
61  const std::vector<Real> & _normal;
65  const unsigned int _n_connections;
67  std::vector<unsigned int> _processor_ids;
68 
69 public:
71 };
unsigned int getBoundaryIDIndex()
Gets the index of the currently executing boundary within the vector of boundary IDs given to this Si...
virtual void finalize() override
std::map< std::pair< const Elem *, const unsigned short int >, unsigned int > _elem_side_to_bnd_id_index
const unsigned int _n_connections
Number of connected flow channels.
unsigned int getNumberOfConnections() const
Gets the number of connected flow channels.
const MaterialProperty< RealVectorValue > & _dir
Direction of the element connected to the junction.
std::vector< unsigned int > _processor_ids
Owners of each side of the junction.
const std::vector< BoundaryID > _bnd_ids_vector
Vector of boundary IDs for this side user object; note that BoundaryRestrictable stores these same bo...
Provides common interfaces for flow junction user objects.
ADFlowJunctionUserObject(const InputParameters &parameters)
const InputParameters & parameters() const
const std::vector< Real > & _normal
Flow channel outward normals or junction inward normals.
virtual const std::vector< ADReal > & getFlux(const unsigned int &connection_index) const =0
Gets the flux vector for a connection.
void checkValidConnectionIndex(const unsigned int &connection_index) const
Checks that a connection index is valid.
static InputParameters validParams()