Commit 5046f404 by Francois Gygi

remove Context dependency, use MPI_Comm

git-svn-id: http://qboxcode.org/svn/qb/trunk@1330 cba15fb0-1239-40c8-b417-11db7ca47a34
parent 2470dfd0
......@@ -21,15 +21,20 @@
#include "D3vector.h"
#include "UnitCell.h"
#include "Context.h"
#include <vector>
#ifdef USE_MPI
#include <mpi.h>
#else
typedef int MPI_Comm;
#endif
class Basis
{
private:
Context ctxt_;
int nprow_, myrow_;
MPI_Comm comm_;
int npes_, mype_;
UnitCell cell_; // cell dimensions
UnitCell refcell_; // reference cell dimensions
......@@ -67,7 +72,9 @@ class Basis
public:
const Context& context(void) const; // context on which Basis is defined
MPI_Comm comm(void) const; // MPI_Comm on which Basis is defined
int mype(void) const { return mype_; }
int npes(void) const { return npes_; }
const UnitCell& cell() const; // cell dimensions
const UnitCell& refcell() const;// reference cell dimensions
......@@ -135,7 +142,7 @@ class Basis
double memsize(void) const;
double localmemsize(void) const;
Basis(const Context &ctxt, D3vector kpoint);
Basis(MPI_Comm comm, D3vector kpoint);
//Basis(const Basis &b);
~Basis(void);
......
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