Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/teuben/nemo
Browse files Browse the repository at this point in the history
  • Loading branch information
teuben committed Dec 23, 2024
2 parents 0a02a20 + 7078082 commit ddf8659
Show file tree
Hide file tree
Showing 36 changed files with 58 additions and 92 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.4.4
4.5.0
10 changes: 9 additions & 1 deletion docs/whatsnew.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,17 @@ <H1> What's New in NEMO </H1>
<hr>
-->

<A NAME=4_5_0>
<H2> 4.5.0: in git </H2>
<UL>
<LI> (Dec 22, 2024)
</UL>

<A NAME=4_4_3>
<H2> 4.4.3/4.4.4: in git </H2>
<H2> 4.4.3/4.4.4/4.4.5 (a.k.a. Malta Release) </H2>
<UL>
<LI> (Dec 22, 2024) define TIMEFUZZ in stdinc.h, not per program
<LI> (Dec 12, 2024) drafting two codes: diskspectrum and lineid
<LI> (Dec 7, 2024) added falcon2 docs.
<LI> (Oct 20, 2024) more code-rot fixed for gcc-14
<LI> (Jun 21, 2024) enhanced <A HREF=man_html/tabsmooth.1.html>tabsmooth</A> with more filters
Expand Down
7 changes: 7 additions & 0 deletions inc/stdinc.h
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,13 @@ typedef real (*float_proc)(float);
#define DR2AS 206264.8062470963551564733
#define DAS2R 4.848136811095359935899141e-6

/*
* TIMEFUZZ
* fuzzy time for snapshots; ideally really should not be hardcoded
*
*/
#define TIMEFUZZ 0.000001

