Changeset b57b9b for test/unit_test/library/periodic_cs.cpp
- Timestamp:
- Sep 20, 2012, 1:54:01 PM (13 years ago)
- Children:
- c3acbb
- Parents:
- 2d3854
- File:
-
- 1 edited
-
test/unit_test/library/periodic_cs.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
test/unit_test/library/periodic_cs.cpp
r2d3854 rb57b9b 35 35 #include "base/vector.hpp" 36 36 #include "comm/comm_serial.hpp" 37 #include "cycles/cycle_cs_periodic.hpp" 37 38 #include "level/level_operator_cs.hpp" 38 39 #include "samples/discretization_poisson_fd.hpp" 39 #include "samples/techniques.hpp"40 40 #include "smoother/gs.hpp" 41 41 #include "smoother/gsrb.hpp" 42 #ifdef HAVE_LAPACK43 #include "solver/dsysv.hpp"44 #endif45 42 #include "solver/givens.hpp" 46 43 #include "solver/solver_singular.hpp" … … 57 54 LibraryPeriodicCSFixture() 58 55 { 59 Factory& factory = MG::GetFactory();56 const Boundary boundary(Periodic, Periodic, Periodic); 60 57 61 Comm *comm = new CommSerial(Boundary(Periodic, Periodic, Periodic)); 62 comm->Register("COMM"); 58 new CommSerial(boundary); 59 new VMGInterfaces::InterfaceSinus(sine_factor, boundary, 2, 6, 0.0, 1.0); 60 new DiscretizationPoissonFD(2); 61 new LevelOperatorCS(Stencils::RestrictionFullWeight, Stencils::InterpolationTrilinear); 62 new GaussSeidelRB(); 63 new Givens<SolverSingular>(); 64 new CycleCSPeriodic(2); 63 65 64 Interface* interface = new VMGInterfaces::InterfaceSinus(sine_factor, comm->BoundaryConditions(), 2, 6, 0.0, 1.0); 65 interface->Register("INTERFACE"); 66 67 Discretization* discretization = new DiscretizationPoissonFD(2); 68 discretization->Register("DISCRETIZATION"); 69 70 LevelOperator* lop = new LevelOperatorCS(Stencils::RestrictionFullWeight, Stencils::InterpolationTrilinear); 71 lop->Register("LEVEL_OPERATOR"); 72 73 Smoother* smoother = new GaussSeidelRB(); 74 smoother->Register("SMOOTHER"); 75 76 #ifdef HAVE_LAPACK 77 Solver* solver = new DSYSV<SolverSingular>(); 78 #else 79 Solver* solver = new Givens<SolverSingular>(); 80 #endif 81 solver->Register("SOLVER"); 82 83 Techniques::SetCorrectionSchemePeriodic(interface->MinLevel(), interface->MaxLevel(), 2); 84 85 factory.RegisterObjectStorage("PRESMOOTHSTEPS", 3); 86 factory.RegisterObjectStorage("POSTSMOOTHSTEPS", 3); 87 factory.RegisterObjectStorage("PRECISION", 1e-10); 88 factory.RegisterObjectStorage("MAX_ITERATION", 7); 66 new ObjectStorage<int>("PRESMOOTHSTEPS", 3); 67 new ObjectStorage<int>("POSTSMOOTHSTEPS", 3); 68 new ObjectStorage<int>("MAX_ITERATION", 7); 69 new ObjectStorage<vmg_float>("PRECISION", 1.0e-10); 89 70 90 71 MG::PostInit();
Note:
See TracChangeset
for help on using the changeset viewer.
