NeoPZ
pznlmat1d.h
Go to the documentation of this file.
1 
6 #ifndef TPZNLMAT1D_H
7 #define TPZNLMAT1D_H
8 
9 #include "TPZMaterial.h"
10 
20 class TPZNLMat1d : public TPZMaterial
21 {
22 public:
24  TPZNLMat1d(int id);
25 
27  virtual ~TPZNLMat1d();
28 
30  virtual std::string Name() override { return "nonlinear_1dMaterial"; }
31 
33  virtual int Dimension() const override {return 1;}
34 
36  virtual int NStateVariables() const override {return 1;}
37 
39  virtual void Print(std::ostream &out = std::cout) override;
40 
41 // /** Returns the variable index associated with the name */
42 // virtual int VariableIndex(const std::string &name);
43 
44 // virtual int NSolutionVariables(int var);
45 
46 protected:
47 // /** @brief Returns the solution associated with the var index based on the finite element approximation */
48 // virtual void Solution(TPZVec<REAL> &Sol, TPZFMatrix<REAL> &DSol,
49 // TPZFMatrix<REAL> &axes, int var, TPZVec<REAL> &Solout);
50 public:
51 
52  virtual void Solution(TPZMaterialData &data, int var, TPZVec<STATE> &Solout) override
53  {
54  TPZMaterial::Solution(data,var,Solout);
55  }
56 
58  virtual void Contribute(TPZMaterialData &data, REAL weight,
59  TPZFMatrix<STATE> &ek, TPZFMatrix<STATE> &ef) override;
60 // /** @brief Computes contribution to the right hand side at an integration point */
61 // virtual void Contribute(TPZMaterialData &data, REAL weight,
62 // TPZFMatrix<STATE> &ef);
63 
65  virtual void ContributeBC(TPZMaterialData &data, REAL weight,
67  TPZBndCond &bc) override;
69  virtual void ContributeBC(TPZMaterialData &data, REAL weight,
71  TPZBndCond &bc) override
72  {
73  TPZMaterial::ContributeBC(data,weight,ef,bc);
74  }
75 
76 // /** @brief To create another material of the same type */
77 // virtual TPZMaterial * NewMaterial();
78 
79 // /** @brief Reads data of the material from a istream (file data) */
80 // virtual void SetData(std::istream &data);
81 
82 // void Write(TPZStream &buf, int withclassid) const override;
83 
84 // void Read(TPZStream &buf, void *context) override;
85 
86 // public:
87 virtual int ClassId() const override;
88 
89 
90  virtual STATE Eps(TPZVec<STATE> &sol,TPZFMatrix<REAL> &axes,TPZFMatrix<REAL> &dphi) = 0;
91 
92 protected:
94  REAL fArea;
95 
97  REAL fE;
98 };
99 
100 #endif
virtual void Solution(TPZMaterialData &data, int var, TPZVec< STATE > &Solout)
Returns the solution associated with the var index based on the finite element approximation.
virtual ~TPZNLMat1d()
Default destructor.
Definition: pznlmat1d.cpp:20
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.
Definition: pznlmat1d.h:52
clarg::argBool bc("-bc", "binary checkpoints", false)
virtual int ClassId() const override
To create another material of the same type.
REAL fE
Young&#39;s modulus.
Definition: pznlmat1d.h:97
REAL fArea
Cross Section Area.
Definition: pznlmat1d.h:94
This abstract class defines the behaviour which each derived class needs to implement.
Definition: TPZMaterial.h:39
virtual std::string Name() override
Returns the name of the material.
Definition: pznlmat1d.h:30
This class defines the boundary condition for TPZMaterial objects.
Definition: pzbndcond.h:29
virtual int Dimension() const override
Returns the integrable dimension of the material: Material is 1d.
Definition: pznlmat1d.h:33
virtual void ContributeBC(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef, TPZBndCond &bc)=0
It computes a contribution to the stiffness matrix and load vector at one BC integration point...
virtual void ContributeBC(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ef, TPZBndCond &bc) override
Computes contribution to load vector (right hand side) at the integration point of a boundary...
Definition: pznlmat1d.h:69
virtual STATE Eps(TPZVec< STATE > &sol, TPZFMatrix< REAL > &axes, TPZFMatrix< REAL > &dphi)=0
TPZNLMat1d(int id)
Simple constructor.
Definition: pznlmat1d.cpp:16
virtual void ContributeBC(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef, TPZBndCond &bc) override
Computes contribution to the right hand side at an integration point.
Definition: pznlmat1d.cpp:64
virtual void Contribute(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef) override
Computes contribution to the stiffness matrix and right hand side at an integration point...
Definition: pznlmat1d.cpp:23
virtual int NStateVariables() const override
Returns the number of state variables associated with the material: Only w?
Definition: pznlmat1d.h:36
virtual void Print(std::ostream &out=std::cout) override
Prints out the data associated with the material.
Definition: pznlmat1d.cpp:144
Virtual class that implements the whole structure for evaluta non linear truss elements.
Definition: pznlmat1d.h:20