Compare commits
14 Commits
lzd-cuda
...
main-upstr
| Author | SHA1 | Date | |
|---|---|---|---|
|
17109fde9b
|
|||
|
c185f99ee3
|
|||
|
4a13a9d37a
|
|||
| ac82ebd889 | |||
| 9c31384b2f | |||
| e4e741caa1 | |||
| 65e0f95f40 | |||
| f9fbf97e64 | |||
| 968522995b | |||
| f3988ac8ca | |||
| e4c25eb21f | |||
| 4b10519876 | |||
| 3a58273501 | |||
| 5c65cea2f0 |
4
.gitignore
vendored
4
.gitignore
vendored
@@ -1,6 +1,6 @@
|
|||||||
__pycache__
|
__pycache__
|
||||||
GW150914
|
GW150914
|
||||||
GW150914*
|
GW150914-origin
|
||||||
docs
|
docs
|
||||||
*.tmp
|
*.tmp
|
||||||
.codex
|
|
||||||
|
|||||||
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
@@ -16,9 +16,9 @@ import numpy
|
|||||||
File_directory = "GW150914" ## output file directory
|
File_directory = "GW150914" ## output file directory
|
||||||
Output_directory = "binary_output" ## binary data file directory
|
Output_directory = "binary_output" ## binary data file directory
|
||||||
## The file directory name should not be too long
|
## The file directory name should not be too long
|
||||||
MPI_processes = 8 ## number of mpi processes used in the simulation
|
MPI_processes = 64 ## number of mpi processes used in the simulation
|
||||||
|
|
||||||
GPU_Calculation = "yes" ## Use GPU or not
|
GPU_Calculation = "no" ## Use GPU or not
|
||||||
## (prefer "no" in the current version, because the GPU part may have bugs when integrated in this Python interface)
|
## (prefer "no" in the current version, because the GPU part may have bugs when integrated in this Python interface)
|
||||||
CPU_Part = 1.0
|
CPU_Part = 1.0
|
||||||
GPU_Part = 0.0
|
GPU_Part = 0.0
|
||||||
|
|||||||
@@ -126,11 +126,6 @@ setup.generate_AMSSNCKU_input()
|
|||||||
#inputvalue = input() ## Wait for user input (press Enter) to proceed
|
#inputvalue = input() ## Wait for user input (press Enter) to proceed
|
||||||
#print()
|
#print()
|
||||||
|
|
||||||
setup.print_puncture_information()
|
|
||||||
|
|
||||||
|
|
||||||
##################################################################
|
|
||||||
|
|
||||||
## Generate AMSS-NCKU program input files based on the configured parameters
|
## Generate AMSS-NCKU program input files based on the configured parameters
|
||||||
|
|
||||||
print( )
|
print( )
|
||||||
@@ -258,7 +253,7 @@ print()
|
|||||||
if (input_data.GPU_Calculation == "no"):
|
if (input_data.GPU_Calculation == "no"):
|
||||||
ABE_file = os.path.join(AMSS_NCKU_source_copy, "ABE")
|
ABE_file = os.path.join(AMSS_NCKU_source_copy, "ABE")
|
||||||
elif (input_data.GPU_Calculation == "yes"):
|
elif (input_data.GPU_Calculation == "yes"):
|
||||||
ABE_file = os.path.join(AMSS_NCKU_source_copy, "ABE_CUDA")
|
ABE_file = os.path.join(AMSS_NCKU_source_copy, "ABEGPU")
|
||||||
|
|
||||||
if not os.path.exists( ABE_file ):
|
if not os.path.exists( ABE_file ):
|
||||||
print( )
|
print( )
|
||||||
@@ -312,7 +307,7 @@ if (input_data.Initial_Data_Method == "Ansorg-TwoPuncture" ):
|
|||||||
|
|
||||||
import generate_TwoPuncture_input
|
import generate_TwoPuncture_input
|
||||||
|
|
||||||
generate_TwoPuncture_input.generate_AMSSNCKU_TwoPuncture_input()
|
generate_TwoPuncture_input.generate_AMSSNCKU_TwoPuncture_input(numerical_grid.puncture_data)
|
||||||
|
|
||||||
print( )
|
print( )
|
||||||
print( " The input parfile for the TwoPunctureABE executable has been generated. " )
|
print( " The input parfile for the TwoPunctureABE executable has been generated. " )
|
||||||
@@ -354,7 +349,7 @@ if (input_data.Initial_Data_Method == "Ansorg-TwoPuncture" ):
|
|||||||
|
|
||||||
import renew_puncture_parameter
|
import renew_puncture_parameter
|
||||||
|
|
||||||
renew_puncture_parameter.append_AMSSNCKU_BSSN_input(File_directory, output_directory)
|
renew_puncture_parameter.append_AMSSNCKU_BSSN_input(File_directory, output_directory, numerical_grid.puncture_data)
|
||||||
|
|
||||||
|
|
||||||
## Generated AMSS-NCKU input filename
|
## Generated AMSS-NCKU input filename
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -48,7 +48,6 @@ public:
|
|||||||
double StartTime, TotalTime;
|
double StartTime, TotalTime;
|
||||||
double AnasTime, DumpTime, d2DumpTime, CheckTime;
|
double AnasTime, DumpTime, d2DumpTime, CheckTime;
|
||||||
double LastAnas, LastConsOut;
|
double LastAnas, LastConsOut;
|
||||||
bool cuda_level0_constraint_cache_valid;
|
|
||||||
int *ConstraintRefreshLevels;
|
int *ConstraintRefreshLevels;
|
||||||
double Courant;
|
double Courant;
|
||||||
double numepss, numepsb, numepsh;
|
double numepss, numepsb, numepsh;
|
||||||
@@ -1098,12 +1098,12 @@ int f_compute_rhs_bssn(int *ex, double &T,
|
|||||||
betaz_rhs[i] = FF * dtSfz[i];
|
betaz_rhs[i] = FF * dtSfz[i];
|
||||||
|
|
||||||
reta[i] =
|
reta[i] =
|
||||||
gupxx[i] * chix[i] * chix[i]
|
gupxx[i] * dtSfx_rhs[i] * dtSfx_rhs[i]
|
||||||
+ gupyy[i] * chiy[i] * chiy[i]
|
+ gupyy[i] * dtSfy_rhs[i] * dtSfy_rhs[i]
|
||||||
+ gupzz[i] * chiz[i] * chiz[i]
|
+ gupzz[i] * dtSfz_rhs[i] * dtSfz_rhs[i]
|
||||||
+ TWO * ( gupxy[i] * chix[i] * chiy[i]
|
+ TWO * ( gupxy[i] * dtSfx_rhs[i] * dtSfy_rhs[i]
|
||||||
+ gupxz[i] * chix[i] * chiz[i]
|
+ gupxz[i] * dtSfx_rhs[i] * dtSfz_rhs[i]
|
||||||
+ gupyz[i] * chiy[i] * chiz[i] );
|
+ gupyz[i] * dtSfy_rhs[i] * dtSfz_rhs[i] );
|
||||||
|
|
||||||
#if (GAUGE == 2)
|
#if (GAUGE == 2)
|
||||||
reta[i] = 1.31 / 2.0 * sqrt( reta[i] / chin1[i] ) / pow( (ONE - sqrt(chin1[i])), 2.0 );
|
reta[i] = 1.31 / 2.0 * sqrt( reta[i] / chin1[i] ) / pow( (ONE - sqrt(chin1[i])), 2.0 );
|
||||||
@@ -1116,12 +1116,12 @@ int f_compute_rhs_bssn(int *ex, double &T,
|
|||||||
dtSfz_rhs[i] = Gamz_rhs[i] - reta[i] * dtSfz[i];
|
dtSfz_rhs[i] = Gamz_rhs[i] - reta[i] * dtSfz[i];
|
||||||
#elif (GAUGE == 4 || GAUGE == 5)
|
#elif (GAUGE == 4 || GAUGE == 5)
|
||||||
reta[i] =
|
reta[i] =
|
||||||
gupxx[i] * chix[i] * chix[i]
|
gupxx[i] * dtSfx_rhs[i] * dtSfx_rhs[i]
|
||||||
+ gupyy[i] * chiy[i] * chiy[i]
|
+ gupyy[i] * dtSfy_rhs[i] * dtSfy_rhs[i]
|
||||||
+ gupzz[i] * chiz[i] * chiz[i]
|
+ gupzz[i] * dtSfz_rhs[i] * dtSfz_rhs[i]
|
||||||
+ TWO * ( gupxy[i] * chix[i] * chiy[i]
|
+ TWO * ( gupxy[i] * dtSfx_rhs[i] * dtSfy_rhs[i]
|
||||||
+ gupxz[i] * chix[i] * chiz[i]
|
+ gupxz[i] * dtSfx_rhs[i] * dtSfz_rhs[i]
|
||||||
+ gupyz[i] * chiy[i] * chiz[i] );
|
+ gupyz[i] * dtSfy_rhs[i] * dtSfz_rhs[i] );
|
||||||
|
|
||||||
#if (GAUGE == 4)
|
#if (GAUGE == 4)
|
||||||
reta[i] = 1.31 / 2.0 * sqrt( reta[i] / chin1[i] ) / pow( (ONE - sqrt(chin1[i])), 2.0 );
|
reta[i] = 1.31 / 2.0 * sqrt( reta[i] / chin1[i] ) / pow( (ONE - sqrt(chin1[i])), 2.0 );
|
||||||
2908
AMSS_NCKU_source/BSSN_GPU/bssn_gpu.cu
Normal file
2908
AMSS_NCKU_source/BSSN_GPU/bssn_gpu.cu
Normal file
File diff suppressed because it is too large
Load Diff
73
AMSS_NCKU_source/BSSN_GPU/bssn_gpu.h
Normal file
73
AMSS_NCKU_source/BSSN_GPU/bssn_gpu.h
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
|
||||||
|
#ifndef BSSN_GPU_H_
|
||||||
|
#define BSSN_GPU_H_
|
||||||
|
#include "bssn_macro.h"
|
||||||
|
#include "macrodef.fh"
|
||||||
|
|
||||||
|
#define DEVICE_ID 0
|
||||||
|
// #define DEVICE_ID_BY_MPI_RANK
|
||||||
|
#define GRID_DIM 256
|
||||||
|
#define BLOCK_DIM 128
|
||||||
|
|
||||||
|
#define _FH2_(i, j, k) fh[(i) + (j) * _1D_SIZE[2] + (k) * _2D_SIZE[2]]
|
||||||
|
#define _FH3_(i, j, k) fh[(i) + (j) * _1D_SIZE[3] + (k) * _2D_SIZE[3]]
|
||||||
|
#define pow2(x) ((x) * (x))
|
||||||
|
#define TimeBetween(a, b) ((b.tv_sec - a.tv_sec) + (b.tv_usec - a.tv_usec) / 1000000.0f)
|
||||||
|
#define M_ metac.
|
||||||
|
#define Mh_ meta->
|
||||||
|
#define Ms_ metassc.
|
||||||
|
#define Msh_ metass->
|
||||||
|
|
||||||
|
// #define TIMING
|
||||||
|
|
||||||
|
#define RHS_SS_PARA int calledby, int mpi_rank, int *ex, double &T, double *crho, double *sigma, double *R, double *X, double *Y, double *Z, double *drhodx, double *drhody, double *drhodz, double *dsigmadx, double *dsigmady, double *dsigmadz, double *dRdx, double *dRdy, double *dRdz, double *drhodxx, double *drhodxy, double *drhodxz, double *drhodyy, double *drhodyz, double *drhodzz, double *dsigmadxx, double *dsigmadxy, double *dsigmadxz, double *dsigmadyy, double *dsigmadyz, double *dsigmadzz, double *dRdxx, double *dRdxy, double *dRdxz, double *dRdyy, double *dRdyz, double *dRdzz, double *chi, double *trK, double *dxx, double *gxy, double *gxz, double *dyy, double *gyz, double *dzz, double *Axx, double *Axy, double *Axz, double *Ayy, double *Ayz, double *Azz, double *Gamx, double *Gamy, double *Gamz, double *Lap, double *betax, double *betay, double *betaz, double *dtSfx, double *dtSfy, double *dtSfz, double *chi_rhs, double *trK_rhs, double *gxx_rhs, double *gxy_rhs, double *gxz_rhs, double *gyy_rhs, double *gyz_rhs, double *gzz_rhs, double *Axx_rhs, double *Axy_rhs, double *Axz_rhs, double *Ayy_rhs, double *Ayz_rhs, double *Azz_rhs, double *Gamx_rhs, double *Gamy_rhs, double *Gamz_rhs, double *Lap_rhs, double *betax_rhs, double *betay_rhs, double *betaz_rhs, double *dtSfx_rhs, double *dtSfy_rhs, double *dtSfz_rhs, double *rho, double *Sx, double *Sy, double *Sz, double *Sxx, double *Sxy, double *Sxz, double *Syy, double *Syz, double *Szz, double *Gamxxx, double *Gamxxy, double *Gamxxz, double *Gamxyy, double *Gamxyz, double *Gamxzz, double *Gamyxx, double *Gamyxy, double *Gamyxz, double *Gamyyy, double *Gamyyz, double *Gamyzz, double *Gamzxx, double *Gamzxy, double *Gamzxz, double *Gamzyy, double *Gamzyz, double *Gamzzz, double *Rxx, double *Rxy, double *Rxz, double *Ryy, double *Ryz, double *Rzz, double *ham_Res, double *movx_Res, double *movy_Res, double *movz_Res, double *Gmx_Res, double *Gmy_Res, double *Gmz_Res, int &Symmetry, int &Lev, double &eps, int &sst, int &co
|
||||||
|
|
||||||
|
/** main function */
|
||||||
|
int gpu_rhs(int calledby, int mpi_rank, int *ex, double &T,
|
||||||
|
double *X, double *Y, double *Z,
|
||||||
|
|
||||||
|
double *chi, double *trK,
|
||||||
|
|
||||||
|
double *dxx, double *gxy, double *gxz, double *dyy, double *gyz, double *dzz,
|
||||||
|
|
||||||
|
double *Axx, double *Axy, double *Axz, double *Ayy, double *Ayz, double *Azz,
|
||||||
|
|
||||||
|
double *Gamx, double *Gamy, double *Gamz,
|
||||||
|
|
||||||
|
double *Lap, double *betax, double *betay, double *betaz,
|
||||||
|
|
||||||
|
double *dtSfx, double *dtSfy, double *dtSfz,
|
||||||
|
|
||||||
|
double *chi_rhs, double *trK_rhs,
|
||||||
|
|
||||||
|
double *gxx_rhs, double *gxy_rhs, double *gxz_rhs, double *gyy_rhs, double *gyz_rhs, double *gzz_rhs,
|
||||||
|
|
||||||
|
double *Axx_rhs, double *Axy_rhs, double *Axz_rhs, double *Ayy_rhs, double *Ayz_rhs, double *Azz_rhs,
|
||||||
|
|
||||||
|
double *Gamx_rhs, double *Gamy_rhs, double *Gamz_rhs,
|
||||||
|
|
||||||
|
double *Lap_rhs, double *betax_rhs, double *betay_rhs, double *betaz_rhs,
|
||||||
|
|
||||||
|
double *dtSfx_rhs, double *dtSfy_rhs, double *dtSfz_rhs,
|
||||||
|
|
||||||
|
double *rho, double *Sx, double *Sy, double *Sz, double *Sxx,
|
||||||
|
double *Sxy, double *Sxz, double *Syy, double *Syz, double *Szz,
|
||||||
|
|
||||||
|
double *Gamxxx, double *Gamxxy, double *Gamxxz, double *Gamxyy, double *Gamxyz, double *Gamxzz,
|
||||||
|
|
||||||
|
double *Gamyxx, double *Gamyxy, double *Gamyxz, double *Gamyyy, double *Gamyyz, double *Gamyzz,
|
||||||
|
|
||||||
|
double *Gamzxx, double *Gamzxy, double *Gamzxz, double *Gamzyy, double *Gamzyz, double *Gamzzz,
|
||||||
|
|
||||||
|
double *Rxx, double *Rxy, double *Rxz, double *Ryy, double *Ryz, double *Rzz,
|
||||||
|
|
||||||
|
double *ham_Res, double *movx_Res, double *movy_Res, double *movz_Res,
|
||||||
|
double *Gmx_Res, double *Gmy_Res, double *Gmz_Res,
|
||||||
|
int &Symmetry, int &Lev, double &eps, int &co);
|
||||||
|
|
||||||
|
int gpu_rhs_ss(RHS_SS_PARA);
|
||||||
|
|
||||||
|
/** Init GPU side data in GPUMeta. */
|
||||||
|
// void init_fluid_meta_gpu(GPUMeta *gpu_meta);
|
||||||
|
|
||||||
|
#endif
|
||||||
7790
AMSS_NCKU_source/BSSN_GPU/bssn_gpu_class.C
Normal file
7790
AMSS_NCKU_source/BSSN_GPU/bssn_gpu_class.C
Normal file
File diff suppressed because it is too large
Load Diff
210
AMSS_NCKU_source/BSSN_GPU/bssn_gpu_class.h
Normal file
210
AMSS_NCKU_source/BSSN_GPU/bssn_gpu_class.h
Normal file
@@ -0,0 +1,210 @@
|
|||||||
|
|
||||||
|
#ifndef BSSN_GPU_CLASS_H
|
||||||
|
#define BSSN_GPU_CLASS_H
|
||||||
|
|
||||||
|
#ifdef newc
|
||||||
|
#include <iostream>
|
||||||
|
#include <iomanip>
|
||||||
|
#include <fstream>
|
||||||
|
#include <cstdlib>
|
||||||
|
#include <string>
|
||||||
|
#include <cmath>
|
||||||
|
using namespace std;
|
||||||
|
#else
|
||||||
|
#include <iostream.h>
|
||||||
|
#include <iomanip.h>
|
||||||
|
#include <fstream.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <math.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <mpi.h>
|
||||||
|
|
||||||
|
#include "macrodef.h"
|
||||||
|
#include "cgh.h"
|
||||||
|
#include "ShellPatch.h"
|
||||||
|
#include "misc.h"
|
||||||
|
#include "var.h"
|
||||||
|
#include "MyList.h"
|
||||||
|
#include "monitor.h"
|
||||||
|
#include "surface_integral.h"
|
||||||
|
#include "checkpoint.h"
|
||||||
|
|
||||||
|
// added by yangquan
|
||||||
|
#include "bssn_macro.h"
|
||||||
|
|
||||||
|
extern void setpbh(int iBHN, double **iPBH, double *iMass, int rBHN);
|
||||||
|
|
||||||
|
class bssn_class
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
// added by yangquan
|
||||||
|
//----------------------
|
||||||
|
int gpu_num_mynode;
|
||||||
|
int cpu_core_num_mynode;
|
||||||
|
int mpi_process_num_mynode;
|
||||||
|
int my_sequence_mynode;
|
||||||
|
int mynode_id;
|
||||||
|
int use_gpu;
|
||||||
|
|
||||||
|
virtual void Step_GPU(int lev, int YN);
|
||||||
|
virtual void Get_runtime_envirment();
|
||||||
|
// virtual void Step_OPENMP(int lev,int YN);
|
||||||
|
//----------------------
|
||||||
|
|
||||||
|
int ngfs;
|
||||||
|
int nprocs, myrank;
|
||||||
|
cgh *GH;
|
||||||
|
ShellPatch *SH;
|
||||||
|
double PhysTime;
|
||||||
|
|
||||||
|
int checkrun;
|
||||||
|
char checkfilename[50];
|
||||||
|
int Steps;
|
||||||
|
double StartTime, TotalTime;
|
||||||
|
double AnasTime, DumpTime, d2DumpTime, CheckTime;
|
||||||
|
double LastAnas, LastConsOut;
|
||||||
|
double Courant;
|
||||||
|
double numepss, numepsb, numepsh;
|
||||||
|
int Symmetry;
|
||||||
|
int maxl, decn;
|
||||||
|
double maxrex, drex;
|
||||||
|
int trfls, a_lev;
|
||||||
|
|
||||||
|
double dT;
|
||||||
|
double chitiny;
|
||||||
|
|
||||||
|
double **Porg0, **Porgbr, **Porg, **Porg1, **Porg_rhs;
|
||||||
|
int BH_num, BH_num_input;
|
||||||
|
double *Mass, *Pmom, *Spin;
|
||||||
|
double ADMMass;
|
||||||
|
|
||||||
|
var *phio, *trKo;
|
||||||
|
var *gxxo, *gxyo, *gxzo, *gyyo, *gyzo, *gzzo;
|
||||||
|
var *Axxo, *Axyo, *Axzo, *Ayyo, *Ayzo, *Azzo;
|
||||||
|
var *Gmxo, *Gmyo, *Gmzo;
|
||||||
|
var *Lapo, *Sfxo, *Sfyo, *Sfzo;
|
||||||
|
var *dtSfxo, *dtSfyo, *dtSfzo;
|
||||||
|
|
||||||
|
var *phi0, *trK0;
|
||||||
|
var *gxx0, *gxy0, *gxz0, *gyy0, *gyz0, *gzz0;
|
||||||
|
var *Axx0, *Axy0, *Axz0, *Ayy0, *Ayz0, *Azz0;
|
||||||
|
var *Gmx0, *Gmy0, *Gmz0;
|
||||||
|
var *Lap0, *Sfx0, *Sfy0, *Sfz0;
|
||||||
|
var *dtSfx0, *dtSfy0, *dtSfz0;
|
||||||
|
|
||||||
|
var *phi, *trK;
|
||||||
|
var *gxx, *gxy, *gxz, *gyy, *gyz, *gzz;
|
||||||
|
var *Axx, *Axy, *Axz, *Ayy, *Ayz, *Azz;
|
||||||
|
var *Gmx, *Gmy, *Gmz;
|
||||||
|
var *Lap, *Sfx, *Sfy, *Sfz;
|
||||||
|
var *dtSfx, *dtSfy, *dtSfz;
|
||||||
|
|
||||||
|
var *phi1, *trK1;
|
||||||
|
var *gxx1, *gxy1, *gxz1, *gyy1, *gyz1, *gzz1;
|
||||||
|
var *Axx1, *Axy1, *Axz1, *Ayy1, *Ayz1, *Azz1;
|
||||||
|
var *Gmx1, *Gmy1, *Gmz1;
|
||||||
|
var *Lap1, *Sfx1, *Sfy1, *Sfz1;
|
||||||
|
var *dtSfx1, *dtSfy1, *dtSfz1;
|
||||||
|
|
||||||
|
var *phi_rhs, *trK_rhs;
|
||||||
|
var *gxx_rhs, *gxy_rhs, *gxz_rhs, *gyy_rhs, *gyz_rhs, *gzz_rhs;
|
||||||
|
var *Axx_rhs, *Axy_rhs, *Axz_rhs, *Ayy_rhs, *Ayz_rhs, *Azz_rhs;
|
||||||
|
var *Gmx_rhs, *Gmy_rhs, *Gmz_rhs;
|
||||||
|
var *Lap_rhs, *Sfx_rhs, *Sfy_rhs, *Sfz_rhs;
|
||||||
|
var *dtSfx_rhs, *dtSfy_rhs, *dtSfz_rhs;
|
||||||
|
|
||||||
|
var *rho, *Sx, *Sy, *Sz, *Sxx, *Sxy, *Sxz, *Syy, *Syz, *Szz;
|
||||||
|
|
||||||
|
var *Gamxxx, *Gamxxy, *Gamxxz, *Gamxyy, *Gamxyz, *Gamxzz;
|
||||||
|
var *Gamyxx, *Gamyxy, *Gamyxz, *Gamyyy, *Gamyyz, *Gamyzz;
|
||||||
|
var *Gamzxx, *Gamzxy, *Gamzxz, *Gamzyy, *Gamzyz, *Gamzzz;
|
||||||
|
|
||||||
|
var *Rxx, *Rxy, *Rxz, *Ryy, *Ryz, *Rzz;
|
||||||
|
|
||||||
|
var *Rpsi4, *Ipsi4;
|
||||||
|
var *t1Rpsi4, *t1Ipsi4, *t2Rpsi4, *t2Ipsi4;
|
||||||
|
|
||||||
|
var *Cons_Ham, *Cons_Px, *Cons_Py, *Cons_Pz, *Cons_Gx, *Cons_Gy, *Cons_Gz;
|
||||||
|
|
||||||
|
#ifdef Point_Psi4
|
||||||
|
var *phix, *phiy, *phiz;
|
||||||
|
var *trKx, *trKy, *trKz;
|
||||||
|
var *Axxx, *Axxy, *Axxz;
|
||||||
|
var *Axyx, *Axyy, *Axyz;
|
||||||
|
var *Axzx, *Axzy, *Axzz;
|
||||||
|
var *Ayyx, *Ayyy, *Ayyz;
|
||||||
|
var *Ayzx, *Ayzy, *Ayzz;
|
||||||
|
var *Azzx, *Azzy, *Azzz;
|
||||||
|
#endif
|
||||||
|
// FIXME: uc = StateList, up = OldStateList, upp = SynchList_cor; so never touch these three data
|
||||||
|
MyList<var> *StateList, *SynchList_pre, *SynchList_cor, *RHSList;
|
||||||
|
MyList<var> *OldStateList, *DumpList;
|
||||||
|
MyList<var> *ConstraintList;
|
||||||
|
|
||||||
|
monitor *ErrorMonitor, *Psi4Monitor, *BHMonitor, *MAPMonitor;
|
||||||
|
monitor *ConVMonitor;
|
||||||
|
surface_integral *Waveshell;
|
||||||
|
checkpoint *CheckPoint;
|
||||||
|
|
||||||
|
public:
|
||||||
|
bssn_class(double Couranti, double StartTimei, double TotalTimei, double DumpTimei, double d2DumpTimei, double CheckTimei, double AnasTimei,
|
||||||
|
int Symmetryi, int checkruni, char *checkfilenamei, double numepssi, double numepsbi, double numepshi,
|
||||||
|
int a_levi, int maxli, int decni, double maxrexi, double drexi);
|
||||||
|
~bssn_class();
|
||||||
|
|
||||||
|
void Evolve(int Steps);
|
||||||
|
void RecursiveStep(int lev);
|
||||||
|
#if (PSTR == 1)
|
||||||
|
void ParallelStep();
|
||||||
|
void SHStep();
|
||||||
|
#endif
|
||||||
|
void RestrictProlong(int lev, int YN, bool BB, MyList<var> *SL, MyList<var> *OL, MyList<var> *corL);
|
||||||
|
void RestrictProlong_aux(int lev, int YN, bool BB, MyList<var> *SL, MyList<var> *OL, MyList<var> *corL);
|
||||||
|
void RestrictProlong(int lev, int YN, bool BB);
|
||||||
|
void ProlongRestrict(int lev, int YN, bool BB);
|
||||||
|
void Setup_Black_Hole_position();
|
||||||
|
void compute_Porg_rhs(double **BH_PS, double **BH_RHS, var *forx, var *fory, var *forz, int lev);
|
||||||
|
bool read_Pablo_file(int *ext, double *datain, char *filename);
|
||||||
|
void write_Pablo_file(int *ext, double xmin, double xmax, double ymin, double ymax, double zmin, double zmax,
|
||||||
|
char *filename);
|
||||||
|
void AnalysisStuff(int lev, double dT_lev);
|
||||||
|
void Setup_KerrSchild();
|
||||||
|
void Enforce_algcon(int lev, int fg);
|
||||||
|
|
||||||
|
void testRestrict();
|
||||||
|
void testOutBd();
|
||||||
|
|
||||||
|
virtual void Setup_Initial_Data_Lousto();
|
||||||
|
virtual void Setup_Initial_Data_Cao();
|
||||||
|
virtual void Initialize();
|
||||||
|
virtual void Read_Ansorg();
|
||||||
|
virtual void Read_Pablo() {};
|
||||||
|
virtual void Compute_Psi4(int lev);
|
||||||
|
virtual void Step(int lev, int YN);
|
||||||
|
virtual void Interp_Constraint(bool infg);
|
||||||
|
virtual void Constraint_Out();
|
||||||
|
virtual void Compute_Constraint();
|
||||||
|
|
||||||
|
#ifdef With_AHF
|
||||||
|
protected:
|
||||||
|
MyList<var> *AHList, *AHDList, *GaugeList;
|
||||||
|
int AHfindevery;
|
||||||
|
double AHdumptime;
|
||||||
|
int *lastahdumpid, HN_num; // number of possible horizons
|
||||||
|
int *findeveryl;
|
||||||
|
double *xc, *yc, *zc, *xr, *yr, *zr;
|
||||||
|
bool *trigger;
|
||||||
|
double *dTT;
|
||||||
|
int *dumpid;
|
||||||
|
|
||||||
|
public:
|
||||||
|
void AH_Prepare_derivatives();
|
||||||
|
bool AH_Interp_Points(MyList<var> *VarList,
|
||||||
|
int NN, double **XX,
|
||||||
|
double *Shellf, int Symmetryi);
|
||||||
|
void AH_Step_Find(int lev, double dT_lev);
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
#endif /* BSSN_GPU_CLASS_H */
|
||||||
1942
AMSS_NCKU_source/BSSN_GPU/bssn_step_gpu.C
Normal file
1942
AMSS_NCKU_source/BSSN_GPU/bssn_step_gpu.C
Normal file
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user