debug dumb bug

This commit is contained in:
James McClure
2019-10-22 13:57:04 +02:00
parent f060a9c3e6
commit 2d54c54db3

View File

@@ -270,15 +270,21 @@ void SubPhase::Basic(){
if (Dm->rank() == 0){
double force_mag = sqrt(Fx*Fx+Fy*Fy+Fz*Fz);
double dir_x = Fx/force_mag;
double dir_y = Fy/force_mag;
double dir_z = Fz/force_mag;
double dir_x = 0.0;
double dir_y = 0.0;
double dir_z = 0.0;
if (force_mag > 0.0){
dir_x = Fx/force_mag;
dir_y = Fy/force_mag;
dir_z = Fz/force_mag;
}
if (Dm->BoundaryCondition > 0 ){
// compute the pressure drop
double pressure_drop = (Pressure(Nx*Ny + Nx + 1) - 1.0) / 3.0;
double length = ((Nz-2)*Dm->nprocz);
force_mag += pressure_drop/length;
force_mag -= pressure_drop/length;
}
if (force_mag == 0.0){