NeoPZ
Public Member Functions | Static Public Member Functions | List of all members
TPZEulerConsLaw Class Reference

This material implements the weak statement of the compressible euler equations. More...

#include <pzeulerconslaw.h>

Inheritance diagram for TPZEulerConsLaw:
[legend]
Collaboration diagram for TPZEulerConsLaw:
[legend]

Public Member Functions

 TPZEulerConsLaw (int nummat, REAL timeStep, REAL gamma, int dim, TPZArtDiffType artdiff)
 
 ~TPZEulerConsLaw ()
 
 TPZEulerConsLaw ()
 
 TPZEulerConsLaw (const TPZEulerConsLaw &cp)
 
virtual TPZMaterialNewMaterial () override
 To create another material of the same type. More...
 
void SetTimeDiscr (TPZTimeDiscr Diff, TPZTimeDiscr ConvVol, TPZTimeDiscr ConvFace)
 Configures the time discretization of some contributions. More...
 
TPZArtDiffArtDiff ()
 Returns a reference to the artificial diffusion term. More...
 
REAL OptimalCFL (int degree)
 returns the best value for the CFL number based on the interpolation degree. More...
 
virtual REAL SetTimeStep (REAL maxveloc, REAL deltax, int degree) override
 See declaration in base class. More...
 
virtual int NStateVariables () const override
 Object-based overload. More...
 
REAL DeltaX (REAL detJac)
 Estimates the deltax (element diameter) based on the inverse of the jacobian. More...
 
REAL Det (TPZFMatrix< REAL > &Mat)
 Computes the determinant of a 2d or 3d matrix.
Used by recompute the element size. More...
 
virtual STATE Pressure (TPZVec< STATE > &U) override
 Thermodynamic pressure determined by the law of an ideal gas. More...
 
virtual void Print (std::ostream &out) override
 Prints the state of internal variables. More...
 
virtual std::string Name () override
 Returns the material name. More...
 
virtual int VariableIndex (const std::string &name) override
 Returns the relative index of a variable according to its name. More...
 
virtual int NSolutionVariables (int var) override
 Returns the number of variables associated with the variable indexed by var. More...
 
virtual int NFluxes () override
 Returns the number of fluxes associated to this material. More...
 
virtual void Write (TPZStream &buf, int withclassid) const override
 Saves the element data to a stream. More...
 
void Read (TPZStream &buf, void *context) override
 Reads the element data from a stream. More...
 
virtual int ClassId () const override
 Class identificator. More...
 
Contributions methods
virtual void Contribute (TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef) override
 Contributes to the residual vector and tangent matrix the volume-based quantities. More...
 
virtual void Contribute (TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ef) override
 Contributes to the residual vector and tangent matrix the volume-based quantities. More...
 
virtual void ContributeInterface (TPZMaterialData &data, TPZMaterialData &dataleft, TPZMaterialData &dataright, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef) override
 Contributes to the residual vector and tangent matrix the face-based quantities. More...
 
virtual void ContributeInterface (TPZMaterialData &data, TPZMaterialData &dataleft, TPZMaterialData &dataright, REAL weight, TPZFMatrix< STATE > &ef) override
 Contributes to the residual vector and tangent matrix the face-based quantities. More...
 
virtual void ContributeBC (TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef, TPZBndCond &bc) override
 Contributes to the residual vector the boundary conditions. More...
 
virtual void ContributeBC (TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ef, TPZBndCond &bc) override
 Contributes to the residual vector the boundary conditions. More...
 
virtual void ContributeBCInterface (TPZMaterialData &data, TPZMaterialData &dataleft, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef, TPZBndCond &bc) override
 It computes a contribution to stiffness matrix and load vector at one BC integration point. More...
 
virtual void ContributeBCInterface (TPZMaterialData &data, TPZMaterialData &dataleft, REAL weight, TPZFMatrix< STATE > &ef, TPZBndCond &bc) override
 It computes a contribution to residual vector at one BC integration point. More...
 
Internal contributions
void ContributeFastestBCInterface (int dim, TPZVec< REAL > &x, TPZVec< STATE > &solL, TPZFMatrix< STATE > &dsolL, REAL weight, TPZVec< REAL > &normal, TPZFMatrix< REAL > &phiL, TPZFMatrix< REAL > &dphiL, TPZFMatrix< REAL > &axesleft, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef, TPZBndCond &bc)
 
template<int dim>
void ContributeFastestBCInterface_dim (TPZVec< REAL > &x, TPZVec< STATE > &solL, TPZFMatrix< STATE > &dsolL, REAL weight, TPZVec< REAL > &normal, TPZFMatrix< REAL > &phiL, TPZFMatrix< REAL > &dphiL, TPZFMatrix< REAL > &axesleft, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef, TPZBndCond &bc)
 
virtual void ContributeLast (TPZVec< REAL > &x, TPZFMatrix< REAL > &jacinv, TPZVec< STATE > &sol, TPZFMatrix< STATE > &dsol, REAL weight, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi, TPZFMatrix< STATE > &ef)
 
virtual void ContributeAdv (TPZVec< REAL > &x, TPZFMatrix< REAL > &jacinv, TPZVec< STATE > &sol, TPZFMatrix< STATE > &dsol, REAL weight, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef)
 
virtual void ContributeAdv (TPZVec< REAL > &x, TPZFMatrix< REAL > &jacinv, TPZVec< STATE > &sol, TPZFMatrix< STATE > &dsol, REAL weight, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi, TPZFMatrix< STATE > &ef)
 
void ContributeApproxImplDiff (TPZVec< REAL > &x, TPZFMatrix< REAL > &jacinv, TPZVec< STATE > &sol, TPZFMatrix< STATE > &dsol, REAL weight, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef)
 
void ContributeExplDiff (TPZVec< REAL > &x, TPZFMatrix< REAL > &jacinv, TPZVec< STATE > &sol, TPZFMatrix< STATE > &dsol, REAL weight, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi, TPZFMatrix< STATE > &ef)
 
void ContributeExplConvFace (TPZVec< REAL > &x, TPZVec< STATE > &solL, TPZVec< STATE > &solR, REAL weight, TPZVec< REAL > &normal, TPZFMatrix< REAL > &phiL, TPZFMatrix< REAL > &phiR, TPZFMatrix< STATE > &ef, int entropyFix=1)
 
void ContributeApproxImplConvFace (TPZVec< REAL > &x, REAL faceSize, TPZVec< STATE > &solL, TPZVec< STATE > &solR, REAL weight, TPZVec< REAL > &normal, TPZFMatrix< REAL > &phiL, TPZFMatrix< REAL > &phiR, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef, int entropyFix=1)
 
void ContributeImplConvVol (TPZVec< REAL > &x, TPZVec< STATE > &sol, TPZFMatrix< STATE > &dsol, REAL weight, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef)
 
void ContributeExplConvVol (TPZVec< REAL > &x, TPZVec< STATE > &sol, REAL weight, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi, TPZFMatrix< STATE > &ef)
 
void ContributeExplT1 (TPZVec< REAL > &x, TPZVec< STATE > &sol, TPZFMatrix< STATE > &dsol, REAL weight, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi, TPZFMatrix< STATE > &ef)
 
void ContributeImplT1 (TPZVec< REAL > &x, TPZVec< STATE > &sol, TPZFMatrix< STATE > &dsol, REAL weight, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef)
 
