Alsvinn  0.5.3
The fast FVM simulator with UQ support
Public Member Functions | List of all members
alsfvm::equation::CellComputer Class Referenceabstract

The CellComputer class defines some useful per cell computations. More...

#include <alsfvm/equation/CellComputer.hpp>

Inheritance diagram for alsfvm::equation::CellComputer:
alsfvm::equation::CPUCellComputer< Equation > alsfvm::equation::CUDACellComputer< Equation >

Public Member Functions

virtual ~CellComputer ()
 Default destructor to allow inheriting classes to have destructors. More...
 
virtual void computeExtraVariables (const volume::Volume &conservedVariables, volume::Volume &extraVariables)=0
 computeExtraVariables computes the extra variables (eg. pressure for euler) More...
 
virtual real computeMaxWaveSpeed (const volume::Volume &conservedVariables, size_t direction)=0
 
virtual bool obeysConstraints (const volume::Volume &conservedVariables)=0
 
virtual void computeFromPrimitive (const volume::Volume &primtiveVariables, volume::Volume &conservedVariables)=0
 computeFromPrimitive computes the conserved and extra variables based on the primtive variables More...
 

Detailed Description

The CellComputer class defines some useful per cell computations.

Constructor & Destructor Documentation

◆ ~CellComputer()

alsfvm::equation::CellComputer::~CellComputer ( )
virtual

Default destructor to allow inheriting classes to have destructors.

Member Function Documentation

◆ computeExtraVariables()

virtual void alsfvm::equation::CellComputer::computeExtraVariables ( const volume::Volume conservedVariables,
volume::Volume extraVariables 
)
pure virtual

computeExtraVariables computes the extra variables (eg. pressure for euler)

Parameters
[in]conservedVariablesthe conserved variables to read from
[out]extraVariablesthe extra variables to write to

Implemented in alsfvm::equation::CPUCellComputer< Equation >, and alsfvm::equation::CUDACellComputer< Equation >.

◆ computeFromPrimitive()

virtual void alsfvm::equation::CellComputer::computeFromPrimitive ( const volume::Volume primtiveVariables,
volume::Volume conservedVariables 
)
pure virtual

computeFromPrimitive computes the conserved and extra variables based on the primtive variables

Parameters
[in]primtiveVariablesthe primitive variables to use
[out]conservedVariablesthe conserved variables.

Implemented in alsfvm::equation::CPUCellComputer< Equation >, and alsfvm::equation::CUDACellComputer< Equation >.

◆ computeMaxWaveSpeed()

virtual real alsfvm::equation::CellComputer::computeMaxWaveSpeed ( const volume::Volume conservedVariables,
size_t  direction 
)
pure virtual

Computes the maximum wavespeed

Parameters
conservedVariablesthe conserved variables (density, momentum, Energy for Euler)
extraVariablesthe extra variables (pressure and velocity for Euler)
directionthe direction to find the wave speed for
direction description
0 x-direction
1 y-direction
2 z-direction
Returns
the maximum wave speed (absolute value)

Implemented in alsfvm::equation::CPUCellComputer< Equation >, and alsfvm::equation::CUDACellComputer< Equation >.

◆ obeysConstraints()

virtual bool alsfvm::equation::CellComputer::obeysConstraints ( const volume::Volume conservedVariables)
pure virtual

Checks if all the constraints for the equation are met

Parameters
conservedVariablesthe conserved variables (density, momentum, Energy for Euler)
extraVariablesthe extra variables (pressure and velocity for Euler)
Returns
true if it obeys the constraints, false otherwise

Implemented in alsfvm::equation::CPUCellComputer< Equation >, and alsfvm::equation::CUDACellComputer< Equation >.


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