/* FDCT3D (Fast 3d Curvelet Transform) Copyright (C) 2004 Caltech Written by Lexing Ying */ #ifndef _CPXCRVLETPRTD_HPP_ #define _CPXCRVLETPRTD_HPP_ #include "numtns.hpp" //----------------------------------------- //Complex Curvelet Partitioned class CpxCrvletPrtd { protected: vector< vector > _nx, _ny, _nz; //size of vector< vector > _owners; vector< vector > _sizes; vector< vector > _exists; vector< vector > _blocks; public: CpxCrvletPrtd() {;} CpxCrvletPrtd(const CpxCrvletPrtd& D); ~CpxCrvletPrtd() {;} CpxCrvletPrtd& operator=(const CpxCrvletPrtd& D); int setup(vector< vector > nx, vector< vector > ny, vector< vector > nz, vector< vector >& owners); int expand(vector< vector >& newexists); int scatter(vector< vector >& newexists); int shift(vector< vector >& newowners); int discard(); int combine(); //access vector< vector >& nx() { return _nx; } vector< vector >& ny() { return _ny; } vector< vector >& nz() { return _nz; } vector< vector >& owners() { return _owners; } vector< vector >& sizes() { return _sizes; } vector< vector >& exists() { return _exists; } CpxNumTns& block(int s, int w) { assert(_exists[s][w]==true); return _blocks[s][w]; } double globalenergy(); int check(); //extra int mpirank() const { int rank; MPI_Comm_rank(MPI_COMM_WORLD, &rank); return rank; } int mpisize() const { int size; MPI_Comm_size(MPI_COMM_WORLD, &size); return size; } }; #endif