void ContributeExplT2 (TPZVec< REAL > &x, TPZVec< STATE > &sol, REAL weight, TPZFMatrix< REAL > &phi, TPZFMatrix< STATE > &ef)
 
- Public Member Functions inherited from TPZConservationLaw
 TPZConservationLaw (int nummat, REAL timeStep, int dim)
 Simple constructor with material id, time step (dt) and dimension of the spatial domain. More...
 
 TPZConservationLaw (const TPZConservationLaw &cp)
 Copy constructor. More...
 
virtual ~TPZConservationLaw ()
 Default destructor. More...
 
int Dimension () const override
 Returns the dimension of the problem. More...
 
REAL TimeStep ()
 Returns the value of the time step. More...
 
void SetTimeStep (REAL timeStep)
 Sets the time step used for time integration. More...
 
REAL CFL ()
 Returns the CFL number. More...
 
void SetCFL (REAL CFL)
 Sets the CFL number. More...
 
REAL Gamma ()
 Returns the value of Gamma (constant of gas) More...
 
void SetGamma (int gamma)
 Sets the value of Gamma (constant of gas) More...
 
void SetContributionTime (TPZContributeTime time)
 Sets whether the contribution is advanced or referring to the last state. More...
 
void SetResidualType (TPZResidualType type)
 Residual_RT for calculations and Flux_RT for convergence check. More...
 
- Public Member Functions inherited from TPZDiscontinuousGalerkin
 TPZDiscontinuousGalerkin ()
 Simple constructor. More...
 
 TPZDiscontinuousGalerkin (int nummat)
 Constructor with the index of the material object within the vector. More...
 
 TPZDiscontinuousGalerkin (const TPZDiscontinuousGalerkin &copy)
 Copy constructor. More...
 
virtual ~TPZDiscontinuousGalerkin ()
 Destructor. More...
 
virtual void FillDataRequirementsInterface (TPZMaterialData &data) override
 Fill material data parameter with necessary requirements for the ContributeInterface method. More...
 
virtual int GetIntegrationOrder (TPZVec< int > &porder_left, TPZVec< int > &porder_right) const
 return the integration order as a function of interpolation orders of the left and right elements More...
 
virtual int IsInterfaceConservative ()
 Dicontinuous galerkin materials implement contribution of discontinuous elements and interfaces. More...
 
virtual void InterfaceJump (TPZVec< REAL > &x, TPZSolVec &leftu, TPZSolVec &rightu, TPZSolVec &jump)
 Computes interface jump = leftu - rightu. More...
 
virtual void BCInterfaceJump (TPZVec< REAL > &x, TPZSolVec &leftu, TPZBndCond &bc, TPZSolVec &jump)
 Computes interface jump from element to Dirichlet boundary condition. It has to reimplemented. More...
 
virtual void ContributeInterfaceErrors (TPZMaterialData &data, TPZMaterialData &dataleft, TPZMaterialData &dataright, REAL weight, TPZVec< STATE > &nkL, TPZVec< STATE > &nkR, int &errorid)
 
virtual void ContributeInterfaceBCErrors (TPZMaterialData &data, TPZMaterialData &dataleft, REAL weight, TPZVec< STATE > &nk, TPZBndCond &bc, int &errorid)
 
virtual void Errors (TPZVec< REAL > &x, TPZVec< STATE > &u, TPZFMatrix< STATE > &dudx, TPZFMatrix< REAL > &axes, TPZVec< STATE > &flux, TPZVec< STATE > &u_exact, TPZFMatrix< STATE > &du_exact, TPZVec< REAL > &values) override
 Computes the error due to the difference between the interpolated flux
and the flux computed based on the derivative of the solution. More...
 
virtual void Errors (TPZMaterialData &data, TPZVec< STATE > &u_exact, TPZFMatrix< STATE > &du_exact, TPZVec< REAL > &errors) override
 
virtual void Errors (TPZVec< TPZMaterialData > &data, TPZVec< STATE > &u_exact, TPZFMatrix< STATE > &du_exact, TPZVec< REAL > &errors) override
 
virtual void Contribute (TPZVec< TPZMaterialData > &datavec, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef) override
 It computes a contribution to the stiffness matrix and load vector at one integration point to multiphysics simulation. More...
 
virtual void Contribute (TPZVec< TPZMaterialData > &datavec, REAL weight, TPZFMatrix< STATE > &ef) override
 It computes a contribution to the stiffness matrix and load vector at one integration point to multiphysics simulation. More...
 
virtual void ContributeBC (TPZVec< TPZMaterialData > &datavec, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef, TPZBndCond &bc) override
 It computes a contribution to the stiffness matrix and load vector at one BC integration point to multiphysics simulation. More...
 
virtual void ContributeBC (TPZVec< TPZMaterialData > &datavec, REAL weight, TPZFMatrix< STATE > &ef, TPZBndCond &bc) override
 It computes a contribution to the stiffness matrix and load vector at one BC integration point to multiphysics simulation. More...
 
virtual void ContributeInterface (TPZVec< TPZMaterialData > &datavec, TPZVec< TPZMaterialData > &dataleftvec, TPZVec< TPZMaterialData > &datarightvec, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef)
 
virtual void ContributeInterface (TPZMaterialData &data, TPZVec< TPZMaterialData > &dataleft, TPZVec< TPZMaterialData > &dataright, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef)
 Computes a contribution to the stiffness matrix and load vector at one integration point to multiphysics simulation. More...
 
virtual void ContributeInterface (TPZMaterialData &data, TPZVec< TPZMaterialData > &dataleft, TPZVec< TPZMaterialData > &dataright, REAL weight, TPZFMatrix< STATE > &ef)
 Computes a contribution to residual vector at one integration point. More...
 
virtual void ContributeBCInterface (TPZMaterialData &data, TPZVec< TPZMaterialData > &dataleft, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef, TPZBndCond &bc)
 It computes a contribution to stiffness matrix and load vector at one BC integration point to multiphysics simulation. More...
 
void SolutionDisc (TPZMaterialData &data, TPZMaterialData &dataleft, TPZMaterialData &dataright, int var, TPZVec< STATE > &Solout)
 Returns the solution associated with the var index based on the finite element approximation. More...
 
- Public Member Functions inherited from TPZMaterial
 TPZMaterial (int id)
 Creates a material object and inserts it in the vector of material pointers of the mesh. More...
 
 TPZMaterial ()
 Default constructor. More...
 
 TPZMaterial (const TPZMaterial &mat)
 Creates a material object based on the referred object and inserts it in the vector of material pointers of the mesh. More...
 
TPZMaterialoperator= (const TPZMaterial &copy)
 operator = More...
 
virtual ~TPZMaterial ()
 Default destructor. More...
 
virtual void FillDataRequirements (TPZMaterialData &data)
 Fill material data parameter with necessary requirements for the. More...
 
virtual void FillDataRequirements (TPZVec< TPZMaterialData > &datavec)
 Fill material data parameter with necessary requirements for the Contribute method. Here, in base class, all requirements are considered as necessary. Each derived class may optimize performance by selecting only the necessary data. More...
 
virtual void FillBoundaryConditionDataRequirement (int type, TPZMaterialData &data)
 This method defines which parameters need to be initialized in order to compute the contribution of the boundary condition. More...
 
virtual void FillBoundaryConditionDataRequirement (int type, TPZVec< TPZMaterialData > &datavec)
 This method defines which parameters need to be initialized in order to compute the contribution of the boundary condition. More...
 
