26 #include "Transient.h" 27 #include "TimeStepper.h" 83 const Real & multiplier,
double ** outgoing_data);
93 const Real & multiplier,
double ** outgoing_data);
112 const Real & multiplier,
double ** outgoing_data);
142 virtual bool converged(
unsigned int)
override {
return true; }
146 virtual void syncSolutions(ExternalProblem::Direction direction)
override;
196 double * outgoing_nek_value);
205 double * outgoing_nek_value);
220 const std::vector<double> * add =
nullptr);
253 virtual void fillAuxVariable(
const unsigned int var_number,
const double * value);
bool _volume
Whether the mesh contains volume-based coupling.
Definition: NekRSProblemBase.h:392
NekTimeStepper * _timestepper
The time stepper used for selection of time step size.
Definition: NekRSProblemBase.h:407
unsigned int _n_uo_slots
Number of scratch space slots used for NekScalarValue usage.
Definition: NekRSProblemBase.h:523
unsigned int _minimum_scratch_size_for_coupling
Minimum allowable scratch space size, strictly what is needed by Cardinal for coupling.
Definition: NekRSProblemBase.h:446
virtual void syncSolutions(ExternalProblem::Direction direction) override
std::vector< NekScalarValue * > _nek_uos
Userobjects containing stochastic input data.
Definition: NekRSProblemBase.h:514
NekWriteEnum
Enumeration of possible fields to write in nekRS.
Definition: CardinalEnums.h:105
const unsigned int & _constant_interval
For constant synchronization intervals, the desired frequency (in units of Nek time steps)
Definition: NekRSProblemBase.h:365
virtual InputParameters getExternalVariableParameters()
Definition: NekRSMesh.h:50
void writeFieldFile(const Real &time, const int &step) const
virtual const bool hasMovingNekMesh() const
Definition: NekRSProblemBase.h:158
Transient * _transient_executioner
Underlying executioner.
Definition: NekRSProblemBase.h:410
const std::vector< int > * _boundary
Boundary IDs through which to couple nekRS and MOOSE.
Definition: NekRSProblemBase.h:389
unsigned int _n_usrwrk_slots
Definition: NekRSProblemBase.h:362
NekRSMesh * _nek_mesh
Definition: NekRSProblemBase.h:404
const PostprocessorValue * _transfer_in
Postprocessor containing the signal of when a synchronization has occurred.
Definition: NekRSProblemBase.h:437
const bool & _write_fld_files
Definition: NekRSProblemBase.h:349
void writeBoundarySolution(const int elem_id, const field::NekWriteEnum &field, double *T)
const Real & _Cp_0
Reference isobaric specific heat capacity.
Definition: NekRSProblemBase.h:333
int _n_surface_elems
Number of surface elements in the data transfer mesh, across all processes.
Definition: NekRSProblemBase.h:374
double _elapsedStepSum
Sum of the elapsed time in NekRS solves.
Definition: NekRSProblemBase.h:458
Definition: CardinalEnums.h:86
void initializeInterpolationMatrices()
Initialize interpolation matrices for transfers in/out of nekRS.
const MultiMooseEnum * _outputs
NekRS solution fields to output to the mesh mirror.
Definition: NekRSProblemBase.h:419
synchronization::SynchronizationEnum _synchronization_interval
When to synchronize the NekRS solution with the mesh mirror.
Definition: NekRSProblemBase.h:508
void boundarySolution(const field::NekFieldEnum &f, double *T)
int _moose_Nq
For the MOOSE mesh, the number of quadrature points in each coordinate direction.
Definition: NekRSProblemBase.h:449
const Real & _T_ref
Reference characteristic temperature.
Definition: NekRSProblemBase.h:321
int _n_volume_elems
Number of volume elements in the data transfer mesh, across all processes.
Definition: NekRSProblemBase.h:380
virtual bool nondimensional() const
Definition: NekRSProblemBase.h:152
void writeVolumeSolution(const int elem_id, const field::NekWriteEnum &field, double *T, const std::vector< double > *add=nullptr)
const bool & _nondimensional
Whether the nekRS solution is performed in nondimensional scales.
Definition: NekRSProblemBase.h:315
virtual bool synchronizeOut()
static InputParameters validParams()
virtual void externalSolve() override
virtual bool isOutputStep() const
Whether nekRS should write an output file for the current time step.
const std::vector< std::string > * _usrwrk_output_prefix
Filename prefix to use for naming the field files containing the nrs->o_usrwrk array slots.
Definition: NekRSProblemBase.h:455
virtual void adjustNekSolution()
Definition: NekRSProblemBase.h:127
std::vector< unsigned int > _external_vars
Numeric identifiers for the external variables.
Definition: NekRSProblemBase.h:425
SynchronizationEnum
Definition: CardinalEnums.h:59
double L_ref() const
Definition: NekRSProblemBase.h:176
int _n_vertices_per_volume
Number of vertices per volume element of the transfer mesh.
Definition: NekRSProblemBase.h:383
void mapFaceDataToNekVolume(const unsigned int &e, const unsigned int &var_num, const Real &multiplier, double **outgoing_data)
Map nodal points on a MOOSE face element to the GLL points on a Nek volume element.
virtual void addTemperatureVariable()
unsigned int nUsrWrkSlots() const
Definition: NekRSProblemBase.h:182
Definition: CardinalProblem.h:26
const Real & _U_ref
Reference characteristic velocity.
Definition: NekRSProblemBase.h:318
const std::string & _casename
NekRS casename.
Definition: NekRSProblemBase.h:283
double * _interpolation_outgoing
Vandermonde interpolation matrix (for outgoing transfers)
Definition: NekRSProblemBase.h:440
const Real & _dT_ref
Reference characteristic temperature delta.
Definition: NekRSProblemBase.h:324
double _tSolveStepMax
Maximum step solve time.
Definition: NekRSProblemBase.h:467
void getNekScalarValueUserObjects()
Setup to fetch NekScalarValue user objects for sending scalar values into NekRS scratch space.
void interpolateBoundarySolutionToNek(double *incoming_moose_value, double *outgoing_nek_value)
int _n_points
Number of points for interpolated fields on the MOOSE mesh.
Definition: NekRSProblemBase.h:434
virtual void fillAuxVariable(const unsigned int var_number, const double *value)
const unsigned int & _first_reserved_usrwrk_slot
First slice in usrwrk for Cardinal to read/write data from.
Definition: NekRSProblemBase.h:371
const bool & _skip_final_field_file
Whether to skip writing a field file on NekRS's last time steo.
Definition: NekRSProblemBase.h:368
int _n_vertices_per_surface
Number of vertices per surface element of the transfer mesh.
Definition: NekRSProblemBase.h:377
const bool & _disable_fld_file_output
Whether to turn off all field file writing.
Definition: NekRSProblemBase.h:352
int _n_vertices_per_elem
Number of vertices per element in the data transfer mesh, which depends on whether boundary/volume co...
Definition: NekRSProblemBase.h:386
virtual bool converged(unsigned int) override
Definition: NekRSProblemBase.h:142
std::vector< std::string > _var_names
Names of external variables when extracting the NekRS solution.
Definition: NekRSProblemBase.h:422
virtual void addExternalVariables() override
NekFieldEnum
Enumeration of possible fields to read from nekRS.
Definition: CardinalEnums.h:89
void sendScalarValuesToNek()
Send values from NekScalarValue userobjects to NekRS.
Definition: NekRSProblemBase.h:40
void mapFaceDataToNekFace(const unsigned int &e, const unsigned int &var_num, const Real &multiplier, double **outgoing_data)
double _tSolveStepMin
Minimum step solve time.
Definition: NekRSProblemBase.h:464
virtual void extractOutputs()
bool _needs_interpolation
Definition: NekRSProblemBase.h:416
double * _interpolation_incoming
Vandermonde interpolation matrix (for incoming transfers)
Definition: NekRSProblemBase.h:443
void interpolateVolumeSolutionToNek(const int elem_id, double *incoming_moose_value, double *outgoing_nek_value)
unsigned int minimumScratchSizeForCoupling() const
Definition: NekRSProblemBase.h:61
bool isDataTransferHappening(ExternalProblem::Direction direction)
const Real & _rho_0
Reference density.
Definition: NekRSProblemBase.h:330
unsigned int _scratch_counter
Counter for any potential NekScalarValue objects in the input file.
Definition: NekRSProblemBase.h:520
std::string fieldFilePrefix(const int &number) const
virtual bool synchronizeIn()
double _start_time
Start time of the simulation based on NekRS's .par file.
Definition: NekRSProblemBase.h:395
bool _is_output_step
Whether the most recent time step was an output file writing step.
Definition: NekRSProblemBase.h:398
const std::vector< unsigned int > * _usrwrk_output
Slots in the nrs->o_usrwrk array to write to a field file.
Definition: NekRSProblemBase.h:452
double * _external_data
Scratch space to place external NekRS fields before writing into auxiliary variables.
Definition: NekRSProblemBase.h:431
static bool _first
flag to indicate whether this is the first pass to serialize the solution
Definition: NekRSProblemBase.h:517
void mapVolumeDataToNekVolume(const unsigned int &e, const unsigned int &var_num, const Real &multiplier, double **outgoing_data)
std::unique_ptr< NumericVector< Number > > _serialized_solution
Definition: NekRSProblemBase.h:273
std::vector< std::string > _usrwrk_indices
quantities to write to nrs->usrwrk (and the order to write them)
Definition: NekRSProblemBase.h:511
unsigned int firstReservedUsrwrkSlot() const
Definition: NekRSProblemBase.h:67
std::string _var_string
Descriptive string for the variables extracted from NekRS.
Definition: NekRSProblemBase.h:428
void volumeSolution(const field::NekFieldEnum &f, double *T)
const Real & _L_ref
Reference characteristic length.
Definition: NekRSProblemBase.h:327
virtual void initialSetup() override
double _elapsedTime
Sum of the total elapsed time in NekRS solves.
Definition: NekRSProblemBase.h:461
Time stepper that reads time step information directly from nekRS.
Definition: NekTimeStepper.h:37
NekRSProblemBase(const InputParameters ¶ms)
void copyScratchToDevice()