Cardinal
NekBoundaryFlux.h
Go to the documentation of this file.
1 /********************************************************************/
2 /* SOFTWARE COPYRIGHT NOTIFICATION */
3 /* Cardinal */
4 /* */
5 /* (c) 2021 UChicago Argonne, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by UChicago Argonne, LLC */
9 /* Under Contract No. DE-AC02-06CH11357 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* Prepared by Battelle Energy Alliance, LLC */
13 /* Under Contract No. DE-AC07-05ID14517 */
14 /* With the U. S. Department of Energy */
15 /* */
16 /* See LICENSE for full restrictions */
17 /********************************************************************/
18 
19 #pragma once
20 
22 
33 {
34 public:
35  static InputParameters validParams();
36 
37  NekBoundaryFlux(const InputParameters & parameters);
38 
39  virtual void sendDataToNek() override;
40 
41  virtual void readDataFromNek() override;
42 
43 protected:
50  void checkInitialFluxValues(const Real & nek_flux, const Real & moose_flux) const;
51 
60  bool
61  normalizeFlux(const double moose_integral, double nek_integral, double & normalized_nek_integral);
62 
71  bool normalizeFluxBySideset(const std::vector<double> & moose_integral,
72  std::vector<double> & nek_integral,
73  double & normalized_nek_integral);
74 
83 
85  const Real & _initial_flux_integral;
86 
88  const std::vector<int> * _boundary;
89 
92 
94  const PostprocessorValue * _flux_integral = nullptr;
95 
97  const VectorPostprocessorValue * _flux_integral_vpp = nullptr;
98 };
Definition: NekBoundaryFlux.h:32
virtual void readDataFromNek() override
Read data from Nek.
const Real _reference_flux_integral
Dimensional reference flux, computed from characteristic scales.
Definition: NekBoundaryFlux.h:91
virtual void sendDataToNek() override
Send data to Nek.
Definition: ConservativeFieldTransfer.h:23
static InputParameters validParams()
NekBoundaryFlux(const InputParameters &parameters)
const VectorPostprocessorValue * _flux_integral_vpp
Sideset-wise surface-integrated flux coming from the coupled MOOSE app.
Definition: NekBoundaryFlux.h:97
void checkInitialFluxValues(const Real &nek_flux, const Real &moose_flux) const
const Real & _initial_flux_integral
Initial value to use for the total flux integral for ensuring conservation.
Definition: NekBoundaryFlux.h:85
bool normalizeFlux(const double moose_integral, double nek_integral, double &normalized_nek_integral)
const std::vector< int > * _boundary
Boundaries through which the flux transfer occurs.
Definition: NekBoundaryFlux.h:88
bool normalizeFluxBySideset(const std::vector< double > &moose_integral, std::vector< double > &nek_integral, double &normalized_nek_integral)
const PostprocessorValue * _flux_integral
Total surface-integrated flux coming from the coupled MOOSE app.
Definition: NekBoundaryFlux.h:94
const bool & _conserve_flux_by_sideset
Definition: NekBoundaryFlux.h:82