/*
* POS_ANGLE, SYM_ANGLE: bring angular variables into standard form.
* To map an angular variable 'phi' into the range [0, 2pi),
Expand Down
4 changes: 2 additions & 2 deletions inc/version.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* do not edit - created by the src/scripts/version script */
#if defined(GETPARAM_VERSION_ID)
static char *version_h = "git_11690"; // git rev-list --count HEAD
static char *version_h = "git_12231"; // git rev-list --count HEAD
#endif
#define NEMO_VERSION "4.4.3"
#define NEMO_VERSION "4.5.0"
2 changes: 1 addition & 1 deletion man/man1/perorb.1
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ In the 1st example we establish that energy is roughly conserved (and the value
the center. The 4th example tries to reproduce the periodic orbit with that specified energy.

.SH "SEE ALSO"
orbstat(1NEMO), potlist(1NEMO), orbint(1NEMO), newton0(1NEMO), potential(5NEMO)
orbstat(1NEMO), potlist(1NEMO), orbint(1NEMO), newton0(1NEMO), henyey(1NEMO), potential(5NEMO)
.nf
Particle Swarm Optimization (PSO): Skokos et al. - 2005MNRAS.359..251S
.fi
Expand Down
3 changes: 1 addition & 2 deletions src/nbody/image/snapgrid.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ string defv[] = { /* keywords/default values/help */
"stack=f\n Stack all selected snapshots?",
"integrate=f\n Sum or Integrate along 'dvar'?",
"proj=\n Sky projection (SIN, TAN, ARC, NCP, GLS, CAR, MER, AIT)",
"VERSION=6.1b\n 20-oct-2024 PJT",
"VERSION=6.2\n 22-dec-2024 PJT",
NULL,
};

Expand All @@ -87,7 +87,6 @@ string usage="grid a snapshot into a 2/3D image-cube";
#ifndef HUGE
#define HUGE 1.0e20 /* don't use INF, ccdfits writes bad headers */
#endif
#define TIMEFUZZ 0.000001
#define CUTOFF 4.0 /* cutoff of gaussian in terms of sigma */
#define MAXVAR 16 /* max evar's */

Expand Down
3 changes: 1 addition & 2 deletions src/nbody/image/snapgridsmooth.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,14 @@ string defv[] = {
"stack=f\n Stack all selected snapshots?",
"periodic=f\n Periodic boundary conditions for smoothing?",
"normalize=t\n Normalize smoothing to conserve mass (evar)",
"VERSION=0.5\n 19-mar-2022 PJT",
"VERSION=0.6\n 22-dec-2024 PJT",
NULL,
};

string usage="grid a snapshot into a 3D image-cube with adaptive smoothing";


#define HUGE 1.0e20 /* don't use INF, ccdfits writes bad headers */
#define TIMEFUZZ 0.000001
#define CUTOFF 4.0 /* cutoff of gaussian in terms of sigma */
#define MAXVAR 16 /* max evar's */

Expand Down
4 changes: 1 addition & 3 deletions src/nbody/image/snapifu.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,14 @@ string defv[] = { /* keywords/default values/help */
"moment=0\n moment in zvar (-2,-1,0,1,2...)",
"mean=f\n mean (moment=0) or sum per cell",
"stack=f\n Stack all selected snapshots?",
"VERSION=1.0\n 8-apr-09 PJT",
"VERSION=1.1\n 22-dec-2024 PJT",
NULL,
};

string usage="take spectra from a snapshot at a set of specified grid points";

string cvsid="$Id$";

#define HUGE 1.0e20 /* don't use INF, ccdfits writes bad headers */
#define TIMEFUZZ 0.000001
#define CUTOFF 4.0 /* cutoff of gaussian in terms of sigma */
#define MAXVAR 16 /* max evar's */
#define MAXPOINTS 1024 /* max # gridpoints */
Expand Down
4 changes: 1 addition & 3 deletions src/nbody/image/snapmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,13 @@ string defv[] = { /* keywords/default values/help */
"stack=f\n Stack all selected snapshots?",
"proj=\n Sky projection (SIN,TAN,ARC,NCP,GLS,MER,AIT)",
"emax=10\n Maximum exp smoothing parameter",
"VERSION=2.1\n 23-sep-2021 PJT",
"VERSION=2.2\n 22-dec-2024 PJT",
NULL,
};

string usage="grid a snapshot into a 2D map";

string cvsid="$Id$";

#define TIMEFUZZ 0.000001
#define MAXVAR 16 /* max evar's */

#define SMODE_GAUSS 1
Expand Down
3 changes: 1 addition & 2 deletions src/nbody/io/testfio.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@
string defv[] = {
"in=???\n input file name",
"out=???\n output file name",
"VERSION=1.0", 15-sep-90 PJT",
"VERSION=1.1\n 22-dec-2024 PJT",
NULL,
};

#define TIMEFUZZ 0.0001 /* tolerance in time comparisons */

main(argc, argv)
int argc;
Expand Down
3 changes: 1 addition & 2 deletions src/nbody/io/testio.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,10 @@ string defv[] = {
"out=\n output file name (optional)",
"io=get_snapshot\n mode of I/O {get_snapshot, get_snap}",
"work=bodywork\n which work routine?",
"VERSION=1.1\n 16-sep-90 PJT",
"VERSION=1.2\n 22-dec-2024 PJT",
NULL,
};

#define TIMEFUZZ 0.0001 /* tolerance in time comparisons */

main(argc, argv)
int argc;
Expand Down
1 change: 0 additions & 1 deletion src/nbody/io_nemo/src/io_get_put.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
#include "parameters.h"


#define TIMEFUZZ 0.0000001
extern int maxbodies[];
extern int CURRENT_IO;
/* -----------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion src/nbody/io_nemo/src/io_get_put_f.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
#include "parameters.h"


#define TIMEFUZZ 0.0000001
extern int maxbodies[];
extern int CURRENT_IO;
/* ----------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions src/nbody/io_nemo/test_src/snapmask2.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
|* V2.0 : imported in teuben's nemo CVS tree
|* V2.1 : PosTag VelTag and KeyTag added
|* V2.1a : note that within() uses real, not double
|* V2.2 : TIMEFUZZ now from stdinc.h
\* -------------------------------------------------------------- */

Expand All @@ -40,13 +41,12 @@ string defv[] = { /* DEFAULT INPUT PARAMETERS */
"select=all\n selected particles",
"times=all\n selected times",
"step=1\n copy only step by step snapshots",
"VERSION=2.1\n 09-Jul-02 JCL",
"VERSION=2.2\n 22-dec-2024 PJT",
NULL,
};

string usage = "mask out particles while copying snapshot data";

#define TIMEFUZZ 0.00001
/* -------------------------------------------------------------- *\
|* save_parameter :
|* Save ParametersTag
Expand Down
4 changes: 1 addition & 3 deletions src/nbody/reduc/snapdiagplot.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ string defv[] = { /* DEFAULT INPUT PARAMETERS */
"eps=0.05\n using this softening",
"formal=false\n publication-style plot",
"tab=\n If given, tabulate Time,Etot",
"VERSION=1.5b\n 12-feb-2024 PJT",
"VERSION=1.6\n 22-dec-2024 PJT",
NULL,
};

Expand All @@ -38,8 +38,6 @@ local string times;
local bool exactpot;
local real eps;
local bool formal;

#define TIMEFUZZ 0.00001

/*
* Arrays used to store diagnostic info.
Expand Down
3 changes: 1 addition & 2 deletions src/nbody/reduc/snapfour.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,12 @@ string defv[] = {
"weight=1\n Weight applied to observable",
"amode=t\n Display sin/cos amps or amp/phase if possible?",
"times=all\n Snapshots to select",
"VERSION=1.2d\n 3-apr-2020 PJT",
"VERSION=1.3\n 22-dec-2024 PJT",
NULL,
};

string usage = "Fourier coefficients of an N-body distribution";

#define TIMEFUZZ 0.0001 /* tolerance in time comparisons */

#define MAXRAD 513
#define MAXORDER 8
Expand Down
5 changes: 2 additions & 3 deletions src/nbody/reduc/snapstab.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,14 @@
string defv[] = {
"in=???\n Input file name (snapshot)",
"times=all\n Times to select snapshots from",
"VERSION=1.2\n 16-feb-97 PJT",
"VERSION=1.3\n 22-dec-2024 PJT",
NULL,
};

string usage = "report disk stability/virial";

#define TIMEFUZZ 0.00001 /* tolerance in time comparisons */

