Skip to content

Commit 25b2e39

Browse files
committed
Fixed Laplace damping option for TE-problem
1 parent d66e18c commit 25b2e39

File tree

8 files changed

+14
-18
lines changed

8 files changed

+14
-18
lines changed

par/visu/create_STF.ipynb

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,7 @@
4444
{
4545
"cell_type": "code",
4646
"execution_count": null,
47-
"metadata": {
48-
"collapsed": true
49-
},
47+
"metadata": {},
5048
"outputs": [],
5149
"source": [
5250
"# TD parameters\n",
@@ -126,9 +124,7 @@
126124
{
127125
"cell_type": "code",
128126
"execution_count": null,
129-
"metadata": {
130-
"collapsed": true
131-
},
127+
"metadata": {},
132128
"outputs": [],
133129
"source": [
134130
"plt.rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']})\n",

src/TE/RHS_source_TE.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ void RHS_source_TE(struct waveAC *waveAC, float ** srcpos, int ishot){
1919
complex float omega;
2020

2121
amp = vector(1,2);
22-
omega = 2.0 * M_PI * ((*waveAC).freq - S * I);
22+
omega = 2.0 * M_PI * ((*waveAC).freq + S * I);
2323
mu0 = 4.0 * M_PI * 1e-7;
2424

2525
/* calculate discrete source position */

src/TE/RHS_source_TE_hess.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ void RHS_source_TE_hess(struct waveAC *waveAC, int ** recpos, int trace){
1717
float ampr, ampi, mu0;
1818
complex float omega;
1919

20-
omega = 2.0 * M_PI * ((*waveAC).freq - S * I);
20+
omega = 2.0 * M_PI * ((*waveAC).freq + S * I);
2121

2222
/* initialize source vector */
2323
for (i=0;i<NXNY;i++){

src/TE/ass_grad_TE.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ void ass_grad_TE(struct fwiTE *fwiTE, struct waveAC *waveAC, struct matTE *matTE
1919
complex float wien, Omega, Omega2;
2020

2121
wien = (*waveAC).stfr + (*waveAC).stfi * I;
22-
Omega = 2.0 * M_PI * (*waveAC).freq - (I * S);
23-
Omega2 = cpowf(((2.0*M_PI*(*waveAC).freq) - (I * S)),2.0);
22+
Omega = 2.0 * M_PI * ((*waveAC).freq + (I * S));
23+
Omega2 = cpowf(2.0*M_PI*((*waveAC).freq + (I * S)),2.0);
2424

2525
/* printf("abs(wien) = %e + i %e \n",creal(cabsf(wien)),cimag(cabsf(wien))); */
2626

src/TE/hessian_TE.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ void hessian_TE(struct fwiTE *fwiTE, struct waveAC *waveAC, struct PML_AC *PML_A
5454
(*waveAC).freq = (*waveAC).stage_freq[nfreq];
5555

5656
/* set squared complex angular frequency*/
57-
Omega = 2.0 * M_PI * (*waveAC).freq - (I * S);
58-
Omega2 = cpowf(((2.0*M_PI*(*waveAC).freq) - (I * S)),2.0);
57+
Omega = 2.0 * M_PI * ((*waveAC).freq + (I * S));
58+
Omega2 = cpowf(2.0*M_PI*((*waveAC).freq + (I * S)),2.0);
5959

6060
/* define PML damping profiles */
6161
pml_pro(PML_AC,waveAC);

src/TE/hessian_shin_TE.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ void hessian_shin_TE(struct fwiTE *fwiTE, struct waveAC *waveAC, struct PML_AC *
5454
(*waveAC).freq = (*waveAC).stage_freq[nfreq];
5555

5656
/* set squared complex angular frequency*/
57-
Omega = 2.0 * M_PI * (*waveAC).freq - (I * S);
58-
Omega2 = cpowf(((2.0*M_PI*(*waveAC).freq) - (I * S)),2.0);
57+
Omega = 2.0 * M_PI * ((*waveAC).freq + (I * S));
58+
Omega2 = cpowf((2.0*M_PI*((*waveAC).freq + (I * S))),2.0);
5959

6060
/* define PML damping profiles */
6161
pml_pro(PML_AC,waveAC);

src/TE/init_A_TE_9p_pml.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ void init_A_TE_9p_pml(struct PML_AC *PML_AC, struct matTE *matTE, struct waveAC
5151
count=0; /* count non-zero elements */
5252

5353
/* set squared complex angular frequency*/
54-
Omega = 2.0 * M_PI * ((*waveAC).freq - S * I);
55-
Omega2 = cpowf(2.0 * M_PI * ((*waveAC).freq - S * I),2.0);
54+
Omega = 2.0 * M_PI * ((*waveAC).freq + S * I);
55+
Omega2 = cpowf(2.0 * M_PI * ((*waveAC).freq + S * I),2.0);
5656

5757
/* define magnetic permeability mu0 */
5858
mu0 = 4.0 * M_PI * 1e-7;

src/cp_grad_frame.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,8 @@ void cp_grad_frame(float ** A){
207207
}
208208
}
209209

210-
sprintf(modfile,"grad_damp_PML.bin");
211-
writemod(modfile,absorb_coeff,3);
210+
/*sprintf(modfile,"grad_damp_PML.bin");
211+
writemod(modfile,absorb_coeff,3); */
212212

213213
free_vector(coeff,1,NPML);
214214
free_matrix(absorb_coeff,1,NY,1,NX);

0 commit comments

Comments
 (0)