ABLATE Source Documentation  0.12.33
ablate::monitors::RadiationFlux Class Reference

#include <radiationFlux.hpp>

+ Inheritance diagram for ablate::monitors::RadiationFlux:

Public Member Functions

 RadiationFlux (std::vector< std::shared_ptr< radiation::SurfaceRadiation >> radiationIn, std::shared_ptr< domain::Region > radiationFluxRegionIn, std::shared_ptr< ablate::monitors::logs::Log >={})
 
 ~RadiationFlux () override
 
void Register (std::shared_ptr< solver::Solver > solverIn) override
 
PetscErrorCode Save (PetscViewer viewer, PetscInt sequenceNumber, PetscReal time) override
 
void * GetContext () override
 
const std::string & GetId () const override
 
PetscErrorCode Restore (PetscViewer viewer, PetscInt sequenceNumber, PetscReal time) override
 
SerializerType Serialize () const override
 
PetscMonitorFunction GetPetscFunction () override
 

Protected Attributes

const std::shared_ptr< ablate::monitors::logs::Loglog = nullptr
 

Additional Inherited Members

- Public Types inherited from ablate::io::Serializable
enum class  SerializerType { none , collective , serial }
 
- Protected Member Functions inherited from ablate::monitors::Monitor
std::shared_ptr< solver::SolverGetSolver ()
 
- Static Protected Member Functions inherited from ablate::io::Serializable
static PetscErrorCode SaveKeyValue (PetscViewer viewer, const char *name, PetscScalar value)
 
static PetscErrorCode RestoreKeyValue (PetscViewer viewer, const char *name, PetscScalar &value)
 
template<class T >
static PetscErrorCode SaveKeyValue (PetscViewer viewer, const char *name, T value)
 
template<class T >
static PetscErrorCode RestoreKeyValue (PetscViewer viewer, const char *name, T &value)
 
template<class T >
static SerializerType DetermineSerializerType (const T &types)
 

Detailed Description

use to call the boundary solver to output any specific output variables

Constructor & Destructor Documentation

◆ ~RadiationFlux()

ablate::monitors::RadiationFlux::~RadiationFlux ( )
override

Clean up the petsc objects

Member Function Documentation

◆ GetContext()

void* ablate::monitors::RadiationFlux::GetContext ( )
inlineoverridevirtual

return context to be returned to the PetscMonitorFunction. By default this is a pointer to this instance

Reimplemented from ablate::monitors::Monitor.

◆ GetId()

const std::string& ablate::monitors::RadiationFlux::GetId ( ) const
inlineoverridevirtual

only required function, returns the id of the object. Should be unique for the simulation

Returns

Implements ablate::io::Serializable.

◆ GetPetscFunction()

PetscMonitorFunction ablate::monitors::RadiationFlux::GetPetscFunction ( )
inlineoverridevirtual

This is not needed because this is only called upon serialize.

Returns

Reimplemented from ablate::monitors::Monitor.

◆ Register()

void ablate::monitors::RadiationFlux::Register ( std::shared_ptr< solver::Solver solverIn)
overridevirtual

Register this solverIn with the boundary solverIn

Parameters
solverInwhich contains the region being monitored.

Add each of the output components on each face in the fluxDm the number of components should be equal to the number of ray tracers plus any ratio outputs?

Create an output field for each of the

Initialize the ray tracers in the list that was provided to the monitor. The ray tracing solvers will independently solve for the different radiation properties models that were assigned to them so that the different radiation properties results can be compared to one another.

Get the face range of the boundary cells to initialize the rays with this range. Add all of the faces to this range that belong to the boundary solverIn. The purpose of using a dynamic range is to avoid including the boundary cells within the stored range of faces that belongs to the radiation solvers in the monitor.

< Isolates the valid cells

Reimplemented from ablate::monitors::Monitor.

◆ Restore()

PetscErrorCode ablate::monitors::RadiationFlux::Restore ( PetscViewer  viewer,
PetscInt  sequenceNumber,
PetscReal  time 
)
inlineoverridevirtual

Restore the state from the PetscViewer

Parameters
viewer
sequenceNumber
time

Implements ablate::io::Serializable.

◆ Save()

PetscErrorCode ablate::monitors::RadiationFlux::Save ( PetscViewer  viewer,
PetscInt  sequenceNumber,
PetscReal  time 
)
overridevirtual

Compute and store the current boundary output values

Parameters
viewer
sequenceNumber
time

Get read access to the local solution information

The TCP monitor must store one output for each of the radiation models that are in the vector of ray tracing solvers. The ratio of red to green intensities must be computed and output as well. It is not clear whether the red to green intensity ratio output should be implicitly defined in the input definition or whether there should be an explicit definition of which absorption model represents the red and green intensities respectively. THe definition of a helper class which represents two radiation solvers each carrying a red and green ray tracing solver would likely be beneficial for the definition of the models. First solve the radiation through each of the ray tracing solvers

After the radiation solution is computed, then the intensity of the individual radiation solutions can be output for each face.

Write the intensity into the fluxDm for outputting. Now that the intensity has been read out of the ray tracing solver, it will need to be written to the field which stores the radiation information in the monitor. This is where the computed information should be written to the dm that was created for the radiation flux monitor.

The size of the pointer is equal to the number of fields that are in the DM.

Get the intensity calculated out of the ray tracer. Write it to the appropriate location in the face DM.

Implements ablate::io::Serializable.

◆ Serialize()

SerializerType ablate::monitors::RadiationFlux::Serialize ( ) const
inlineoverridevirtual

boolean used to determined if this object should be serialized at runtime

Returns

Reimplemented from ablate::io::Serializable.


The documentation for this class was generated from the following files: