https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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{
19public:
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
36protected:
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
69public:
71};
Provides common interfaces for flow junction user objects.
unsigned int getBoundaryIDIndex()
Gets the index of the currently executing boundary within the vector of boundary IDs given to this Si...
unsigned int getNumberOfConnections() const
Gets the number of connected flow channels.
static InputParameters validParams()
const std::vector< BoundaryID > _bnd_ids_vector
Vector of boundary IDs for this side user object; note that BoundaryRestrictable stores these same bo...
std::vector< unsigned int > _processor_ids
Owners of each side of the junction.
const unsigned int _n_connections
Number of connected flow channels.
std::map< std::pair< const Elem *, const unsigned short int >, unsigned int > _elem_side_to_bnd_id_index
virtual void finalize() override
virtual const std::vector< ADReal > & getFlux(const unsigned int &connection_index) const =0
Gets the flux vector for a connection.
const std::vector< Real > & _normal
Flow channel outward normals or junction inward normals.
void checkValidConnectionIndex(const unsigned int &connection_index) const
Checks that a connection index is valid.
const MaterialProperty< RealVectorValue > & _dir
Direction of the element connected to the junction.
const InputParameters & parameters() const