Alsvinn  0.5.3
The fast FVM simulator with UQ support
Public Member Functions | List of all members
alsfvm::equation::CPUCellComputer< Equation > Class Template Reference

#include <alsfvm/equation/CPUCellComputer.hpp>

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

Public Member Functions

 CPUCellComputer (simulator::SimulatorParameters &parameters)
 
virtual void computeExtraVariables (const volume::Volume &conservedVariables, volume::Volume &extraVariables) override
 computeExtraVariables computes the extra variables (eg. pressure for euler) More...
 
virtual real computeMaxWaveSpeed (const volume::Volume &conservedVariables, size_t direction) override
 
virtual bool obeysConstraints (const volume::Volume &conservedVariables) override
 
virtual void computeFromPrimitive (const volume::Volume &primtiveVariables, volume::Volume &conservedVariables) override
 computeFromPrimitive computes the conserved and extra variables based on the primtive variables More...
 
- Public Member Functions inherited from alsfvm::equation::CellComputer
virtual ~CellComputer ()
 Default destructor to allow inheriting classes to have destructors. More...
 

Constructor & Destructor Documentation

◆ CPUCellComputer()

template<class Equation >
alsfvm::equation::CPUCellComputer< Equation >::CPUCellComputer ( simulator::SimulatorParameters parameters)

Member Function Documentation

◆ computeExtraVariables()

template<class Equation >
void alsfvm::equation::CPUCellComputer< Equation >::computeExtraVariables ( const volume::Volume conservedVariables,
volume::Volume extraVariables 
)
overridevirtual

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

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

Implements alsfvm::equation::CellComputer.

◆ computeFromPrimitive()

template<class Equation >
void alsfvm::equation::CPUCellComputer< Equation >::computeFromPrimitive ( const volume::Volume primtiveVariables,
volume::Volume conservedVariables 
)
overridevirtual

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

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

Implements alsfvm::equation::CellComputer.

◆ computeMaxWaveSpeed()

template<class Equation >
real alsfvm::equation::CPUCellComputer< Equation >::computeMaxWaveSpeed ( const volume::Volume conservedVariables,
size_t  direction 
)
overridevirtual

Computes the maximum wavespeed

Parameters
conservedVariablesthe conserved variables (density, momentum, Energy 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)

Implements alsfvm::equation::CellComputer.

◆ obeysConstraints()

template<class Equation >
bool alsfvm::equation::CPUCellComputer< Equation >::obeysConstraints ( const volume::Volume conservedVariables)
overridevirtual

Checks if all the constraints for the equation are met

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

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
Todo:
Tidy up the way we check for nan and inf

Implements alsfvm::equation::CellComputer.


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