51 int ndata = datavec.
size();
52 for (
int idata=0; idata < ndata ; idata++) {
53 datavec[idata].SetAllRequirements(
false);
54 datavec[idata].fNeedsSol =
true;
60 int ndata = datavec.
size();
61 for (
int idata=0; idata < ndata ; idata++) {
62 datavec[idata].SetAllRequirements(
false);
63 datavec[idata].fNeedsSol =
true;
64 datavec[idata].fNeedsNormal =
true;
83 int nref_left = datavec_left.
size();
84 for(
int iref = 0; iref<nref_left; iref++){
85 datavec_left[iref].SetAllRequirements(
false);
86 datavec_left[iref].fNeedsSol =
true;
87 datavec_left[iref].fNeedsNormal =
true;
89 int nref_right = datavec_right.
size();
90 for(
int iref = 0; iref<nref_right; iref++){
91 datavec_right[iref].SetAllRequirements(
false);
92 datavec_right[iref].fNeedsSol =
true;
100 out <<
"\t Base class print:\n";
101 out <<
" name of material : " << this->
Name() <<
"\n";
108 if (!strcmp(
"Sw", name.c_str()))
return 0;
109 if (!strcmp(
"So", name.c_str()))
return 1;
133 REAL sw = datavec[s_b].sol[0][0];
175 int nref = datavec.
size();
177 std::cout <<
" Erro. The size of the datavec is different from 3 \n";
188 REAL s = datavec[s_b].sol[0][0];
189 int n_phi_s = phiS.
Rows();
193 for (
int is = 0; is < n_phi_s; is++)
195 ef(is + firsts_s) += 1.0 * alpha * weight *
m_phi * s * phiS(is,0);
197 for (
int js = 0; js < n_phi_s; js++)
199 ek(is + firsts_s, js + firsts_s) += alpha * weight *
m_phi * (phiS(js,0) )* phiS(is,0);
207 this->
Contribute(datavec, weight, ek_fake, ef);
236 std::cout<<
"el valor de m_mass_matrix_Q es: "<<
m_mass_matrix_Q<<std::endl;
246 int n_phi_s_l = phiS_l.
Rows();
247 REAL s_l = datavecleft[s_b].sol[0][0];
252 int n_phi_s_r = phiS_r.
Rows();
253 REAL s_r = datavecright[s_b].sol[0][0];
254 int firsts_s_r = n_phi_s_l;
259 for (
int i = 0; i < 3; i++) {
269 for (
int is = 0; is < n_phi_s_l; is++) {
271 ef(is + firsts_s_l) += +1.0 *
m_dt * weight * (beta*s_l + (1.0-beta)*s_r)*phiS_l(is,0)*qn;
273 for (
int js = 0; js < n_phi_s_l; js++) {
274 ek(is + firsts_s_l, js + firsts_s_l) += +1.0*
m_dt * weight * beta * phiS_l(js,0) * phiS_l(is,0)*qn;
277 for (
int js = 0; js < n_phi_s_r; js++) {
278 ek(is + firsts_s_l, js + firsts_s_r) += +1.0*
m_dt * weight * (1.0-beta) * phiS_r(js,0) * phiS_l(is,0)*qn;
283 for (
int is = 0; is < n_phi_s_r; is++) {
285 ef(is + firsts_s_r) += -1.0*
m_dt * weight * (beta*s_l + (1.0-beta)*s_r)*phiS_r(is,0)*qn;
287 for (
int js = 0; js < n_phi_s_l; js++) {
288 ek(is + firsts_s_r, js + firsts_s_l) += -1.0*
m_dt * weight * beta * phiS_l(js,0) * phiS_r(is,0)*qn;
291 for (
int js = 0; js < n_phi_s_r; js++) {
292 ek(is + firsts_s_r, js + firsts_s_r) += -1.0*
m_dt * weight * (1.0-beta) * phiS_r(js,0) * phiS_r(is,0)*qn;
318 int n_phi_s_l = phiS_l.
Rows();
319 REAL s_l = datavecleft[s_b].sol[0][0];
326 for (
int i = 0; i < 3; i++) {
334 REAL s_inlet = bc.
Val2()(0,0);
335 if (qn > 0.0 ||
IsZero(qn)) {
336 std::cout <<
"TPZTracerFlow:: Outlet flux in inlet boundary condition qn = " << qn << std::endl;
338 for (
int is = 0; is < n_phi_s_l; is++) {
339 ef(is + firsts_s_l) += +1.0*
m_dt * weight * s_inlet * phiS_l(is,0)*qn;
348 if (qn > 0.0 ||
IsZero(qn)) {
349 for (
int is = 0; is < n_phi_s_l; is++) {
351 ef(is + firsts_s_l) += +1.0*
m_dt * weight * s_l*phiS_l(is,0)*qn;
353 for (
int js = 0; js < n_phi_s_l; js++) {
354 ek(is + firsts_s_l, js + firsts_s_l) += +1.0*
m_dt * weight * phiS_l(js,0) * phiS_l(is,0)*qn;
365 default: std::cout <<
"This BC doesn't exist." << std::endl;
Defines the interface which material objects need to implement for discontinuous Galerkin formulation...
bool fLinearContext
Defines whether the equation context is linear solver or non linear.
void ContributeInterface(TPZMaterialData &data, TPZMaterialData &dataleft, TPZMaterialData &dataright, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef) override
It computes a contribution to stiffness matrix and load vector at one integration point...
REAL m_dt
Regular time step size.
int ClassId() const override
TPZManVector< REAL, 3 > normal
normal to the element at the integration point
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.
bool IsZero(long double a)
Returns if the value a is close Zero as the allowable tolerance.
virtual void FillDataRequirementsInterface(TPZMaterialData &data) override
Fill material data parameter with necessary requirements for the ContributeInterface method...
clarg::argBool bc("-bc", "binary checkpoints", false)
clarg::argInt dimension("-d", "Matrices dimension M x M", 1000)
TPZMaterial & operator=(const TPZMaterial ©)
operator =
int m_mat_id
material dimension
virtual int VariableIndex(const std::string &name)
Returns the variable index associated with the name.
void SetAllRequirements(bool set)
Set all flags at once.
int NSolutionVariables(int var) override
Returns the number of variables associated with varindex.
int VariableIndex(const std::string &name) override
Returns the variable index associated with the name.
virtual void FillBoundaryConditionDataRequirement(int type, TPZVec< TPZMaterialData > &datavec) override
Set the required data at each integration point.
This class implements a simple vector storage scheme for a templated class T. Utility.
virtual void FillDataRequirements(TPZVec< TPZMaterialData > &datavec) override
Set the required data at each integration point.
bool m_mass_matrix_Q
Directive that stands for Mass matrix assembly.
TPZFMatrix< STATE > & Val2(int loadcase=0)
void Print(std::ostream &out=std::cout) override
Print out the data associated with the material.
void Write(TPZStream &buf, int withclassid)
virtual void Print(std::ostream &out=std::cout)
Prints out the data associated with the material.
int64_t size() const
Returns the number of elements of the vector.
virtual void Resize(const int64_t newsize, const T &object)
Resizes the vector object reallocating the necessary storage, copying the existing objects to the new...
int m_dimension
material dimension
TPZTracerFlow & operator=(const TPZTracerFlow &other)
Assignment operator.
~TPZTracerFlow()
Default destructor.
#define DebugStop()
Returns a message to user put a breakpoint in.
virtual std::string Name() override
Returns the name of the material.
This class defines the boundary condition for TPZMaterial objects.
int64_t Rows() const
Returns number of rows.
TPZFNMatrix< 9, REAL > axes
axes indicating the directions of the derivatives of the shapefunctions
void Read(TPZStream &buf, void *context) override
void Solution(TPZVec< TPZMaterialData > &datavec, int var, TPZVec< REAL > &Solout) override
Returns the solution associated with the var index.
virtual int NSolutionVariables(int var)
Returns the number of variables associated with the variable indexed by var.
Defines the interface for saving and reading data. Persistency.
TPZTracerFlow()
Default constructor.
REAL FractureFactor(TPZMaterialData &data)
void Contribute(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef) override
Not used contribute methods.