virtual void FillDataRequirementsInterface (TPZMaterialData &data, TPZVec< TPZMaterialData > &datavec_left, TPZVec< TPZMaterialData > &datavec_right)
 This method defines which parameters need to be initialized in order to compute the contribution of interface elements. More...
 
int Id () const
 
void SetId (int id)
 
int NumLoadCases ()
 returns the number of load cases for this material object More...
 
virtual int MinimumNumberofLoadCases ()
 returns the minimum number of load cases for this material More...
 
void SetNumLoadCases (int numloadcases)
 changes the number of load cases for this material More...
 
void SetPostProcessIndex (int index)
 indicates which variable should be post processed More...
 
virtual TPZBndCondCreateBC (TPZMaterial *reference, int id, int typ, TPZFMatrix< STATE > &val1, TPZFMatrix< STATE > &val2)
 Creates an object TPZBndCond derived of TPZMaterial. More...
 
void SetForcingFunction (TPZAutoPointer< TPZFunction< STATE > > fp)
 Sets a procedure as source function for the material. More...
 
void SetForcingFunction (void(*fp)(const TPZVec< REAL > &loc, TPZVec< STATE > &result), int porder)
 
void SetForcingFunction (void(*fp)(const TPZVec< REAL > &loc, TPZVec< STATE > &result, TPZFMatrix< STATE > &gradu), int porder)
 
TPZAutoPointer< TPZFunction< STATE > > & ForcingFunction ()
 Returns a procedure as source function for the material. More...
 
void SetForcingFunctionExact (TPZAutoPointer< TPZFunction< STATE > > fp)
 Sets a procedure as exact solution for the problem. More...
 
TPZAutoPointer< TPZFunction< STATE > > & ForcingFunctionExact ()
 Returns a procedure as exact solution for the problem. More...
 
void SetTimeDependentForcingFunction (TPZAutoPointer< TPZFunction< STATE > > fp)
 Sets a procedure as time dependent source function for the material. More...
 
TPZAutoPointer< TPZFunction< STATE > > & TimeDependentForcingFunction ()
 Returns a procedure as time dependent source function for the material. More...
 
void SetTimeDependentFunctionExact (TPZAutoPointer< TPZFunction< STATE > > fp)
 Sets a procedure as time dependent exact solution for the problem. More...
 
TPZAutoPointer< TPZFunction< STATE > > & TimedependentFunctionExact ()
 Returns a procedure as time dependent exact solution for the problem. More...
 
void SetBCForcingFunction (TPZAutoPointer< TPZFunction< STATE > > fp)
 Sets a procedure as variable boundary condition. More...
 
TPZAutoPointer< TPZFunction< STATE > > & BCForcingFunction ()
 Returns a procedure as variable boundary condition. More...
 
void SetTimedependentBCForcingFunction (TPZAutoPointer< TPZFunction< STATE > > fp)
 Sets a procedure as time variable boundary condition. More...
 
TPZAutoPointer< TPZFunction< STATE > > & TimedependentBCForcingFunction ()
 Returns a procedure as time variable boundary condition. More...
 
virtual int HasForcingFunction ()
 Directive that gives true if the material has a forcing function. More...
 
virtual int HasForcingFunctionExact ()
 Directive that gives true if the material has a function exact. More...
 
virtual int HasBCForcingFunction ()
 Directive that gives true if the material has a bc forcing function exact. More...
 
virtual int HasTimedependentFunctionExact ()
 Directive that gives true if the material has a time dependent function exact. More...
 
virtual int HasTimedependentForcingFunction ()
 Directive that gives true if the material has a time dependent forcing function. More...
 
virtual int HasTimedependentBCForcingFunction ()
 Directive that gives true if the material has a time dependent bc forcing function. More...
 
virtual int IntegrationRuleOrder (int elPMaxOrder) const
 Gets the order of the integration rule necessary to integrate an element with polinomial order p. More...
 
virtual int IntegrationRuleOrder (TPZVec< int > &elPMaxOrder) const
 Gets the order of the integration rule necessary to integrate an element multiphysic. More...
 
virtual void ErrorsHdiv (TPZMaterialData &data, TPZVec< STATE > &u_exact, TPZFMatrix< STATE > &du_exact, TPZVec< REAL > &values)
 
virtual int NEvalErrors ()
 Returns the number of norm errors. Default is 3: energy, L2 and H1. More...
 
virtual void SetData (std::istream &data)
 Reads data of the material from a istream (file data) More...
 
virtual void Clone (std::map< int, TPZMaterial * > &matvec)
 Creates a copy of the material object and put it in the vector which is passed on. More...
 
virtual int FluxType ()
 To return a numerical flux type to apply over the interfaces of the elements. More...
 
virtual void ContributeErrors (TPZMaterialData &data, REAL weight, TPZVec< REAL > &nk, int &errorid)
 
virtual REAL ComputeSquareResidual (TPZVec< REAL > &X, TPZVec< STATE > &sol, TPZFMatrix< STATE > &dsol)
 Computes square of residual of the differential equation at one integration point. More...
 
virtual int PushMemItem (int sourceIndex=-1)
 Pushes a new entry in the context of materials with memory, returning its index at the internal storage stack. More...
 
virtual void FreeMemItem (int index)
 Frees an entry in the material with memory internal history storage. More...
 
void SetLinearContext (bool IsLinear)
 Sets fLinearContext attribute. More...
 
bool GetLinearContext () const
 Returns fLinearContext attribute. More...
 
int ClassId () const override
 Unique identifier for serialization purposes. More...
 
void Write (TPZStream &buf, int withclassid) const override
 Saves the element data to a stream. More...
 
void Read (TPZStream &buf, void *context) override
 Reads the element data from a stream. More...
 
virtual void Solution (TPZVec< TPZMaterialData > &datavec, int var, TPZVec< STATE > &Solout)
 Returns the solution associated with the var index based on the finite element approximation. More...
 
virtual void Solution (TPZMaterialData &data, TPZVec< TPZMaterialData > &dataleftvec, TPZVec< TPZMaterialData > &datarightvec, int var, TPZVec< STATE > &Solout)
 Returns the solution associated with the var index based on the finite element approximation around one interface element. More...
 
virtual void Solution (TPZMaterialData &data, TPZVec< TPZMaterialData > &dataleftvec, TPZVec< TPZMaterialData > &datarightvec, int var, TPZVec< STATE > &Solout, TPZCompEl *left, TPZCompEl *ritgh)
 Returns the solution associated with the var index based on the finite element approximation around one interface element. More...
 
virtual void Flux (TPZVec< REAL > &x, TPZVec< STATE > &Sol, TPZFMatrix< STATE > &DSol, TPZFMatrix< REAL > &axes, TPZVec< STATE > &flux)
 Computes the value of the flux function to be used by ZZ error estimator. More...
 
- Public Member Functions inherited from TPZSavable
 TPZSavable ()
 
virtual ~TPZSavable ()
 
virtual std::list< std::map< std::string, uint64_t > > VersionHistory () const
 
virtual std::pair< std::string, uint64_t > Version () const
 
virtual bool Compare (TPZSavable *copy, bool override=false)
 Compares the object for identity with the object pointed to, eventually copy the object. More...
 
virtual bool Compare (TPZSavable *copy, bool override=false) const
 Compares the object for identity with the object pointed to, eventually copy the object. More...
 
- Public Member Functions inherited from TPZRegisterClassId
template<typename T >
 TPZRegisterClassId (int(T::*)() const)
 
 TPZRegisterClassId ()=default
 

