diff --git a/src/main.cpp b/src/main.cpp index 1c51637df51b8102f61f191b4a6fb0f631d51151..1ab6e36f6ba9a7888f7231969a3fbfbfbe9340ad 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -67,16 +67,16 @@ int main(int argc, char *argv[]) } std::cout << "Code version: " - << rang::style::bold << RevisionInfo::version() << rang::style::reset << '\n'; + << rang::style::bold << RevisionInfo::version() << rang::style::reset << '\n'; std::cout << "-------------------- " - << rang::fg::green - << "git info" - << rang::fg::reset - <<" -------------------------" - << '\n'; + << rang::fg::green + << "git info" + << rang::fg::reset + <<" -------------------------" + << '\n'; std::cout << "tag: " << rang::fg::reset - << rang::style::bold << RevisionInfo::gitTag() << rang::style::reset << '\n'; + << rang::style::bold << RevisionInfo::gitTag() << rang::style::reset << '\n'; std::cout << "HEAD: " << rang::style::bold << RevisionInfo::gitHead() << rang::style::reset << '\n'; std::cout << "hash: " << rang::style::bold << RevisionInfo::gitHash() << rang::style::reset << " ("; @@ -190,22 +190,22 @@ int main(int argc, char *argv[]) VTKWriter vtk_writer("mesh", 0.01); while((t<tmax) and (iteration<itermax)) { - vtk_writer.write(mesh, t); - double dt = 0.4*acoustic_solver.acoustic_dt(Vj, cj); - if (t+dt>tmax) { - dt=tmax-t; - } - acoustic_solver.computeNextStep(t,dt, unknowns); + vtk_writer.write(mesh, t); + double dt = 0.4*acoustic_solver.acoustic_dt(Vj, cj); + if (t+dt>tmax) { + dt=tmax-t; + } + acoustic_solver.computeNextStep(t,dt, unknowns); - block_eos.updatePandCFromRhoE(); + block_eos.updatePandCFromRhoE(); - t += dt; - ++iteration; + t += dt; + ++iteration; } vtk_writer.write(mesh, t, true); // forces last output std::cout << "* " << rang::style::underline << "Final time" << rang::style::reset - << ": " << rang::fgB::green << t << rang::fg::reset << " (" << iteration << " iterations)\n"; + << ": " << rang::fgB::green << t << rang::fg::reset << " (" << iteration << " iterations)\n"; method_cost_map["AcousticSolverWithMesh"] = timer.seconds(); @@ -229,7 +229,6 @@ int main(int argc, char *argv[]) ConnectivityType::NodesBoundary nodes_boundary = mesh.connectivity().nodesBoundary(i_boundary); const RefId& ref = nodes_boundary.first; TinyVector<2> normal(0,0); - std::cout << "imposing BC on " << ref.tagName() << '\n'; if ((ref.tagName()== std::string("XMIN")) or (ref.tagName()=="XMAX")) { normal = TinyVector<2>(1,0); } else if ((ref.tagName()=="YMIN") or (ref.tagName()=="YMAX")) { @@ -279,22 +278,22 @@ int main(int argc, char *argv[]) VTKWriter vtk_writer("mesh", 0.01); while((t<tmax) and (iteration<itermax)) { - vtk_writer.write(mesh, t); - double dt = 0.4*acoustic_solver.acoustic_dt(Vj, cj); - if (t+dt>tmax) { - dt=tmax-t; - } - acoustic_solver.computeNextStep(t,dt, unknowns); + vtk_writer.write(mesh, t); + double dt = 0.4*acoustic_solver.acoustic_dt(Vj, cj); + if (t+dt>tmax) { + dt=tmax-t; + } + acoustic_solver.computeNextStep(t,dt, unknowns); - block_eos.updatePandCFromRhoE(); + block_eos.updatePandCFromRhoE(); - t += dt; - ++iteration; + t += dt; + ++iteration; } vtk_writer.write(mesh, t, true); // forces last output std::cout << "* " << rang::style::underline << "Final time" << rang::style::reset - << ": " << rang::fgB::green << t << rang::fg::reset << " (" << iteration << " iterations)\n"; + << ": " << rang::fgB::green << t << rang::fg::reset << " (" << iteration << " iterations)\n"; method_cost_map["AcousticSolverWithMesh"] = timer.seconds(); break; @@ -321,14 +320,14 @@ int main(int argc, char *argv[]) std::vector<BoundaryConditionHandler> bc_list; { // quite dirty! SymmetryBoundaryCondition<MeshType::dimension>* sym_bc0 - = new SymmetryBoundaryCondition<MeshType::dimension>(std::vector<unsigned int>({0u}), - TinyVector<1>(-1)); + = new SymmetryBoundaryCondition<MeshType::dimension>(std::vector<unsigned int>({0u}), + TinyVector<1>(-1)); std::shared_ptr<SymmetryBoundaryCondition<1>> bc0(sym_bc0); bc_list.push_back(BoundaryConditionHandler(bc0)); PressureBoundaryCondition* pres_bc1 - = new PressureBoundaryCondition(0.1, - std::vector<unsigned int>({static_cast<unsigned int>(mesh.numberOfCells())})); + = new PressureBoundaryCondition(0.1, + std::vector<unsigned int>({static_cast<unsigned int>(mesh.numberOfCells())})); std::shared_ptr<PressureBoundaryCondition> bc1(pres_bc1); bc_list.push_back(BoundaryConditionHandler(bc1)); }