Skip to content

Commit

Permalink
Small changes to run with gcc13
Browse files Browse the repository at this point in the history
  • Loading branch information
jefersondossa committed Jul 10, 2024
1 parent 37b4a58 commit 3bd8387
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 10 deletions.
2 changes: 2 additions & 0 deletions Common/pzreal.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
#include <iostream>
#include <complex>
#include "fpo_exceptions.h"
#include <cstdint>


template <int Num, class T> class TFad;
template <class T> class Fad;
Expand Down
7 changes: 3 additions & 4 deletions Material/Elasticity/TPZMixedElasticityND.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ void TPZMixedElasticityND::Contribute_3spaces(const TPZVec<TPZMaterialDataT<STAT
}
#endif
}
datavec[0].ComputeFunctionDivergence();
// datavec[0].ComputeFunctionDivergence();
for (int i = 0; i < nshapeS; i++) {
int iphi = datavec[0].fVecShapeIndex[i].second;
int ivec = datavec[0].fVecShapeIndex[i].first;
Expand Down Expand Up @@ -1496,15 +1496,14 @@ STATE TPZMixedElasticityND::Inner(TPZFMatrix<STATE> &S, TPZFMatrix<STATE> &T) {

////////////////////////////////////////////////////////////////////

template <typename TVar>
TVar TPZMixedElasticityND::InnerVec(const TPZVec<TVar> &S, const TPZVec<TVar> &T) {
STATE TPZMixedElasticityND::InnerVec(const TPZVec<STATE> &S, const TPZVec<STATE> &T) {
//inner product of two vectors
#ifdef DEBUG
if (S.size() != T.size()) {
DebugStop();
}
#endif
TVar Val = 0;
STATE Val = 0;
for (int i = 0; i < S.size(); i++) {
Val += S[i] * T[i];
}
Expand Down
3 changes: 1 addition & 2 deletions Material/Elasticity/TPZMixedElasticityND.h
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,7 @@ using TBase = TPZMatBase<STATE, TPZMatCombinedSpacesT<STATE>,
void SymmetricSecondOrderTensorFromMandel(const TPZVec<STATE> &SMandel, TPZFMatrix<STATE> &S) const;

/** inner product of two vectors. See Gurtin (2003), p. 5. */
template<class TVar>
TVar InnerVec(const TPZVec<TVar> &S, const TPZVec<TVar> &T);
STATE InnerVec(const TPZVec<STATE> &S, const TPZVec<STATE> &T);

/** trace of the tensor GradU = Div(U)*/
STATE Tr(TPZFMatrix<REAL> &GradU);
Expand Down
9 changes: 7 additions & 2 deletions Pre/TPZAnalyticSolution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -426,8 +426,10 @@ void TElasticity2DAnalytic::uxy(const TPZVec<FADFADSTATE > &x, TPZVec<FADFADSTAT
disp[1] = K1*mult1*sinT2*mult3 + K2*mult1*cosT2*mult4;


} else if (fProblemType==EHarmonic){
disp[0] = FADsin(2.*M_PI*x[1])*(-1.+FADcos(2.*M_PI*x[0])) + FADsin(M_PI*x[0])*FADsin(M_PI*x[1]);;
disp[1] = FADsin(2.*M_PI*x[0])*(1.-FADcos(2.*M_PI*x[1])) + FADsin(M_PI*x[0])*FADsin(M_PI*x[1]);;
}

else
{
DebugStop();
Expand Down Expand Up @@ -675,7 +677,10 @@ void TElasticity2DAnalytic::uxy(const TPZVec<TVar1> &x, TPZVec<TVar2> &disp) con


}

else if (fProblemType==EHarmonic){
disp[0] = sin(2.*M_PI*x[1])*(-1.+cos(2.*M_PI*x[0])) + sin(M_PI*x[0])*sin(M_PI*x[1]);
disp[1] = sin(2.*M_PI*x[0])*(1.-cos(2.*M_PI*x[1])) + sin(M_PI*x[0])*sin(M_PI*x[1]);
}
else {
DebugStop();
}
Expand Down
2 changes: 1 addition & 1 deletion Pre/TPZAnalyticSolution.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ struct TPZAnalyticSolution
struct TElasticity2DAnalytic : public TPZAnalyticSolution
{
enum EDefState {ENone, EDispx, EDispy, ERot, EStretchx, EUniAxialx, EStretchy, EShear, EBend, ELoadedBeam, Etest1, Etest2, EThiago, EPoly,
ESquareRootUpper, ESquareRootLower, ESquareRoot, ELShape, ECrack,EHomoDir
ESquareRootUpper, ESquareRootLower, ESquareRoot, ELShape, ECrack,EHomoDir, EHarmonic
};

EDefState fProblemType = EDispx;
Expand Down
2 changes: 1 addition & 1 deletion Pre/TPZApproxCreator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ void TPZApproxCreator::AddHybridizationGeoElements(){
void TPZApproxCreator::CheckNeighborhoodHybridization() const {
const int dim = fGeoMesh->Dimension();
for(auto gel : fGeoMesh->ElementVec()) {
if(gel->Dimension() != dim || gel->HasSubElement()) continue;
if(!gel || gel->Dimension() != dim || gel->HasSubElement()) continue;

const int firstFace = gel->FirstSide(dim-1);
for (int iside = firstFace; iside < gel->NSides()-1; iside++) {
Expand Down
1 change: 1 addition & 0 deletions Save/TPZChunkTranslator.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#include <map>
#include <string>
#include <cstdint>

class TPZChunkInTranslation;

Expand Down
1 change: 1 addition & 0 deletions Save/TPZSavable.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#ifndef TPZSAVABLE_H
#define TPZSAVABLE_H

#include <cstdint>
#include <string> // for string
#include <set> // for std::set
#include <map> // for std::map
Expand Down

0 comments on commit 3bd8387

Please sign in to comment.