Static Public Member Functions

static int NStateVariables (int dim)
 See declaration in base class. More...
 
template<class T >
static void Pressure (REAL gamma, int dim, T &press, TPZVec< T > &U)
 Thermodynamic pressure determined by the law of an ideal gas. More...
 
template<class T >
static void cSpeed (TPZVec< T > &sol, REAL gamma, T &c)
 Evaluates the speed of sound in the fluid. More...
 
template<class T >
static void uRes (TPZVec< T > &sol, T &us)
 
- Static Public Member Functions inherited from TPZSavable
static std::set< TPZRestoreClassBase * > & RestoreClassSet ()
 This static function guarantees that the gMap object is available when needed. More...
 
static std::map< int, TPZRestore_t > & ClassIdMap ()
 This static function guarantees that the gMap object is available when needed. More...
 
static std::pair< std::string, uint64_t > NeoPZVersion ()
 
static void Register (TPZRestoreClassBase *restore)
 
static void RegisterClassId (int classid, TPZRestore_t fun)
 
static TPZSavableCreateInstance (const int &classId)
 

Protected Attributes

Attributes
TPZArtDiff fArtDiff
 diffusive term More...
 
TPZTimeDiscr fDiff
 variables indication whether the following terms are implicit More...
 
TPZTimeDiscr fConvVol
 
TPZTimeDiscr fConvFace
 
- Protected Attributes inherited from TPZConservationLaw
int fDim
 Dimension of the problem. More...
 
REAL fTimeStep
 Time step used for time integration. More...
 
REAL fCFL
 CFL number. More...
 
REAL fGamma
 Ratio between specific heat is constant and the specific heat the constant volume of a polytropic gas. More...
 
TPZContributeTime fContributionTime
 Variable indicating the context of the solution. More...
 
TPZResidualType fResidualType
 Variable to indicate the type of residual to be computed by Assemble. More...
 
- Protected Attributes inherited from TPZMaterial
TPZAutoPointer< TPZFunction< STATE > > fForcingFunction
 Pointer to forcing function, it is the right member at differential equation. More...
 
TPZAutoPointer< TPZFunction< STATE > > fForcingFunctionExact
 Pointer to exact solution function, needed to calculate exact error. More...
 
TPZAutoPointer< TPZFunction< STATE > > fTimeDependentForcingFunction
 Pointer to time dependent forcing function, it is the right member at differential equation. More...
 
TPZAutoPointer< TPZFunction< STATE > > fTimedependentFunctionExact
 Pointer to time dependent exact solution function, needed to calculate exact error. More...
 
TPZAutoPointer< TPZFunction< STATE > > fBCForcingFunction
 Pointer to bc forcing function, it is a variable boundary condition at differential equation. More...
 
TPZAutoPointer< TPZFunction< STATE > > fTimedependentBCForcingFunction
 Pointer to time dependent bc forcing function, it is a variable boundary condition at differential equation. More...
 
bool fLinearContext
 Defines whether the equation context is linear solver or non linear. More...
 
int fNumLoadCases
 Defines the number of load cases generated by this material. More...
 
int fPostProcIndex
 indicates which solution should be used for post processing More...
 

Solutions methods

template<class T >
void ComputeGhostState (TPZVec< T > &solL, TPZVec< T > &solR, TPZVec< REAL > &normal, TPZBndCond &bc, int &entropyFix)
 Computes the ghost state variables bsed on the BC type. More...
 
virtual void Solution (TPZMaterialData &data, int var, TPZVec< STATE > &Solout) override
 returns the solution associated with the var index based on the finite element approximation More...
 
virtual void Solution (TPZVec< STATE > &Sol, TPZFMatrix< STATE > &DSol, TPZFMatrix< REAL > &axes, int var, TPZVec< STATE > &Solout) override
 

Fluxes methods

template<class T >
void Flux (TPZVec< T > &U, TPZVec< T > &Fx, TPZVec< T > &Fy, TPZVec< T > &Fz)
 tensor of the three-dimensional flux of Euler More...
 
template<class T >
void Test_Flux (TPZVec< T > &solL, TPZVec< T > &solR, TPZVec< REAL > &normal, REAL gamma, TPZVec< T > &flux)
 Test flux -> returns the averaged state variables across an interface. More...
 
void SetDelta (REAL delta)
 Sets the delta parameter inside the artifficial diffusion term. More...
 
template<class T >
static void JacobFlux (REAL gamma, int dim, TPZVec< T > &U, TPZVec< TPZDiffMatrix< T > > &Ai)
 Jacobian of the tensor flux of Euler. More...
 
template<class T >
static void Roe_Flux (TPZVec< T > &solL, TPZVec< T > &solR, TPZVec< REAL > &normal, REAL gamma, TPZVec< T > &flux, int entropyFix=1)
 This flux encapsulates the two and three dimensional fluxes acquired from the Mouse program. More...
 
template<class T >
static void ApproxRoe_Flux (TPZVec< T > &solL, TPZVec< T > &solR, TPZVec< REAL > &normal, REAL gamma, TPZVec< T > &flux, int entropyFix=1)
 This flux encapsulates the two and three dimensional fluxes acquired from the Mouse program. More...
 
template<class T >
static void Roe_Flux (const T &rho_f, const T &rhou_f, const T &rhov_f, const T &rhow_f, const T &rhoE_f, const T &rho_t, const T &rhou_t, const T &rhov_t, const T &rhow_t, const T &rhoE_t, const REAL nx, const REAL ny, const REAL nz, const REAL gam, T &flux_rho, T &flux_rhou, T &flux_rhov, T &flux_rhow, T &flux_rhoE, int entropyFix=1)
 Flux of Roe (MOUSE program) More...
 
template<class T >
static void Roe_Flux (const T &rho_f, const T &rhou_f, const T &rhov_f, const T &rhoE_f, const T &rho_t, const T &rhou_t, const T &rhov_t, const T &rhoE_t, const REAL nx, const REAL ny, const REAL gam, T &flux_rho, T &flux_rhou, T &flux_rhov, T &flux_rhoE, int entropyFix=1)
 
template<class T >
static void ApproxRoe_Flux (const T &rho_f, const T &rhou_f, const T &rhov_f, const T &rhow_f, const T &rhoE_f, const T &rho_t, const T &rhou_t, const T &rhov_t, const T &rhow_t, const T &rhoE_t, const REAL nx, const REAL ny, const REAL nz, const REAL gam, T &flux_rho, T &flux_rhou, T &flux_rhov, T &flux_rhow, T &flux_rhoE, int entropyFix=1)
 Flux of Roe (MOUSE program) More...
 
template<class T >
static void ApproxRoe_Flux (const T &rho_f, const T &rhou_f, const T &rhov_f, const T &rhoE_f, const T &rho_t, const T &rhou_t, const T &rhov_t, const T &rhoE_t, const REAL nx, const REAL ny, const REAL gam, T &flux_rho, T &flux_rhou, T &flux_rhov, T &flux_rhoE, int entropyFix=1)
 

Additional Inherited Members

- Static Public Attributes inherited from TPZMaterial
static REAL gBigNumber
 Big number to penalization method, used for Dirichlet conditions. More...
 
- Protected Member Functions inherited from TPZConservationLaw
- Protected Member Functions inherited from TPZMaterial

Detailed Description

This material implements the weak statement of the compressible euler equations.

Definition at line 33 of file pzeulerconslaw.h.

Constructor & Destructor Documentation

