34 #ifndef MG_POISSON_SOLVER_H_
35 #define MG_POISSON_SOLVER_H_
44 #include <Tpetra_Vector.hpp>
45 #include <Tpetra_CrsMatrix.hpp>
47 #include <Teuchos_DefaultMpiComm.hpp>
49 #include <BelosLinearProblem.hpp>
50 #include <BelosSolverFactory.hpp>
53 #include <MueLu_TpetraOperator.hpp>
55 #include "Teuchos_ParameterList.hpp"
84 typedef Teuchos::MpiComm<int>
Comm_t;
100 std::vector<BoundaryGeometry *> geometries,
101 std::string itsolver, std::string interpl,
102 double tol,
int maxiters, std::string precmode);
131 bp_m->resizeMesh(origin, hr, rmin, rmax, dh);
169 std::unique_ptr<IrregularDomain>
bp_m;
172 Teuchos::RCP<TpetraVector_t>
RHS;
174 Teuchos::RCP<TpetraVector_t>
LHS;
176 Teuchos::RCP<TpetraCrsMatrix_t>
A;
186 Teuchos::RCP<TpetraMultiVector_t>
P_mp;
UniformCartesian< 3, double > Mesh_t
Field< double, 3, Mesh_t, Center_t > Field_t
ParticleSpatialLayout< double, 3, Mesh_t > Layout_t
CenteredFieldLayout< 3, Mesh_t, Center_t > FieldLayout_t
Inform & operator<<(Inform &os, const MGPoissonSolver &fs)
ParticleSpatialLayout< double, 3 >::SingleParticlePos_t Vector_t
int precmode_m
preconditioner mode
Teuchos::RCP< TpetraVector_t > LHS
left hand side of the linear system of equations we solve
void computeMap(NDIndex< 3 > localId)
recomputes the map
Teuchos::MpiComm< int > Comm_t
void setupMueLuList()
Setup the parameters for the SAAMG preconditioner.
IpplTimings::TimerRef FunctionTimer2_m
IpplTimings::TimerRef FunctionTimer4_m
Teuchos::RCP< LinearProblem_t > problem_mp
Tpetra::CrsMatrix TpetraCrsMatrix_t
Inform & print(Inform &os) const
double getXRangeMax(unsigned short)
Tpetra::Vector ::global_ordinal_type TpetraGlobalOrdinal_t
Tpetra::Vector ::scalar_type TpetraScalar_t
void printLoadBalanceStats()
useful load balance information
Tpetra::Vector TpetraVector_t
Vector_t hr_m
mesh spacings in each direction
MueLu::TpetraOperator MueLuTpetraOperator_t
Teuchos::ParameterList belosList
parameter list for the iterative solver (Belos)
PartBunch * itsBunch_m
PartBunch object.
int recycleBlocks_m
number of vectors in recycle space
int numBlocks_m
maximum number of blocks in Krylov space
IpplTimings::TimerRef FunctionTimer5_m
double getXRangeMin(unsigned short)
Tpetra::MultiVector TpetraMultiVector_t
Teuchos::ParameterList ParameterList_t
Vektor< int, 3 > nr_m
current number of mesh points in each direction
double getYRangeMax(unsigned short)
IpplTimings::TimerRef FunctionTimer3_m
double tol_m
tolerance for the iterative solver
double getYRangeMin(unsigned short)
std::deque< TpetraVector_t > OldLHS
void setupBelosList()
Setup the parameters for the Belos iterative solver.
double getZRangeMax(unsigned short)
void computePotential(Field_t &rho, Vector_t hr)
IpplTimings::TimerRef FunctionTimer7_m
int maxiters_m
maximal number of iterations for the iterative solver
Teuchos::RCP< MueLuTpetraOperator_t > prec_mp
MueLu preconditioner object.
void IPPLToMap3D(NDIndex< 3 > localId)
void setGeometry(std::vector< BoundaryGeometry * > geometries)
set a geometry
void ComputeStencil(Vector_t hr, Teuchos::RCP< TpetraVector_t > RHS)
unsigned int nLHS_m
last N LHS's for extrapolating the new LHS as starting vector
Teuchos::RCP< const Comm_t > comm_mp
communicator used by Trilinos
bool verbose_m
flag specifying if we are verbose
void resizeMesh(Vector_t &origin, Vector_t &hr, const Vector_t &rmin, const Vector_t &rmax, double dh)
MGPoissonSolver(PartBunch *beam, Mesh_t *mesh, FieldLayout_t *fl, std::vector< BoundaryGeometry * > geometries, std::string itsolver, std::string interpl, double tol, int maxiters, std::string precmode)
BoundaryGeometry * currentGeometry
holding the currently active geometry
Tpetra::Operator TpetraOperator_t
Belos::SolverManager< TpetraScalar_t, TpetraMultiVector_t, TpetraOperator_t > SolverManager_t
Vektor< int, 3 > orig_nr_m
global number of mesh points in each direction
Teuchos::RCP< TpetraMap_t > map_p
Map holding the processor distribution of data.
Teuchos::RCP< SolverManager_t > solver_mp
double getZRangeMin(unsigned short)
IpplTimings::TimerRef FunctionTimer6_m
Belos::LinearProblem< TpetraScalar_t, TpetraMultiVector_t, TpetraOperator_t > LinearProblem_t
Teuchos::RCP< TpetraMultiVector_t > P_mp
IpplTimings::TimerRef FunctionTimer8_m
Teuchos::RCP< TpetraVector_t > RHS
right hand side of our problem
IpplTimings::TimerRef FunctionTimer1_m
Teuchos::ParameterList MueLuList_m
parameter list for the MueLu solver
void test(PartBunchBase< double, 3 > *)
std::vector< BoundaryGeometry * > geometries_m
container for multiple geometries
Teuchos::RCP< TpetraCrsMatrix_t > A
matrix used in the linear system of equations
std::unique_ptr< IrregularDomain > bp_m
structure that holds boundary points
Timing::TimerRef TimerRef