From 2b37da017660384788dca42b4d5a6eac0f9e8f96 Mon Sep 17 00:00:00 2001 From: Jack Rao Date: Thu, 16 Nov 2023 17:56:00 -0800 Subject: [PATCH] removed (cleaned up) all my debug statements, so hopefully it shouldn't print things like crazy --- Code/Source/cvOneDBFSolver.cxx | 10 +--------- Code/Source/cvOneDMaterialLinear.cxx | 1 - Code/Source/cvOneDMaterialManager.cxx | 4 ---- Code/Source/cvOneDMaterialOlufsen.cxx | 10 ---------- Code/Source/cvOneDModelManager.cxx | 3 --- Code/Source/cvOneDMthSegmentModel.cxx | 7 ------- Code/Source/cvOneDSubdomain.cxx | 3 --- Code/Source/main.cxx | 2 -- 8 files changed, 1 insertion(+), 39 deletions(-) diff --git a/Code/Source/cvOneDBFSolver.cxx b/Code/Source/cvOneDBFSolver.cxx index 5a242f5..edeb629 100644 --- a/Code/Source/cvOneDBFSolver.cxx +++ b/Code/Source/cvOneDBFSolver.cxx @@ -1165,13 +1165,7 @@ void cvOneDBFSolver::QuerryModelInformation(void) if(!seg->IsOutlet){ subdomain->SetBoundCondition(BoundCondTypeScope::NOBOUND); } - cout << "Line 1168 of cvOneDBFSolver.cxx" << endl; - // cout << subdomain->GetMaterial()->GetEHR((double) 1.5); - // cout << " " << subdomain->GetMaterial()->GetStarlingAmbientPressure(); - // so I guess these values haven't been set yet. It's somehow resetting those values when it called the constructor again?? - cout << "Line 1170" << endl; subdomain->SetupMaterial(matID); - cout << "Line 1172" << endl; subdomain->GetMaterial()->SetPeriod(Period); // Set up Minor Loss @@ -1232,9 +1226,7 @@ void cvOneDBFSolver::QuerryModelInformation(void) subdomain->SetBoundCondition(BoundCondTypeScope::NOBOUND); } } - - cout << "Line 1230" << endl; - + // For branch use. temp *= 2; for(i=0; iSetReferencePressure(pRef); olfmat->SetHydraulicConductivity(L_P); olfmat->SetStarlingAmbientPressure(P_ambient); - cout << "Getting the pressure: " << olfmat->GetStarlingAmbientPressure() << endl; olfmat->SetMaterialType(params,pRef); printf("new cvOneMaterialOlufsen called check pRef %f \n", olfmat->GetReferencePressure()); return cvOneDGlobal::gMaterialManager->AddNewMaterial(MaterialType_MATERIAL_OLUFSEN,(cvOneDMaterial*)olfmat); @@ -89,13 +88,10 @@ int cvOneDMaterialManager::AddNewMaterialLinear(double density, double dynamicVi // caller must deallocate material instance to avoid memory leak cvOneDMaterial* cvOneDMaterialManager::GetNewInstance(int matID){ if (types[matID] == MaterialType_MATERIAL_OLUFSEN) { - cout << "declaration" << endl; cvOneDMaterialOlufsen* olfmat = new cvOneDMaterialOlufsen(); // printf("In GetNewInstance cvOneDMaterialOlufsen is called matID=%i \n",matID); - cout << "assignment" << endl; *olfmat = *((cvOneDMaterialOlufsen*)(materials[matID])); // printf("In GetNewInstance cvOneDMaterialOlufsen* materials is called \n"); - cout << "line 94 of the MaterialManager.cxx function:" << endl; olfmat->GetStarlingAmbientPressure(); return (cvOneDMaterial*)olfmat; }else if (types[matID] == MaterialType_MATERIAL_LINEAR) { diff --git a/Code/Source/cvOneDMaterialOlufsen.cxx b/Code/Source/cvOneDMaterialOlufsen.cxx index b2e35ee..1d51dbb 100644 --- a/Code/Source/cvOneDMaterialOlufsen.cxx +++ b/Code/Source/cvOneDMaterialOlufsen.cxx @@ -48,7 +48,6 @@ const double PI = 4.0 * atan(1.0); using namespace std; cvOneDMaterialOlufsen::cvOneDMaterialOlufsen(){ - cout << "cvOneDMaterialOlufsen function1: P_ambient is: " << P_ambient << endl; p1_ = 1333.2237 * 85.0; // initial p.. systemic side // p1_ = 1333.2237 * 20.0; // initial p..pulmonary side zstar = 70.0; @@ -67,7 +66,6 @@ cvOneDMaterialOlufsen::cvOneDMaterialOlufsen(){ cvOneDMaterialOlufsen::~cvOneDMaterialOlufsen(){} cvOneDMaterialOlufsen::cvOneDMaterialOlufsen (const cvOneDMaterialOlufsen &rhs){ - // cout << "cvOneDMaterialOlufsen function2: P_ambient is: " << P_ambient << endl; // this seems not used cvOneDMaterial::operator=(rhs); double k1 = 0,k2 = 0,k3 = 0; @@ -84,7 +82,6 @@ cvOneDMaterialOlufsen::cvOneDMaterialOlufsen (const cvOneDMaterialOlufsen &rhs){ } cvOneDMaterialOlufsen& cvOneDMaterialOlufsen::operator= (const cvOneDMaterialOlufsen &that){ - // cout << "operator= function: P_ambient is: " << P_ambient << endl; if (this != &that) { cvOneDMaterial::operator=(that); double k1 = 0,k2 = 0,k3 = 0; @@ -103,7 +100,6 @@ cvOneDMaterialOlufsen& cvOneDMaterialOlufsen::operator= (const cvOneDMaterialOlu } void cvOneDMaterialOlufsen::SetMaterialType(double *mType,double Pref){ - // cout << "SetMaterialType function: P_ambient is: " << P_ambient << endl; K1_ = mType[0]; K2_ = mType[1]; K3_ = mType[2]; @@ -114,7 +110,6 @@ void cvOneDMaterialOlufsen::SetMaterialType(double *mType,double Pref){ } void cvOneDMaterialOlufsen::SetPeriod(double per){ - // cout << "SetPeriod function: P_ambient is: " << P_ambient << endl; Period=per; } @@ -140,17 +135,13 @@ double cvOneDMaterialOlufsen::GetProperty(char* what)const{ void cvOneDMaterialOlufsen::SetHydraulicConductivity(double value) { L_P = value; - // cout << "L_P: "<< L_P << endl; } void cvOneDMaterialOlufsen::SetStarlingAmbientPressure(double value) { - // cout << "value: " << value << endl; P_ambient = value; - // cout << "P_ambient: "<< P_ambient << endl; } double cvOneDMaterialOlufsen::GetStarlingAmbientPressure() { - // cout << "GetStarlingAmbientPressure function: P_ambient is: " << P_ambient << endl; return P_ambient; } @@ -228,7 +219,6 @@ double cvOneDMaterialOlufsen::GetDpDS(double S, double z)const{ double So_ = GetS1(z); double ro=Getr1(z); double dpds=0.5* EHR * sqrt(So_/S)/S ; - // cout << EHR << " " << So_ << " " << ro << endl; return dpds; } diff --git a/Code/Source/cvOneDModelManager.cxx b/Code/Source/cvOneDModelManager.cxx index 096141c..15e9222 100644 --- a/Code/Source/cvOneDModelManager.cxx +++ b/Code/Source/cvOneDModelManager.cxx @@ -55,9 +55,6 @@ int cvOneDModelManager::CreateMaterial(char *matName, char *MaterialTypeString, cvOneDGlobal::gMaterialManager = new cvOneDMaterialManager(); } - // cout << L_P << endl; - // cout << P_ambient << endl; - if(!strcmp (MaterialTypeString, "MATERIAL_OLUFSEN")){ *matID = cvOneDGlobal::gMaterialManager->AddNewMaterialOlufsen(density,dynamicViscosity, profile_exponent,pRef,L_P,P_ambient,params); diff --git a/Code/Source/cvOneDMthSegmentModel.cxx b/Code/Source/cvOneDMthSegmentModel.cxx index 3afc69b..e8de99f 100644 --- a/Code/Source/cvOneDMthSegmentModel.cxx +++ b/Code/Source/cvOneDMthSegmentModel.cxx @@ -164,7 +164,6 @@ void cvOneDMthSegmentModel::N_MinorLoss(long ith, double* N_vec){ // func= Kv/Re0 + Kt / 2. * (1/a - 1.) * (1/a - 1.)*abs(Q[0])/Q[0]+Ku*1.06*L*sub->getDQDt()/Q; // for non-steady flow func = 2.0 * func*a*a/q/q; // a^2/q^2 switch from upstream segment to stenosed segment N = func * Q[1] / (2 * L); - cout << "168" << N << "\t"; const double pi = 3.14159265358979323846; const double mult = (8.0 * pi * kinViscosity0 / Q[0] + 0.5 * Kt / L * (1.0 - a) * (1.0 - a)); @@ -202,7 +201,6 @@ void cvOneDMthSegmentModel::N_MinorLoss(long ith, double* N_vec){ N_vec[0] = std; } - // cout << " -N " << -N << " Q(1) :"<< Q[1] << endl; } @@ -370,7 +368,6 @@ void cvOneDMthSegmentModel::FormElement(long element, // more values coming from constitutive equations // IV added IntegralpS and IntegralpD2S 01-24-03 - // cout << "\tline 376 N: " << N <GetPressure( U[0], z); double Outflow = material->GetOutflowFunction( pressure, z); double DpDS = material->GetDpDS( U[0], z); @@ -428,10 +425,6 @@ void cvOneDMthSegmentModel::FormElement(long element, double modA[4]; double modC[4]; - // cout << "A21: " << A[2] << "\tA22: " << A[3] << "\taux: " << aux << "\tDpDS: " << DpDS << "\t"; - // cout << "C22: " << C[3] << "\tN: " << N << "\tU[0]: " << U[0] << "\t"; - // cout << "F: " << F1 << "\t" << F2 << endl; - if(STABILIZATION==1){ GetModulus(A, modA); if(kinViscosity < SMALL_KINEMATIC_VISCOSITY){ diff --git a/Code/Source/cvOneDSubdomain.cxx b/Code/Source/cvOneDSubdomain.cxx index bc3f402..058708d 100644 --- a/Code/Source/cvOneDSubdomain.cxx +++ b/Code/Source/cvOneDSubdomain.cxx @@ -95,9 +95,6 @@ void cvOneDSubdomain::SetupMaterial(int matID){ mat = cvOneDGlobal::gMaterialManager->GetNewInstance(matID); // printf("subdomain cpp setupMaterial matID=%i \n", matID); mat->SetAreas_and_length(S_initial, S_final, fabs(z_out - z_in)); - // cout << "line 98 of cvOneDSubdomain.cxx" << endl; - // cout << mat->GetEHR((double) 0.3) << endl; - // mat->GetStarlingAmbientPressure(); } void cvOneDSubdomain::SetBoundValue(double boundV){ diff --git a/Code/Source/main.cxx b/Code/Source/main.cxx index c414291..4a81826 100644 --- a/Code/Source/main.cxx +++ b/Code/Source/main.cxx @@ -169,8 +169,6 @@ void createAndRunModel(cvOneDOptions* opts){ doubleParams[1] = opts->materialParam2[loopA]; doubleParams[2] = opts->materialParam3[loopA]; // CREATE MATERIAL - // cout << opts->materialHydraulicConductivity[loopA] << endl; - // cout << opts->materialAmbientPressure[loopA] << endl; matError = oned->CreateMaterial((char*)opts->materialName[loopA].c_str(), (char*)currMatType.c_str(), opts->materialDensity[loopA],