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