Go to the documentation of this file.
12 #include "ElementUserObject.h"
44 virtual void threadJoin(
const UserObject & uo)
override;
48 virtual void execute()
override;
61 dof_id_type global_i, dof_id_type global_j,
unsigned local_i,
unsigned local_j,
unsigned qp);
76 const std::map<dof_id_type, Real> &
getdFluxOutdu(dof_id_type node_i)
const;
84 const std::vector<std::vector<Real>> &
getdFluxOutdKjk(dof_id_type node_i)
const;
121 virtual Real
computeVelocity(
unsigned i,
unsigned j,
unsigned qp)
const = 0;
127 virtual Real
computeU(
unsigned i)
const = 0;
139 void limitFlux(Real a, Real b, Real & limited, Real & dlimited_db)
const;
149 Real
rPlus(dof_id_type sequential_i,
150 std::vector<Real> & dlimited_du,
151 std::vector<Real> & dlimited_dk)
const;
161 Real
rMinus(dof_id_type sequential_i,
162 std::vector<Real> & dlimited_du,
163 std::vector<Real> & dlimited_dk)
const;
176 std::vector<std::vector<Real>>
_kij;
235 std::map<processor_id_type, std::vector<std::pair<dof_id_type, dof_id_type>>>
_pairs_to_receive;
244 std::map<processor_id_type, std::vector<std::pair<dof_id_type, dof_id_type>>>
_pairs_to_send;
276 std::vector<Real> & derivs,
277 std::vector<Real> & dpq_dk)
const;
285 void zeroedConnection(std::map<dof_id_type, Real> & the_map, dof_id_type node_i)
const;
288 std::vector<std::vector<Real>>
_dij;
298 std::vector<std::vector<Real>>
_lij;
303 std::vector<std::vector<Real>>
_drP;
305 std::vector<std::vector<Real>>
_drM;
312 std::vector<std::vector<Real>>
_fa;
316 std::vector<std::vector<std::map<dof_id_type, Real>>>
_dfa;
std::vector< std::vector< Real > > _dDii_dKji
dDii_dKji[i][j] = d(D[i][i])/d(K[j][i])
std::map< processor_id_type, std::vector< dof_id_type > > _nodes_to_send
_nodes_to_send[proc_id] = list of sequential nodal IDs.
std::vector< std::vector< Real > > _drP
drP[i][j] = d(rP[i])/d(u[j]). Here j indexes the j^th node connected to i
virtual void threadJoin(const UserObject &uo) override
virtual void execute() override
Class designed to hold node ID information and information about nodal connectivity.
std::vector< bool > _u_nodal_computed_by_thread
_u_nodal_computed_by_thread(i) = true if _u_nodal[i] has been computed in execute() by the thread on ...
std::map< processor_id_type, std::vector< dof_id_type > > _nodes_to_receive
_nodes_to_receive[proc_id] = list of sequential nodal IDs.
InputParameters validParams< AdvectiveFluxCalculatorBase >()
std::vector< std::vector< std::vector< Real > > > _dFij_dKik
dFij_dKik[sequential_i][j][k] = d(fa[sequential_i][j])/d(K[sequential_i][k]).
enum AdvectiveFluxCalculatorBase::FluxLimiterTypeEnum _flux_limiter_type
void zeroedConnection(std::map< dof_id_type, Real > &the_map, dof_id_type node_i) const
Clears the_map, then, using _kij, constructs the_map so that the_map[node_id] = 0....
virtual Real computeVelocity(unsigned i, unsigned j, unsigned qp) const =0
Computes the transfer velocity between current node i and current node j at the current qp in the cur...
const std::vector< std::vector< Real > > & getdFluxOutdKjk(dof_id_type node_i) const
Returns r where r[j][k] = d(flux out of global node i)/dK[connected node j][connected node k] used in...
std::vector< std::vector< Real > > _drM_dk
drM_dk[i][j] = d(rM[i])/d(K[i][j]). Here j indexes the j^th node connected to i
const std::map< dof_id_type, Real > & getdFluxOutdu(dof_id_type node_i) const
Returns r where r[j] = d(flux out of global node i)/du(global node j) used in Jacobian computations.
std::vector< std::map< dof_id_type, Real > > _dflux_out_du
_dflux_out_du[i][j] = d(flux_out[i])/d(u[j]).
unsigned getValence(dof_id_type node_i) const
Returns the valence of the global node i Valence is the number of times the node is encountered in a ...
PQPlusMinusEnum
Signals to the PQPlusMinus method what should be computed.
Real PQPlusMinus(dof_id_type sequential_i, const PQPlusMinusEnum pq_plus_minus, std::vector< Real > &derivs, std::vector< Real > &dpq_dk) const
Returns the value of P_{i}^{+}, P_{i}^{-}, Q_{i}^{+} or Q_{i}^{-} (depending on pq_plus_minus) which ...
std::vector< std::vector< Real > > _dij
Vectors used in finalize()
virtual void executeOnElement(dof_id_type global_i, dof_id_type global_j, unsigned local_i, unsigned local_j, unsigned qp)
This is called by multiple times in execute() in a double loop over _current_elem's nodes (local_i an...
std::size_t _number_of_nodes
Number of nodes held by the _connections object.
std::vector< std::vector< Real > > _dDii_dKij
dDii_dKij[i][j] = d(D[i][i])/d(K[i][j])
virtual void buildCommLists()
When using multiple processors, other processors will compute:
Real rPlus(dof_id_type sequential_i, std::vector< Real > &dlimited_du, std::vector< Real > &dlimited_dk) const
Returns the value of R_{i}^{+}, Eqn (49) of KT.
virtual void timestepSetup() override
virtual Real computeU(unsigned i) const =0
Computes the value of u at the local node id of the current element (_current_elem)
std::vector< Real > _u_nodal
_u_nodal[i] = value of _u at sequential node number i
virtual void finalize() override
virtual void meshChanged() override
virtual void exchangeGhostedInfo()
Sends and receives multi-processor information regarding u_nodal and k_ij.
processor_id_type _my_pid
processor ID of this object
PorousFlowConnectedNodes _connections
Holds the sequential and global nodal IDs, and info regarding mesh connections between them.
bool _resizing_needed
whether _kij, etc, need to be sized appropriately (and valence recomputed) at the start of the timest...
AdvectiveFluxCalculatorBase(const InputParameters ¶meters)
virtual void initialize() override
void limitFlux(Real a, Real b, Real &limited, Real &dlimited_db) const
flux limiter, L, on Page 135 of Kuzmin and Turek
Base class to compute Advective fluxes.
std::map< processor_id_type, std::vector< std::pair< dof_id_type, dof_id_type > > > _pairs_to_send
_pairs_to_send[proc_id] indicates the k(i, j) pairs that we will send to proc_id _pairs_to_send is fi...
std::vector< std::vector< Real > > _kij
Kuzmin-Turek K_ij matrix.
std::map< processor_id_type, std::vector< std::pair< dof_id_type, dof_id_type > > > _pairs_to_receive
_pairs_to_receive[proc_id] indicates the k(i, j) pairs that will be sent to us from proc_id _pairs_to...
Real getFluxOut(dof_id_type node_i) const
Returns the flux out of lobal node id.
FluxLimiterTypeEnum
Determines Flux Limiter type (Page 135 of Kuzmin and Turek) "None" means that limitFlux=0 always,...
const Real _allowable_MB_wastage
A mooseWarning is issued if mb_wasted = (_connections.sizeSequential() - _connections....
std::vector< std::vector< Real > > _drP_dk
drP_dk[i][j] = d(rP[i])/d(K[i][j]). Here j indexes the j^th node connected to i
std::vector< std::vector< Real > > _dDij_dKji
dDij_dKji[i][j] = d(D[i][j])/d(K[j][i]) for i!=j
std::vector< Real > _flux_out
_flux_out[i] = flux of "heat" from sequential node i
Real rMinus(dof_id_type sequential_i, std::vector< Real > &dlimited_du, std::vector< Real > &dlimited_dk) const
Returns the value of R_{i}^{-}, Eqn (49) of KT.
std::vector< std::vector< Real > > _lij
std::vector< std::vector< std::map< dof_id_type, Real > > > _dfa
dfa[sequential_i][j][global_k] = d(fa[sequential_i][j])/du[global_k].
std::vector< std::vector< Real > > _drM
drM[i][j] = d(rM[i])/d(u[j]). Here j indexes the j^th node connected to i
std::vector< std::vector< std::vector< Real > > > _dflux_out_dKjk
_dflux_out_dKjk[sequential_i][j][k] = d(flux_out[sequential_i])/d(K[j][k]).
std::vector< std::vector< std::vector< Real > > > _dFij_dKjk
dFij_dKjk[sequential_i][j][k] = d(fa[sequential_i][j])/d(K[sequential_j][k]).
std::vector< unsigned > _valence
_valence[i] = number of times, in a loop over elements seen by this processor (viz,...
std::vector< std::vector< Real > > _dDij_dKij
dDij_dKij[i][j] = d(D[i][j])/d(K[i][j]) for i!=j
std::vector< std::vector< Real > > _fa
fa[sequential_i][j] sequential_j is the j^th connection to sequential_i