Changeset dfed1c for src/commands/com_print_residual_norm.cpp
- Timestamp:
- Nov 22, 2011, 9:22:10 PM (14 years ago)
- Children:
- facba0
- Parents:
- 66f24d
- File:
-
- 1 edited
-
src/commands/com_print_residual_norm.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/commands/com_print_residual_norm.cpp
r66f24d rdfed1c 13 13 #endif 14 14 15 #include < cstdio>15 #include <sstream> 16 16 17 17 #include "base/command.hpp" 18 18 #include "comm/comm.hpp" 19 #include "grid/grid.hpp" 19 20 #include "grid/multigrid.hpp" 20 21 #include "level/level_operator.hpp" … … 28 29 Request Run(Command::argument_vector arguments) 29 30 { 30 if (MG::GetComm()->Rank() == 0) 31 printf("Multigrid: Residual: %e\n", MG::GetComm()->ComputeResidualNorm(*MG::GetSol(), *MG::GetRhs())); 31 MPE_EVENT_BEGIN() 32 33 Multigrid* sol = MG::GetSol(); 34 Multigrid* rhs = MG::GetRhs(); 35 Comm* comm = MG::GetComm(); 36 37 if ((*sol)(sol->MaxLevel()).IsActive()) { 38 vmg_float residual = comm->ComputeResidualNorm(*sol, *rhs); 39 comm->PrintStringOnce("Residual: %e", residual); 40 } 41 42 MPE_EVENT_END() 32 43 33 44 return Continue; … … 38 49 }; 39 50 40 CREATE_INITIALIZER(VMGCommandPrintResidualNorm) ;51 CREATE_INITIALIZER(VMGCommandPrintResidualNorm)
Note:
See TracChangeset
for help on using the changeset viewer.
