148 virtual void Print(std::ostream & out)
override;
151 virtual std::string
Name()
override = 0;
157 virtual int VariableIndex(
const std::string &name)
override = 0;
162 virtual int NFluxes()
override;
Defines the interface which material objects need to implement for discontinuous Galerkin formulation...
virtual void Solution(TPZMaterialData &data, int var, TPZVec< STATE > &Solout)
Returns the solution associated with the var index based on the finite element approximation.
void Read(TPZStream &buf, void *context) override
Read the element data from a stream.
virtual int NStateVariables() const override=0
Number of state variables according to the dimension.
TPZResidualType fResidualType
Variable to indicate the type of residual to be computed by Assemble.
int ClassId() const override
Unique identifier for serialization purposes.
virtual void ContributeBC(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ef, TPZBndCond &bc) override
Contributes to the residual vector the boundary conditions.
TPZConservationLaw(const TPZConservationLaw &cp)
Copy constructor.
void SetTimeStep(REAL timeStep)
Sets the time step used for time integration.
clarg::argBool bc("-bc", "binary checkpoints", false)
void SetContributionTime(TPZContributeTime time)
Sets whether the contribution is advanced or referring to the last state.
Templated vector implementation.
Semi implicit time discretization.
void SetGamma(int gamma)
Sets the value of Gamma (constant of gas)
int Dimension() const override
Returns the dimension of the problem.
void degree(int root, int adj_num, int adj_row[], int adj[], int mask[], int deg[], int *iccsze, int ls[], int node_num)
virtual int NFluxes() override
Returns the number of fluxes associated to this material.
virtual void ContributeInterface(TPZMaterialData &data, TPZMaterialData &dataleft, TPZMaterialData &dataright, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef) override=0
Contributes to the residual vector and tangent matrix the face-based quantities.
TPZTimeDiscr
Indicates the type of time discretization.
virtual void Contribute(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ef) override
Contributes to the residual vector and tangent matrix the volume-based quantities.
virtual STATE Pressure(TPZVec< STATE > &U)=0
Thermodynamic pressure determined by the law of an ideal gas.
virtual int NSolutionVariables(int var) override=0
Returns the number of variables associated with the variable indexed by var.
REAL TimeStep()
Returns the value of the time step.
int fDim
Dimension of the problem.
void SetCFL(REAL CFL)
Sets the CFL number.
TPZResidualType
Which terms are being contributed.
virtual void ContributeBC(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef, TPZBndCond &bc) override=0
It computes a contribution to the stiffness matrix and load vector at one BC integration point...
Contains TPZMatrixclass which implements full matrix (using column major representation).
virtual void Contribute(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef) override=0
Contributes to the residual vector and tangent matrix the volume-based quantities.
This class defines the boundary condition for TPZMaterial objects.
virtual void ContributeInterface(TPZMaterialData &data, TPZMaterialData &dataleft, TPZMaterialData &dataright, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef)
It computes a contribution to stiffness matrix and load vector at one integration point...
TPZConservationLaw(int nummat, REAL timeStep, int dim)
Simple constructor with material id, time step (dt) and dimension of the spatial domain.
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.
virtual void ContributeBC(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef, TPZBndCond &bc) override=0
Contributes to the residual vector the boundary conditions.
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.
virtual ~TPZConservationLaw()
Default destructor.
int32_t Hash(std::string str)
long double gamma(unsigned int n)
Evaluate the factorial of a integer.
Implements the interface for conservation laws, keeping track of the timestep as well.
virtual std::string Name() override=0
Returns the material name.
void Write(TPZStream &buf, int withclassid) const override
Save the element data to a stream.
virtual void Solution(TPZVec< STATE > &Sol, TPZFMatrix< STATE > &DSol, TPZFMatrix< REAL > &axes, int var, TPZVec< STATE > &Solout) override=0
REAL fTimeStep
Time step used for time integration.
REAL CFL()
Returns the CFL number.
REAL fGamma
Ratio between specific heat is constant and the specific heat the constant volume of a polytropic gas...
Defines the interface for saving and reading data. Persistency.
Implicit time discretization.
int ClassId() const override
Define the class id associated with the class.
Unknown time discretization.
Contains the TPZDiscontinuousGalerkin class which implements the interface for discontinuous Galerkin...
virtual int VariableIndex(const std::string &name) override=0
Returns the relative index of a variable according to its name.
TPZContributeTime fContributionTime
Variable indicating the context of the solution.
TPZContributeTime
Indicates which term is put in the right hand side and tangent matrix.
virtual void Contribute(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef) override=0
It computes a contribution to the stiffness matrix and load vector at one integration point...
void SetResidualType(TPZResidualType type)
Residual_RT for calculations and Flux_RT for convergence check.
virtual void Print(std::ostream &out) override
Prints the state of internal variables.
REAL Gamma()
Returns the value of Gamma (constant of gas)
Explicit time discretization. Can to be Euler method, Runge Kutta method, etc.