◆ TPZEulerConsLaw() [1/3]

TPZEulerConsLaw::TPZEulerConsLaw ( int  nummat,
REAL  timeStep,
REAL  gamma,
int  dim,
TPZArtDiffType  artdiff 
)

Definition at line 37 of file pzeulerconslaw.cpp.

References TPZConservationLaw::fGamma, and gamma().

◆ ~TPZEulerConsLaw()

TPZEulerConsLaw::~TPZEulerConsLaw ( )

Definition at line 33 of file pzeulerconslaw.cpp.

◆ TPZEulerConsLaw() [2/3]

TPZEulerConsLaw::TPZEulerConsLaw ( )

Definition at line 50 of file pzeulerconslaw.cpp.

References TPZConservationLaw::fGamma.

Referenced by NewMaterial().

◆ TPZEulerConsLaw() [3/3]

TPZEulerConsLaw::TPZEulerConsLaw ( const TPZEulerConsLaw cp)
inline

Definition at line 45 of file pzeulerconslaw.h.

Member Function Documentation

◆ ApproxRoe_Flux() [1/3]

template<class T >
void TPZEulerConsLaw::ApproxRoe_Flux ( TPZVec< T > &  solL,
TPZVec< T > &  solR,
TPZVec< REAL > &  normal,
REAL  gamma,
TPZVec< T > &  flux,
int  entropyFix = 1 
)
static

This flux encapsulates the two and three dimensional fluxes acquired from the Mouse program.

Note
This function is called Approx because it evaluates the derivative of the Roe Flux without using automatic differentiation
Parameters
[in]solLVector with solution from left element
[in]solRVector with solution from right element
[in]normalNormal vector of the interface
[in]gammaGamma value to use
[out]fluxVector to return flux values
entropyFixThis flux encapsulates the two and three dimensional fluxes acquired from the Mouse program This function is called Approx because it evaluates the derivative of the Roe Flux without using automatic differentiation
solL[in]
solR[in]
normal[in]
gamma[in]
flux[in]

Definition at line 1984 of file pzeulerconslaw.cpp.

References gamma(), TPZVec< T >::NElements(), PZError, and sqrt.

Referenced by ContributeExplConvFace(), and Solution().

◆ ApproxRoe_Flux() [2/3]

template<class T >
static void TPZEulerConsLaw::ApproxRoe_Flux ( const T &  rho_f,
const T &  rhou_f,
const T &  rhov_f,
const T &  rhow_f,
const T &  rhoE_f,
const T &  rho_t,
const T &  rhou_t,
const T &  rhov_t,
const T &  rhow_t,
const T &  rhoE_t,
const REAL  nx,
const REAL  ny,
const REAL  nz,
const REAL  gam,
T &  flux_rho,
T &  flux_rhou,
T &  flux_rhov,
T &  flux_rhow,
T &  flux_rhoE,
int  entropyFix = 1 
)
static

Flux of Roe (MOUSE program)

◆ ApproxRoe_Flux() [3/3]

template<class T >
static void TPZEulerConsLaw::ApproxRoe_Flux ( const T &  rho_f,
const T &  rhou_f,
const T &  rhov_f,
const T &  rhoE_f,
const T &  rho_t,
const T &  rhou_t,
const T &  rhov_t,
const T &  rhoE_t,
const REAL  nx,
const REAL  ny,
const REAL  gam,
T &  flux_rho,
T &  flux_rhou,
T &  flux_rhov,
T &  flux_rhoE,
int  entropyFix = 1 
)
static

◆ ArtDiff()

TPZArtDiff& TPZEulerConsLaw::ArtDiff ( )
inline

Returns a reference to the artificial diffusion term.

Definition at line 65 of file pzeulerconslaw.h.

References bc, ComputeGhostState(), cSpeed(), degree(), DeltaX(), Det(), fArtDiff, Name(), NFluxes(), NSolutionVariables(), NStateVariables(), OptimalCFL(), Pressure(), Print(), SetTimeStep(), Solution(), uRes(), and VariableIndex().

◆ ClassId()

int TPZEulerConsLaw::ClassId ( ) const
overridevirtual

Class identificator.

Class identificator

Reimplemented from TPZConservationLaw.

Definition at line 2515 of file pzeulerconslaw.cpp.

References TPZConservationLaw::ClassId(), and Hash().

Referenced by ContributeBC().

◆ ComputeGhostState()

template<class T >
void TPZEulerConsLaw::ComputeGhostState ( TPZVec< T > &  solL,
TPZVec< T > &  solR,
TPZVec< REAL > &  normal,
TPZBndCond bc,
int &  entropyFix 
)

Computes the ghost state variables bsed on the BC type.

Definition at line 937 of file pzeulerconslaw.cpp.

References TPZConservationLaw::fGamma, NStateVariables(), pow(), sqrt, TPZBndCond::Type(), and TPZBndCond::Val2().

Referenced by ArtDiff(), and ContributeBCInterface().

◆ Contribute() [1/2]

void TPZEulerConsLaw::Contribute ( TPZMaterialData data,
REAL  weight,
TPZFMatrix< STATE > &  ek,
TPZFMatrix< STATE > &  ef 
)
overridevirtual

◆ Contribute() [2/2]

void TPZEulerConsLaw::Contribute ( TPZMaterialData data,
REAL  weight,
TPZFMatrix< STATE > &  ef 
)
overridevirtual

◆ ContributeAdv() [1/2]

void TPZEulerConsLaw::ContributeAdv ( TPZVec< REAL > &  x,
TPZFMatrix< REAL > &  jacinv,
TPZVec< STATE > &  sol,
TPZFMatrix< STATE > &  dsol,
REAL  weight,
TPZFMatrix< REAL > &  phi,
TPZFMatrix< REAL > &  dphi,
TPZFMatrix< STATE > &  ek,
TPZFMatrix< STATE > &  ef 
)
virtual

◆ ContributeAdv() [2/2]

void TPZEulerConsLaw::ContributeAdv ( TPZVec< REAL > &  x,
TPZFMatrix< REAL > &  jacinv,
TPZVec< STATE > &  sol,
TPZFMatrix< STATE > &  dsol,
REAL  weight,
TPZFMatrix< REAL > &  phi,
TPZFMatrix< REAL > &  dphi,
TPZFMatrix< STATE > &  ef 
)
virtual

◆ ContributeApproxImplConvFace()

void TPZEulerConsLaw::ContributeApproxImplConvFace ( TPZVec< REAL > &  x,
REAL  faceSize,
TPZVec< STATE > &  solL,
TPZVec< STATE > &  solR,
REAL  weight,
TPZVec< REAL > &  normal,
TPZFMatrix< REAL > &  phiL,
TPZFMatrix< REAL > &  phiR,
TPZFMatrix< STATE > &  ek,
TPZFMatrix< STATE > &  ef,
int  entropyFix = 1 
)

◆ ContributeApproxImplDiff()

void TPZEulerConsLaw::ContributeApproxImplDiff ( TPZVec< REAL > &  x,
TPZFMatrix< REAL > &  jacinv,
TPZVec< STATE > &  sol,
TPZFMatrix< STATE > &  dsol,
REAL  weight,
TPZFMatrix< REAL > &  phi,
TPZFMatrix< REAL > &  dphi,
TPZFMatrix< STATE > &  ek,
TPZFMatrix< STATE > &  ef 
)

◆ ContributeBC() [1/2]

