Skip to content
8 changes: 7 additions & 1 deletion Analysis/TPZAnalysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,13 @@ class TPZAnalysis : public TPZSavable {
TPZAnalysis(TPZCompMesh *mesh, const RenumType& renumtype = RenumType::EDefault, std::ostream &out = std::cout);
/** @brief Create an TPZAnalysis object from one mesh auto pointer object */
TPZAnalysis(TPZAutoPointer<TPZCompMesh> mesh, const RenumType& renumtype = RenumType::EDefault, std::ostream &out = std::cout);


/** @brief Copying is disabled: TPZAnalysis owns fSolver and deletes it in
* its destructor. Copying would make two objects delete the same pointer,
* causing a crash. */
TPZAnalysis(const TPZAnalysis &) = delete;
TPZAnalysis &operator=(const TPZAnalysis &) = delete;

void CreateRenumberObject(const RenumType& renumtype);

/** @} */
Expand Down
6 changes: 3 additions & 3 deletions Material/Elasticity/TPZMixedElasticityND.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1144,7 +1144,7 @@ void TPZMixedElasticityND::Solution(const TPZVec<TPZMaterialDataT<STATE>> &data,

STATE TPZMixedElasticityND::Inner(TPZFMatrix<STATE> &S, TPZFMatrix<STATE> &T) {
//inner product of two tensors
#ifdef DEBUG
#ifdef PZDEBUG
if (S.Rows() != S.Cols() || T.Cols() != T.Rows() || S.Rows() != T.Rows()) {
DebugStop();
}
Expand All @@ -1165,7 +1165,7 @@ STATE TPZMixedElasticityND::Inner(TPZFMatrix<STATE> &S, TPZFMatrix<STATE> &T) {
template <typename TVar>
TVar TPZMixedElasticityND::InnerVec(const TPZVec<TVar> &S, const TPZVec<TVar> &T) {
//inner product of two vectors
#ifdef DEBUG
#ifdef PZDEBUG
if (S.size() != T.size()) {
DebugStop();
}
Expand All @@ -1179,7 +1179,7 @@ TVar TPZMixedElasticityND::InnerVec(const TPZVec<TVar> &S, const TPZVec<TVar> &T

////////////////////////////////////////////////////////////////////
STATE TPZMixedElasticityND::Tr(TPZFMatrix<REAL> &GradU) {
#ifdef DEBUG
#ifdef PZDEBUG
if (GradU.Rows() != GradU.Cols()) {
DebugStop();
}
Expand Down
2 changes: 1 addition & 1 deletion Mesh/TPZCompElHDivDuplConnects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ template<class TSHAPE>
int TPZCompElHDivDuplConnects<TSHAPE>::NConnectShapeF(int connect, int order)const
{

#ifdef DEBUG
#ifdef PZDEBUG
if (connect < 0 || connect > TSHAPE::NFacets*2) {
DebugStop();
}
Expand Down
2 changes: 1 addition & 1 deletion Mesh/TPZCompElHDivDuplConnectsBound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ int TPZCompElHDivDuplConnectsBound<TSHAPE>::NSideConnects(int side) const{
template<class TSHAPE>
int TPZCompElHDivDuplConnectsBound<TSHAPE>::NConnectShapeF(int connect, int connectorder)const
{
#ifdef DEBUG
#ifdef PZDEBUG
if (connect < 0 || connect > TSHAPE::NFacets) {
DebugStop();
}
Expand Down
2 changes: 1 addition & 1 deletion Mesh/pzelchdiv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ void TPZCompElHDiv<TSHAPE>::SetConnectIndex(int i, int64_t connectindex){
template<class TSHAPE>
int TPZCompElHDiv<TSHAPE>::NConnectShapeF(int connect, int order)const
{
#ifdef DEBUG
#ifdef PZDEBUG
if (connect < 0 || connect > TSHAPE::NFacets) {
DebugStop();
}
Expand Down
2 changes: 1 addition & 1 deletion Mesh/pzelchdivbound2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ void TPZCompElHDivBound2<TSHAPE>::SetConnectIndex(int i, int64_t connectindex)
template<class TSHAPE>
int TPZCompElHDivBound2<TSHAPE>::NConnectShapeF(int connect, int connectorder) const
{
#ifdef DEBUG
#ifdef PZDEBUG
if (connect < 0 || connect > TSHAPE::NFacets) {
DebugStop();
}
Expand Down
3 changes: 3 additions & 0 deletions Mesh/pzgmesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ TPZGeoMesh::~TPZGeoMesh()
#ifdef PZDEBUG2
std::cout << "Deleting TPZGeoMesh " << (void *) this << std::endl;
#endif
if (fReference && fReference->Reference() == this) {
fReference->SetReference(nullptr);
}
CleanUp();
}

Expand Down
12 changes: 0 additions & 12 deletions Post/pzpostprocanalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,6 @@ TPZLinearAnalysis(), fpMainMesh(pRef)

}

TPZPostProcAnalysis::TPZPostProcAnalysis(const TPZPostProcAnalysis &copy) : TPZRegisterClassId(&TPZPostProcAnalysis::ClassId),
TPZLinearAnalysis(copy), fpMainMesh(0)
{

}

TPZPostProcAnalysis &TPZPostProcAnalysis::operator=(const TPZPostProcAnalysis &copy)
{
SetCompMesh(0);
return *this;
}

TPZPostProcAnalysis::~TPZPostProcAnalysis()
{
if (fCompMesh) {
Expand Down
9 changes: 6 additions & 3 deletions Post/pzpostprocanalysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,12 @@ TPZPostProcAnalysis(TPZCompMesh * pRef);

TPZPostProcAnalysis();

TPZPostProcAnalysis(const TPZPostProcAnalysis &copy);

TPZPostProcAnalysis &operator=(const TPZPostProcAnalysis &copy);
/** @brief Copying is disabled: the base class (TPZAnalysis) owns fSolver
* and deletes it in its destructor, so copying would make two objects
* delete the same pointer. */
TPZPostProcAnalysis(const TPZPostProcAnalysis &copy) = delete;

TPZPostProcAnalysis &operator=(const TPZPostProcAnalysis &copy) = delete;

virtual ~TPZPostProcAnalysis();

Expand Down
7 changes: 4 additions & 3 deletions Pre/TPZH1ApproxCreator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,10 @@ void TPZH1ApproxCreator::CreateAtomicMeshes(TPZVec<TPZCompMesh *> &meshvec) {

meshvec.resize(fNumMeshes);
int countMesh = 0;
if(HybridType() != HybridizationType::ENone)
if(HybridType() != HybridizationType::ENone) {
meshvec[countMesh++] = CreateBoundaryHDivSpace();
meshvec[countMesh++] = CreateL2Space();
}
meshvec[countMesh++] = CreateL2Space();

if (fIsRBSpaces){
int lagMult1 = EDistFlux, lagMult2 = EAvSol;
Expand Down Expand Up @@ -639,7 +640,7 @@ TPZCompMesh *TPZH1ApproxCreator::CreateBoundaryHDivSpace()
int nstate = 1;
if(fProbType == ProblemType::EElastic) nstate = fGeoMesh->Dimension();
//Inserting HDiv material
if (fHybridType!= HybridizationType::EStandard || fHybridType!= HybridizationType::EStandardSquared) {
if (fHybridType== HybridizationType::EStandard || fHybridType== HybridizationType::EStandardSquared) {
int matid = fHybridizationData.fLagrangeMatId;
auto nullmat = new TPZNullMaterial(matid);
nullmat->SetDimension(fGeoMesh->Dimension()-1);
Expand Down
27 changes: 6 additions & 21 deletions Pre/pzcreateapproxspace.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,24 +60,9 @@ class TPZCreateApproximationSpace : public TPZSavable {
SetAllCreateFunctionsContinuous();
}

TPZCreateApproximationSpace(const TPZCreateApproximationSpace &copy) : fCreateHybridMesh(copy.fCreateHybridMesh), fCreateLagrangeMultiplier(copy.fCreateLagrangeMultiplier)
,fCreateWithMemory(copy.fCreateWithMemory)
{
for (int i=0; i<8; i++) {
fp[i] = copy.fp[i];
}
}

TPZCreateApproximationSpace &operator=(const TPZCreateApproximationSpace &copy)
{
for (int i=0; i<8; i++) {
fp[i] = copy.fp[i];
}
fCreateHybridMesh = copy.fCreateHybridMesh;
fCreateLagrangeMultiplier = copy.fCreateLagrangeMultiplier;
fCreateWithMemory = copy.fCreateWithMemory;
return *this;
}
TPZCreateApproximationSpace(const TPZCreateApproximationSpace &copy) = default;

TPZCreateApproximationSpace &operator=(const TPZCreateApproximationSpace &copy) = default;
int ClassId() const override;

void Read(TPZStream &buf, void *context) override;
Expand All @@ -97,15 +82,15 @@ class TPZCreateApproximationSpace : public TPZSavable {
// Get set methods for space families
const HDivFamily &HDivFam() const {return fhdivfam;}
const HDivFamily &HDivFam() {return fhdivfam;}
const void SetHDivFamily(HDivFamily fam){fhdivfam = fam;}
void SetHDivFamily(HDivFamily fam){fhdivfam = fam;}

const H1Family &H1Fam() const {return fh1fam;}
const H1Family &H1Fam() {return fh1fam;}
const void SetH1Family(H1Family fam){fh1fam = fam;}
void SetH1Family(H1Family fam){fh1fam = fam;}

const HCurlFamily &HCurlFam() const {return fhcurlfam;}
const HCurlFamily &HCurlFam() {return fhcurlfam;}
const void SetHCurlFamily(HCurlFamily fam){fhcurlfam = fam;}
void SetHCurlFamily(HCurlFamily fam){fhcurlfam = fam;}

/** @brief Create discontinuous approximation spaces */
void SetAllCreateFunctionsDiscontinuous();
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ can be added to a startup file of your shell. In both examples, `pz_install_dir`
A Doxygen documentation can be found
[here](http://www.labmec.org.br/pz/arquivos-html/html/index.html).

Additionally, the [`ai-analysis`](ai-analysis) folder contains an AI-generated
codebase analysis (architecture overview, algorithm notes, and a findings/roadmap
report).

## How to cite NeoPZ

Devloo, P.R. B., 1997. PZ: An object oriented environment
Expand Down
2 changes: 1 addition & 1 deletion Shape/TPZShapeHDiv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ int TPZShapeHDiv<TSHAPE>::NShapeF(const TPZShapeData &shapedata)
template<class TSHAPE>
int TPZShapeHDiv<TSHAPE>::ComputeNConnectShapeF(int connect, int order)
{
#ifdef DEBUG
#ifdef PZDEBUG
if (connect < 0 || connect > TSHAPE::NFacets) {
DebugStop();
}
Expand Down
4 changes: 2 additions & 2 deletions Shape/TPZShapeHDivConstant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ void TPZShapeHDivConstant<TSHAPE>::Shape(const TPZVec<Fad<REAL>> &pt, TPZShapeDa
count++;

// Kernel HDiv functions
for (int k = 0; k < data.fHCurl.fNumConnectShape[nedges]; k++)
for (int k = 0; k < data.fHCurl.fNumConnectShape[nedges + i]; k++)
{
for (auto d = 0; d < dim; d++)
{
Expand Down Expand Up @@ -343,7 +343,7 @@ template <class TSHAPE>
int TPZShapeHDivConstant<TSHAPE>::ComputeNConnectShapeF(int connect, int order)
{

#ifdef DEBUG
#ifdef PZDEBUG
if (connect < 0 || connect > TSHAPE::NFacets)
{
DebugStop();
Expand Down
2 changes: 1 addition & 1 deletion Shape/TPZShapeHDivConstantBound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ void TPZShapeHDivConstantBound<TSHAPE>::Shape(const TPZVec<REAL> &pt, TPZShapeDa
template<class TSHAPE>
int TPZShapeHDivConstantBound<TSHAPE>::ComputeNConnectShapeF(int connect, int order)
{
#ifdef DEBUG
#ifdef PZDEBUG
if (connect < 0 || connect > TSHAPE::NFacets) {
DebugStop();
}
Expand Down
2 changes: 1 addition & 1 deletion Shape/TPZShapeHDivOptimized.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ int TPZShapeHDivOptimized<TSHAPE>::NShapeF(const TPZShapeData &shapedata)
template <class TSHAPE>
int TPZShapeHDivOptimized<TSHAPE>::ComputeNConnectShapeF(int connect, int order)
{
#ifdef DEBUG
#ifdef PZDEBUG
if (connect < 0 || connect > TSHAPE::NFacets)
{
DebugStop();
Expand Down
2 changes: 1 addition & 1 deletion Topology/TPZTopologyUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace pztopology{
// };// if, in the future, there are more topology settings to be adjusted, this model of singleton can be used.

typedef std::numeric_limits< REAL > dbl;
static REAL gTolerance = pow(10,(-1 * (dbl::max_digits10- 5)));
inline REAL gTolerance = pow(10,(-1 * (dbl::max_digits10- 5)));

REAL GetTolerance();

Expand Down
Loading