Changeset b57b9b for src/units/particle/interface_fcs.cpp
- Timestamp:
- Sep 20, 2012, 1:54:01 PM (13 years ago)
- Children:
- c3acbb
- Parents:
- 2d3854
- File:
-
- 1 edited
-
src/units/particle/interface_fcs.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/units/particle/interface_fcs.cpp
r2d3854 rb57b9b 46 46 #include "comm/mpi/error_handler.hpp" 47 47 #endif 48 #include "cycles/cycle_cs_periodic.hpp" 49 #include "cycles/cycle_fas_dirichlet.hpp" 48 50 #include "level/level_operator_cs.hpp" 49 51 #include "level/level_operator_fas.hpp" … … 51 53 #include "samples/discretization_poisson_fd.hpp" 52 54 #include "samples/discretization_poisson_fv.hpp" 53 #include "samples/techniques.hpp"54 55 #include "smoother/gsrb_poisson_2.hpp" 55 56 #include "smoother/gsrb_poisson_4.hpp" … … 111 112 const bool singular = periodic[0] * periodic[1] * periodic[2]; 112 113 113 Comm* comm;114 Discretization* discretization;115 Interface* interface;116 LevelOperator* lop;117 Smoother* smoother;118 Solver* solver;119 120 114 /* 121 115 * Choose multigrid components … … 123 117 if (singular) { 124 118 125 comm = new Particle::CommMPI(boundary, new DomainDecompositionMPI(), mpi_comm); 126 discretization = new DiscretizationPoissonFD(discretization_order); 127 interface = new InterfaceParticles(boundary, 2, level, Vector(box_offset), box_size, near_field_cells, 0, 1.0); 128 lop = new LevelOperatorCS(Stencils::RestrictionFullWeight, Stencils::InterpolationTrilinear); 129 solver = new Givens<SolverSingular>(); 130 131 Techniques::SetCorrectionSchemePeriodic(interface->MinLevel(), interface->MaxLevel(), cycle_type); 119 new Particle::CommMPI(boundary, new DomainDecompositionMPI(), mpi_comm); 120 new DiscretizationPoissonFD(discretization_order); 121 new InterfaceParticles(boundary, 2, level, Vector(box_offset), box_size, near_field_cells, 0, 1.0); 122 new LevelOperatorCS(Stencils::RestrictionFullWeight, Stencils::InterpolationTrilinear); 123 new Givens<SolverSingular>(); 124 new CycleCSPeriodic(cycle_type); 132 125 133 126 }else { 134 127 135 comm = new Particle::CommMPI(boundary, new DomainDecompositionMPI(), mpi_comm); 136 discretization = new DiscretizationPoissonFV(discretization_order); 137 interface = new InterfaceParticles(boundary, 2, level, Vector(box_offset), box_size, near_field_cells, 2, 1.6); 138 lop = new LevelOperatorFAS(Stencils::RestrictionFullWeight, Stencils::Injection, Stencils::InterpolationTrilinear); 139 solver = new Givens<SolverRegular>(); 140 141 Techniques::SetFullApproximationSchemeDirichlet(interface->MinLevel(), interface->MaxLevel(), cycle_type); 128 new Particle::CommMPI(boundary, new DomainDecompositionMPI(), mpi_comm); 129 new DiscretizationPoissonFV(discretization_order); 130 new InterfaceParticles(boundary, 2, level, Vector(box_offset), box_size, near_field_cells, 2, 1.6); 131 new LevelOperatorFAS(Stencils::RestrictionFullWeight, Stencils::Injection, Stencils::InterpolationTrilinear); 132 new Givens<SolverRegular>(); 133 new CycleFASDirichlet(cycle_type); 142 134 143 135 } … … 147 139 */ 148 140 if (discretization_order == 2) 149 smoother =new GaussSeidelRBPoisson2();141 new GaussSeidelRBPoisson2(); 150 142 else 151 smoother = new GaussSeidelRBPoisson4(); 152 153 /* 154 * Register multigrid components 155 */ 156 comm->Register("COMM"); 157 discretization->Register("DISCRETIZATION"); 158 interface->Register("INTERFACE"); 159 lop->Register("LEVEL_OPERATOR"); 160 smoother->Register("SMOOTHER"); 161 solver->Register("SOLVER"); 143 new GaussSeidelRBPoisson4(); 162 144 163 145 /*
Note:
See TracChangeset
for help on using the changeset viewer.