void TPZEulerConsLaw::ContributeBC ( TPZMaterialData data,
REAL  weight,
TPZFMatrix< STATE > &  ek,
TPZFMatrix< STATE > &  ef,
TPZBndCond bc 
)
overridevirtual

Contributes to the residual vector the boundary conditions.

Implements TPZConservationLaw.

Definition at line 662 of file pzeulerconslaw.cpp.

References TPZMaterial::gBigNumber, NStateVariables(), TPZMaterialData::phi, TPZMatrix< TVar >::Rows(), TPZBndCond::Type(), TPZBndCond::Val1(), and TPZBndCond::Val2().

Referenced by Solution().

◆ ContributeBC() [2/2]

virtual void TPZEulerConsLaw::ContributeBC ( TPZMaterialData data,
REAL  weight,
TPZFMatrix< STATE > &  ef,
TPZBndCond bc 
)
inlineoverridevirtual

◆ ContributeBCInterface() [1/2]

void TPZEulerConsLaw::ContributeBCInterface ( TPZMaterialData data,
TPZMaterialData dataleft,
REAL  weight,
TPZFMatrix< STATE > &  ek,
TPZFMatrix< STATE > &  ef,
TPZBndCond bc 
)
overridevirtual

It computes a contribution to stiffness matrix and load vector at one BC integration point.

Parameters
data[in]
dataleft[in]
weight[in]
ek[out] is the stiffness matrix
ef[out] is the load vector
bc[in] is the boundary condition object
Since
April 16, 2007

Implements TPZDiscontinuousGalerkin.

Definition at line 702 of file pzeulerconslaw.cpp.

References Advanced_CT, ApproxImplicit_TD, ComputeGhostState(), ContributeApproxImplConvFace(), ContributeExplConvFace(), ContributeFastestBCInterface(), DebugStop, TPZMaterialData::dsol, Explicit_TD, TPZConservationLaw::fContributionTime, fConvFace, TPZConservationLaw::fDim, TPZMaterialData::HSize, Implicit_TD, Last_CT, LOGPZ_DEBUG, TPZMaterialData::normal, NStateVariables(), TPZMaterialData::phi, TPZMatrix< TVar >::Print(), TPZVec< T >::size(), TPZMaterialData::sol, and TPZMaterialData::x.

Referenced by ContributeBC().

◆ ContributeBCInterface() [2/2]

void TPZEulerConsLaw::ContributeBCInterface ( TPZMaterialData data,
TPZMaterialData dataleft,
REAL  weight,
TPZFMatrix< STATE > &  ef,
TPZBndCond bc 
)
overridevirtual

◆ ContributeExplConvFace()

void TPZEulerConsLaw::ContributeExplConvFace ( TPZVec< REAL > &  x,
TPZVec< STATE > &  solL,
TPZVec< STATE > &  solR,
REAL  weight,
TPZVec< REAL > &  normal,
TPZFMatrix< REAL > &  phiL,
TPZFMatrix< REAL > &  phiR,
TPZFMatrix< STATE > &  ef,
int  entropyFix = 1 
)

◆ ContributeExplConvVol()

void TPZEulerConsLaw::ContributeExplConvVol ( TPZVec< REAL > &  x,
TPZVec< STATE > &  sol,
REAL  weight,
TPZFMatrix< REAL > &  phi,
TPZFMatrix< REAL > &  dphi,
TPZFMatrix< STATE > &  ef 
)

◆ ContributeExplDiff()

void TPZEulerConsLaw::ContributeExplDiff ( TPZVec< REAL > &  x,
TPZFMatrix< REAL > &  jacinv,
TPZVec< STATE > &  sol,
TPZFMatrix< STATE > &  dsol,
REAL  weight,
TPZFMatrix< REAL > &  phi,
TPZFMatrix< REAL > &  dphi,
TPZFMatrix< STATE > &  ef 
)

◆ ContributeExplT1()

void TPZEulerConsLaw::ContributeExplT1 ( TPZVec< REAL > &  x,
TPZVec< STATE > &  sol,
TPZFMatrix< STATE > &  dsol,
REAL  weight,
TPZFMatrix< REAL > &  phi,
TPZFMatrix< REAL > &  dphi,
TPZFMatrix< STATE > &  ef 
)

◆ ContributeExplT2()

void TPZEulerConsLaw::ContributeExplT2 ( TPZVec< REAL > &  x,
TPZVec< STATE > &  sol,
REAL  weight,
TPZFMatrix< REAL > &  phi,
TPZFMatrix< STATE > &  ef 
)

◆ ContributeFastestBCInterface()

void TPZEulerConsLaw::ContributeFastestBCInterface ( int  dim,
TPZVec< REAL > &  x,
TPZVec< STATE > &  solL,
TPZFMatrix< STATE > &  dsolL,
REAL  weight,
TPZVec< REAL > &  normal,
TPZFMatrix< REAL > &  phiL,
TPZFMatrix< REAL > &  dphiL,
TPZFMatrix< REAL > &  axesleft,
TPZFMatrix< STATE > &  ek,
TPZFMatrix< STATE > &  ef,
TPZBndCond bc 
)

◆ ContributeFastestBCInterface_dim()

template<int dim>
void TPZEulerConsLaw::ContributeFastestBCInterface_dim ( TPZVec< REAL > &  x,
TPZVec< STATE > &  solL,
TPZFMatrix< STATE > &  dsolL,
REAL  weight,
TPZVec< REAL > &  normal,
TPZFMatrix< REAL > &  phiL,
TPZFMatrix< REAL > &  dphiL,
TPZFMatrix< REAL > &  axesleft,
TPZFMatrix< STATE > &  ek,
TPZFMatrix< STATE > &  ef,
TPZBndCond bc 
)

◆ ContributeImplConvVol()

void TPZEulerConsLaw::ContributeImplConvVol ( TPZVec< REAL > &  x,
TPZVec< STATE > &  sol,
TPZFMatrix< STATE > &  dsol,
REAL  weight,
TPZFMatrix< REAL > &  phi,
TPZFMatrix< REAL > &  dphi,
TPZFMatrix< STATE > &  ek,
TPZFMatrix< STATE > &  ef 
)

◆ ContributeImplT1()

void TPZEulerConsLaw::ContributeImplT1 ( TPZVec< REAL > &  x,
TPZVec< STATE > &  sol,
TPZFMatrix< STATE > &  dsol,
REAL  weight,
TPZFMatrix< REAL > &  phi,
TPZFMatrix< REAL > &  dphi,
TPZFMatrix< STATE > &  ek,
TPZFMatrix< STATE > &  ef 
)

◆ ContributeInterface() [1/2]

void TPZEulerConsLaw::ContributeInterface ( TPZMaterialData data,
TPZMaterialData dataleft,
TPZMaterialData dataright,
REAL  weight,
TPZFMatrix< STATE > &  ek,
TPZFMatrix< STATE > &  ef 
)
overridevirtual

◆ ContributeInterface() [2/2]

void TPZEulerConsLaw::ContributeInterface ( TPZMaterialData data,
TPZMaterialData dataleft,
TPZMaterialData dataright,
REAL  weight,
TPZFMatrix< STATE > &  ef 
)
overridevirtual

Contributes to the residual vector and tangent matrix the face-based quantities.

Reimplemented from TPZConservationLaw.

Definition at line 646 of file pzeulerconslaw.cpp.

