Git Product home page Git Product logo

ecosmog-cvg's Issues

1D Gaussian

Amp = 0.000005d0
sigma = 0.09
alpha = 0.01
rho(icell_amr) = 1.0d0 + 2.0d0*beta_cvg/(3.0d0*omega_m*aexp) &
                       * 2.0d0*Amp*alpha/sigma**2 &
                       * (1.0d0 - 2.0d0*(xs-0.5d0)**2/sigma**2) &
                       * dexp(-(xs-0.5d0)**2/sigma**2)

rho

Multigrid Off:

  • jobid_1681479: initial guess of sf = 0.0d0, narrowing the convergence criteria to residual<1e-12, switched off multigrid-solver resulted in ecosmogs centered at zero, thus shifted down by an amount equal to Amp. The average value of sf_src_mean converges to 1e-8.
    jobid_1681479
    repeating this test with initial guess of sf = Amp*(1.0d0 - alpha*dexp(-(xs-0.5d0)**2/sigma**2)) gives, jobid_1681810:
    jobid_1681810
    The average value of sf_src_mean converges to 1e-10.
    (the same settings gave the correct result for the sine test too)

  • jobid_1685023: repeating test 'jobid_1681479', but with abs(residual-residual_old)<1.0d-13 in multigrid_fine_commons_extradof.f90 at line [241,247], gives
    jobid_1685023

Multigrid On:

  • jobid_1681489: initial guess of sf = 0.0d0, narrowing the convergence criteria to residual<1e-12, switched on multigrid-solver resulted in ecosmogs centered at zero, thus shifted down by an amount equal to Amp. Furthermore there is unwanted evolution in the result
    jobid_1681489
    repeating this test with initial guess of sf = Amp*(1.0d0 - alpha*dexp(-(xs-0.5d0)**2/sigma**2)) gives, jobid_1681796:
    jobid_1681796

Code Changes:

  • coarse and fine level solve the same equations.
  • correct order in restriction and communication in fine-commons-extradof, and correct some double-precisions.

Multigrid On:

  • jobid_1687566: correct analytical initial guess of sf, sf_src_mean calculated by code, uses non-linear eq. in multigrid_fine_fine_extradof.f90, narrow convergence criteria of residual<1e-12. After the code changes we get the following improvement:
    jobid_1687566

  • jobid_1687585: same as test 'jobid_1687566' but with a zero initial guess of sf gives:
    jobid_1687585

1D Sine Wave

Amp = 0.00000005d0
pii = 4.0d0*datan(1.0d0)
rho(icell_amr) = 1.0d0-8.0d0*beta_cvg*pii**2/(3.0d0*aexp*omega_m)
                     * Amp*dsin(2.0d0*pii*xs)

rho_sine
Findings:

  • the sf_src_mean for chi is not close enough to zero (reaches 1e-8, but 1e-21 should be possible), whereas cbf's are (reaches 1e-31).
  • it depends more on the initial guess than on the residual criteria

Tests:

  • jobid_1680694: narrowing the convergence criteria from residual<1e-8 to residual<1e-10 in multigrid_fine_commons_extradof.f90 line 239 did not change the mismatch between the numerical and analytical result, but there is a slightly wider spread in the results of ecosmog
    jobid_1680694

  • jobid_1680760: we switched the multigrid-solver off by setting in multigrid_fine_commons.f90 line 161: levelmin_mg = levelmin. This resulted in numerical values of chi now being some factors smaller than analytic answer.

  • jobid_1680763: fixed sf_src_mean to zero in multigrid_fine_commons_extradof.f90 at line 665. This resulted into a translations of different magnitude depending of aexp of chi-values. Thus the calculation of sf_src_mean and sf_src_mean2 seem to work correctly.

  • jobid_1680768: changed the initial guess of sf by adding in amr_step.f90 at line 340: sf(icell_amr) = Amp*dsin(2.0d0*pii*xs). This improved the mean value of sf from 1e-7 to 1e-12 for the first iteration before in rises back to 1e-7 after V-cycle.

  • jobid_1680770: changed the initial guess of sf by adding in amr_step.f90 at line 340: sf(icell_amr) = Amp*dsin(2.0d0*pii*xs) and set levelmin_mg = levelmin in multigrid_fine_commons.f90 line 161. This gives a perfect match between numerical and analytic results.

  • jobid_1681120: using 0. as initial guess for sf and narrowing the convergence criteria to residual<1e-12 and levelmin_mg = levelmin, gives no improvent, but similar behaviour result to jobid_1680694.

  • jobid_1681236: 0.0 initial guess for sf, setting op = op - 1.5d0*omega_m/beta_cvg*aexp*(rho(icell_amr(i))-rho_tot)*dx2 at appr. line [125,129,509,514] and sf_src(icell_amr(i)) = 1.5d0*omega_m/beta_cvg*aexp*(rho(icell_amr(i))-rho_tot) at appr. line [510,717] in multigrid_fine_fine_extradof.f90 gives average value of 1e-21. We switched multigrid-solver off. Thus, even if we did not enforce the correct solution on op, should we expect an average in the same ballpark as 1e-21. Ecosmog and analytical result match.

  • jobid_1685033: same set-up as previous test, jobid_1681236, but with multigrid-solver switched on. Ecosmog and analytical result match.