nemo_main()
void nemo_main()
{
stream instr;
real inv_rscale, e_pot, e_kin, tsnap;
Expand Down
4 changes: 1 addition & 3 deletions src/nbody/trans/snapcopy.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,13 @@ string defv[] = {
"precision=double\n Precision of results to store (double/single) [unused]",
"keep=all\n Items to copy in snapshot",
"i=-1\n Select one body to select (overrides select=)",
"VERSION=2.0a\n 8-aug-2022 PJT",
"VERSION=2.1\n 22-dec-2024 PJT",
NULL,
};

string usage="copy an N-body snapshot";


#define TIMEFUZZ 0.0001 /* tolerance in time comparisons */

void nemo_main(void)
{
stream instr, outstr;
Expand Down
11 changes: 5 additions & 6 deletions src/nbody/trans/snapdisk.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,19 @@ string defv[] = {
"sign=1\n Sign of rotcur",
"outflow=f\n Outflow or Rotation/Spin",
"times=all\n times of snapshots to copy",
"VERSION=1.0\n 3-aug-06 PJT",
"VERSION=1.1\n 22-dec-2024 PJT",
NULL,
};

string usage="assign rotation to a disk";

string cvsid="$Id$";

#define TIMEFUZZ 0.0001 /* tolerance in time comparisons */

void get_rotcur(string);
real rotcur(real);

nemo_main()
#define MAXLINES 1000000

void nemo_main()
{
stream instr, outstr;
real tsnap, omega, omega2, sign, r,v,f,v2, cost,sint;
Expand Down Expand Up @@ -126,7 +125,7 @@ void get_rotcur(string name)
int i,colnr[2], nmax;
real *coldat[2];

nmax = nemo_file_lines(name);
nmax = nemo_file_lines(name, MAXLINES);
if (nmax<1) error("No data to read from %s",name);
rad = (real *) allocate(nmax*sizeof(real));
vel = (real *) allocate(nmax*sizeof(real));
Expand Down
3 changes: 1 addition & 2 deletions src/nbody/trans/snapgalview.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,12 @@ string defv[] = {
"vel=\n Velocity vector of LSR",
"center=\n Star # to represent LSR (0=first)",
"times=all\n Times to select snapshots from",
"VERSION=1.0\n 16-feb-03 PJT",
"VERSION=1.1\n 22-dec-2024 PJT",
NULL,
};

string usage="coordinate transformations for galactic viewing";

#define TIMEFUZZ 0.000001 /* tolerance in time comparisons */

void nemo_main()
{
Expand Down
4 changes: 1 addition & 3 deletions src/nbody/trans/snapinert.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,12 @@ string defv[] = {
"weight=m\n factor to use in computing center/inertia ",
"per_weight=t\n flag to give inertia per weight basis ",
"tab=f\n flag to produce one-line output",
"VERSION=2.1a\n 9-may-2023 PJT",
"VERSION=2.2\n 22-dec-2024 PJT",
NULL,
};

string usage="get inertia tensor & its eigenvectors, eigenvalues";

#define TIMEFUZZ 0.001 /* slop tolerated in time comparisons */

void snapinert(Body *, int, real, rproc_body, float i[3][3]);

// nr.h
Expand Down
7 changes: 2 additions & 5 deletions src/nbody/trans/snapkey.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,13 @@ string defv[] = {
"keys=\n Manually supply all keys",
"keyfile=\n ascii table with keys",
"key=\n bodytrans expression",
"VERSION=0.3\n 17-feb-2020 PJT",
"VERSION=0.4\n 22-dec-2024 PJT",
NULL,
};

string usage="(re)assign keys to a snapshot";

string cvsid="$Id$";

#define TIMEFUZZ 0.0001 /* tolerance in time comparisons */
#define MAXNBODY 100000
#define MAXNBODY 1000000

extern btiproc btitrans(string);

Expand Down
3 changes: 1 addition & 2 deletions src/nbody/trans/snapmask.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ string defv[] = {
"times=all\n times select string ",
"keyfile=\n file with Key field to select from ",
"keyoffset=0\n offsets to be applied extra to outkey ",
"VERSION=1.9a\n 9-feb-2024 PJT",
"VERSION=1.10\n 22-dec-2024 PJT",
NULL,
};

Expand All @@ -55,7 +55,6 @@ local bool *Qsel=NULL; /* pointer to select */
local bool *Qself=NULL; /* pointer to select from file */
local int *sel=NULL;

#define TIMEFUZZ 0.0001 /* tolerance in time comparisons */


void nemo_main()
Expand Down
3 changes: 1 addition & 2 deletions src/nbody/trans/snapmass.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,12 @@ string defv[] = {
"ccd=\n Input CCD with mapvalues that represent mass",
"norm=\n Normalization value for the total mass (if used)",
"aux=f\n Store in Aux instead?",
"VERSION=2.4\n 5-nov-2023 PJT",
"VERSION=2.5\n 22-dec-2024 PJT",
NULL,
};

string usage="(re)assign masses to a snapshot";

#define TIMEFUZZ 0.0001 /* tolerance in time comparisons */

extern real_proc getrfunc(string , string , string , int *);

Expand Down
5 changes: 2 additions & 3 deletions src/nbody/trans/snapmerge_a.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,12 @@
string defv[] = {
"in1=???\n Input NEMO snapshot",
"in2=???\n Input NEMO snapshot to append after in1",
"VERSION=1.22\n 6-Jun-08 pjt",
"VERSION=1.23\n 22-dec-2024 PJT",
NULL,
};

string usage="Merge the second input snapshot at the end of the first one";

#define TIMEFUZZ 0.00001

real
* timeptr = NULL,
Expand Down Expand Up @@ -270,7 +269,7 @@ int goto_end_1st_snap(stream instr,
/* -------------------------------------------------------------- *\
|* Main program
\* -------------------------------------------------------------- */
nemo_main()
void nemo_main()
{
stream in1,out,
in2;
Expand Down
Loading

0 comments on commit ddf8659

Please sign in to comment.