Changeset b57b9b for test/unit_test/library/dirichlet_fas_mpi.cpp
- Timestamp:
- Sep 20, 2012, 1:54:01 PM (13 years ago)
- Children:
- c3acbb
- Parents:
- 2d3854
- File:
-
- 1 edited
-
test/unit_test/library/dirichlet_fas_mpi.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
test/unit_test/library/dirichlet_fas_mpi.cpp
r2d3854 rb57b9b 44 44 #include "comm/comm_mpi.hpp" 45 45 #include "comm/domain_decomposition_mpi.hpp" 46 #include "cycles/cycle_fas_dirichlet.hpp" 46 47 #include "level/level_operator_fas.hpp" 47 48 #include "level/level_operator.hpp" 48 49 #include "samples/discretization_poisson_fd.hpp" 49 #include "samples/techniques.hpp"50 50 #include "smoother/gsrb.hpp" 51 #ifdef HAVE_LAPACK52 #include "solver/dgesv.hpp"53 #endif54 51 #include "solver/givens.hpp" 55 52 #include "solver/solver_regular.hpp" … … 66 63 LibraryDirichletFASMPIFixture() 67 64 { 68 Factory& factory = MG::GetFactory();65 const Boundary boundary(Dirichlet, Dirichlet, Dirichlet); 69 66 70 Comm *comm = new CommMPI(Boundary(Dirichlet, Dirichlet, Dirichlet), new DomainDecompositionMPI()); 71 comm->Register("COMM"); 67 new CommMPI(boundary, new DomainDecompositionMPI()); 68 new VMGInterfaces::InterfaceSinus(sine_factor, boundary, 2, 6, 0.0, 1.0); 69 new DiscretizationPoissonFD(2); 70 new LevelOperatorFAS(Stencils::RestrictionFullWeight, Stencils::Injection, Stencils::InterpolationTrilinear); 71 new GaussSeidelRB(); 72 new Givens<SolverRegular>(); 73 new CycleFASDirichlet(2); 72 74 73 Interface* interface = new VMGInterfaces::InterfaceSinus(sine_factor, comm->BoundaryConditions(), 2, 6, 0.0, 1.0); 74 interface->Register("INTERFACE"); 75 76 Discretization* discretization = new DiscretizationPoissonFD(2); 77 discretization->Register("DISCRETIZATION"); 78 79 LevelOperator* lop = new LevelOperatorFAS(Stencils::RestrictionFullWeight, Stencils::Injection, Stencils::InterpolationTrilinear); 80 lop->Register("LEVEL_OPERATOR"); 81 82 Smoother* smoother = new GaussSeidelRB(); 83 smoother->Register("SMOOTHER"); 84 85 #ifdef HAVE_LAPACK 86 Solver* solver = new DGESV<SolverRegular>(); 87 #else 88 Solver* solver = new Givens<SolverRegular>(); 89 #endif 90 91 solver->Register("SOLVER"); 92 93 Techniques::SetFullApproximationSchemeDirichlet(interface->MinLevel(), interface->MaxLevel(), 2); 94 95 factory.RegisterObjectStorage("PRESMOOTHSTEPS", 3); 96 factory.RegisterObjectStorage("POSTSMOOTHSTEPS", 3); 97 factory.RegisterObjectStorage("PRECISION", 1e-10); 98 factory.RegisterObjectStorage("MAX_ITERATION", 7); 75 new ObjectStorage<int>("PRESMOOTHSTEPS", 3); 76 new ObjectStorage<int>("POSTSMOOTHSTEPS", 3); 77 new ObjectStorage<int>("MAX_ITERATION", 7); 78 new ObjectStorage<vmg_float>("PRECISION", 1.0e-10); 99 79 100 80 MG::PostInit();
Note:
See TracChangeset
for help on using the changeset viewer.
