Commit fc2135cc authored by frey_m's avatar frey_m

Fix SAAMG compilation error due to new bunch base class

modified:   src/Solvers/MGPoissonSolver.cpp
modified:   src/Solvers/MGPoissonSolver.h
modified:   src/Structure/FieldSolver.cpp
parent ca67df1f
......@@ -9,7 +9,6 @@
#include "BoxCornerDomain.h"
//#include "RectangularDomain.h"
#include "Algorithms/PartBunch.h"
#include "Track/Track.h"
#include "Physics/Physics.h"
#include "Utilities/OpalException.h"
......@@ -52,7 +51,7 @@ using Teuchos::RCP;
using Teuchos::rcp;
using Physics::c;
MGPoissonSolver::MGPoissonSolver ( PartBunch &beam,
MGPoissonSolver::MGPoissonSolver ( PartBunch *beam,
Mesh_t *mesh,
FieldLayout_t *fl,
std::vector<BoundaryGeometry *> geometries,
......@@ -61,7 +60,7 @@ MGPoissonSolver::MGPoissonSolver ( PartBunch &beam,
double tol,
int maxiters,
std::string precmode):
itsBunch_m(&beam),
itsBunch_m(beam),
mesh_m(mesh),
layout_m(fl),
geometries_m(geometries),
......
......@@ -37,6 +37,8 @@ class Epetra_MpiComm;
// #include "BelosLinearProblem.hpp"
// #include "BelosRCGSolMgr.hpp"
#include "Algorithms/PartBunch.h"
#include "BelosTypes.hpp"
namespace Belos {
......@@ -94,13 +96,12 @@ enum {
* \warning This solver is in an EXPERIMENTAL STAGE. For reliable simulations use the FFTPoissonSolver
*
*/
class PartBunch;
class BoundaryGeometry;
class MGPoissonSolver : public PoissonSolver {
public:
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);
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);
MGPoissonSolver(PartBunch &bunch);
~MGPoissonSolver();
......
......@@ -375,11 +375,12 @@ void FieldSolver::initSolver(PartBunchBase<double, 3> *b) {
} else
tmp += geoms[i];
}
solver_m = new MGPoissonSolver(b, mesh_m, FL_m, geometries, Attributes::getString(itsAttr[ITSOLVER]),
Attributes::getString(itsAttr[INTERPL]),
Attributes::getReal(itsAttr[TOL]),
Attributes::getReal(itsAttr[MAXITERS]),
Attributes::getString(itsAttr[PRECMODE]));
solver_m = new MGPoissonSolver(dynamic_cast<PartBunch*>(itsBunch_m), mesh_m, FL_m,
geometries, Attributes::getString(itsAttr[ITSOLVER]),
Attributes::getString(itsAttr[INTERPL]),
Attributes::getReal(itsAttr[TOL]),
Attributes::getReal(itsAttr[MAXITERS]),
Attributes::getString(itsAttr[PRECMODE]));
itsBunch_m->set_meshEnlargement(Attributes::getReal(itsAttr[BBOXINCR]) / 100.0);
fsType_m = "SAAMG";
#else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment