Skip to content

Commit

Permalink
removed (cleaned up) all my debug statements, so hopefully it shouldn…
Browse files Browse the repository at this point in the history
…'t print things like crazy
  • Loading branch information
JRao-rgb committed Nov 17, 2023
1 parent ca60b52 commit 2b37da0
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 39 deletions.
10 changes: 1 addition & 9 deletions Code/Source/cvOneDBFSolver.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1232,9 +1226,7 @@ void cvOneDBFSolver::QuerryModelInformation(void)
subdomain->SetBoundCondition(BoundCondTypeScope::NOBOUND);
}
}

cout << "Line 1230" << endl;


// For branch use.
temp *= 2;
for(i=0; i<ij; i++){
Expand Down
1 change: 0 additions & 1 deletion Code/Source/cvOneDMaterialLinear.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ double cvOneDMaterialLinear::GetDpDS(double S, double z)const{
double So_ = GetS1(z);
double ro = Getr1(z);
double dpds=0.5* EHR* sqrt(So_/S)/S ;// for linear model
// cout << EHR << " " << So_ << " " << ro << endl;
return dpds;
}

Expand Down
4 changes: 0 additions & 4 deletions Code/Source/cvOneDMaterialManager.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ int cvOneDMaterialManager::AddNewMaterialOlufsen(double density, double dynamicV
olfmat->SetReferencePressure(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);
Expand All @@ -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) {
Expand Down
10 changes: 0 additions & 10 deletions Code/Source/cvOneDMaterialOlufsen.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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];
Expand All @@ -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;
}

Expand All @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down
3 changes: 0 additions & 3 deletions Code/Source/cvOneDModelManager.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
7 changes: 0 additions & 7 deletions Code/Source/cvOneDMthSegmentModel.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -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;
}


Expand Down Expand Up @@ -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 <<endl;
double pressure = material->GetPressure( U[0], z);
double Outflow = material->GetOutflowFunction( pressure, z);
double DpDS = material->GetDpDS( U[0], z);
Expand Down Expand Up @@ -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){
Expand Down
3 changes: 0 additions & 3 deletions Code/Source/cvOneDSubdomain.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down
2 changes: 0 additions & 2 deletions Code/Source/main.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down

0 comments on commit 2b37da0

Please sign in to comment.