GPUE  v1.0
GPU Gross-Pitaevskii Equation numerical solver for Bose-Einstein condensates
split_op.h File Reference

command line parser file. More...

#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <string>
#include <ctime>
#include <cuda.h>
#include <cuda_runtime.h>
#include <cufft.h>
#include <ctype.h>
#include <getopt.h>
#include "tracker.h"
#include "ds.h"
#include "constants.h"
Include dependency graph for split_op.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int isError (int result, char *c)
 Checks if CUDA operation has succeeded. Prints to stdout. More...
 
void parSum (double2 *gpuWfc, Grid &par)
 Performs parallel summation and renormalises the wavefunction. More...
 
void parSum (double *gpuWfc, double *gpuParSum, Grid &par)
 Performs parallel summation and renormalises the wavefunction. More...
 
void optLatSetup (const std::shared_ptr< Vtx::Vortex > centre, const double *V, std::vector< std::shared_ptr< Vtx::Vortex >> &vArray, double theta_opt, double intensity, double *v_opt, const double *x, const double *y, Grid &par)
 Creates the optical lattice to match the vortex lattice constant. More...
 
double energy_calc (Grid &par, double2 *wfc)
 Calculates the energy of the condensate. More...
 

Detailed Description

command line parser file.

Host and device declarations for simulations.

Author
James Ryan Schloss (leios)
Date
5/25/2016
Version
0.1
Author
Lee J. O'Riordan (mlxd)
Date
12/11/2015
Version
0.1

DESCRIPTION

These functions and variables are necessary for carrying out the GPUE simulations. This file will be re-written in an improved form in some future release.

Definition in file split_op.h.

Function Documentation

◆ energy_calc()

double energy_calc ( Grid par,
double2 *  wfc 
)

Calculates the energy of the condensate.

Parameters
gpuWfcDevice wavefunction array
Parameterclass
Returns
$ | H | $

◆ isError()

int isError ( int  result,
char *  c 
)

Checks if CUDA operation has succeeded. Prints to stdout.

Parameters
resultFunction result code of CUDA operation
cDescriptor of CUDA operation
Returns
0 for success. See CUDA failure codes in cuda.h for other values.

◆ optLatSetup()

void optLatSetup ( const std::shared_ptr< Vtx::Vortex centre,
const double *  V,
std::vector< std::shared_ptr< Vtx::Vortex >> &  vArray,
double  theta_opt,
double  intensity,
double *  v_opt,
const double *  x,
const double *  y,
Grid par 
)

Creates the optical lattice to match the vortex lattice constant.

Parameters
centreCentral vortex in condensate
VTrapping potential for condensate
vArrayVortex location array
theta_optOffset angle for optical lattice relative to vortex lattice
intensityOptical lattice amplitude
v_optOptical lattice memory address location
xX grid array
yY grid array
Parameterclass

◆ parSum() [1/2]

void parSum ( double2 *  gpuWfc,
Grid par 
)

Performs parallel summation and renormalises the wavefunction.

Parameters
gpuWfcGPU memory location for wavefunction
Parameterclass
Returns
0 for success. See CUDA failure codes in cuda.h for other values.

◆ parSum() [2/2]

void parSum ( double *  gpuWfc,
double *  gpuParSum,
Grid par 
)

Performs parallel summation and renormalises the wavefunction.

Parameters
gpuWfcGPU memory location for wavefunction
gpuParSumwavefunction density
Parameterclass
Returns
0 for success. See CUDA failure codes in cuda.h for other values.