Cache repeated interpolation plans
This commit is contained in:
@@ -20,25 +20,41 @@ using namespace std;
|
||||
#include "cgh.h"
|
||||
#include "ShellPatch.h"
|
||||
#include "NullShellPatch.h"
|
||||
#include "NullShellPatch2.h"
|
||||
#include "var.h"
|
||||
#include "monitor.h"
|
||||
#include "NullShellPatch2.h"
|
||||
#include "var.h"
|
||||
#include "monitor.h"
|
||||
#include <map>
|
||||
|
||||
class surface_integral
|
||||
{
|
||||
|
||||
private:
|
||||
int Symmetry, factor;
|
||||
int N_theta, N_phi; // Number of points in Theta & Phi directions
|
||||
double dphi, dcostheta;
|
||||
double *arcostheta, *wtcostheta;
|
||||
int n_tot; // size of arrays
|
||||
|
||||
double *nx_g, *ny_g, *nz_g; // global list of unit normals
|
||||
int myrank, cpusize;
|
||||
|
||||
public:
|
||||
surface_integral(int iSymmetry);
|
||||
private:
|
||||
struct SpherePointCache
|
||||
{
|
||||
double *pox[3];
|
||||
SpherePointCache()
|
||||
{
|
||||
pox[0] = pox[1] = pox[2] = 0;
|
||||
}
|
||||
};
|
||||
|
||||
int Symmetry, factor;
|
||||
int N_theta, N_phi; // Number of points in Theta & Phi directions
|
||||
double dphi, dcostheta;
|
||||
double *arcostheta, *wtcostheta;
|
||||
int n_tot; // size of arrays
|
||||
|
||||
double *nx_g, *ny_g, *nz_g; // global list of unit normals
|
||||
int myrank, cpusize;
|
||||
map<double, SpherePointCache> sphere_point_cache;
|
||||
map<int, double *> shellf_cache;
|
||||
|
||||
void get_surface_points(double rex, double **pox);
|
||||
double *get_shellf_buffer(int num_var);
|
||||
void release_cached_buffers();
|
||||
|
||||
public:
|
||||
surface_integral(int iSymmetry);
|
||||
~surface_integral();
|
||||
|
||||
void surf_Wave(double rex, int lev, cgh *GH, var *Rpsi4, var *Ipsi4,
|
||||
|
||||
Reference in New Issue
Block a user