References Advanced_CT, ApproxImplicit_TD, ContributeExplConvFace(), Explicit_TD, TPZConservationLaw::fContributionTime, fConvFace, Implicit_TD, Last_CT, TPZMaterialData::normal, TPZMaterialData::phi, TPZMaterialData::sol, and TPZMaterialData::x.

◆ ContributeLast()

void TPZEulerConsLaw::ContributeLast ( TPZVec< REAL > &  x,
TPZFMatrix< REAL > &  jacinv,
TPZVec< STATE > &  sol,
TPZFMatrix< STATE > &  dsol,
REAL  weight,
TPZFMatrix< REAL > &  phi,
TPZFMatrix< REAL > &  dphi,
TPZFMatrix< STATE > &  ef 
)
virtual

◆ cSpeed()

template<class T >
void TPZEulerConsLaw::cSpeed ( TPZVec< T > &  sol,
REAL  gamma,
T &  c 
)
static

Evaluates the speed of sound in the fluid.

Definition at line 1318 of file pzeulerconslaw.h.

References TPZVec< T >::NElements(), test::obj, Pressure(), PZError, and sqrt.

Referenced by ArtDiff(), TPZArtDiff::Bornhaus(), TPZArtDiff::Delta(), Solution(), and TPZArtDiff::SUPG().

◆ DeltaX()

REAL TPZEulerConsLaw::DeltaX ( REAL  detJac)

Estimates the deltax (element diameter) based on the inverse of the jacobian.

<!> Works only for quadratic and hexahedral elements (it assumes that each element is parametrized tensorially with functions varying from -1 to 1)

Definition at line 179 of file pzeulerconslaw.cpp.

References fabs, TPZConservationLaw::fDim, and pow().

Referenced by ArtDiff(), ContributeApproxImplDiff(), and ContributeExplDiff().

◆ Det()

REAL TPZEulerConsLaw::Det ( TPZFMatrix< REAL > &  Mat)

Computes the determinant of a 2d or 3d matrix.
Used by recompute the element size.

Definition at line 184 of file pzeulerconslaw.cpp.

References PZError, and TPZMatrix< TVar >::Rows().

Referenced by ArtDiff(), ContributeApproxImplDiff(), and ContributeExplDiff().

◆ Flux()

template<class T >
void TPZEulerConsLaw::Flux ( TPZVec< T > &  U,
TPZVec< T > &  Fx,
TPZVec< T > &  Fy,
TPZVec< T > &  Fz 
)
inline

◆ JacobFlux()

template<class T >
void TPZEulerConsLaw::JacobFlux ( REAL  gamma,
int  dim,
TPZVec< T > &  U,
TPZVec< TPZDiffMatrix< T > > &  Ai 
)
inlinestatic

Jacobian of the tensor flux of Euler.

Parameters
[in]gammaGamma value to use
[in]dimSpatial dimension
[in]U$dim+2$ solutions at given point
[out]AiVector of dim tensors of $ (dim+2)*(dim*2)$, representing the derivatives of F with respect to the dim spatial dimensions

Definition at line 615 of file pzeulerconslaw.h.

References NStateVariables(), test::obj, PZError, and val().

Referenced by ContributeApproxImplConvFace(), ContributeImplConvVol(), TPZArtDiff::PrepareDiff(), TPZArtDiff::PrepareFastDiff(), and Solution().

◆ Name()

std::string TPZEulerConsLaw::Name ( )
inlineoverridevirtual

Returns the material name.

Implements TPZConservationLaw.

Definition at line 550 of file pzeulerconslaw.h.

Referenced by ArtDiff().

◆ NewMaterial()

virtual TPZMaterial* TPZEulerConsLaw::NewMaterial ( )
inlineoverridevirtual

To create another material of the same type.

Reimplemented from TPZMaterial.

Definition at line 51 of file pzeulerconslaw.h.

References SetTimeDiscr(), and TPZEulerConsLaw().

◆ NFluxes()

int TPZEulerConsLaw::NFluxes ( )
overridevirtual

Returns the number of fluxes associated to this material.

Reimplemented from TPZConservationLaw.

Definition at line 211 of file pzeulerconslaw.cpp.

References TPZConservationLaw::Dimension().

Referenced by ArtDiff(), and Print().

◆ NSolutionVariables()

int TPZEulerConsLaw::NSolutionVariables ( int  var)
overridevirtual

Returns the number of variables associated with the variable indexed by var.

Parameters
varIndex variable into the solution, is obtained by calling VariableIndex

Implements TPZConservationLaw.

Definition at line 169 of file pzeulerconslaw.cpp.

References TPZConservationLaw::Dimension(), and NStateVariables().

Referenced by ArtDiff().

◆ NStateVariables() [1/2]

int TPZEulerConsLaw::NStateVariables ( int  dim)
static

See declaration in base class.

Definition at line 87 of file pzeulerconslaw.cpp.

◆ NStateVariables() [2/2]

int TPZEulerConsLaw::NStateVariables ( ) const
overridevirtual

◆ OptimalCFL()

REAL TPZEulerConsLaw::OptimalCFL ( int  degree)

returns the best value for the CFL number based on the interpolation degree.

Definition at line 68 of file pzeulerconslaw.cpp.

Referenced by ArtDiff(), and SetTimeStep().

◆ Pressure() [1/2]

template<class T >
void TPZEulerConsLaw::Pressure ( REAL  gamma,
int  dim,
T &  press,
TPZVec< T > &  U 
)
inlinestatic

Thermodynamic pressure determined by the law of an ideal gas.

Parameters
[in]gammaGamma value
[in]dimSpatial dimension
[out]pressComputed pressure
[in]UVector of state variables (sol)

Definition at line 817 of file pzeulerconslaw.h.

References fabs, TPZVec< T >::NElements(), NStateVariables(), test::obj, PZError, TPZVec< T >::Resize(), and val().

Referenced by ArtDiff(), TPZArtDiff::ContributeExplDiff(), cSpeed(), Flux(), Pressure(), and Solution().

◆ Pressure() [2/2]

STATE TPZEulerConsLaw::Pressure ( TPZVec< STATE > &  U)
overridevirtual

Thermodynamic pressure determined by the law of an ideal gas.

Parameters
[in]Uvector of state variables (sol)

Implements TPZConservationLaw.

Definition at line 95 of file pzeulerconslaw.cpp.

References TPZConservationLaw::fDim, TPZConservationLaw::fGamma, and Pressure().

◆ Print()

void TPZEulerConsLaw::Print ( std::ostream &  out)
overridevirtual

Prints the state of internal variables.

Parameters
outOutput to print the information of the current object

Reimplemented from TPZConservationLaw.

Definition at line 102 of file pzeulerconslaw.cpp.

References ApproxImplicit_TD, TPZArtDiff::DiffusionName(), Explicit_TD, fArtDiff, fConvFace, fConvVol, fDiff, Implicit_TD, NFluxes(), NStateVariables(), TPZConservationLaw::Print(), TPZMaterial::Print(), and TPZString::Str().

Referenced by ArtDiff().

◆ Read()

void TPZEulerConsLaw::Read ( TPZStream buf,
void *  context 
)
overridevirtual

Reads the element data from a stream.

Reimplemented from TPZConservationLaw.

Definition at line 1958 of file pzeulerconslaw.cpp.

References fArtDiff, fConvFace, fConvVol, fDiff, TPZArtDiff::Read(), TPZStream::Read(), and TPZConservationLaw::Read().

Referenced by ContributeBC().

◆ Roe_Flux() [1/3]

