Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • SWIFTsim SWIFTsim
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 57
    • Issues 57
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 21
    • Merge requests 21
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • SWIFT
  • SWIFTsimSWIFTsim
  • Issues
  • #312
Closed
Open
Issue created May 24, 2017 by James Willis@jwillisDeveloper

EAGLE_25 Bug with runner_dopair1_density_vec

The output of EAGLE_25 when the code is vectorised does not agree with the un-vectorised code after 815 steps. The timesteps change, but the code continues to completion anyway.

I noticed that when I find the first pi and last pj particle I was using their own smoothing lengths to calculate the limits:

  int active_id = ci->count - 1; 
  for (int k = ci->count - 1; k >= 0; k--) {
    p = &parts_i[sort_i[k].i];
    h = p->h;
    d = sort_i[k].d + h * kernel_gamma + dx_max - rshift;

    max_di[k] = d; 

    /* If the particle is out of range set the index to
     * the last active particle within range. */
    if (d < dj_min) {
      //first_pi = active_id;
      first_pi = k; 
      break;
    } else {
      if (part_is_active(p, e)) active_id = k; 
    }    
  }

instead of hi_max and hj_max:

  int active_id = ci->count - 1; 
  for (int k = ci->count - 1; k >= 0; k--) {
    p = &parts_i[sort_i[k].i];
    d = sort_i[k].d + hi_max + dx_max;

    max_di[k] = d; 

    /* If the particle is out of range set the index to
     * the last active particle within range. */
    if (d < dj_min) {
      //first_pi = active_id;
      first_pi = k; 
      break;
    } else {
      if (part_is_active(p, e)) active_id = k; 
    }    
  }
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking