Updated whole package
This commit is contained in:
parent
51319a4778
commit
867c3d535c
2
Makefile
2
Makefile
|
@ -1,5 +1,7 @@
|
|||
CUDA_FLAGS=-arch sm_35
|
||||
|
||||
all:bin/Color-WIA bin/Color-WIA-CBUB
|
||||
|
||||
bin/Color-WIA:gpu/lb2_Color_wia_mpi.o lib/libcuColor.a lib/libcuD3Q19.a lib/libcuD3Q7.a lib/libcuExtras.a
|
||||
mkdir -p bin
|
||||
CC -O3 -o bin/Color-WIA gpu/lb2_Color_wia_mpi.o -lcuColor -lcuD3Q19 -lcuD3Q7 -lcuExtras -Llib -Iinclude
|
||||
|
|
8
README.titan
Normal file
8
README.titan
Normal file
|
@ -0,0 +1,8 @@
|
|||
# INSTRUCTIONS FOR COMPILING AND RUNNING ON TITAN
|
||||
|
||||
# load the module for cuda
|
||||
module load cudatoolkit
|
||||
|
||||
# build executables
|
||||
make all
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
2 2 2
|
||||
82 82 82
|
||||
399
|
||||
1.0 1.0 1.0
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
2 2 2
|
||||
80 80 80
|
||||
399
|
||||
1.0 1.0 1.0
|
||||
|
Binary file not shown.
|
@ -1,106 +0,0 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include "Domain.h"
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
//.......................................................................
|
||||
// Variable declaration
|
||||
//.......................................................................
|
||||
int i,j,k,n,N;
|
||||
int Nx,Ny,Nz;
|
||||
int nspheres;
|
||||
double Lx,Ly,Lz;
|
||||
// parallel domain size (# of sub-domains)
|
||||
int nprocx,nprocy,nprocz;
|
||||
// int iproc,jproc,kproc;
|
||||
//.......................................................................
|
||||
|
||||
//.......................................................................
|
||||
// Reading the input file
|
||||
//.......................................................................
|
||||
ifstream domain("Domain.in");
|
||||
domain >> nprocx;
|
||||
domain >> nprocy;
|
||||
domain >> nprocz;
|
||||
domain >> Nx;
|
||||
domain >> Ny;
|
||||
domain >> Nz;
|
||||
domain >> nspheres;
|
||||
domain >> Lx;
|
||||
domain >> Ly;
|
||||
domain >> Lz;
|
||||
//.......................................................................
|
||||
|
||||
//.......................................................................
|
||||
printf("********************************************************\n");
|
||||
printf("Sub-domain size = %i x %i x %i\n",Nz,Nz,Nz);
|
||||
printf("Parallel domain size = %i x %i x %i\n",nprocx,nprocy,nprocz);
|
||||
printf("Number of spheres = %i \n", nspheres);
|
||||
printf("Domain Length (x) = %f \n", Lx);
|
||||
printf("Domain Length (y) = %f \n", Ly);
|
||||
printf("Domain Length (z) = %f \n", Lz);
|
||||
printf("********************************************************\n");
|
||||
//.......................................................................
|
||||
N = Nx*Ny*Nz;
|
||||
printf("Read input media... \n");
|
||||
|
||||
char *id;
|
||||
id = new char[N];
|
||||
|
||||
double *SignDist;
|
||||
SignDist = new double[N];
|
||||
//.......................................................................
|
||||
// Read from a sphere packing
|
||||
//.......................................................................
|
||||
double *cx,*cy,*cz,*r;
|
||||
cx = new double[nspheres];
|
||||
cy = new double[nspheres];
|
||||
cz = new double[nspheres];
|
||||
r = new double[nspheres];
|
||||
//.......................................................................
|
||||
printf("Reading the sphere packing \n");
|
||||
ReadSpherePacking(nspheres,cx,cy,cz,r);
|
||||
//.......................................................................
|
||||
|
||||
//.......................................................................
|
||||
// Write out the files
|
||||
//.......................................................................
|
||||
int rank;
|
||||
char LocalRankString[8];
|
||||
char LocalRankFilename[40];
|
||||
for (k=0; k<nprocz; k++){
|
||||
for (j=0; j<nprocy; j++){
|
||||
for (i=0; i<nprocx; i++){
|
||||
//.......................................................................
|
||||
rank = k*nprocx*nprocy + j*nprocx + i;
|
||||
//.......................................................................
|
||||
sprintf(LocalRankString,"%05d",rank);
|
||||
sprintf(LocalRankFilename,"%s%s","ID.",LocalRankString);
|
||||
//.......................................................................
|
||||
// printf("Assigning the local phase ID \n");
|
||||
SignedDistance(SignDist,nspheres,cx,cy,cz,r,Lx,Ly,Lz,Nx,Ny,Nz,
|
||||
i,j,k,nprocx,nprocy,nprocz);
|
||||
|
||||
for (n=0; n<N; n++){
|
||||
if (SignDist[n] < 0.0) id[n] = 0;
|
||||
else id[n] = 1;
|
||||
}
|
||||
//.......................................................................
|
||||
// printf("Generating residual NWP \n");
|
||||
GenerateResidual(id,Nx,Ny,Nz,0.3);
|
||||
//.......................................................................
|
||||
WriteLocalSolidID(LocalRankFilename, id, N);
|
||||
//.......................................................................
|
||||
sprintf(LocalRankFilename,"%s%s","SignDist.",LocalRankString);
|
||||
WriteLocalSolidDistance(LocalRankFilename, SignDist, N);
|
||||
//.......................................................................
|
||||
printf("Finished rank = %i \n",rank);
|
||||
}
|
||||
}
|
||||
}
|
||||
//.......................................................................
|
||||
|
||||
}
|
|
@ -1,94 +0,0 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include "Domain.h"
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
//.......................................................................
|
||||
// Variable declaration
|
||||
//.......................................................................
|
||||
int i,j,k,N;
|
||||
int Nx,Ny,Nz;
|
||||
int nspheres;
|
||||
double Lx,Ly,Lz;
|
||||
// parallel domain size (# of sub-domains)
|
||||
int nprocx,nprocy,nprocz;
|
||||
// int iproc,jproc,kproc;
|
||||
//.......................................................................
|
||||
|
||||
//.......................................................................
|
||||
// Reading the input file
|
||||
//.......................................................................
|
||||
ifstream domain("Domain.in");
|
||||
domain >> nprocx;
|
||||
domain >> nprocy;
|
||||
domain >> nprocz;
|
||||
domain >> Nx;
|
||||
domain >> Ny;
|
||||
domain >> Nz;
|
||||
domain >> nspheres;
|
||||
domain >> Lx;
|
||||
domain >> Ly;
|
||||
domain >> Lz;
|
||||
|
||||
//.......................................................................
|
||||
printf("********************************************************\n");
|
||||
printf("Sub-domain size = %i x %i x %i\n",Nz,Nz,Nz);
|
||||
printf("Parallel domain size = %i x %i x %i\n",nprocx,nprocy,nprocz);
|
||||
printf("Number of spheres = %i \n", nspheres);
|
||||
printf("Domain Length (x) = %f \n", Lx);
|
||||
printf("Domain Length (y) = %f \n", Ly);
|
||||
printf("Domain Length (z) = %f \n", Lz);
|
||||
printf("********************************************************\n");
|
||||
//.......................................................................
|
||||
N = Nx*Ny*Nz;
|
||||
printf("Read input media... \n");
|
||||
|
||||
char *id;
|
||||
id = new char[N];
|
||||
//.......................................................................
|
||||
// Read from a sphere packing
|
||||
//.......................................................................
|
||||
double *cx,*cy,*cz,*r;
|
||||
cx = new double[nspheres];
|
||||
cy = new double[nspheres];
|
||||
cz = new double[nspheres];
|
||||
r = new double[nspheres];
|
||||
//.......................................................................
|
||||
printf("Reading the sphere packing \n");
|
||||
ReadSpherePacking(nspheres,cx,cy,cz,r);
|
||||
//.......................................................................
|
||||
|
||||
//.......................................................................
|
||||
// Write out the files
|
||||
//.......................................................................
|
||||
int rank;
|
||||
char LocalRankString[8];
|
||||
char LocalRankFilename[40];
|
||||
for (k=0; k<nprocz; k++){
|
||||
for (j=0; j<nprocy; j++){
|
||||
for (i=0; i<nprocx; i++){
|
||||
//.......................................................................
|
||||
rank = k*nprocx*nprocy + j*nprocx + i;
|
||||
//.......................................................................
|
||||
sprintf(LocalRankString,"%05d",rank);
|
||||
sprintf(LocalRankFilename,"%s%s","ID.",LocalRankString);
|
||||
//.......................................................................
|
||||
// printf("Assigning the local phase ID \n");
|
||||
AssignLocalSolidID(id,nspheres,cx,cy,cz,r,Lx,Ly,Lz,Nx,Ny,Nz,
|
||||
i,j,k,nprocx,nprocy,nprocz);
|
||||
//.......................................................................
|
||||
// printf("Generating residual NWP \n");
|
||||
GenerateResidual(id,Nx,Ny,Nz,0.3);
|
||||
//.......................................................................
|
||||
WriteLocalSolidID(LocalRankFilename, id, N);
|
||||
//.......................................................................
|
||||
printf("Finished rank = %i \n",rank);
|
||||
}
|
||||
}
|
||||
}
|
||||
//.......................................................................
|
||||
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
ID
|
||||
80 32 128
|
||||
1.0
|
||||
1.0e-2 0.9 0.1 0.9
|
||||
0.0 0.0 0.0
|
||||
0 1.0 1.0
|
||||
500 500 1e-5
|
||||
|
|
@ -1 +0,0 @@
|
|||
2 2 2
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,27 +0,0 @@
|
|||
#!/bin/bash
|
||||
#PBS -l walltime=00:10:00
|
||||
#PBS -l nodes=1:ppn=8
|
||||
# Access group, queue, and accounting project
|
||||
#PBS -W group_list=hokiespeed
|
||||
# Queue name. Replace normal_q with long_q to submit a job to the long queue.
|
||||
#PBS -q normal_q
|
||||
#PBS -A hokiespeed
|
||||
|
||||
echo "------------------------------------------"
|
||||
echo "Running Color LBM using MPI!"
|
||||
echo "Number of processors = " $PBS_NP
|
||||
echo "------------------------------------------"
|
||||
|
||||
module purge
|
||||
#module load intel mvapich2
|
||||
module load gcc cuda mvapich2/1.9rc1
|
||||
|
||||
cd $PBS_O_WORKDIR
|
||||
|
||||
export MV2_CPU_BINDING_POLICY=scatter
|
||||
#export VIADEV_CPU_MAPPING=0:2:3:4:1:5:6:7
|
||||
export MV2_SHOW_CPU_BINDING=1
|
||||
|
||||
mpirun -np $PBS_NP ~/LBPM-WIA/cpu/ColorLBM-cpu
|
||||
|
||||
exit;
|
|
@ -1,404 +0,0 @@
|
|||
Number of Spheres: 399
|
||||
Domain Length (x,y,z): 1, 1, 1
|
||||
Media porosity: 0.369
|
||||
log(r) Normal with mean -2.47144, variance 0
|
||||
Mean coordination No. 11.84
|
||||
0.0358075 0.0887041 0.112468 0.0844631
|
||||
0.118482 0.318651 0.473828 0.0844631
|
||||
0.582752 0.0454491 0.529264 0.0844631
|
||||
0.852622 0.828954 0.547441 0.0844631
|
||||
0.807778 0.54718 0.595125 0.0844631
|
||||
0.557502 0.0185902 0.694119 0.0844631
|
||||
0.832159 0.72426 0.207901 0.0844631
|
||||
0.84196 0.996673 0.530338 0.0844631
|
||||
0.0811649 0.0792821 0.70289 0.0844631
|
||||
0.994893 0.869664 0.237064 0.0844631
|
||||
0.488065 0.221434 0.32131 0.0844631
|
||||
0.170562 0.759156 0.532848 0.0844631
|
||||
0.844254 0.0475049 0.812703 0.0844631
|
||||
0.711717 0.835039 0.165973 0.0844631
|
||||
0.545693 0.415679 0.814859 0.0844631
|
||||
0.291362 0.221277 0.740625 0.0844631
|
||||
0.625387 0.177012 0.665196 0.0844631
|
||||
0.226285 0.692765 0.689361 0.0844631
|
||||
0.891466 0.0957847 0.657861 0.0844631
|
||||
0.517532 0.273905 0.902284 0.0844631
|
||||
0.410399 0.682132 0.16299 0.0844631
|
||||
0.0570839 0.629902 0.0756787 0.0844631
|
||||
0.00559676 0.182636 0.975355 0.0844631
|
||||
0.132737 0.531505 0.667699 0.0844631
|
||||
0.662373 0.662491 0.762575 0.0844631
|
||||
0.572523 0.557371 0.0770451 0.0844631
|
||||
0.241216 0.554304 0.795169 0.0844631
|
||||
0.404127 0.9559 0.727017 0.0844631
|
||||
0.84986 0.285616 0.807583 0.0844631
|
||||
0.622755 0.508751 0.695781 0.0844631
|
||||
0.0647357 0.683784 0.64081 0.0844631
|
||||
0.017351 0.0335981 0.271083 0.0844631
|
||||
0.634026 0.657202 0.955442 0.0844631
|
||||
0.665255 0.637861 0.595479 0.0844631
|
||||
0.936277 0.0301754 0.9533 0.0844631
|
||||
0.465166 0.519937 0.229393 0.0844631
|
||||
0.27117 0.85172 0.724784 0.0844631
|
||||
0.404611 0.539355 0.0728933 0.0844631
|
||||
0.738345 0.774204 0.892481 0.0844631
|
||||
0.784738 0.235691 0.659926 0.0844631
|
||||
0.694499 0.92715 0.574585 0.0844631
|
||||
0.203094 0.29767 0.618523 0.0844631
|
||||
0.997892 0.98119 0.593439 0.0844631
|
||||
0.51469 0.833673 0.950843 0.0844631
|
||||
0.131958 0.596077 0.511604 0.0844631
|
||||
0.429379 0.264579 0.0654981 0.0844631
|
||||
0.98469 0.958944 0.771791 0.0844631
|
||||
0.952019 0.25238 0.676499 0.0844631
|
||||
0.0395681 0.440658 0.559985 0.0844631
|
||||
0.663478 0.959076 0.270011 0.0844631
|
||||
0.118073 0.821444 0.0698155 0.0844631
|
||||
0.597588 0.270182 0.0509888 0.0844631
|
||||
0.823071 0.555628 0.203843 0.0844631
|
||||
0.710083 0.00668089 0.425246 0.0844631
|
||||
0.708692 0.904726 0.788856 0.0844631
|
||||
0.293722 0.292769 0.47605 0.0844631
|
||||
0.33054 0.402152 0.352697 0.0844631
|
||||
0.103216 0.475309 0.852193 0.0844631
|
||||
0.54144 0.881093 0.790931 0.0844631
|
||||
0.588392 0.889518 0.424822 0.0844631
|
||||
0.54267 0.681877 0.268062 0.0844631
|
||||
0.671421 0.784318 0.321985 0.0844631
|
||||
0.893617 0.749839 0.954392 0.0844631
|
||||
0.612948 0.108126 0.331386 0.0844631
|
||||
0.40227 0.503457 0.798711 0.0844631
|
||||
0.854573 0.0324028 0.101137 0.0844631
|
||||
0.426354 0.122944 0.715253 0.0844631
|
||||
0.973041 0.632152 0.222197 0.0844631
|
||||
0.232692 0.0935994 0.176676 0.0844631
|
||||
0.303504 0.575786 0.59508 0.0844631
|
||||
0.365845 0.667468 0.781117 0.0844631
|
||||
0.764071 0.282961 0.49907 0.0844631
|
||||
0.31194 0.763128 0.995006 0.0844631
|
||||
0.16544 0.598159 0.950031 0.0844631
|
||||
0.988502 0.421201 0.400142 0.0844631
|
||||
0.0904952 0.804367 0.790716 0.0844631
|
||||
0.247648 0.450753 0.942993 0.0844631
|
||||
0.269592 0.0566081 0.709864 0.0844631
|
||||
0.251452 0.261402 0.171533 0.0844631
|
||||
0.701449 0.298528 0.342954 0.0844631
|
||||
0.613014 0.423649 0.982098 0.0844631
|
||||
0.408804 0.0300075 0.575286 0.0844631
|
||||
0.299217 0.816215 0.42207 0.0844631
|
||||
0.576412 0.321367 0.588916 0.0844631
|
||||
0.519125 0.705171 0.841281 0.0844631
|
||||
0.200777 0.684171 0.384522 0.0844631
|
||||
0.553896 0.522574 0.542147 0.0844631
|
||||
0.128416 0.958809 0.168028 0.0844631
|
||||
0.724615 0.0432676 0.69352 0.0844631
|
||||
0.770004 0.00074753 0.958129 0.0844631
|
||||
0.207296 0.447809 0.541212 0.0844631
|
||||
0.903614 0.193834 0.109557 0.0844631
|
||||
0.215384 0.415782 0.229858 0.0844631
|
||||
0.666485 0.318737 0.747423 0.0844631
|
||||
0.745934 0.349421 0.0668263 0.0844631
|
||||
0.766981 0.0877808 0.234542 0.0844631
|
||||
0.315324 0.397626 0.0947259 0.0844631
|
||||
0.610816 0.534216 0.313762 0.0844631
|
||||
0.687703 0.775593 0.500285 0.0844631
|
||||
0.43313 0.83717 0.0998827 0.0844631
|
||||
0.561228 0.135274 0.816213 0.0844631
|
||||
0.213419 0.355151 0.807995 0.0844631
|
||||
0.975543 0.153798 0.811644 0.0844631
|
||||
0.161034 0.342383 0.0537506 0.0844631
|
||||
0.725965 0.170735 0.804364 0.0844631
|
||||
0.91098 0.16578 0.275974 0.0844631
|
||||
0.275188 0.74229 0.244446 0.0844631
|
||||
0.389144 0.64072 0.325376 0.0844631
|
||||
0.554735 0.372235 0.282359 0.0844631
|
||||
0.104658 0.191284 0.227677 0.0844631
|
||||
0.499806 0.985717 0.302229 0.0844631
|
||||
0.470468 0.486829 0.394958 0.0844631
|
||||
0.587684 0.750647 0.08832 0.0844631
|
||||
0.299257 0.432828 0.684974 0.0844631
|
||||
0.424695 0.92756 0.441914 0.0844631
|
||||
0.504459 0.272912 0.733867 0.0844631
|
||||
0.807186 0.287712 0.211658 0.0844631
|
||||
0.460013 0.682085 0.00151398 0.0844631
|
||||
0.860599 0.886291 0.860442 0.0844631
|
||||
0.53648 0.087021 0.172119 0.0844631
|
||||
0.82388 0.678662 0.475869 0.0844631
|
||||
0.196931 0.186369 0.876273 0.0844631
|
||||
0.463229 0.765994 0.411131 0.0844631
|
||||
0.987373 0.930252 0.0795568 0.0844631
|
||||
0.513417 0.544658 0.919064 0.0844631
|
||||
0.185582 0.164945 0.453624 0.0844631
|
||||
0.0924416 0.635728 0.800369 0.0844631
|
||||
0.889638 0.614201 0.0598228 0.0844631
|
||||
0.941545 0.724731 0.793543 0.0844631
|
||||
0.731609 0.123715 0.545145 0.0844631
|
||||
0.679436 0.640664 0.177882 0.0844631
|
||||
0.218729 0.671364 0.101905 0.0844631
|
||||
0.334539 0.739691 0.568468 0.0844631
|
||||
0.215164 0.00844407 0.0318398 0.0844631
|
||||
0.669247 0.522968 0.85756 0.0844631
|
||||
0.299222 0.158529 0.578448 0.0844631
|
||||
0.919157 0.140163 0.485759 0.0844631
|
||||
0.591358 0.657196 0.427926 0.0844631
|
||||
0.268799 0.869125 0.133054 0.0844631
|
||||
0.612547 0.990973 0.897731 0.0844631
|
||||
0.15907 0.958743 0.791981 0.0844631
|
||||
0.548442 0.844609 0.223106 0.0844631
|
||||
0.888657 0.308625 0.986192 0.0844631
|
||||
0.795381 0.439411 0.932689 0.0844631
|
||||
0.635763 0.80385 0.674 0.0844631
|
||||
0.0371748 0.202381 0.38214 0.0844631
|
||||
0.386407 0.16184 0.192518 0.0844631
|
||||
0.758207 0.719974 0.0512279 0.0844631
|
||||
0.457535 0.0925071 0.426104 0.0844631
|
||||
0.972372 0.903228 0.445768 0.0844631
|
||||
0.0607607 0.730332 0.939615 0.0844631
|
||||
0.981198 0.828728 0.664238 0.0844631
|
||||
0.739213 0.53735 0.0583449 0.0844631
|
||||
0.82734 0.158482 0.938934 0.0844631
|
||||
0.879107 0.0201421 0.367227 0.0844631
|
||||
0.687105 0.0110493 0.106996 0.0844631
|
||||
0.0818178 0.316873 0.906747 0.0844631
|
||||
0.200611 0.873239 0.931621 0.0844631
|
||||
0.106137 0.24103 0.744726 0.0844631
|
||||
0.435493 0.793483 0.692769 0.0844631
|
||||
0.528055 0.731786 0.56564 0.0844631
|
||||
0.0571424 0.0492633 0.45064 0.0844631
|
||||
0.135322 0.891012 0.632386 0.0844631
|
||||
0.328101 0.134057 0.0302443 0.0844631
|
||||
0.869313 0.301052 0.368178 0.0844631
|
||||
0.961967 0.765697 0.108057 0.0844631
|
||||
0.668496 0.446111 0.181676 0.0844631
|
||||
0.919568 0.756006 0.348926 0.0844631
|
||||
0.991666 0.744856 0.501286 0.0844631
|
||||
0.295511 0.290355 0.965744 0.0844631
|
||||
0.458841 0.605759 0.654311 0.0844631
|
||||
0.794554 0.61734 0.920233 0.0844631
|
||||
0.0019474 0.33119 0.109448 0.0844631
|
||||
0.46369 0.309833 0.463181 0.0844631
|
||||
0.296394 0.904238 0.566223 0.0844631
|
||||
0.890565 0.405413 0.63493 0.0844631
|
||||
0.144195 0.575774 0.262804 0.0844631
|
||||
0.210047 0.888592 0.29819 0.0844631
|
||||
0.617947 0.229081 0.213569 0.0844631
|
||||
0.495406 0.122105 0.00322827 0.0844631
|
||||
0.831011 0.872402 0.0523457 0.0844631
|
||||
0.279675 0.0391166 0.878759 0.0844631
|
||||
0.433519 0.406039 0.973258 0.0844631
|
||||
0.702773 0.535258 0.463338 0.0844631
|
||||
0.842781 0.922694 0.687626 0.0844631
|
||||
0.703096 0.29956 0.911215 0.0844631
|
||||
0.0380851 0.639181 0.37794 0.0844631
|
||||
0.379016 0.820676 0.851045 0.0844631
|
||||
0.723109 0.401954 0.611759 0.0844631
|
||||
0.955443 0.579247 0.512529 0.0844631
|
||||
0.296401 0.037199 0.449389 0.0844631
|
||||
0.881657 0.447792 0.087761 0.0844631
|
||||
0.656098 0.143532 0.95574 0.0844631
|
||||
0.965936 0.546205 0.690001 0.0844631
|
||||
0.334146 0.0146719 0.286282 0.0844631
|
||||
0.174903 0.0508213 0.329537 0.0844631
|
||||
0.668068 0.875575 0.00789851 0.0844631
|
||||
0.517478 0.402511 0.119801 0.0844631
|
||||
0.0335784 0.895984 0.920728 0.0844631
|
||||
0.353489 0.926216 0.98045 0.0844631
|
||||
0.515858 0.899496 0.581788 0.0844631
|
||||
0.0214488 0.483245 0.999798 0.0844631
|
||||
0.836999 0.433238 0.473884 0.0844631
|
||||
0.381474 0.299744 0.621214 0.0844631
|
||||
0.893548 0.554202 0.357359 0.0844631
|
||||
0.385287 0.00679129 0.125476 0.0844631
|
||||
0.382082 0.176473 0.875897 0.0844631
|
||||
0.375338 0.439285 0.526206 0.0844631
|
||||
0.333229 0.595868 0.930602 0.0844631
|
||||
0.533036 0.965661 0.0546621 0.0844631
|
||||
0.0348509 0.392455 0.721819 0.0844631
|
||||
0.613491 0.216291 0.46143 0.0844631
|
||||
0.17733 0.0419469 0.56912 0.0844631
|
||||
0.185888 0.506077 0.0901699 0.0844631
|
||||
0.166015 0.914118 0.459266 0.0844631
|
||||
0.746306 0.633286 0.332833 0.0844631
|
||||
0.225214 0.724578 0.855262 0.0844631
|
||||
0.820434 0.603526 0.753874 0.0844631
|
||||
0.16378 0.173693 0.0414764 0.0844631
|
||||
0.0995727 0.0546697 0.917656 0.0844631
|
||||
0.447591 0.020769 0.876813 0.0844631
|
||||
0.0623956 0.183214 0.56894 0.0844631
|
||||
0.94763 0.410834 0.865314 0.0844631
|
||||
0.953689 0.579147 0.878359 0.0844631
|
||||
0.404145 0.327586 0.22019 0.0844631
|
||||
0.800574 0.868069 0.391566 0.0844631
|
||||
0.287223 0.546206 0.429562 0.0844631
|
||||
0.606297 0.397675 0.441199 0.0844631
|
||||
0.380349 0.33851 0.827832 0.0844631
|
||||
0.202245 0.28176 0.331846 0.0844631
|
||||
0.47476 0.434332 0.662686 0.0844631
|
||||
0.081255 0.802026 0.365527 0.0844631
|
||||
0.790427 0.768306 0.731892 0.0844631
|
||||
0.952141 0.303167 0.515389 0.0844631
|
||||
0.735282 0.184001 0.0993647 0.0844631
|
||||
0.108137 0.733294 0.213575 0.0844631
|
||||
0.0626769 0.350381 0.265908 0.0844631
|
||||
0.328084 0.17067 0.350811 0.0844631
|
||||
0.0373343 0.485658 0.167958 0.0844631
|
||||
0.487331 0.179389 0.567878 0.0844631
|
||||
0.782697 0.157339 0.387679 0.0844631
|
||||
0.392496 0.856145 0.287012 0.0844631
|
||||
0.78666 0.43832 0.763992 0.0844631
|
||||
0.836323 0.927719 0.232454 0.0844631
|
||||
0.152772 0.455916 0.381533 0.0844631
|
||||
0.302341 0.558622 0.205956 0.0844631
|
||||
0.426957 0.620411 0.488758 0.0844631
|
||||
0.760088 0.455904 0.324774 0.0844631
|
||||
0.907569 0.417477 0.251912 0.0844631
|
||||
0.896312 0.687184 0.628241 0.0844631
|
||||
1.03581 0.0887041 0.112468 0.0844631
|
||||
0.582752 1.04545 0.529264 0.0844631
|
||||
0.557502 1.01859 0.694119 0.0844631
|
||||
0.84196 -0.003327 0.530338 0.0844631
|
||||
1.08116 0.0792821 0.70289 0.0844631
|
||||
0.0811649 1.07928 0.70289 0.0844631
|
||||
1.08116 1.07928 0.70289 0.0844631
|
||||
-0.005107 0.869664 0.237064 0.0844631
|
||||
0.844254 1.0475 0.812703 0.0844631
|
||||
1.05708 0.629902 0.0756787 0.0844631
|
||||
0.0570839 0.629902 1.07568 0.0844631
|
||||
1.05708 0.629902 1.07568 0.0844631
|
||||
0.00559676 0.182636 -0.024645 0.0844631
|
||||
1.0056 0.182636 0.975355 0.0844631
|
||||
1.0056 0.182636 -0.024645 0.0844631
|
||||
0.572523 0.557371 1.07705 0.0844631
|
||||
0.404127 -0.0441 0.727017 0.0844631
|
||||
1.06474 0.683784 0.64081 0.0844631
|
||||
1.01735 0.0335981 0.271083 0.0844631
|
||||
0.017351 1.0336 0.271083 0.0844631
|
||||
1.01735 1.0336 0.271083 0.0844631
|
||||
0.634026 0.657202 -0.044558 0.0844631
|
||||
-0.063723 0.0301754 0.9533 0.0844631
|
||||
0.936277 0.0301754 -0.0467 0.0844631
|
||||
0.936277 1.03018 0.9533 0.0844631
|
||||
-0.063723 0.0301754 -0.0467 0.0844631
|
||||
-0.063723 1.03018 0.9533 0.0844631
|
||||
0.936277 1.03018 -0.0467 0.0844631
|
||||
-0.063723 1.03018 -0.0467 0.0844631
|
||||
0.404611 0.539355 1.07289 0.0844631
|
||||
0.694499 -0.07285 0.574585 0.0844631
|
||||
-0.002108 0.98119 0.593439 0.0844631
|
||||
0.997892 -0.01881 0.593439 0.0844631
|
||||
-0.002108 -0.01881 0.593439 0.0844631
|
||||
0.51469 0.833673 -0.049157 0.0844631
|
||||
0.429379 0.264579 1.0655 0.0844631
|
||||
-0.01531 0.958944 0.771791 0.0844631
|
||||
0.98469 -0.041056 0.771791 0.0844631
|
||||
-0.01531 -0.041056 0.771791 0.0844631
|
||||
-0.047981 0.25238 0.676499 0.0844631
|
||||
1.03957 0.440658 0.559985 0.0844631
|
||||
0.663478 -0.040924 0.270011 0.0844631
|
||||
0.118073 0.821444 1.06982 0.0844631
|
||||
0.597588 0.270182 1.05099 0.0844631
|
||||
0.710083 1.00668 0.425246 0.0844631
|
||||
0.893617 0.749839 -0.045608 0.0844631
|
||||
0.854573 1.0324 0.101137 0.0844631
|
||||
-0.026959 0.632152 0.222197 0.0844631
|
||||
0.31194 0.763128 -0.004994 0.0844631
|
||||
0.16544 0.598159 -0.049969 0.0844631
|
||||
-0.011498 0.421201 0.400142 0.0844631
|
||||
0.247648 0.450753 -0.057007 0.0844631
|
||||
0.269592 1.05661 0.709864 0.0844631
|
||||
0.613014 0.423649 -0.017902 0.0844631
|
||||
0.408804 1.03001 0.575286 0.0844631
|
||||
0.128416 -0.041191 0.168028 0.0844631
|
||||
0.724615 1.04327 0.69352 0.0844631
|
||||
0.770004 0.00074753 -0.041871 0.0844631
|
||||
0.770004 1.00075 0.958129 0.0844631
|
||||
0.770004 1.00075 -0.041871 0.0844631
|
||||
0.745934 0.349421 1.06683 0.0844631
|
||||
-0.024457 0.153798 0.811644 0.0844631
|
||||
0.161034 0.342383 1.05375 0.0844631
|
||||
0.499806 -0.014283 0.302229 0.0844631
|
||||
0.424695 -0.07244 0.441914 0.0844631
|
||||
0.460013 0.682085 1.00151 0.0844631
|
||||
-0.012627 0.930252 0.0795568 0.0844631
|
||||
0.987373 -0.069748 0.0795568 0.0844631
|
||||
0.987373 0.930252 1.07956 0.0844631
|
||||
-0.012627 -0.069748 0.0795568 0.0844631
|
||||
-0.012627 0.930252 1.07956 0.0844631
|
||||
0.987373 -0.069748 1.07956 0.0844631
|
||||
-0.012627 -0.069748 1.07956 0.0844631
|
||||
0.513417 0.544658 -0.080936 0.0844631
|
||||
0.889638 0.614201 1.05982 0.0844631
|
||||
-0.058455 0.724731 0.793543 0.0844631
|
||||
0.215164 1.00844 0.0318398 0.0844631
|
||||
0.215164 0.00844407 1.03184 0.0844631
|
||||
0.215164 1.00844 1.03184 0.0844631
|
||||
-0.080843 0.140163 0.485759 0.0844631
|
||||
0.612547 -0.009027 0.897731 0.0844631
|
||||
0.15907 -0.041257 0.791981 0.0844631
|
||||
0.888657 0.308625 -0.013808 0.0844631
|
||||
0.795381 0.439411 -0.067311 0.0844631
|
||||
1.03717 0.202381 0.38214 0.0844631
|
||||
0.758207 0.719974 1.05123 0.0844631
|
||||
-0.027628 0.903228 0.445768 0.0844631
|
||||
0.0607607 0.730332 -0.060385 0.0844631
|
||||
1.06076 0.730332 0.939615 0.0844631
|
||||
1.06076 0.730332 -0.060385 0.0844631
|
||||
-0.018802 0.828728 0.664238 0.0844631
|
||||
0.739213 0.53735 1.05834 0.0844631
|
||||
0.82734 0.158482 -0.061066 0.0844631
|
||||
0.879107 1.02014 0.367227 0.0844631
|
||||
0.687105 1.01105 0.106996 0.0844631
|
||||
1.08182 0.316873 0.906747 0.0844631
|
||||
0.200611 0.873239 -0.068379 0.0844631
|
||||
1.05714 0.0492633 0.45064 0.0844631
|
||||
0.0571424 1.04926 0.45064 0.0844631
|
||||
1.05714 1.04926 0.45064 0.0844631
|
||||
0.328101 0.134057 1.03024 0.0844631
|
||||
-0.038033 0.765697 0.108057 0.0844631
|
||||
-0.080432 0.756006 0.348926 0.0844631
|
||||
-0.008334 0.744856 0.501286 0.0844631
|
||||
0.295511 0.290355 -0.034256 0.0844631
|
||||
0.794554 0.61734 -0.079767 0.0844631
|
||||
1.00195 0.33119 0.109448 0.0844631
|
||||
0.495406 0.122105 1.00323 0.0844631
|
||||
0.831011 0.872402 1.05235 0.0844631
|
||||
0.279675 1.03912 0.878759 0.0844631
|
||||
0.433519 0.406039 -0.026742 0.0844631
|
||||
0.842781 -0.077306 0.687626 0.0844631
|
||||
1.03809 0.639181 0.37794 0.0844631
|
||||
-0.044557 0.579247 0.512529 0.0844631
|
||||
0.296401 1.0372 0.449389 0.0844631
|
||||
0.656098 0.143532 -0.04426 0.0844631
|
||||
-0.034064 0.546205 0.690001 0.0844631
|
||||
0.334146 1.01467 0.286282 0.0844631
|
||||
0.174903 1.05082 0.329537 0.0844631
|
||||
0.668068 0.875575 1.0079 0.0844631
|
||||
0.0335784 0.895984 -0.079272 0.0844631
|
||||
1.03358 0.895984 0.920728 0.0844631
|
||||
1.03358 0.895984 -0.079272 0.0844631
|
||||
0.353489 -0.073784 0.98045 0.0844631
|
||||
0.353489 0.926216 -0.01955 0.0844631
|
||||
0.353489 -0.073784 -0.01955 0.0844631
|
||||
0.0214488 0.483245 -0.000202 0.0844631
|
||||
1.02145 0.483245 0.999798 0.0844631
|
||||
1.02145 0.483245 -0.000202 0.0844631
|
||||
0.385287 1.00679 0.125476 0.0844631
|
||||
0.333229 0.595868 -0.069398 0.0844631
|
||||
0.533036 -0.034339 0.0546621 0.0844631
|
||||
0.533036 0.965661 1.05466 0.0844631
|
||||
0.533036 -0.034339 1.05466 0.0844631
|
||||
1.03485 0.392455 0.721819 0.0844631
|
||||
0.17733 1.04195 0.56912 0.0844631
|
||||
0.16378 0.173693 1.04148 0.0844631
|
||||
0.0995727 0.0546697 -0.082344 0.0844631
|
||||
0.0995727 1.05467 0.917656 0.0844631
|
||||
0.0995727 1.05467 -0.082344 0.0844631
|
||||
0.447591 1.02077 0.876813 0.0844631
|
||||
1.0624 0.183214 0.56894 0.0844631
|
||||
-0.05237 0.410834 0.865314 0.0844631
|
||||
-0.046311 0.579147 0.878359 0.0844631
|
||||
1.08126 0.802026 0.365527 0.0844631
|
||||
-0.047859 0.303167 0.515389 0.0844631
|
||||
1.06268 0.350381 0.265908 0.0844631
|
||||
1.03733 0.485658 0.167958 0.0844631
|
||||
0.836323 -0.072281 0.232454 0.0844631
|
|
@ -1,8 +0,0 @@
|
|||
ID
|
||||
80 32 128
|
||||
1.0
|
||||
1.0e-2 0.9 0.1 0.9
|
||||
0.0 0.0 0.0
|
||||
0 1.0 1.0
|
||||
500 500 1e-5
|
||||
|
|
@ -1 +0,0 @@
|
|||
2 2 2
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,22 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
#PBS -l walltime=00:10:00
|
||||
# Set the number of nodes, and the number of processors per node (generally should be 6)
|
||||
#PBS -l nodes=8:ppn=1
|
||||
#PBS -A hokiespeed
|
||||
# Access group, queue, and accounting project
|
||||
#PBS -W group_list=hokiespeed
|
||||
|
||||
module purge
|
||||
module load gcc cuda mvapich2/1.9rc1
|
||||
|
||||
cd $PBS_O_WORKDIR
|
||||
|
||||
echo "------------------------------------------"
|
||||
echo "Running LBM using MPI!"
|
||||
echo "Number of processors = " $PBS_NP
|
||||
echo "------------------------------------------"
|
||||
|
||||
mpirun_rsh -np $PBS_NP -hostfile $PBS_NODEFILE MV2_USE_CUDA=1 ~/LBPM-WIA/bin/ColorLBM
|
||||
|
||||
exit;
|
|
@ -1,96 +0,0 @@
|
|||
hs060
|
||||
hs060
|
||||
hs060
|
||||
hs060
|
||||
hs060
|
||||
hs060
|
||||
hs060
|
||||
hs060
|
||||
hs060
|
||||
hs060
|
||||
hs060
|
||||
hs060
|
||||
hs061
|
||||
hs061
|
||||
hs061
|
||||
hs061
|
||||
hs061
|
||||
hs061
|
||||
hs061
|
||||
hs061
|
||||
hs061
|
||||
hs061
|
||||
hs061
|
||||
hs061
|
||||
hs064
|
||||
hs064
|
||||
hs064
|
||||
hs064
|
||||
hs064
|
||||
hs064
|
||||
hs064
|
||||
hs064
|
||||
hs064
|
||||
hs064
|
||||
hs064
|
||||
hs064
|
||||
hs065
|
||||
hs065
|
||||
hs065
|
||||
hs065
|
||||
hs065
|
||||
hs065
|
||||
hs065
|
||||
hs065
|
||||
hs065
|
||||
hs065
|
||||
hs065
|
||||
hs065
|
||||
hs066
|
||||
hs066
|
||||
hs066
|
||||
hs066
|
||||
hs066
|
||||
hs066
|
||||
hs066
|
||||
hs066
|
||||
hs066
|
||||
hs066
|
||||
hs066
|
||||
hs066
|
||||
hs067
|
||||
hs067
|
||||
hs067
|
||||
hs067
|
||||
hs067
|
||||
hs067
|
||||
hs067
|
||||
hs067
|
||||
hs067
|
||||
hs067
|
||||
hs067
|
||||
hs067
|
||||
hs068
|
||||
hs068
|
||||
hs068
|
||||
hs068
|
||||
hs068
|
||||
hs068
|
||||
hs068
|
||||
hs068
|
||||
hs068
|
||||
hs068
|
||||
hs068
|
||||
hs068
|
||||
hs069
|
||||
hs069
|
||||
hs069
|
||||
hs069
|
||||
hs069
|
||||
hs069
|
||||
hs069
|
||||
hs069
|
||||
hs069
|
||||
hs069
|
||||
hs069
|
||||
hs069
|
|
@ -1,404 +0,0 @@
|
|||
Number of Spheres: 399
|
||||
Domain Length (x,y,z): 1, 1, 1
|
||||
Media porosity: 0.369
|
||||
log(r) Normal with mean -2.47144, variance 0
|
||||
Mean coordination No. 11.84
|
||||
0.0358075 0.0887041 0.112468 0.0844631
|
||||
0.118482 0.318651 0.473828 0.0844631
|
||||
0.582752 0.0454491 0.529264 0.0844631
|
||||
0.852622 0.828954 0.547441 0.0844631
|
||||
0.807778 0.54718 0.595125 0.0844631
|
||||
0.557502 0.0185902 0.694119 0.0844631
|
||||
0.832159 0.72426 0.207901 0.0844631
|
||||
0.84196 0.996673 0.530338 0.0844631
|
||||
0.0811649 0.0792821 0.70289 0.0844631
|
||||
0.994893 0.869664 0.237064 0.0844631
|
||||
0.488065 0.221434 0.32131 0.0844631
|
||||
0.170562 0.759156 0.532848 0.0844631
|
||||
0.844254 0.0475049 0.812703 0.0844631
|
||||
0.711717 0.835039 0.165973 0.0844631
|
||||
0.545693 0.415679 0.814859 0.0844631
|
||||
0.291362 0.221277 0.740625 0.0844631
|
||||
0.625387 0.177012 0.665196 0.0844631
|
||||
0.226285 0.692765 0.689361 0.0844631
|
||||
0.891466 0.0957847 0.657861 0.0844631
|
||||
0.517532 0.273905 0.902284 0.0844631
|
||||
0.410399 0.682132 0.16299 0.0844631
|
||||
0.0570839 0.629902 0.0756787 0.0844631
|
||||
0.00559676 0.182636 0.975355 0.0844631
|
||||
0.132737 0.531505 0.667699 0.0844631
|
||||
0.662373 0.662491 0.762575 0.0844631
|
||||
0.572523 0.557371 0.0770451 0.0844631
|
||||
0.241216 0.554304 0.795169 0.0844631
|
||||
0.404127 0.9559 0.727017 0.0844631
|
||||
0.84986 0.285616 0.807583 0.0844631
|
||||
0.622755 0.508751 0.695781 0.0844631
|
||||
0.0647357 0.683784 0.64081 0.0844631
|
||||
0.017351 0.0335981 0.271083 0.0844631
|
||||
0.634026 0.657202 0.955442 0.0844631
|
||||
0.665255 0.637861 0.595479 0.0844631
|
||||
0.936277 0.0301754 0.9533 0.0844631
|
||||
0.465166 0.519937 0.229393 0.0844631
|
||||
0.27117 0.85172 0.724784 0.0844631
|
||||
0.404611 0.539355 0.0728933 0.0844631
|
||||
0.738345 0.774204 0.892481 0.0844631
|
||||
0.784738 0.235691 0.659926 0.0844631
|
||||
0.694499 0.92715 0.574585 0.0844631
|
||||
0.203094 0.29767 0.618523 0.0844631
|
||||
0.997892 0.98119 0.593439 0.0844631
|
||||
0.51469 0.833673 0.950843 0.0844631
|
||||
0.131958 0.596077 0.511604 0.0844631
|
||||
0.429379 0.264579 0.0654981 0.0844631
|
||||
0.98469 0.958944 0.771791 0.0844631
|
||||
0.952019 0.25238 0.676499 0.0844631
|
||||
0.0395681 0.440658 0.559985 0.0844631
|
||||
0.663478 0.959076 0.270011 0.0844631
|
||||
0.118073 0.821444 0.0698155 0.0844631
|
||||
0.597588 0.270182 0.0509888 0.0844631
|
||||
0.823071 0.555628 0.203843 0.0844631
|
||||
0.710083 0.00668089 0.425246 0.0844631
|
||||
0.708692 0.904726 0.788856 0.0844631
|
||||
0.293722 0.292769 0.47605 0.0844631
|
||||
0.33054 0.402152 0.352697 0.0844631
|
||||
0.103216 0.475309 0.852193 0.0844631
|
||||
0.54144 0.881093 0.790931 0.0844631
|
||||
0.588392 0.889518 0.424822 0.0844631
|
||||
0.54267 0.681877 0.268062 0.0844631
|
||||
0.671421 0.784318 0.321985 0.0844631
|
||||
0.893617 0.749839 0.954392 0.0844631
|
||||
0.612948 0.108126 0.331386 0.0844631
|
||||
0.40227 0.503457 0.798711 0.0844631
|
||||
0.854573 0.0324028 0.101137 0.0844631
|
||||
0.426354 0.122944 0.715253 0.0844631
|
||||
0.973041 0.632152 0.222197 0.0844631
|
||||
0.232692 0.0935994 0.176676 0.0844631
|
||||
0.303504 0.575786 0.59508 0.0844631
|
||||
0.365845 0.667468 0.781117 0.0844631
|
||||
0.764071 0.282961 0.49907 0.0844631
|
||||
0.31194 0.763128 0.995006 0.0844631
|
||||
0.16544 0.598159 0.950031 0.0844631
|
||||
0.988502 0.421201 0.400142 0.0844631
|
||||
0.0904952 0.804367 0.790716 0.0844631
|
||||
0.247648 0.450753 0.942993 0.0844631
|
||||
0.269592 0.0566081 0.709864 0.0844631
|
||||
0.251452 0.261402 0.171533 0.0844631
|
||||
0.701449 0.298528 0.342954 0.0844631
|
||||
0.613014 0.423649 0.982098 0.0844631
|
||||
0.408804 0.0300075 0.575286 0.0844631
|
||||
0.299217 0.816215 0.42207 0.0844631
|
||||
0.576412 0.321367 0.588916 0.0844631
|
||||
0.519125 0.705171 0.841281 0.0844631
|
||||
0.200777 0.684171 0.384522 0.0844631
|
||||
0.553896 0.522574 0.542147 0.0844631
|
||||
0.128416 0.958809 0.168028 0.0844631
|
||||
0.724615 0.0432676 0.69352 0.0844631
|
||||
0.770004 0.00074753 0.958129 0.0844631
|
||||
0.207296 0.447809 0.541212 0.0844631
|
||||
0.903614 0.193834 0.109557 0.0844631
|
||||
0.215384 0.415782 0.229858 0.0844631
|
||||
0.666485 0.318737 0.747423 0.0844631
|
||||
0.745934 0.349421 0.0668263 0.0844631
|
||||
0.766981 0.0877808 0.234542 0.0844631
|
||||
0.315324 0.397626 0.0947259 0.0844631
|
||||
0.610816 0.534216 0.313762 0.0844631
|
||||
0.687703 0.775593 0.500285 0.0844631
|
||||
0.43313 0.83717 0.0998827 0.0844631
|
||||
0.561228 0.135274 0.816213 0.0844631
|
||||
0.213419 0.355151 0.807995 0.0844631
|
||||
0.975543 0.153798 0.811644 0.0844631
|
||||
0.161034 0.342383 0.0537506 0.0844631
|
||||
0.725965 0.170735 0.804364 0.0844631
|
||||
0.91098 0.16578 0.275974 0.0844631
|
||||
0.275188 0.74229 0.244446 0.0844631
|
||||
0.389144 0.64072 0.325376 0.0844631
|
||||
0.554735 0.372235 0.282359 0.0844631
|
||||
0.104658 0.191284 0.227677 0.0844631
|
||||
0.499806 0.985717 0.302229 0.0844631
|
||||
0.470468 0.486829 0.394958 0.0844631
|
||||
0.587684 0.750647 0.08832 0.0844631
|
||||
0.299257 0.432828 0.684974 0.0844631
|
||||
0.424695 0.92756 0.441914 0.0844631
|
||||
0.504459 0.272912 0.733867 0.0844631
|
||||
0.807186 0.287712 0.211658 0.0844631
|
||||
0.460013 0.682085 0.00151398 0.0844631
|
||||
0.860599 0.886291 0.860442 0.0844631
|
||||
0.53648 0.087021 0.172119 0.0844631
|
||||
0.82388 0.678662 0.475869 0.0844631
|
||||
0.196931 0.186369 0.876273 0.0844631
|
||||
0.463229 0.765994 0.411131 0.0844631
|
||||
0.987373 0.930252 0.0795568 0.0844631
|
||||
0.513417 0.544658 0.919064 0.0844631
|
||||
0.185582 0.164945 0.453624 0.0844631
|
||||
0.0924416 0.635728 0.800369 0.0844631
|
||||
0.889638 0.614201 0.0598228 0.0844631
|
||||
0.941545 0.724731 0.793543 0.0844631
|
||||
0.731609 0.123715 0.545145 0.0844631
|
||||
0.679436 0.640664 0.177882 0.0844631
|
||||
0.218729 0.671364 0.101905 0.0844631
|
||||
0.334539 0.739691 0.568468 0.0844631
|
||||
0.215164 0.00844407 0.0318398 0.0844631
|
||||
0.669247 0.522968 0.85756 0.0844631
|
||||
0.299222 0.158529 0.578448 0.0844631
|
||||
0.919157 0.140163 0.485759 0.0844631
|
||||
0.591358 0.657196 0.427926 0.0844631
|
||||
0.268799 0.869125 0.133054 0.0844631
|
||||
0.612547 0.990973 0.897731 0.0844631
|
||||
0.15907 0.958743 0.791981 0.0844631
|
||||
0.548442 0.844609 0.223106 0.0844631
|
||||
0.888657 0.308625 0.986192 0.0844631
|
||||
0.795381 0.439411 0.932689 0.0844631
|
||||
0.635763 0.80385 0.674 0.0844631
|
||||
0.0371748 0.202381 0.38214 0.0844631
|
||||
0.386407 0.16184 0.192518 0.0844631
|
||||
0.758207 0.719974 0.0512279 0.0844631
|
||||
0.457535 0.0925071 0.426104 0.0844631
|
||||
0.972372 0.903228 0.445768 0.0844631
|
||||
0.0607607 0.730332 0.939615 0.0844631
|
||||
0.981198 0.828728 0.664238 0.0844631
|
||||
0.739213 0.53735 0.0583449 0.0844631
|
||||
0.82734 0.158482 0.938934 0.0844631
|
||||
0.879107 0.0201421 0.367227 0.0844631
|
||||
0.687105 0.0110493 0.106996 0.0844631
|
||||
0.0818178 0.316873 0.906747 0.0844631
|
||||
0.200611 0.873239 0.931621 0.0844631
|
||||
0.106137 0.24103 0.744726 0.0844631
|
||||
0.435493 0.793483 0.692769 0.0844631
|
||||
0.528055 0.731786 0.56564 0.0844631
|
||||
0.0571424 0.0492633 0.45064 0.0844631
|
||||
0.135322 0.891012 0.632386 0.0844631
|
||||
0.328101 0.134057 0.0302443 0.0844631
|
||||
0.869313 0.301052 0.368178 0.0844631
|
||||
0.961967 0.765697 0.108057 0.0844631
|
||||
0.668496 0.446111 0.181676 0.0844631
|
||||
0.919568 0.756006 0.348926 0.0844631
|
||||
0.991666 0.744856 0.501286 0.0844631
|
||||
0.295511 0.290355 0.965744 0.0844631
|
||||
0.458841 0.605759 0.654311 0.0844631
|
||||
0.794554 0.61734 0.920233 0.0844631
|
||||
0.0019474 0.33119 0.109448 0.0844631
|
||||
0.46369 0.309833 0.463181 0.0844631
|
||||
0.296394 0.904238 0.566223 0.0844631
|
||||
0.890565 0.405413 0.63493 0.0844631
|
||||
0.144195 0.575774 0.262804 0.0844631
|
||||
0.210047 0.888592 0.29819 0.0844631
|
||||
0.617947 0.229081 0.213569 0.0844631
|
||||
0.495406 0.122105 0.00322827 0.0844631
|
||||
0.831011 0.872402 0.0523457 0.0844631
|
||||
0.279675 0.0391166 0.878759 0.0844631
|
||||
0.433519 0.406039 0.973258 0.0844631
|
||||
0.702773 0.535258 0.463338 0.0844631
|
||||
0.842781 0.922694 0.687626 0.0844631
|
||||
0.703096 0.29956 0.911215 0.0844631
|
||||
0.0380851 0.639181 0.37794 0.0844631
|
||||
0.379016 0.820676 0.851045 0.0844631
|
||||
0.723109 0.401954 0.611759 0.0844631
|
||||
0.955443 0.579247 0.512529 0.0844631
|
||||
0.296401 0.037199 0.449389 0.0844631
|
||||
0.881657 0.447792 0.087761 0.0844631
|
||||
0.656098 0.143532 0.95574 0.0844631
|
||||
0.965936 0.546205 0.690001 0.0844631
|
||||
0.334146 0.0146719 0.286282 0.0844631
|
||||
0.174903 0.0508213 0.329537 0.0844631
|
||||
0.668068 0.875575 0.00789851 0.0844631
|
||||
0.517478 0.402511 0.119801 0.0844631
|
||||
0.0335784 0.895984 0.920728 0.0844631
|
||||
0.353489 0.926216 0.98045 0.0844631
|
||||
0.515858 0.899496 0.581788 0.0844631
|
||||
0.0214488 0.483245 0.999798 0.0844631
|
||||
0.836999 0.433238 0.473884 0.0844631
|
||||
0.381474 0.299744 0.621214 0.0844631
|
||||
0.893548 0.554202 0.357359 0.0844631
|
||||
0.385287 0.00679129 0.125476 0.0844631
|
||||
0.382082 0.176473 0.875897 0.0844631
|
||||
0.375338 0.439285 0.526206 0.0844631
|
||||
0.333229 0.595868 0.930602 0.0844631
|
||||
0.533036 0.965661 0.0546621 0.0844631
|
||||
0.0348509 0.392455 0.721819 0.0844631
|
||||
0.613491 0.216291 0.46143 0.0844631
|
||||
0.17733 0.0419469 0.56912 0.0844631
|
||||
0.185888 0.506077 0.0901699 0.0844631
|
||||
0.166015 0.914118 0.459266 0.0844631
|
||||
0.746306 0.633286 0.332833 0.0844631
|
||||
0.225214 0.724578 0.855262 0.0844631
|
||||
0.820434 0.603526 0.753874 0.0844631
|
||||
0.16378 0.173693 0.0414764 0.0844631
|
||||
0.0995727 0.0546697 0.917656 0.0844631
|
||||
0.447591 0.020769 0.876813 0.0844631
|
||||
0.0623956 0.183214 0.56894 0.0844631
|
||||
0.94763 0.410834 0.865314 0.0844631
|
||||
0.953689 0.579147 0.878359 0.0844631
|
||||
0.404145 0.327586 0.22019 0.0844631
|
||||
0.800574 0.868069 0.391566 0.0844631
|
||||
0.287223 0.546206 0.429562 0.0844631
|
||||
0.606297 0.397675 0.441199 0.0844631
|
||||
0.380349 0.33851 0.827832 0.0844631
|
||||
0.202245 0.28176 0.331846 0.0844631
|
||||
0.47476 0.434332 0.662686 0.0844631
|
||||
0.081255 0.802026 0.365527 0.0844631
|
||||
0.790427 0.768306 0.731892 0.0844631
|
||||
0.952141 0.303167 0.515389 0.0844631
|
||||
0.735282 0.184001 0.0993647 0.0844631
|
||||
0.108137 0.733294 0.213575 0.0844631
|
||||
0.0626769 0.350381 0.265908 0.0844631
|
||||
0.328084 0.17067 0.350811 0.0844631
|
||||
0.0373343 0.485658 0.167958 0.0844631
|
||||
0.487331 0.179389 0.567878 0.0844631
|
||||
0.782697 0.157339 0.387679 0.0844631
|
||||
0.392496 0.856145 0.287012 0.0844631
|
||||
0.78666 0.43832 0.763992 0.0844631
|
||||
0.836323 0.927719 0.232454 0.0844631
|
||||
0.152772 0.455916 0.381533 0.0844631
|
||||
0.302341 0.558622 0.205956 0.0844631
|
||||
0.426957 0.620411 0.488758 0.0844631
|
||||
0.760088 0.455904 0.324774 0.0844631
|
||||
0.907569 0.417477 0.251912 0.0844631
|
||||
0.896312 0.687184 0.628241 0.0844631
|
||||
1.03581 0.0887041 0.112468 0.0844631
|
||||
0.582752 1.04545 0.529264 0.0844631
|
||||
0.557502 1.01859 0.694119 0.0844631
|
||||
0.84196 -0.003327 0.530338 0.0844631
|
||||
1.08116 0.0792821 0.70289 0.0844631
|
||||
0.0811649 1.07928 0.70289 0.0844631
|
||||
1.08116 1.07928 0.70289 0.0844631
|
||||
-0.005107 0.869664 0.237064 0.0844631
|
||||
0.844254 1.0475 0.812703 0.0844631
|
||||
1.05708 0.629902 0.0756787 0.0844631
|
||||
0.0570839 0.629902 1.07568 0.0844631
|
||||
1.05708 0.629902 1.07568 0.0844631
|
||||
0.00559676 0.182636 -0.024645 0.0844631
|
||||
1.0056 0.182636 0.975355 0.0844631
|
||||
1.0056 0.182636 -0.024645 0.0844631
|
||||
0.572523 0.557371 1.07705 0.0844631
|
||||
0.404127 -0.0441 0.727017 0.0844631
|
||||
1.06474 0.683784 0.64081 0.0844631
|
||||
1.01735 0.0335981 0.271083 0.0844631
|
||||
0.017351 1.0336 0.271083 0.0844631
|
||||
1.01735 1.0336 0.271083 0.0844631
|
||||
0.634026 0.657202 -0.044558 0.0844631
|
||||
-0.063723 0.0301754 0.9533 0.0844631
|
||||
0.936277 0.0301754 -0.0467 0.0844631
|
||||
0.936277 1.03018 0.9533 0.0844631
|
||||
-0.063723 0.0301754 -0.0467 0.0844631
|
||||
-0.063723 1.03018 0.9533 0.0844631
|
||||
0.936277 1.03018 -0.0467 0.0844631
|
||||
-0.063723 1.03018 -0.0467 0.0844631
|
||||
0.404611 0.539355 1.07289 0.0844631
|
||||
0.694499 -0.07285 0.574585 0.0844631
|
||||
-0.002108 0.98119 0.593439 0.0844631
|
||||
0.997892 -0.01881 0.593439 0.0844631
|
||||
-0.002108 -0.01881 0.593439 0.0844631
|
||||
0.51469 0.833673 -0.049157 0.0844631
|
||||
0.429379 0.264579 1.0655 0.0844631
|
||||
-0.01531 0.958944 0.771791 0.0844631
|
||||
0.98469 -0.041056 0.771791 0.0844631
|
||||
-0.01531 -0.041056 0.771791 0.0844631
|
||||
-0.047981 0.25238 0.676499 0.0844631
|
||||
1.03957 0.440658 0.559985 0.0844631
|
||||
0.663478 -0.040924 0.270011 0.0844631
|
||||
0.118073 0.821444 1.06982 0.0844631
|
||||
0.597588 0.270182 1.05099 0.0844631
|
||||
0.710083 1.00668 0.425246 0.0844631
|
||||
0.893617 0.749839 -0.045608 0.0844631
|
||||
0.854573 1.0324 0.101137 0.0844631
|
||||
-0.026959 0.632152 0.222197 0.0844631
|
||||
0.31194 0.763128 -0.004994 0.0844631
|
||||
0.16544 0.598159 -0.049969 0.0844631
|
||||
-0.011498 0.421201 0.400142 0.0844631
|
||||
0.247648 0.450753 -0.057007 0.0844631
|
||||
0.269592 1.05661 0.709864 0.0844631
|
||||
0.613014 0.423649 -0.017902 0.0844631
|
||||
0.408804 1.03001 0.575286 0.0844631
|
||||
0.128416 -0.041191 0.168028 0.0844631
|
||||
0.724615 1.04327 0.69352 0.0844631
|
||||
0.770004 0.00074753 -0.041871 0.0844631
|
||||
0.770004 1.00075 0.958129 0.0844631
|
||||
0.770004 1.00075 -0.041871 0.0844631
|
||||
0.745934 0.349421 1.06683 0.0844631
|
||||
-0.024457 0.153798 0.811644 0.0844631
|
||||
0.161034 0.342383 1.05375 0.0844631
|
||||
0.499806 -0.014283 0.302229 0.0844631
|
||||
0.424695 -0.07244 0.441914 0.0844631
|
||||
0.460013 0.682085 1.00151 0.0844631
|
||||
-0.012627 0.930252 0.0795568 0.0844631
|
||||
0.987373 -0.069748 0.0795568 0.0844631
|
||||
0.987373 0.930252 1.07956 0.0844631
|
||||
-0.012627 -0.069748 0.0795568 0.0844631
|
||||
-0.012627 0.930252 1.07956 0.0844631
|
||||
0.987373 -0.069748 1.07956 0.0844631
|
||||
-0.012627 -0.069748 1.07956 0.0844631
|
||||
0.513417 0.544658 -0.080936 0.0844631
|
||||
0.889638 0.614201 1.05982 0.0844631
|
||||
-0.058455 0.724731 0.793543 0.0844631
|
||||
0.215164 1.00844 0.0318398 0.0844631
|
||||
0.215164 0.00844407 1.03184 0.0844631
|
||||
0.215164 1.00844 1.03184 0.0844631
|
||||
-0.080843 0.140163 0.485759 0.0844631
|
||||
0.612547 -0.009027 0.897731 0.0844631
|
||||
0.15907 -0.041257 0.791981 0.0844631
|
||||
0.888657 0.308625 -0.013808 0.0844631
|
||||
0.795381 0.439411 -0.067311 0.0844631
|
||||
1.03717 0.202381 0.38214 0.0844631
|
||||
0.758207 0.719974 1.05123 0.0844631
|
||||
-0.027628 0.903228 0.445768 0.0844631
|
||||
0.0607607 0.730332 -0.060385 0.0844631
|
||||
1.06076 0.730332 0.939615 0.0844631
|
||||
1.06076 0.730332 -0.060385 0.0844631
|
||||
-0.018802 0.828728 0.664238 0.0844631
|
||||
0.739213 0.53735 1.05834 0.0844631
|
||||
0.82734 0.158482 -0.061066 0.0844631
|
||||
0.879107 1.02014 0.367227 0.0844631
|
||||
0.687105 1.01105 0.106996 0.0844631
|
||||
1.08182 0.316873 0.906747 0.0844631
|
||||
0.200611 0.873239 -0.068379 0.0844631
|
||||
1.05714 0.0492633 0.45064 0.0844631
|
||||
0.0571424 1.04926 0.45064 0.0844631
|
||||
1.05714 1.04926 0.45064 0.0844631
|
||||
0.328101 0.134057 1.03024 0.0844631
|
||||
-0.038033 0.765697 0.108057 0.0844631
|
||||
-0.080432 0.756006 0.348926 0.0844631
|
||||
-0.008334 0.744856 0.501286 0.0844631
|
||||
0.295511 0.290355 -0.034256 0.0844631
|
||||
0.794554 0.61734 -0.079767 0.0844631
|
||||
1.00195 0.33119 0.109448 0.0844631
|
||||
0.495406 0.122105 1.00323 0.0844631
|
||||
0.831011 0.872402 1.05235 0.0844631
|
||||
0.279675 1.03912 0.878759 0.0844631
|
||||
0.433519 0.406039 -0.026742 0.0844631
|
||||
0.842781 -0.077306 0.687626 0.0844631
|
||||
1.03809 0.639181 0.37794 0.0844631
|
||||
-0.044557 0.579247 0.512529 0.0844631
|
||||
0.296401 1.0372 0.449389 0.0844631
|
||||
0.656098 0.143532 -0.04426 0.0844631
|
||||
-0.034064 0.546205 0.690001 0.0844631
|
||||
0.334146 1.01467 0.286282 0.0844631
|
||||
0.174903 1.05082 0.329537 0.0844631
|
||||
0.668068 0.875575 1.0079 0.0844631
|
||||
0.0335784 0.895984 -0.079272 0.0844631
|
||||
1.03358 0.895984 0.920728 0.0844631
|
||||
1.03358 0.895984 -0.079272 0.0844631
|
||||
0.353489 -0.073784 0.98045 0.0844631
|
||||
0.353489 0.926216 -0.01955 0.0844631
|
||||
0.353489 -0.073784 -0.01955 0.0844631
|
||||
0.0214488 0.483245 -0.000202 0.0844631
|
||||
1.02145 0.483245 0.999798 0.0844631
|
||||
1.02145 0.483245 -0.000202 0.0844631
|
||||
0.385287 1.00679 0.125476 0.0844631
|
||||
0.333229 0.595868 -0.069398 0.0844631
|
||||
0.533036 -0.034339 0.0546621 0.0844631
|
||||
0.533036 0.965661 1.05466 0.0844631
|
||||
0.533036 -0.034339 1.05466 0.0844631
|
||||
1.03485 0.392455 0.721819 0.0844631
|
||||
0.17733 1.04195 0.56912 0.0844631
|
||||
0.16378 0.173693 1.04148 0.0844631
|
||||
0.0995727 0.0546697 -0.082344 0.0844631
|
||||
0.0995727 1.05467 0.917656 0.0844631
|
||||
0.0995727 1.05467 -0.082344 0.0844631
|
||||
0.447591 1.02077 0.876813 0.0844631
|
||||
1.0624 0.183214 0.56894 0.0844631
|
||||
-0.05237 0.410834 0.865314 0.0844631
|
||||
-0.046311 0.579147 0.878359 0.0844631
|
||||
1.08126 0.802026 0.365527 0.0844631
|
||||
-0.047859 0.303167 0.515389 0.0844631
|
||||
1.06268 0.350381 0.265908 0.0844631
|
||||
1.03733 0.485658 0.167958 0.0844631
|
||||
0.836323 -0.072281 0.232454 0.0844631
|
|
@ -1,8 +1,6 @@
|
|||
ID
|
||||
160 32 128
|
||||
1.0
|
||||
1.0e-2 0.95 0.1 0.9
|
||||
0.7
|
||||
0.0 0.0 0.0
|
||||
0 1.0 1.0
|
||||
1000 1000 1e-5
|
||||
0 0 1.0 1.0
|
||||
20000 1000 1e-5
|
||||
|
|
6
example/Sph1896/Color.in
Normal file
6
example/Sph1896/Color.in
Normal file
|
@ -0,0 +1,6 @@
|
|||
1.0
|
||||
1.0e-2 0.95 0.1 0.9
|
||||
0.7
|
||||
0.0 0.0 0.0
|
||||
0 0 1.0 1.0
|
||||
10000 1000 1e-5
|
4
example/Sph1896/Domain.in
Normal file
4
example/Sph1896/Domain.in
Normal file
|
@ -0,0 +1,4 @@
|
|||
3 3 3
|
||||
120 120 120
|
||||
1896
|
||||
1.0 1.0 1.0
|
20
example/Sph1896/Titan-Submit.pbs
Normal file
20
example/Sph1896/Titan-Submit.pbs
Normal file
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
#PBS -A GEO019
|
||||
#PBS -N LB-WIA-Color
|
||||
#PBS -j oe
|
||||
#PBS -l walltime=0:30:00,nodes=27
|
||||
#PBS -l gres=widow2%widow3
|
||||
##PBS -q killable
|
||||
#PBS -q debug
|
||||
|
||||
#cd /tmp/work/$USER
|
||||
date
|
||||
|
||||
cd $PBS_O_WORKDIR
|
||||
|
||||
#echo "PBS_O_WORKDIR: `echo $PBS_O_WORKDIR`"
|
||||
source $MODULESHOME/init/bash
|
||||
module swap cray-mpich2 cray-mpich2/5.6.3
|
||||
export LD_LIBRARY_PATH=${CRAY_LD_LIBRARY_PATH}:${LD_LIBRARY_PATH}
|
||||
export MPICH_RDMA_ENABLED_CUDA=1
|
||||
aprun -n 27 -N 1 ~/LBPM-WIA/bin/Color-WIA
|
510
gpu/Color.cu
510
gpu/Color.cu
|
@ -108,6 +108,56 @@ __global__ void Compute_VELOCITY(char *ID, double *disteven, double *distodd, do
|
|||
}
|
||||
}
|
||||
|
||||
__global__ void ComputePressureD3Q19(char *ID, double *disteven, double *distodd, double *Pressure,
|
||||
int Nx, int Ny, int Nz, int S)
|
||||
{
|
||||
int n,N;
|
||||
// distributions
|
||||
double f0,f1,f2,f3,f4,f5,f6,f7,f8,f9;
|
||||
double f10,f11,f12,f13,f14,f15,f16,f17,f18;
|
||||
|
||||
N = Nx*Ny*Nz;
|
||||
|
||||
// S - number of threadblocks per grid block
|
||||
for (int s=0; s<S; s++){
|
||||
|
||||
//........Get 1-D index for this thread....................
|
||||
n = S*blockIdx.x*blockDim.x + s*blockDim.x + threadIdx.x;
|
||||
|
||||
if (n<N){
|
||||
if (ID[n] > 0){
|
||||
//........................................................................
|
||||
// Registers to store the distributions
|
||||
//........................................................................
|
||||
f0 = disteven[n];
|
||||
f2 = disteven[N+n];
|
||||
f4 = disteven[2*N+n];
|
||||
f6 = disteven[3*N+n];
|
||||
f8 = disteven[4*N+n];
|
||||
f10 = disteven[5*N+n];
|
||||
f12 = disteven[6*N+n];
|
||||
f14 = disteven[7*N+n];
|
||||
f16 = disteven[8*N+n];
|
||||
f18 = disteven[9*N+n];
|
||||
//........................................................................
|
||||
f1 = distodd[n];
|
||||
f3 = distodd[1*N+n];
|
||||
f5 = distodd[2*N+n];
|
||||
f7 = distodd[3*N+n];
|
||||
f9 = distodd[4*N+n];
|
||||
f11 = distodd[5*N+n];
|
||||
f13 = distodd[6*N+n];
|
||||
f15 = distodd[7*N+n];
|
||||
f17 = distodd[8*N+n];
|
||||
//.................Compute the velocity...................................
|
||||
Pressure[n] = 0.3333333333333333*(f0+f2+f1+f4+f3+f6+f5+f8+f7+f10+
|
||||
f9+f12+f11+f14+f13+f16+f15+f18+f17);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
//*************************************************************************
|
||||
__global__ void PressureBC_inlet(double *disteven, double *distodd, double din,
|
||||
|
@ -381,9 +431,9 @@ __global__ void ComputeColorGradient(char *ID, double *phi, double *ColorGrad, i
|
|||
// ny = ny/C;
|
||||
// nz = nz/C;
|
||||
//...Store the Color Gradient....................
|
||||
ColorGrad[3*n] = nx;
|
||||
ColorGrad[3*n+1] = ny;
|
||||
ColorGrad[3*n+2] = nz;
|
||||
ColorGrad[n] = nx;
|
||||
ColorGrad[N+n] = ny;
|
||||
ColorGrad[2*N+n] = nz;
|
||||
//...............................................
|
||||
}
|
||||
}
|
||||
|
@ -419,9 +469,9 @@ __global__ void ColorCollide( char *ID, double *disteven, double *distodd, doubl
|
|||
if (id > 0){
|
||||
|
||||
// Retrieve the color gradient
|
||||
nx = ColorGrad[3*n];
|
||||
ny = ColorGrad[3*n+1];
|
||||
nz = ColorGrad[3*n+2];
|
||||
nx = ColorGrad[n];
|
||||
ny = ColorGrad[N+n];
|
||||
nz = ColorGrad[2*N+n];
|
||||
//...........Normalize the Color Gradient.................................
|
||||
C = sqrt(nx*nx+ny*ny+nz*nz);
|
||||
nx = nx/C;
|
||||
|
@ -591,20 +641,429 @@ __global__ void ColorCollide( char *ID, double *disteven, double *distodd, doubl
|
|||
distodd[6*N+n] = f13;
|
||||
distodd[7*N+n] = f15;
|
||||
distodd[8*N+n] = f17;
|
||||
|
||||
//...Store the Velocity..........................
|
||||
Velocity[3*n] = jx;
|
||||
Velocity[3*n+1] = jy;
|
||||
Velocity[3*n+2] = jz;
|
||||
/* //...Store the Color Gradient....................
|
||||
ColorGrad[3*n] = C*nx;
|
||||
ColorGrad[3*n+1] = C*ny;
|
||||
ColorGrad[3*n+2] = C*nz;
|
||||
*/ //...............................................
|
||||
//...Store the Color Gradient....................
|
||||
// ColorGrad[3*n] = nx*C;
|
||||
// ColorGrad[3*n+1] = ny*C;
|
||||
// ColorGrad[3*n+2] = nz*C;
|
||||
//...............................................
|
||||
//***************************************************************
|
||||
} // check if n is in the solid
|
||||
} // check if n is in the domain
|
||||
} // loop over s
|
||||
}
|
||||
|
||||
__global__ void ColorCollideOpt( char *ID, double *disteven, double *distodd, double *phi, double *ColorGrad,
|
||||
double *Velocity, int Nx, int Ny, int Nz, int S,double rlx_setA, double rlx_setB,
|
||||
double alpha, double beta, double Fx, double Fy, double Fz)
|
||||
{
|
||||
|
||||
int i,j,k,n,nn,N;
|
||||
// distributions
|
||||
double f0,f1,f2,f3,f4,f5,f6,f7,f8,f9;
|
||||
double f10,f11,f12,f13,f14,f15,f16,f17,f18;
|
||||
|
||||
// non-conserved moments
|
||||
double m1,m2,m4,m6,m8,m9,m10,m11,m12,m13,m14,m15,m16,m17,m18;
|
||||
// additional variables needed for computations
|
||||
double rho,jx,jy,jz,C,nx,ny,nz;
|
||||
|
||||
N = Nx*Ny*Nz;
|
||||
char id;
|
||||
|
||||
// S - number of threadblocks per grid block
|
||||
for (int s=0; s<S; s++){
|
||||
// for (int n=0; n<N; n++){
|
||||
//........Get 1-D index for this thread....................
|
||||
n = S*blockIdx.x*blockDim.x + s*blockDim.x + threadIdx.x;
|
||||
|
||||
id = ID[n];
|
||||
|
||||
if (n<N){
|
||||
if (id > 0){
|
||||
|
||||
//.......Back out the 3-D indices for node n..............
|
||||
k = n/(Nx*Ny);
|
||||
j = (n-Nx*Ny*k)/Nx;
|
||||
i = n-Nx*Ny*k-Nx*j;
|
||||
//........................................................................
|
||||
//........Get 1-D index for this thread....................
|
||||
// n = S*blockIdx.x*blockDim.x + s*blockDim.x + threadIdx.x;
|
||||
//........................................................................
|
||||
// COMPUTE THE COLOR GRADIENT
|
||||
//........................................................................
|
||||
//.................Read Phase Indicator Values............................
|
||||
//........................................................................
|
||||
nn = n-1; // neighbor index (get convention)
|
||||
if (i-1<0) nn += Nx; // periodic BC along the x-boundary
|
||||
f1 = phi[nn]; // get neighbor for phi - 1
|
||||
//........................................................................
|
||||
nn = n+1; // neighbor index (get convention)
|
||||
if (!(i+1<Nx)) nn -= Nx; // periodic BC along the x-boundary
|
||||
f2 = phi[nn]; // get neighbor for phi - 2
|
||||
//........................................................................
|
||||
nn = n-Nx; // neighbor index (get convention)
|
||||
if (j-1<0) nn += Nx*Ny; // Perioidic BC along the y-boundary
|
||||
f3 = phi[nn]; // get neighbor for phi - 3
|
||||
//........................................................................
|
||||
nn = n+Nx; // neighbor index (get convention)
|
||||
if (!(j+1<Ny)) nn -= Nx*Ny; // Perioidic BC along the y-boundary
|
||||
f4 = phi[nn]; // get neighbor for phi - 4
|
||||
//........................................................................
|
||||
nn = n-Nx*Ny; // neighbor index (get convention)
|
||||
if (k-1<0) nn += Nx*Ny*Nz; // Perioidic BC along the z-boundary
|
||||
f5 = phi[nn]; // get neighbor for phi - 5
|
||||
//........................................................................
|
||||
nn = n+Nx*Ny; // neighbor index (get convention)
|
||||
if (!(k+1<Nz)) nn -= Nx*Ny*Nz; // Perioidic BC along the z-boundary
|
||||
f6 = phi[nn]; // get neighbor for phi - 6
|
||||
//........................................................................
|
||||
nn = n-Nx-1; // neighbor index (get convention)
|
||||
if (i-1<0) nn += Nx; // periodic BC along the x-boundary
|
||||
if (j-1<0) nn += Nx*Ny; // Perioidic BC along the y-boundary
|
||||
f7 = phi[nn]; // get neighbor for phi - 7
|
||||
//........................................................................
|
||||
nn = n+Nx+1; // neighbor index (get convention)
|
||||
if (!(i+1<Nx)) nn -= Nx; // periodic BC along the x-boundary
|
||||
if (!(j+1<Ny)) nn -= Nx*Ny; // Perioidic BC along the y-boundary
|
||||
f8 = phi[nn]; // get neighbor for phi - 8
|
||||
//........................................................................
|
||||
nn = n+Nx-1; // neighbor index (get convention)
|
||||
if (i-1<0) nn += Nx; // periodic BC along the x-boundary
|
||||
if (!(j+1<Ny)) nn -= Nx*Ny; // Perioidic BC along the y-boundary
|
||||
f9 = phi[nn]; // get neighbor for phi - 9
|
||||
//........................................................................
|
||||
nn = n-Nx+1; // neighbor index (get convention)
|
||||
if (!(i+1<Nx)) nn -= Nx; // periodic BC along the x-boundary
|
||||
if (j-1<0) nn += Nx*Ny; // Perioidic BC along the y-boundary
|
||||
f10 = phi[nn]; // get neighbor for phi - 10
|
||||
//........................................................................
|
||||
nn = n-Nx*Ny-1; // neighbor index (get convention)
|
||||
if (i-1<0) nn += Nx; // periodic BC along the x-boundary
|
||||
if (k-1<0) nn += Nx*Ny*Nz; // Perioidic BC along the z-boundary
|
||||
f11 = phi[nn]; // get neighbor for phi - 11
|
||||
//........................................................................
|
||||
nn = n+Nx*Ny+1; // neighbor index (get convention)
|
||||
if (!(i+1<Nx)) nn -= Nx; // periodic BC along the x-boundary
|
||||
if (!(k+1<Nz)) nn -= Nx*Ny*Nz; // Perioidic BC along the z-boundary
|
||||
f12 = phi[nn]; // get neighbor for phi - 12
|
||||
//........................................................................
|
||||
nn = n+Nx*Ny-1; // neighbor index (get convention)
|
||||
if (i-1<0) nn += Nx; // periodic BC along the x-boundary
|
||||
if (!(k+1<Nz)) nn -= Nx*Ny*Nz; // Perioidic BC along the z-boundary
|
||||
f13 = phi[nn]; // get neighbor for phi - 13
|
||||
//........................................................................
|
||||
nn = n-Nx*Ny+1; // neighbor index (get convention)
|
||||
if (!(i+1<Nx)) nn -= Nx; // periodic BC along the x-boundary
|
||||
if (k-1<0) nn += Nx*Ny*Nz; // Perioidic BC along the z-boundary
|
||||
f14 = phi[nn]; // get neighbor for phi - 14
|
||||
//........................................................................
|
||||
nn = n-Nx*Ny-Nx; // neighbor index (get convention)
|
||||
if (j-1<0) nn += Nx*Ny; // Perioidic BC along the y-boundary
|
||||
if (k-1<0) nn += Nx*Ny*Nz; // Perioidic BC along the z-boundary
|
||||
f15 = phi[nn]; // get neighbor for phi - 15
|
||||
//........................................................................
|
||||
nn = n+Nx*Ny+Nx; // neighbor index (get convention)
|
||||
if (!(j+1<Ny)) nn -= Nx*Ny; // Perioidic BC along the y-boundary
|
||||
if (!(k+1<Nz)) nn -= Nx*Ny*Nz; // Perioidic BC along the z-boundary
|
||||
f16 = phi[nn]; // get neighbor for phi - 16
|
||||
//........................................................................
|
||||
nn = n+Nx*Ny-Nx; // neighbor index (get convention)
|
||||
if (j-1<0) nn += Nx*Ny; // Perioidic BC along the y-boundary
|
||||
if (!(k+1<Nz)) nn -= Nx*Ny*Nz; // Perioidic BC along the z-boundary
|
||||
f17 = phi[nn]; // get neighbor for phi - 17
|
||||
//........................................................................
|
||||
nn = n-Nx*Ny+Nx; // neighbor index (get convention)
|
||||
if (!(j+1<Ny)) nn -= Nx*Ny; // Perioidic BC along the y-boundary
|
||||
if (k-1<0) nn += Nx*Ny*Nz; // Perioidic BC along the z-boundary
|
||||
f18 = phi[nn]; // get neighbor for phi - 18
|
||||
//............Compute the Color Gradient...................................
|
||||
nx = -(f1-f2+0.5*(f7-f8+f9-f10+f11-f12+f13-f14));
|
||||
ny = -(f3-f4+0.5*(f7-f8-f9+f10+f15-f16+f17-f18));
|
||||
nz = -(f5-f6+0.5*(f11-f12-f13+f14+f15-f16-f17+f18));
|
||||
//...Store the Color Gradient....................
|
||||
ColorGrad[n] = nx;
|
||||
ColorGrad[N+n] = ny;
|
||||
ColorGrad[2*N+n] = nz;
|
||||
//...............................................
|
||||
//...........Normalize the Color Gradient.................................
|
||||
C = sqrt(nx*nx+ny*ny+nz*nz);
|
||||
nx = nx/C;
|
||||
ny = ny/C;
|
||||
nz = nz/C;
|
||||
//......No color gradient at z-boundary if pressure BC are set.............
|
||||
// if (pBC && k==0) nx = ny = nz = 0.f;
|
||||
// if (pBC && k==Nz-1) nx = ny = nz = 0.f;
|
||||
//........................................................................
|
||||
// READ THE DISTRIBUTIONS
|
||||
// (read from opposite array due to previous swap operation)
|
||||
//........................................................................
|
||||
f2 = distodd[n];
|
||||
f4 = distodd[N+n];
|
||||
f6 = distodd[2*N+n];
|
||||
f0 = disteven[n];
|
||||
f1 = disteven[N+n];
|
||||
f3 = disteven[2*N+n];
|
||||
f5 = disteven[3*N+n];
|
||||
//........................................................................
|
||||
//....................compute the moments...............................................
|
||||
rho = f0+f2+f1+f4+f3+f6+f5;
|
||||
m1 = -30*f0-11*(f2+f1+f4+f3+f6+f5);
|
||||
m2 = 12*f0-4*(f2+f1 +f4+f3+f6 +f5);
|
||||
jx = f1-f2;
|
||||
m4 = 4*(-f1+f2);
|
||||
jy = f3-f4;
|
||||
m6 = -4*(f3-f4);
|
||||
jz = f5-f6;
|
||||
m8 = -4*(f5-f6);
|
||||
m9 = 2*(f1+f2)-f3-f4-f5-f6;
|
||||
m10 = -4*(f1+f2)+2*(f4+f3+f6+f5);
|
||||
m11 = f4+f3-f6-f5;
|
||||
m12 = -2*(f4+f3-f6-f5);
|
||||
//........................................................................
|
||||
f8 = distodd[3*N+n];
|
||||
f10 = distodd[4*N+n];
|
||||
f7 = disteven[4*N+n];
|
||||
f9 = disteven[5*N+n];
|
||||
//........................................................................
|
||||
rho += f8+f7+f10+f9;
|
||||
m1 += 8*(f8+f7+f10+f9);
|
||||
m2 += f8+f7+f10+f9;
|
||||
jx += f7-f8+f9-f10;
|
||||
m4 += f7-f8+f9-f10;
|
||||
jy += f7-f8-f9+f10;
|
||||
m6 += f7-f8-f9+f10;
|
||||
m9 += f7+f8+f9+f10;
|
||||
m10 += f8+f7+f10+f9;
|
||||
m11 += f8+f7+f10+f9;
|
||||
m12 += f8+f7+f10+f9;
|
||||
m13 = f8+f7-f10-f9;
|
||||
m16 = f7-f8+f9-f10;
|
||||
m17 = -f7+f8+f9-f10;
|
||||
//........................................................................
|
||||
f11 = disteven[6*N+n];
|
||||
f13 = disteven[7*N+n];
|
||||
f12 = distodd[5*N+n];
|
||||
f14 = distodd[6*N+n];
|
||||
//........................................................................
|
||||
//........................................................................
|
||||
f15 = disteven[8*N+n];
|
||||
f17 = disteven[9*N+n];
|
||||
f16 = distodd[7*N+n];
|
||||
f18 = distodd[8*N+n];
|
||||
//........................................................................
|
||||
//....................compute the moments...............................................
|
||||
rho += f12+f11+f14+f13+f16+f15+f18+f17;
|
||||
m1 += 8*(f12+f11+f14+f13+f16+f15+f18+f17);
|
||||
m2 += f12+f11+f14+f13+f16+f15+f18+f17;
|
||||
jx += f11-f12+f13-f14;
|
||||
m4 += f11-f12+f13-f14;
|
||||
jy += f15-f16+f17-f18;
|
||||
m6 += f15-f16+f17-f18;
|
||||
jz += f11-f12-f13+f14+f15-f16-f17+f18;
|
||||
m8 += f11-f12-f13+f14+f15-f16-f17+f18;
|
||||
m9 += f11+f12+f13+f14-2*(f15+f16+f17+f18);
|
||||
m10 += f12+f11+f14+f13-2*(f16+f15+f18+f17);
|
||||
m11 += -f12-f11-f14-f13;
|
||||
m12 += -f12-f11-f14-f13;
|
||||
m14 = f16+f15-f18-f17;
|
||||
m15 = f12+f11-f14-f13;
|
||||
m16 += -f11+f12-f13+f14;
|
||||
m17 += f15-f16+f17-f18;
|
||||
m18 = f11-f12-f13+f14-f15+f16+f17-f18;
|
||||
//........................................................................
|
||||
|
||||
/* f2 = distodd[n];
|
||||
f4 = distodd[N+n];
|
||||
f6 = distodd[2*N+n];
|
||||
f8 = distodd[3*N+n];
|
||||
//........................................................................
|
||||
f0 = disteven[n];
|
||||
f1 = disteven[N+n];
|
||||
f3 = disteven[2*N+n];
|
||||
f5 = disteven[3*N+n];
|
||||
f7 = disteven[4*N+n];
|
||||
//........................................................................
|
||||
//........................................................................
|
||||
//....................compute the moments...............................................
|
||||
rho = f0+f2+f1+f4+f3+f6+f5+f8+f7;
|
||||
m1 = -30*f0-11*(f2+f1+f4+f3+f6+f5)+8*(f8+f7);
|
||||
m2 = 12*f0-4*(f2+f1 +f4+f3+f6 +f5)+f8+f7;
|
||||
jx = f1-f2+f7-f8;
|
||||
m4 = 4*(-f1+f2)+f7-f8;
|
||||
jy = f3-f4+f7-f8;
|
||||
m6 = -4*(f3-f4)+f7-f8;
|
||||
jz = f5-f6;
|
||||
m8 = -4*(f5-f6);
|
||||
m9 = 2*(f1+f2)-f3-f4-f5-f6+f7+f8;
|
||||
m10 = -4*(f1+f2)+2*(f4+f3+f6+f5)+f8+f7;
|
||||
m11 = f4+f3-f6-f5+f8+f7;
|
||||
m12 = -2*(f4+f3-f6-f5)+f8+f7;
|
||||
m13 = f8+f7;
|
||||
m16 = f7-f8;
|
||||
m17 = -f7+f8;
|
||||
//........................................................................
|
||||
f9 = disteven[5*N+n];
|
||||
f11 = disteven[6*N+n];
|
||||
f13 = disteven[7*N+n];
|
||||
f15 = disteven[8*N+n];
|
||||
f17 = disteven[9*N+n];
|
||||
f10 = distodd[4*N+n];
|
||||
f12 = distodd[5*N+n];
|
||||
f14 = distodd[6*N+n];
|
||||
f16 = distodd[7*N+n];
|
||||
f18 = distodd[8*N+n];
|
||||
//........................................................................
|
||||
rho += f10+f9+f12+f11+f14+f13+f16+f15+f18+f17;
|
||||
m1 += 8*(f10+f9+f12+f11+f14+f13+f16+f15+f18 +f17);
|
||||
m2 += f10+f9+f12+f11+f14+f13+f16+f15+f18+f17;
|
||||
jx += f9-f10+f11-f12+f13-f14;
|
||||
m4 += f9-f10+f11-f12+f13-f14;
|
||||
jy += -f9+f10+f15-f16+f17-f18;
|
||||
m6 += -f9+f10+f15-f16+f17-f18;
|
||||
jz += f11-f12-f13+f14+f15-f16-f17+f18;
|
||||
m8 += f11-f12-f13+f14+f15-f16-f17+f18;
|
||||
m9 += f9+f10+f11+f12+f13+f14-2*(f15+f16+f17+f18);
|
||||
m10 += f10+f9+f12+f11+f14+f13-2*(f16+f15+f18+f17);
|
||||
m11 += f10+f9-f12-f11-f14-f13;
|
||||
m12 += f10+f9-f12-f11-f14-f13;
|
||||
m13 += -f10-f9;
|
||||
m14 = f16+f15-f18-f17;
|
||||
m15 = f12+f11-f14-f13;
|
||||
m16 += f9-f10-f11+f12-f13+f14;
|
||||
m17 += f9-f10+f15-f16+f17-f18;
|
||||
m18 = f11-f12-f13+f14-f15+f16+f17-f18;
|
||||
*/ //........................................................................
|
||||
// PERFORM RELAXATION PROCESS
|
||||
//........................................................................
|
||||
//..........Toelke, Fruediger et. al. 2006...............
|
||||
if (C == 0.0) nx = ny = nz = 1.0;
|
||||
m1 = m1 + rlx_setA*((19*(jx*jx+jy*jy+jz*jz)/rho - 11*rho) -alpha*C - m1);
|
||||
m2 = m2 + rlx_setA*((3*rho - 5.5*(jx*jx+jy*jy+jz*jz)/rho)- m2);
|
||||
m4 = m4 + rlx_setB*((-0.6666666666666666*jx)- m4);
|
||||
m6 = m6 + rlx_setB*((-0.6666666666666666*jy)- m6);
|
||||
m8 = m8 + rlx_setB*((-0.6666666666666666*jz)- m8);
|
||||
m9 = m9 + rlx_setA*(((2*jx*jx-jy*jy-jz*jz)/rho) + 0.5*alpha*C*(2*nx*nx-ny*ny-nz*nz) - m9);
|
||||
m10 = m10 + rlx_setA*(-0.5*((2*jx*jx-jy*jy-jz*jz)/rho) - m10);
|
||||
m11 = m11 + rlx_setA*(((jy*jy-jz*jz)/rho) + 0.5*alpha*C*(ny*ny-nz*nz)- m11);
|
||||
m12 = m12 + rlx_setA*( -0.5*((jy*jy-jz*jz)/rho) - m12);
|
||||
m13 = m13 + rlx_setA*( (jx*jy/rho) + 0.5*alpha*C*nx*ny - m13);
|
||||
m14 = m14 + rlx_setA*( (jy*jz/rho) + 0.5*alpha*C*ny*nz - m14);
|
||||
m15 = m15 + rlx_setA*( (jx*jz/rho) + 0.5*alpha*C*nx*nz - m15);
|
||||
m16 = m16 + rlx_setB*( - m16);
|
||||
m17 = m17 + rlx_setB*( - m17);
|
||||
m18 = m18 + rlx_setB*( - m18);
|
||||
//.................inverse transformation......................................................
|
||||
f0 = 0.05263157894736842*rho-0.012531328320802*m1+0.04761904761904762*m2;
|
||||
f1 = 0.05263157894736842*rho-0.004594820384294068*m1-0.01587301587301587*m2
|
||||
+0.1*(jx-m4)+0.0555555555555555555555555*(m9-m10);
|
||||
f2 = 0.05263157894736842*rho-0.004594820384294068*m1-0.01587301587301587*m2
|
||||
+0.1*(m4-jx)+0.0555555555555555555555555*(m9-m10);
|
||||
f3 = 0.05263157894736842*rho-0.004594820384294068*m1-0.01587301587301587*m2
|
||||
+0.1*(jy-m6)+0.02777777777777778*(m10-m9)+0.08333333333333333*(m11-m12);
|
||||
f4 = 0.05263157894736842*rho-0.004594820384294068*m1-0.01587301587301587*m2
|
||||
+0.1*(m6-jy)+0.02777777777777778*(m10-m9)+0.08333333333333333*(m11-m12);
|
||||
f5 = 0.05263157894736842*rho-0.004594820384294068*m1-0.01587301587301587*m2
|
||||
+0.1*(jz-m8)+0.02777777777777778*(m10-m9)+0.08333333333333333*(m12-m11);
|
||||
f6 = 0.05263157894736842*rho-0.004594820384294068*m1-0.01587301587301587*m2
|
||||
+0.1*(m8-jz)+0.02777777777777778*(m10-m9)+0.08333333333333333*(m12-m11);
|
||||
f7 = 0.05263157894736842*rho+0.003341687552213868*m1+0.003968253968253968*m2+0.1*(jx+jy)+0.025*(m4+m6)
|
||||
+0.02777777777777778*m9+0.01388888888888889*m10+0.08333333333333333*m11
|
||||
+0.04166666666666666*m12+0.25*m13+0.125*(m16-m17);
|
||||
f8 = 0.05263157894736842*rho+0.003341687552213868*m1+0.003968253968253968*m2-0.1*(jx+jy)-0.025*(m4+m6)
|
||||
+0.02777777777777778*m9+0.01388888888888889*m10+0.08333333333333333*m11
|
||||
+0.04166666666666666*m12+0.25*m13+0.125*(m17-m16);
|
||||
f9 = 0.05263157894736842*rho+0.003341687552213868*m1+0.003968253968253968*m2+0.1*(jx-jy)+0.025*(m4-m6)
|
||||
+0.02777777777777778*m9+0.01388888888888889*m10+0.08333333333333333*m11
|
||||
+0.04166666666666666*m12-0.25*m13+0.125*(m16+m17);
|
||||
f10 = 0.05263157894736842*rho+0.003341687552213868*m1+0.003968253968253968*m2+0.1*(jy-jx)+0.025*(m6-m4)
|
||||
+0.02777777777777778*m9+0.01388888888888889*m10+0.08333333333333333*m11
|
||||
+0.04166666666666666*m12-0.25*m13-0.125*(m16+m17);
|
||||
f11 = 0.05263157894736842*rho+0.003341687552213868*m1
|
||||
+0.003968253968253968*m2+0.1*(jx+jz)+0.025*(m4+m8)
|
||||
+0.02777777777777778*m9+0.01388888888888889*m10-0.08333333333333333*m11
|
||||
-0.04166666666666666*m12+0.25*m15+0.125*(m18-m16);
|
||||
f12 = 0.05263157894736842*rho+0.003341687552213868*m1
|
||||
+0.003968253968253968*m2-0.1*(jx+jz)-0.025*(m4+m8)
|
||||
+0.02777777777777778*m9+0.01388888888888889*m10-0.08333333333333333*m11
|
||||
-0.04166666666666666*m12+0.25*m15+0.125*(m16-m18);
|
||||
f13 = 0.05263157894736842*rho+0.003341687552213868*m1
|
||||
+0.003968253968253968*m2+0.1*(jx-jz)+0.025*(m4-m8)
|
||||
+0.02777777777777778*m9+0.01388888888888889*m10-0.08333333333333333*m11
|
||||
-0.04166666666666666*m12-0.25*m15-0.125*(m16+m18);
|
||||
f14 = 0.05263157894736842*rho+0.003341687552213868*m1
|
||||
+0.003968253968253968*m2+0.1*(jz-jx)+0.025*(m8-m4)
|
||||
+0.02777777777777778*m9+0.01388888888888889*m10-0.08333333333333333*m11
|
||||
-0.04166666666666666*m12-0.25*m15+0.125*(m16+m18);
|
||||
f15 = 0.05263157894736842*rho+0.003341687552213868*m1
|
||||
+0.003968253968253968*m2+0.1*(jy+jz)+0.025*(m6+m8)
|
||||
-0.0555555555555555555555555*m9-0.02777777777777778*m10+0.25*m14+0.125*(m17-m18);
|
||||
f16 = 0.05263157894736842*rho+0.003341687552213868*m1
|
||||
+0.003968253968253968*m2-0.1*(jy+jz)-0.025*(m6+m8)
|
||||
-0.0555555555555555555555555*m9-0.02777777777777778*m10+0.25*m14+0.125*(m18-m17);
|
||||
f17 = 0.05263157894736842*rho+0.003341687552213868*m1
|
||||
+0.003968253968253968*m2+0.1*(jy-jz)+0.025*(m6-m8)
|
||||
-0.0555555555555555555555555*m9-0.02777777777777778*m10-0.25*m14+0.125*(m17+m18);
|
||||
f18 = 0.05263157894736842*rho+0.003341687552213868*m1
|
||||
+0.003968253968253968*m2+0.1*(jz-jy)+0.025*(m8-m6)
|
||||
-0.0555555555555555555555555*m9-0.02777777777777778*m10-0.25*m14-0.125*(m17+m18);
|
||||
//.......................................................................................................
|
||||
// incorporate external force
|
||||
f1 += 0.16666666*Fx;
|
||||
f2 -= 0.16666666*Fx;
|
||||
f3 += 0.16666666*Fy;
|
||||
f4 -= 0.16666666*Fy;
|
||||
f5 += 0.16666666*Fz;
|
||||
f6 -= 0.16666666*Fz;
|
||||
f7 += 0.08333333333*(Fx+Fy);
|
||||
f8 -= 0.08333333333*(Fx+Fy);
|
||||
f9 += 0.08333333333*(Fx-Fy);
|
||||
f10 -= 0.08333333333*(Fx-Fy);
|
||||
f11 += 0.08333333333*(Fx+Fz);
|
||||
f12 -= 0.08333333333*(Fx+Fz);
|
||||
f13 += 0.08333333333*(Fx-Fz);
|
||||
f14 -= 0.08333333333*(Fx-Fz);
|
||||
f15 += 0.08333333333*(Fy+Fz);
|
||||
f16 -= 0.08333333333*(Fy+Fz);
|
||||
f17 += 0.08333333333*(Fy-Fz);
|
||||
f18 -= 0.08333333333*(Fy-Fz);
|
||||
//*********** WRITE UPDATED VALUES TO MEMORY ******************
|
||||
// Write the updated distributions
|
||||
//....EVEN.....................................
|
||||
disteven[n] = f0;
|
||||
disteven[N+n] = f2;
|
||||
disteven[2*N+n] = f4;
|
||||
disteven[3*N+n] = f6;
|
||||
disteven[4*N+n] = f8;
|
||||
disteven[5*N+n] = f10;
|
||||
disteven[6*N+n] = f12;
|
||||
disteven[7*N+n] = f14;
|
||||
disteven[8*N+n] = f16;
|
||||
disteven[9*N+n] = f18;
|
||||
//....ODD......................................
|
||||
distodd[n] = f1;
|
||||
distodd[N+n] = f3;
|
||||
distodd[2*N+n] = f5;
|
||||
distodd[3*N+n] = f7;
|
||||
distodd[4*N+n] = f9;
|
||||
distodd[5*N+n] = f11;
|
||||
distodd[6*N+n] = f13;
|
||||
distodd[7*N+n] = f15;
|
||||
distodd[8*N+n] = f17;
|
||||
//...Store the Velocity..........................
|
||||
Velocity[3*n] = jx;
|
||||
Velocity[3*n+1] = jy;
|
||||
Velocity[3*n+2] = jz;
|
||||
//***************************************************************
|
||||
} // check if n is in the solid
|
||||
} // check if n is in the domain
|
||||
} // loop over s
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
__global__ void DensityStreamD3Q7(char *ID, double *Den, double *Copy, double *Phi, double *ColorGrad, double *Velocity,
|
||||
double beta, int Nx, int Ny, int Nz, bool pBC, int S)
|
||||
|
@ -642,9 +1101,9 @@ __global__ void DensityStreamD3Q7(char *ID, double *Den, double *Copy, double *P
|
|||
int j = (n-Nx*Ny*k)/Nx;
|
||||
int i = n-Nx*Ny*k-Nx*j;
|
||||
//.....Load the Color gradient.........
|
||||
nx = ColorGrad[3*n];
|
||||
ny = ColorGrad[3*n+1];
|
||||
nz = ColorGrad[3*n+2];
|
||||
nx = ColorGrad[n];
|
||||
ny = ColorGrad[N+n];
|
||||
nz = ColorGrad[2*N+n];
|
||||
C = sqrt(nx*nx+ny*ny+nz*nz);
|
||||
nx = nx/C;
|
||||
ny = ny/C;
|
||||
|
@ -790,6 +1249,8 @@ __global__ void ComputePhi(char *ID, double *Phi, double *Copy, double *Den, int
|
|||
}
|
||||
//...................................................................
|
||||
}
|
||||
|
||||
|
||||
//*************************************************************************
|
||||
extern "C" void dvc_InitDenColor( int nblocks, int nthreads, int S,
|
||||
char *ID, double *Den, double *Phi, double das, double dbs, int Nx, int Ny, int Nz)
|
||||
|
@ -811,6 +1272,19 @@ extern "C" void dvc_ColorCollide(int nBlocks, int nthreads, int S,
|
|||
ColorCollide<<<nBlocks, nthreads>>>(ID, f_even, f_odd, ColorGrad, Velocity, Nx, Ny, Nz, S,
|
||||
rlxA, rlxB, alpha, beta, Fx, Fy, Fz, pBC);
|
||||
}
|
||||
//*************************************************************************
|
||||
extern "C" void dvc_ColorCollideOpt(int nBlocks, int nthreads, int S,
|
||||
char *ID, double *f_even, double *f_odd, double *Phi, double *ColorGrad,
|
||||
double *Velocity, int Nx, int Ny, int Nz,double rlxA, double rlxB,
|
||||
double alpha, double beta, double Fx, double Fy, double Fz)
|
||||
{
|
||||
ColorCollideOpt<<<nBlocks, nthreads>>>(ID, f_even, f_odd, Phi, ColorGrad, Velocity, Nx, Ny, Nz, S,
|
||||
rlxA, rlxB, alpha, beta, Fx, Fy, Fz);
|
||||
// bool pBC = false;
|
||||
// ColorCollide<<<nBlocks, nthreads>>>(ID, f_even, f_odd, ColorGrad, Velocity, Nx, Ny, Nz, S,
|
||||
// rlxA, rlxB, alpha, beta, Fx, Fy, Fz, pBC);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
extern "C" void dvc_DensityStreamD3Q7(int nBlocks, int nthreads, int S,
|
||||
char *ID, double *Den, double *Copy, double *Phi, double *ColorGrad, double *Velocity,
|
||||
|
@ -825,3 +1299,11 @@ extern "C" void dvc_ComputePhi(int nBlocks, int nthreads, int S,
|
|||
ComputePhi<<<nBlocks, nthreads>>>(ID,Phi,Copy,Den,N,S);
|
||||
}
|
||||
//*************************************************************************
|
||||
extern "C" void dvc_ComputePressure(int nBlocks, int nthreads, int S,
|
||||
char *ID, double *disteven, double *distodd,
|
||||
double *Pressure, int Nx, int Ny, int Nz)
|
||||
{
|
||||
|
||||
ComputePressureD3Q19<<<nBlocks, nthreads>>>(ID,disteven,distodd,Pressure,Nx,Ny,Nz,S);
|
||||
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -343,3 +343,59 @@ inline void WriteLocalSolidDistance(char *FILENAME, double *Distance, int N)
|
|||
}
|
||||
File.close();
|
||||
}
|
||||
|
||||
|
||||
inline void WriteCheckpoint(char *FILENAME, double *cDen, double *cDistEven, double *cDistOdd, int N)
|
||||
{
|
||||
int q,n;
|
||||
double value;
|
||||
ofstream File(FILENAME,ios::binary);
|
||||
for (n=0; n<N; n++){
|
||||
// Write the two density values
|
||||
value = cDen[2*n];
|
||||
File.write((char*) &value, sizeof(value));
|
||||
value = cDen[2*n+1];
|
||||
File.write((char*) &value, sizeof(value));
|
||||
// Write the even distributions
|
||||
for (q=0; q<10; q++){
|
||||
value = cDistEven[q*N+n];
|
||||
File.write((char*) &value, sizeof(value));
|
||||
}
|
||||
// Write the odd distributions
|
||||
for (q=0; q<9; q++){
|
||||
value = cDistOdd[q*N+n];
|
||||
File.write((char*) &value, sizeof(value));
|
||||
}
|
||||
}
|
||||
File.close();
|
||||
|
||||
}
|
||||
|
||||
inline void ReadCheckpoint(char *FILENAME, double *cDen, double *cDistEven, double *cDistOdd, int N)
|
||||
{
|
||||
int q,n;
|
||||
double value;
|
||||
ifstream File(FILENAME,ios::binary);
|
||||
for (n=0; n<N; n++){
|
||||
// Write the two density values
|
||||
File.read((char*) &value, sizeof(value));
|
||||
cDen[2*n] = value;
|
||||
// if (n== 66276) printf("Density a = %f \n",value);
|
||||
File.read((char*) &value, sizeof(value));
|
||||
cDen[2*n+1] = value;
|
||||
// if (n== 66276) printf("Density b = %f \n",value);
|
||||
// Read the even distributions
|
||||
for (q=0; q<10; q++){
|
||||
File.read((char*) &value, sizeof(value));
|
||||
cDistEven[q*N+n] = value;
|
||||
// if (n== 66276) printf("dist even %i = %f \n",q,value);
|
||||
}
|
||||
// Read the odd distributions
|
||||
for (q=0; q<9; q++){
|
||||
File.read((char*) &value, sizeof(value));
|
||||
cDistOdd[q*N+n] = value;
|
||||
// if (n== 66276) printf("dist even %i = %f \n",q,value);
|
||||
}
|
||||
}
|
||||
File.close();
|
||||
}
|
2904
pmmc/BlobPMMC-v1.cpp
Normal file
2904
pmmc/BlobPMMC-v1.cpp
Normal file
File diff suppressed because it is too large
Load Diff
|
@ -2552,7 +2552,7 @@ inline void ComputeAreasPMMC(IntArray &cubeList, int start, int finish,
|
|||
n_nw_tris_beg = n_nw_tris;
|
||||
n_ns_tris_beg = n_ns_tris;
|
||||
n_ws_tris_beg = n_ws_tris;
|
||||
n_nws_seg_beg = n_nws_seg;
|
||||
// n_nws_seg_beg = n_nws_seg;
|
||||
// Loop over all cubes
|
||||
blob_volume = 0; // Initialize the volume for blob a to zero
|
||||
for (c=start;c<finish;c++){
|
||||
|
|
Loading…
Reference in New Issue
Block a user