Code Changes:

  • coarse and fine level solve the same equations.

  • jobid_1685040: 0.0 initial guess for sf, calculated sf_src_mean, code solves non-linear eq. in multigrid_fine_fine_extradof.f90, multigrid-solver switched on. The changes in the code do not change the result.
    jobid_1685040

  • jobid_1685406: 0.0 initial guess for sf, fixing sf_src_mean to zero, use non-linear eq. in multigrid_fine_fine_extradof.f90, and switching off multigrid-solver, gives same result as in test 'jobid_1680760'. Interestingly even though we fixed sf_src_mean to zero, the result does not move along the y-axis as in test 'jobid_1680763'.


Code Changes:

  • correct order in restriction and communication in fine-commons-extradof, and correct some double-precisions.

  • jobid_1687555: repeating test 'jobid_1685402' but with correct analytical initial guess for sf.
    jobid_1687555

  • jobid_1687577: repetition of test 'jobid_1685402', but this time fixing sf_src_mean to zero. This time we get the correct result, e.g. match between ecosmog and analytica answer.

  • jobid_1687589: for clarification: zero initial guess for sf, sf_src_mean calculated by ecosmog, multigrid-solver on, use of non-linear eq. in multigrid_fine_fine_extradof.f90, gives the correct result:
    jobid_1687589

3D Top-Hat

rr = dsqrt((xs-0.5d0)**2 + (ys-0.5d0)**2 + (zs-0.5d0)**2)
if(rr<=R0) then
   rho(icell_amr) = 1 + delta_in
else
   rho(icell_amr) = 1 + delta_out
end if

Top-Hat Nr. 1

delta_in = 190.9d0
delta_out = -0.1d0
R0 = 0.05d0

jobid_1697114: sf_src_mean set to zero, multigrid-solver switched on, convergence criteria set to 1e-12 and 1e-9, number of cells 128.
jobid_1697114

jobid_1702612: sf_src_mean calculated, multigrid-solver switched on, convergence criteria set to 1e-12 and 1e-9, number of cells 256. For analytical result the scipy.interate.trapz method is used.
jobid_1702612

The above rest compared to a different integration method to obtain the analytical result (scipy.interate.odeint).
jobid_1702612_2

jobid_1705277: placed centre of top-hat in centre of cells.

jobid_1705279: output sf field along x-y diagonal.


Top-Hat Nr. 2

delta_in = 23.77d0
delta_out = -0.1d0
R0 = 0.1d0

jobid_1699598: sf_src_mean set to zero, multigrid-solver switched on, convergence criteria set to 1e-12 and 1e-9, number of cells 256.
jobid_1699598

Cosmological Simulation

Complex chi field

The point in time when the chi field turns complex:

  • jobid_1703821: param_b3=0.000001, negative eta at a= 0.843792366627832, 256^3 particles

  • jobid_1707468: param_b3=0.000001, negative eta at a= 0.841407822646427, 512^3 particles

    • jobid_1708120: param_b3=0.0001, negative eta at a= 0.841407860117935, 512^3 particles (restart from snapshot 21 of jobid_1707468)

    • jobid_1708628: param_b3=0.00000001, negative eta at a= 0.841407820905272, 512^3 particles (restart from snapshot 21 of jobid_1707468)

  • jobid_1708628: param_b3=0.00000001, negative eta at a= 0.841407763520329 , 512^3 particles

  • jobid_1714440: param_b3=0.0001, negative eta at a= 0.841409089391650 , 512^3 particles

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.