Skip to content

Forcing high Q around source node #6

@deanrockit

Description

@deanrockit

When using the new source input, the result is the same no matter FORCE_HIGH_Q is 0 or 1, whereas it will be executed and also take effect with old source input when FORCE_HIGH_Q is enabled.
With new source input and FORCE_HIGH_Q enabled, this part of the code was indeed executed since I saw "force high q around source nodes" in the output file, but it didn't take effect.

I guess the reason is that AWP doesn't know where the source is at this point when we use the new source input, so that no any value is assigned to the "tpsrc" array. Therefore the lines below aren't changing anything in the modeling domain (even though there's a bug, but doesn't matter). 
                for (xi=idx-2; xi<idx+3;xi++){
            for (yi=idy-2; yi<idy+3;yi++){
               for (zi=idz-2; zi<idz+3;zi++){
                  dox=doy=doz=0;
                  if ((xi>=0) && (xi < (nxt[0] + ngsl2 +1))) dox = 1;
                  if ((yi>=0) && (yi < (nyt[0] + ngsl2 +1))) doy = 1;
                  //FIXME: Bug here? shouldn't it be zi < (nzt[0] + ...)
                  if ((zi>=0) && (yi < (nzt[0] + ngsl2 +1))) doz = 1;
                  if ((dox && doy) && doz ) {
                     qp[p][xi][yi][zi]=7.88313861E-04;  //Q of 10,000 before inimesh
                     qs[p][xi][yi][zi]=7.88313861E-04;
                     //qp[p][xi][yi][zi]=0.;  //Q of 10,000 before inimesh
                     //qs[p][xi][yi][zi]=0.;
                  }
               }
             }

So, yea, source/receiver implementation is okay, but there are still some differences between the two versions when topography is disabled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions