Commit 83ad83e9 authored by Shuang Chen's avatar Shuang Chen
Browse files

add debug code

parent 30f93664
......@@ -36,10 +36,14 @@ void MatrixTranslatorGeneral<ODESystemTag::FirstOrderImplicitQuasilinear>::
auto& tmp = NumLib::GlobalVectorProvider::provider.getVector(_tmp_id);
_time_disc.getWeightedOldX(tmp, x_prev);
// debugging
tmp.write(
"C:\\george\\PhD\\UFZ\\task\\89\\opti_BHEprocess\\debug\\weighted_old_x.txt");
// rhs = M * weighted_old_x + b
LinAlg::matMultAdd(M, tmp, b, rhs);
// debugging
rhs.write(
"C:\\george\\PhD\\UFZ\\task\\89\\opti_BHEprocess\\debug\\global_B.txt");
NumLib::GlobalVectorProvider::provider.releaseVector(tmp);
}
......
......@@ -91,6 +91,9 @@ NonlinearSolverStatus NonlinearSolver<NonlinearSolverTag::Picard>::solve(
time_assembly.start();
sys.assemble(x_new, x_prev, process_id);
sys.getA(A);
// debugging
A.write(
"C:\\george\\PhD\\UFZ\\task\\89\\opti_BHEprocess\\debug\\global_A.txt");
sys.getRhs(*x_prev[process_id], rhs);
INFO("[time] Assembly took {:g} s.", time_assembly.elapsed());
......
......@@ -25,6 +25,9 @@ void BHEBottomDirichletBoundaryCondition::getEssentialBCValues(
// the same as the inflow temperature
// get the inflow temperature from here.
bc_values.values[0] = x[_in_out_global_indices.first];
// debugging
x.write(
"C:\\george\\PhD\\UFZ\\task\\89\\opti_BHEprocess\\debug\\x.txt");
}
std::unique_ptr<BHEBottomDirichletBoundaryCondition>
......
......@@ -103,6 +103,10 @@ void VectorMatrixAssembler::assemble(
assert(_local_b_data.size() == num_r_c);
b.add(indices, _local_b_data);
}
// debugging
M.write("C:\\george\\PhD\\UFZ\\task\\89\\opti_BHEprocess\\debug\\m.txt");
K.write("C:\\george\\PhD\\UFZ\\task\\89\\opti_BHEprocess\\debug\\K.txt");
b.write("C:\\george\\PhD\\UFZ\\task\\89\\opti_BHEprocess\\debug\\b.txt");
}
void VectorMatrixAssembler::assembleWithJacobian(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment