Commit ffcef999 authored by adelmann's avatar adelmann 🎗
Browse files

Merge branch 'master' of gitlab.psi.ch:OPAL/src

parents 70687d61 8752f0a1
......@@ -214,24 +214,34 @@ int main(int argc, char *argv[])
// Various counters, constants, etc:
double pi = acos(-1.0);
double twopi = 2.0*pi;
const double pi = acos(-1.0);
const double twopi = 2.0*pi;
e_dim_tag allParallel[D]; // Specifies SERIAL, PARALLEL dims
e_dim_tag serialParallel[D]; // Specifies SERIAL, PARALLEL dims
if (domDec == 3) {
for (unsigned int d=0; d<D; d++)
allParallel[d] = PARALLEL;
e_dim_tag serialParallel[D]; // Specifies SERIAL, PARALLEL dims
}
if (domDec == 2) {
for (unsigned int d=0; d<D; d++)
serialParallel[d] = PARALLEL;
serialParallel[domDec] = SERIAL;
serialParallel[2] = SERIAL;
}
else {
for (unsigned int d=0; d<D; d++)
serialParallel[d] = SERIAL;
serialParallel[2] = PARALLEL;
}
IpplTimings::startTimer(fInitTimer);
// create standard domain
NDIndex<D> ndiStandard;
for (unsigned int d=0; d<D; d++)
ndiStandard[d] = Index(ngrid[d]);
// create new domain with axes permuted to match FFT output
// create half-size domain for RC transform along zeroth axis
......@@ -298,7 +308,7 @@ int main(int argc, char *argv[])
rcfft.setDirectionName(+1, "forward");
rcfft.setDirectionName(-1, "inverse");
msg << "RC transform using layout with zeroth dim serial: compress tmp, constInput" << endl;
msg << "RC transform using compress tmp and constInput" << endl;
IpplTimings::startTimer(fftTimer);
rcfft.transform("forward", RFieldSPStan, CFieldSPStan0h, constInput);
......
......@@ -155,24 +155,21 @@ MGPoissonSolver::MGPoissonSolver ( PartBunch *beam,
FunctionTimer8_m = IpplTimings::getTimer("LHS to IPPL");
}
MGPoissonSolver::~MGPoissonSolver() {
if (Map) delete Map; Map = 0;
if (MLPrec) delete MLPrec; MLPrec = 0;
void MGPoissonSolver::deletePtr() {
if(Map) delete Map;
Map = 0;
if(MLPrec) delete MLPrec;
MLPrec=0;
A = Teuchos::null;
LHS = Teuchos::null;
RHS = Teuchos::null;
prec_m = Teuchos::null;
solver_ptr = Teuchos::null;
problem_ptr = Teuchos::null;
}
void MGPoissonSolver::deletePtr() {
A = Teuchos::null;
LHS = Teuchos::null;
RHS = Teuchos::null;
if(Map) delete Map;
if(MLPrec) delete MLPrec; MLPrec=0;
prec_m = Teuchos::null;
MGPoissonSolver::~MGPoissonSolver() {
deletePtr ();
solver_ptr = Teuchos::null;
problem_ptr = Teuchos::null;
}
void MGPoissonSolver::computePotential(Field_t &rho, Vector_t hr, double zshift) {
......
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