Changeset dfed1c for test/unit_test/smoother_test.cpp
- Timestamp:
- Nov 22, 2011, 9:22:10 PM (14 years ago)
- Children:
- facba0
- Parents:
- 66f24d
- File:
-
- 1 edited
-
test/unit_test/smoother_test.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
test/unit_test/smoother_test.cpp
r66f24d rdfed1c 27 27 void SmootherTestSuite::setUp() 28 28 { 29 Comm* comm = new CommSerial(Dirichlet); 29 Boundary boundary(Dirichlet, Dirichlet, Dirichlet); 30 31 Comm* comm = new CommSerial(boundary); 30 32 comm->Register("COMM"); 31 33 … … 33 35 discretization->Register("DISCRETIZATION"); 34 36 35 Interface* interface = new VMGInterfaces::InterfaceSinus( Dirichlet, 4, 4, 0.0, 1.0);37 Interface* interface = new VMGInterfaces::InterfaceSinus(boundary, 4, 4, 0.0, 1.0); 36 38 MG::SetInterface(interface, comm); 37 39 … … 44 46 void SmootherTestSuite::tearDown() 45 47 { 48 MG::Destroy(); 49 46 50 delete gs; 47 51 delete gsrb; … … 51 55 { 52 56 double norm; 57 Multigrid& sol = *MG::GetSol(); 58 Multigrid& rhs = *MG::GetRhs(); 59 Comm& comm = *MG::GetComm(); 53 60 54 MG::GetSol()->ClearAll();61 sol.ClearAll(); 55 62 56 63 for (int i=0; i<20; ++i) { 57 64 58 gs->Run( *MG::GetSol(), *MG::GetRhs(), 50);59 norm = MG::GetComm()->ComputeResidualNorm(*MG::GetSol(), *MG::GetRhs());65 gs->Run(sol, rhs, 50); 66 norm = comm.ComputeResidualNorm(sol, rhs); 60 67 61 68 if (norm < 1e-10)
Note:
See TracChangeset
for help on using the changeset viewer.
