Skip to content

Commit

Permalink
changed the axial interval determination to a regular ceil() function…
Browse files Browse the repository at this point in the history
… to fix some issues that come up when doing static analysis of the code
  • Loading branch information
jtramm committed May 29, 2018
1 parent dd09252 commit e85e6c4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
| |
|_|

Version 3
Version 4

==============================================================================
Contact Information
Expand Down
2 changes: 1 addition & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# User Options
#===============================================================================

COMPILER = intel
COMPILER = gnu
MPI = no
OPENMP = yes
OPTIMIZE = yes
Expand Down
2 changes: 1 addition & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

int main( int argc, char * argv[] )
{
int version = 3;
int version = 4;
int mype = 0;

#ifdef MPI
Expand Down
4 changes: 1 addition & 3 deletions src/solver.c
Original file line number Diff line number Diff line change
Expand Up @@ -902,9 +902,7 @@ int get_pos_interval( float z, float dz)
* negative direction */
int get_neg_interval( float z, float dz)
{
// NOTE: a bit of trickery using floors to obtain ceils
int interval = INT_MAX - (int) ( (double) INT_MAX
- (double) ( z / dz ) );
int interval = ceil(z/dz);
return interval;
}

Expand Down

0 comments on commit e85e6c4

Please sign in to comment.