template<class T >
void TPZEulerConsLaw::Roe_Flux ( TPZVec< T > &  solL,
TPZVec< T > &  solR,
TPZVec< REAL > &  normal,
REAL  gamma,
TPZVec< T > &  flux,
int  entropyFix = 1 
)
static

This flux encapsulates the two and three dimensional fluxes acquired from the Mouse program.

Parameters
[in]solLVector with solution from left element
[in]solRVector with solution from right element
[in]normalNormal vector of the interface
[in]gammaGamma value to use
[out]fluxVector to return flux values
entropyFix

Definition at line 872 of file pzeulerconslaw.h.

References TPZVec< T >::NElements(), and PZError.

Referenced by ContributeApproxImplConvFace(), and Solution().

◆ Roe_Flux() [2/3]

template<class T >
void TPZEulerConsLaw::Roe_Flux ( const T &  rho_f,
const T &  rhou_f,
const T &  rhov_f,
const T &  rhow_f,
const T &  rhoE_f,
const T &  rho_t,
const T &  rhou_t,
const T &  rhov_t,
const T &  rhow_t,
const T &  rhoE_t,
const REAL  nx,
const REAL  ny,
const REAL  nz,
const REAL  gam,
T &  flux_rho,
T &  flux_rhou,
T &  flux_rhov,
T &  flux_rhow,
T &  flux_rhoE,
int  entropyFix = 1 
)
inlinestatic

Flux of Roe (MOUSE program)

Definition at line 915 of file pzeulerconslaw.h.

References sqrt.

◆ Roe_Flux() [3/3]

template<class T >
void TPZEulerConsLaw::Roe_Flux ( const T &  rho_f,
const T &  rhou_f,
const T &  rhov_f,
const T &  rhoE_f,
const T &  rho_t,
const T &  rhou_t,
const T &  rhov_t,
const T &  rhoE_t,
const REAL  nx,
const REAL  ny,
const REAL  gam,
T &  flux_rho,
T &  flux_rhou,
T &  flux_rhov,
T &  flux_rhoE,
int  entropyFix = 1 
)
inlinestatic

Definition at line 1126 of file pzeulerconslaw.h.

References sqrt.

◆ SetDelta()

void TPZEulerConsLaw::SetDelta ( REAL  delta)

Sets the delta parameter inside the artifficial diffusion term.

Definition at line 272 of file pzeulerconslaw.cpp.

References fArtDiff, fastAccessDx(), TPZConservationLaw::fDim, TPZVec< T >::Fill(), TPZVec< T >::NElements(), NStateVariables(), PZError, TPZVec< T >::Resize(), TPZMatrix< TVar >::Rows(), TPZArtDiff::SetDelta(), and val().

Referenced by Solution().

◆ SetTimeDiscr()

void TPZEulerConsLaw::SetTimeDiscr ( TPZTimeDiscr  Diff,
TPZTimeDiscr  ConvVol,
TPZTimeDiscr  ConvFace 
)

Configures the time discretization of some contributions.

Parameters
[in]DiffRefers to the diffusion term
[in]ConvVolRefers to the volume contribution to the convective term
[in]ConvFaceRefers to the numerical flux

Definition at line 61 of file pzeulerconslaw.cpp.

References fConvFace, fConvVol, and fDiff.

Referenced by NewMaterial().

◆ SetTimeStep()

REAL TPZEulerConsLaw::SetTimeStep ( REAL  maxveloc,
REAL  deltax,
int  degree 
)
overridevirtual

See declaration in base class.

Implements TPZConservationLaw.

Definition at line 73 of file pzeulerconslaw.cpp.

References TPZConservationLaw::CFL(), TPZConservationLaw::fCFL, OptimalCFL(), and TPZConservationLaw::SetTimeStep().

Referenced by ArtDiff().

◆ Solution() [1/2]

void TPZEulerConsLaw::Solution ( TPZVec< STATE > &  Sol,
TPZFMatrix< STATE > &  DSol,
TPZFMatrix< REAL > &  axes,
int  var,
TPZVec< STATE > &  Solout 
)
overrideprotectedvirtual
Deprecated:
Deprecated interface for Solution method which must use material data.

Implements TPZConservationLaw.

Definition at line 218 of file pzeulerconslaw.cpp.

References cSpeed(), TPZConservationLaw::Dimension(), fabs, TPZConservationLaw::fGamma, NStateVariables(), Pressure(), PZError, TPZVec< T >::Resize(), TPZMaterial::Solution(), sqrt, and uRes().

Referenced by ArtDiff().

◆ Solution() [2/2]

virtual void TPZEulerConsLaw::Solution ( TPZMaterialData data,
int  var,
TPZVec< STATE > &  Solout 
)
inlineoverridevirtual

returns the solution associated with the var index based on the finite element approximation

Reimplemented from TPZConservationLaw.

Definition at line 136 of file pzeulerconslaw.h.

References ApproxRoe_Flux(), Contribute(), ContributeBC(), ContributeInterface(), Flux(), JacobFlux(), Roe_Flux(), SetDelta(), TPZConservationLaw::Solution(), and Test_Flux().

◆ Test_Flux()

template<class T >
void TPZEulerConsLaw::Test_Flux ( TPZVec< T > &  solL,
TPZVec< T > &  solR,
TPZVec< REAL > &  normal,
REAL  gamma,
TPZVec< T > &  flux 
)

Test flux -> returns the averaged state variables across an interface.

Definition at line 860 of file pzeulerconslaw.h.

References TPZVec< T >::NElements().

Referenced by Solution().

◆ uRes()

template<class T >
void TPZEulerConsLaw::uRes ( TPZVec< T > &  sol,
T &  us 
)
inlinestatic

◆ VariableIndex()

int TPZEulerConsLaw::VariableIndex ( const std::string &  name)
overridevirtual

Returns the relative index of a variable according to its name.

Parameters
[in]nameName of the variable wished.

Implements TPZConservationLaw.

Definition at line 157 of file pzeulerconslaw.cpp.

References TPZMaterial::VariableIndex().

Referenced by ArtDiff().

◆ Write()

void TPZEulerConsLaw::Write ( TPZStream buf,
int  withclassid 
) const
overridevirtual

Saves the element data to a stream.

Reimplemented from TPZConservationLaw.

Definition at line 1946 of file pzeulerconslaw.cpp.

References fArtDiff, fConvFace, fConvVol, fDiff, tmp, TPZStream::Write(), TPZArtDiff::Write(), and TPZConservationLaw::Write().

Referenced by ContributeBC().

Member Data Documentation

◆ fArtDiff

TPZArtDiff TPZEulerConsLaw::fArtDiff
protected

diffusive term

Definition at line 541 of file pzeulerconslaw.h.

Referenced by ArtDiff(), ContributeApproxImplDiff(), ContributeExplDiff(), Print(), Read(), SetDelta(), and Write().

◆ fConvFace

TPZTimeDiscr TPZEulerConsLaw::fConvFace
protected

◆ fConvVol

TPZTimeDiscr TPZEulerConsLaw::fConvVol
protected

Definition at line 544 of file pzeulerconslaw.h.

Referenced by ContributeAdv(), ContributeLast(), Print(), Read(), SetTimeDiscr(), and Write().

◆ fDiff

TPZTimeDiscr TPZEulerConsLaw::fDiff
protected

variables indication whether the following terms are implicit

Definition at line 544 of file pzeulerconslaw.h.

Referenced by ContributeAdv(), ContributeLast(), Print(), Read(), SetTimeDiscr(), and Write().


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