Commit 298e5436 authored by laura.gassner's avatar laura.gassner

Merge branch 'master' of git.scc.kit.edu:GPIAG-Software/DENISE

Conflicts:
	par/in_and_out/toy_example/toy_example_ac_INV.json
parents 1df104fb 98b7051f
......@@ -12,6 +12,11 @@ manual_DENISE.pdf
*.bin*
*.su*
LOG_FILE.*
*.vp*
*.vs*
*.rho*
*.div*
*.rot*
### C ###
# Object files
......@@ -325,25 +330,3 @@ local.properties
# TeXlipse plugin
.texlipse
### CMake ###
CMakeCache.txt
CMakeFiles
CMakeScripts
Makefile
cmake_install.cmake
install_manifest.txt
### premake-gmake ###
Makefile
*.make
obj/
*.vp*
*.vs*
*.rho*
*.div*
*.rot*
......@@ -44,7 +44,7 @@ void model_acoustic(float **rho, float **pi){
float *fldepth, *flrho, *flvp, *fltaper;
nd = FDORDER/2 + 1;
nd = FDORDER/2;
/*read FL nodes from File*/
nodes=5;
......
......@@ -58,7 +58,7 @@
"Receiver" : "comment",
"SEISMO" : "5",
"READREC" : "1",
"REC_FILE" : "./receiver/rec_toy_example_ac_PML.dat",
"REC_FILE" : "./receiver/rec_toy_example_ac.dat",
"REFRECX, REFRECY" : "0.0 , 0.0",
"Seismograms" : "comment",
......
......@@ -58,7 +58,7 @@
"Receiver" : "comment",
"SEISMO" : "5",
"READREC" : "1",
"REC_FILE" : "./receiver/rec_toy_example_ac_PML.dat",
"REC_FILE" : "./receiver/rec_toy_example_ac.dat",
"REFRECX, REFRECY" : "0.0 , 0.0",
"Seismograms" : "comment",
......@@ -124,9 +124,9 @@
"SRTRADIUS" : "3.0",
"FILTSIZE" : "1",
"SWS_TAPER_FILE" : "1",
"TAPER_FILE_NAME" : "taper/taper_te_ac.bin",
"TAPER_FILE_NAME_U" : "taper/taper_te_ac_u.bin",
"TAPER_FILE_NAME_RHO" : "taper/taper_te_ac_rho.bin",
"TAPER_FILE_NAME" : "taper_te_ac.bin",
"TAPER_FILE_NAME_U" : "taper_te_ac_u.bin",
"TAPER_FILE_NAME_RHO" : "taper_te_ac_rho.bin",
"Upper and lower limits for model parameters" : "comment",
"VPUPPERLIM" : "5000",
......
200.00 500.0
250.00 500.0
300.00 500.0
350.00 500.0
400.00 500.0
450.00 500.0
500.00 500.0
......@@ -17,7 +13,3 @@
1000.00 500.0
1050.00 500.0
1100.00 500.0
1150.00 500.0
1200.00 500.0
1250.00 500.0
1300.00 500.0
......@@ -39,7 +39,7 @@ MPI_Request *req_send, MPI_Request *req_rec){
/* comunication initialisation for persistent communication */
fdo2 = 2*(FDORDER/2 + 1);
fdo2 = 2*(FDORDER/2);
/* buffer arrays are copied into local buffers using buffered send (bsend),
......
......@@ -76,7 +76,7 @@ int main(int argc, char **argv){
int * DTINV_help;
float ** bufferlef_to_rig, ** bufferrig_to_lef, ** buffertop_to_bot, ** bufferbot_to_top;
float ** bufferlef_to_rig, ** bufferrig_to_lef, ** buffertop_to_bot, ** bufferbot_to_top, ** p_bufferlef_to_rig, ** p_bufferrig_to_lef, ** p_buffertop_to_bot, ** p_bufferbot_to_top;
/* PML variables */
float * d_x, * K_x, * alpha_prime_x, * a_x, * b_x, * d_x_half, * K_x_half, * alpha_prime_x_half, * a_x_half, * b_x_half,
......@@ -249,7 +249,7 @@ int main(int argc, char **argv){
fac1=(NX+FDORDER)*(NY+FDORDER);
fac2=sizeof(float)*pow(2.0,-20.0);
nd = FDORDER/2 + 1;
nd = FDORDER/2;
fdo3 = 2*nd;
if (L){
......@@ -519,6 +519,15 @@ int main(int argc, char **argv){
bufferrig_to_lef = matrix(1,NY,1,fdo3);
buffertop_to_bot = matrix(1,NX,1,fdo3);
bufferbot_to_top = matrix(1,NX,1,fdo3);
/* In exchange_p for acousic simulation only one variable (sp) will be exchanged,
therfore not fdo3=2*nd but 1*nd is enough buffer*/
if (ACOUSTIC) {
p_bufferlef_to_rig = matrix(1,NY,1,nd);
p_bufferrig_to_lef = matrix(1,NY,1,nd);
p_buffertop_to_bot = matrix(1,NX,1,nd);
p_bufferbot_to_top = matrix(1,NX,1,nd);
}
switch (SEISMO){
case 1 : /* particle velocities only */
......@@ -1061,7 +1070,7 @@ int main(int argc, char **argv){
if(!ACOUSTIC)
exchange_s(psxx,psyy,psxy,bufferlef_to_rig, bufferrig_to_lef,buffertop_to_bot, bufferbot_to_top,req_send, req_rec);
else
exchange_p(psp,bufferlef_to_rig, bufferrig_to_lef,buffertop_to_bot, bufferbot_to_top,req_send, req_rec);
exchange_p(psp,p_bufferlef_to_rig, p_bufferrig_to_lef,p_buffertop_to_bot,p_bufferbot_to_top,req_send, req_rec);
if (MYID==0){
......@@ -1511,7 +1520,7 @@ int main(int argc, char **argv){
if(!ACOUSTIC)
exchange_s(psxx,psyy,psxy, bufferlef_to_rig, bufferrig_to_lef, buffertop_to_bot, bufferbot_to_top, req_send, req_rec);
else
exchange_p(psp,bufferlef_to_rig, bufferrig_to_lef,buffertop_to_bot, bufferbot_to_top,req_send, req_rec);
exchange_p(psp,p_bufferlef_to_rig, p_bufferrig_to_lef,p_buffertop_to_bot, p_bufferbot_to_top,req_send, req_rec);
if (MYID==0){
......@@ -1945,7 +1954,7 @@ int main(int argc, char **argv){
if(!ACOUSTIC)
exchange_s(psxx,psyy,psxy, bufferlef_to_rig, bufferrig_to_lef, buffertop_to_bot, bufferbot_to_top, req_send, req_rec);
else
exchange_p(psp,bufferlef_to_rig, bufferrig_to_lef,buffertop_to_bot, bufferbot_to_top,req_send, req_rec);
exchange_p(psp,p_bufferlef_to_rig, p_bufferrig_to_lef,p_buffertop_to_bot, p_bufferbot_to_top,req_send, req_rec);
if (MYID==0){
......@@ -2650,7 +2659,7 @@ int main(int argc, char **argv){
if(!ACOUSTIC)
exchange_s(psxx,psyy,psxy, bufferlef_to_rig, bufferrig_to_lef, buffertop_to_bot, bufferbot_to_top, req_send, req_rec);
else
exchange_p(psp,bufferlef_to_rig, bufferrig_to_lef,buffertop_to_bot, bufferbot_to_top,req_send, req_rec);
exchange_p(psp,p_bufferlef_to_rig, p_bufferrig_to_lef,p_buffertop_to_bot, p_bufferbot_to_top,req_send, req_rec);
if (MYID==0){
time7=MPI_Wtime();
......@@ -3231,6 +3240,13 @@ int main(int argc, char **argv){
free_matrix(bufferrig_to_lef,1,NY,1,fdo3);
free_matrix(buffertop_to_bot,1,NX,1,fdo3);
free_matrix(bufferbot_to_top,1,NX,1,fdo3);
if (ACOUSTIC) {
free_matrix(p_bufferlef_to_rig,1,NY,1,nd);
free_matrix(p_bufferrig_to_lef,1,NY,1,nd);
free_matrix(p_buffertop_to_bot,1,NX,1,nd);
free_matrix(p_bufferbot_to_top,1,NX,1,nd);
}
switch (SEISMO){
case 1 : /* particle velocities only */
......
......@@ -38,8 +38,8 @@ void exchange_p(float ** sp, float ** bufferlef_to_rig, float ** bufferrig_to_le
int i, j, fdo, fdo3, n, l;
fdo = FDORDER/2 + 1;
fdo3 = 2*fdo;
fdo = FDORDER/2;
fdo3 = 1*fdo;
/* top - bottom */
......@@ -94,7 +94,7 @@ void exchange_p(float ** sp, float ** bufferlef_to_rig, float ** bufferrig_to_le
for (j=1;j<=NY;j++){
/* storage of left edge of local volume into buffer */
n = 1;
for (l=1;l<fdo;l++) {
for (l=1;l<=fdo;l++) {
bufferlef_to_rig[j][n++] = sp[j][l];
}
}
......@@ -104,7 +104,7 @@ void exchange_p(float ** sp, float ** bufferlef_to_rig, float ** bufferrig_to_le
for (j=1;j<=NY;j++){
/* storage of right edge of local volume into buffer */
n = 1;
for (l=1;l<fdo-1;l++) {
for (l=1;l<=fdo-1;l++) {
bufferrig_to_lef[j][n++] = sp[j][NX-l+1];
}
}
......@@ -119,7 +119,7 @@ void exchange_p(float ** sp, float ** bufferlef_to_rig, float ** bufferrig_to_le
if ((BOUNDARY) || (POS[1]!=NPROCX-1)) /* no boundary exchange at right edge of global grid */
for (j=1;j<=NY;j++){
n = 1;
for (l=1;l<fdo;l++) {
for (l=1;l<=fdo;l++) {
sp[j][NX+l] = bufferlef_to_rig[j][n++];
}
}
......@@ -127,7 +127,7 @@ void exchange_p(float ** sp, float ** bufferlef_to_rig, float ** bufferrig_to_le
if ((BOUNDARY) || (POS[1]!=0)) /* no boundary exchange at left edge of global grid */
for (j=1;j<=NY;j++){
n = 1;
for (l=1;l<fdo-1;l++) {
for (l=1;l<=fdo-1;l++) {
sp[j][1-l] = bufferrig_to_lef[j][n++];
}
}
......
......@@ -39,7 +39,7 @@ void exchange_s(float ** sxx, float ** syy,
int i, j, fdo, fdo3, n, l;
fdo = FDORDER/2 + 1;
fdo = FDORDER/2;
fdo3 = 2*fdo;
......@@ -125,10 +125,10 @@ void exchange_s(float ** sxx, float ** syy,
for (j=1;j<=NY;j++){
/* storage of left edge of local volume into buffer */
n = 1;
for (l=1;l<fdo-1;l++) {
for (l=1;l<=fdo-1;l++) {
bufferlef_to_rig[j][n++] = sxy[j][l];
}
for (l=1;l<fdo;l++) {
for (l=1;l<=fdo;l++) {
bufferlef_to_rig[j][n++] = sxx[j][l];
}
}
......@@ -138,10 +138,10 @@ void exchange_s(float ** sxx, float ** syy,
for (j=1;j<=NY;j++){
/* storage of right edge of local volume into buffer */
n = 1;
for (l=1;l<fdo;l++) {
for (l=1;l<=fdo;l++) {
bufferrig_to_lef[j][n++] = sxy[j][NX-l+1];
}
for (l=1;l<fdo-1;l++) {
for (l=1;l<=fdo-1;l++) {
bufferrig_to_lef[j][n++] = sxx[j][NX-l+1];
}
}
......@@ -178,10 +178,10 @@ void exchange_s(float ** sxx, float ** syy,
if ((BOUNDARY) || (POS[1]!=NPROCX-1)) /* no boundary exchange at right edge of global grid */
for (j=1;j<=NY;j++){
n = 1;
for (l=1;l<fdo-1;l++) {
for (l=1;l<=fdo-1;l++) {
sxy[j][NX+l] = bufferlef_to_rig[j][n++];
}
for (l=1;l<fdo;l++) {
for (l=1;l<=fdo;l++) {
sxx[j][NX+l] = bufferlef_to_rig[j][n++];
}
}
......@@ -189,10 +189,10 @@ void exchange_s(float ** sxx, float ** syy,
if ((BOUNDARY) || (POS[1]!=0)) /* no boundary exchange at left edge of global grid */
for (j=1;j<=NY;j++){
n = 1;
for (l=1;l<fdo;l++) {
for (l=1;l<=fdo;l++) {
sxy[j][1-l] = bufferrig_to_lef[j][n++];
}
for (l=1;l<fdo-1;l++) {
for (l=1;l<=fdo-1;l++) {
sxx[j][1-l] = bufferrig_to_lef[j][n++];
}
}
......
......@@ -38,7 +38,7 @@ void exchange_v(float ** vx, float ** vy,
MPI_Status status;
int i, j, fdo, fdo3, n, l;
fdo = FDORDER/2 + 1;
fdo = FDORDER/2;
fdo3 = 2*fdo;
/* top - bottom */
......@@ -127,10 +127,10 @@ void exchange_v(float ** vx, float ** vy,
for (j=1;j<=NY;j++){
/* storage of left edge of local volume into buffer */
n = 1;
for (l=1;l<fdo;l++) {
for (l=1;l<=fdo;l++) {
bufferlef_to_rig[j][n++] = vy[j][l];
}
for (l=1;l<fdo-1;l++) {
for (l=1;l<=fdo-1;l++) {
bufferlef_to_rig[j][n++] = vx[j][l];
}
}
......@@ -141,10 +141,10 @@ void exchange_v(float ** vx, float ** vy,
for (j=1;j<=NY;j++){
/* storage of right edge of local volume into buffer */
n = 1;
for (l=1;l<fdo-1;l++) {
for (l=1;l<=fdo-1;l++) {
bufferrig_to_lef[j][n++] = vy[j][NX-l+1];
}
for (l=1;l<fdo;l++) {
for (l=1;l<=fdo;l++) {
bufferrig_to_lef[j][n++] = vx[j][NX-l+1];
}
}
......@@ -179,10 +179,10 @@ void exchange_v(float ** vx, float ** vy,
if ((BOUNDARY) || (POS[1]!=NPROCX-1)) /* no boundary exchange at right edge of global grid */
for (j=1;j<=NY;j++){
n = 1;
for (l=1;l<fdo;l++) {
for (l=1;l<=fdo;l++) {
vy[j][NX+l] = bufferlef_to_rig[j][n++];
}
for (l=1;l<fdo-1;l++) {
for (l=1;l<=fdo-1;l++) {
vx[j][NX+l] = bufferlef_to_rig[j][n++];
}
}
......@@ -191,10 +191,10 @@ void exchange_v(float ** vx, float ** vy,
if ((BOUNDARY) || (POS[1]!=0)) /* no boundary exchange at left edge of global grid */
for (j=1;j<=NY;j++){
n = 1;
for (l=1;l<fdo-1;l++) {
for (l=1;l<=fdo-1;l++) {
vy[j][1-l] = bufferrig_to_lef[j][n++];
}
for (l=1;l<fdo;l++) {
for (l=1;l<=fdo;l++) {
vx[j][1-l] = bufferrig_to_lef[j][n++];
}
}
......
......@@ -154,7 +154,7 @@ void snap(FILE *fp,int nt, int nsnap, float **vx, float **vy, float **sxx,
fpx2=fopen(snapfile_div,wm);
fpy2=fopen(snapfile_rot,wm);
nd = FDORDER/2+1;
nd = FDORDER/2;
curlfield = matrix(-nd+1,NY+nd,-nd+1,NX+nd);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment