Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
e9b5c24
New member struct spec
imckstewart Sep 11, 2015
05591d0
Rearranged raytrace code
imckstewart Sep 11, 2015
1ca8978
Added new raytrace algorithm.
imckstewart Sep 11, 2015
607709c
Removed function raytrace_1_4()
imckstewart Sep 11, 2015
86be9af
Rearranged and renamed writefits()
imckstewart Sep 11, 2015
b7ba6f3
New function to write 2D FITS
imckstewart Sep 11, 2015
5e361cb
Added new structs.
imckstewart Apr 8, 2016
0f1725a
Moved nmol from grid to populations
imckstewart Apr 8, 2016
0a45fd7
qhull to delaunay
imckstewart Apr 8, 2016
cfc7ebb
New arguments for delaunay()
imckstewart Apr 8, 2016
06529af
Rearranged if block in delaunay()
imckstewart Apr 8, 2016
a9c072b
Renamed simplex in delaunay()
imckstewart Apr 8, 2016
9cceb29
Added the rest of delaunay arguments
imckstewart Apr 8, 2016
f0a5ba5
Added cell return code to delaunay()
imckstewart Apr 8, 2016
8b8a364
Changed g to gp in delaunay()
imckstewart Apr 8, 2016
bf9cb4d
Edited comments in delaunay()
imckstewart Apr 8, 2016
ffdf517
velocityspline to calcLineAmp(etc).
imckstewart Apr 8, 2016
9e3006c
New module raythrucells.c
imckstewart Apr 8, 2016
40c6ab1
Added freePop2 and freeGAux
imckstewart Apr 8, 2016
77bd98a
Changed stokesangles
imckstewart Apr 8, 2016
52b66b2
Changes to sourceFunc_pol()
imckstewart Apr 8, 2016
7cccb38
Changed sourcefunc_*() interfaces.
imckstewart Apr 8, 2016
b34bf51
New functions sourceFunc_*_raytrace().
imckstewart Apr 8, 2016
7b5bf5d
Rearranged if-block in traceray().
imckstewart Apr 8, 2016
2bcfc57
Changed g to gp and m to md in traceray().
imckstewart Apr 8, 2016
c1a51a2
Cosmetic changes to traceray().
imckstewart Apr 8, 2016
42ee18e
More rearrangements in traceray().
imckstewart Apr 8, 2016
ba408d4
Added calcLineAmpInterp() and traceray_smooth().
imckstewart Apr 8, 2016
6ffd22c
Sink point values set
imckstewart Apr 8, 2016
eeb8cae
Added interpolation machinery to raytrace().
imckstewart Apr 8, 2016
f8b24ef
Minor cosmetic changes.
imckstewart Apr 11, 2016
441ebd8
Smarter call to velocity in raytrace
imckstewart Apr 20, 2016
106bd83
Smarter call to sourceFunc_cont
imckstewart Apr 20, 2016
de04348
Merge branch 'master' of https://github.com/lime-rt/lime into faster_RT
imckstewart May 3, 2016
8b89586
Merge branch 'master' of https://github.com/lime-rt/lime into raytrac…
imckstewart May 3, 2016
c78ea06
Merge branch 'master' of https://github.com/lime-rt/lime into new_ray…
imckstewart May 3, 2016
9b0ede1
Raytrace loop dynamically scheduled
imckstewart Jun 24, 2016
d294971
Merge branch 'master' of https://github.com/lime-rt/lime into faster_RT
imckstewart Jun 24, 2016
812bb65
Merge branch 'master' of https://github.com/lime-rt/lime into raytrac…
imckstewart Jun 24, 2016
58e27f2
Merge branch 'master' of https://github.com/lime-rt/lime into new_ray…
imckstewart Jun 24, 2016
0a0df71
Removed comment
imckstewart Jun 28, 2016
954fd63
Merge branch 'master' of https://github.com/lime-rt/lime into raytrac…
imckstewart Jun 28, 2016
fce30ba
Merge branch 'master' of https://github.com/lime-rt/lime into new_ray…
imckstewart Jun 28, 2016
f078b50
Merge branch 'master' of https://github.com/lime-rt/lime into faster_RT
imckstewart Jun 28, 2016
e0e029e
Fixed some errors
imckstewart Jun 29, 2016
6905fd0
Merge branch 'new_raytrace' into raytrace_all
imckstewart Jun 29, 2016
670ff7c
Added some comments and made some small mods.
imckstewart Jun 29, 2016
5089d1c
Merge branch 'faster_RT' into raytrace_all
imckstewart Jun 29, 2016
75c7282
Removed some unused variables.
imckstewart Jun 29, 2016
0195f81
Added 1.4 raytrace algorithm
imckstewart Jun 29, 2016
f45872f
Updated documentation
imckstewart Jun 30, 2016
b3f2298
Merge branch 'master' of https://github.com/lime-rt/lime into raytrac…
imckstewart Jul 21, 2016
a7c30b8
Moved call to gasIIdust() outside of line loop.
imckstewart Jul 21, 2016
67f8da5
Removed unnecessary NULL tests in frees.c
imckstewart Jul 21, 2016
6e81279
Fixed iatrogenic bug in traceray().
imckstewart Jul 22, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,23 +50,23 @@ endif

TARGET = lime.x
CC = gcc -fopenmp
SRCS = src/aux.c src/messages.c src/grid.c src/LTEsolution.c \
src/main.c src/molinit.c src/photon.c src/popsin.c \
src/popsout.c src/predefgrid.c src/ratranInput.c \
src/raytrace.c src/smooth.c src/sourcefunc.c \
src/stateq.c src/statistics.c src/magfieldfit.c \
src/stokesangles.c src/writefits.c src/weights.c \
src/velospline.c src/getclosest.c src/frees.c \
src/tcpsocket.c src/defaults.c src/fastexp.c
SRCS = src/aux.c src/messages.c src/grid.c src/LTEsolution.c \
src/main.c src/molinit.c src/photon.c src/popsin.c \
src/popsout.c src/predefgrid.c src/ratranInput.c \
src/raytrace.c src/smooth.c src/sourcefunc.c src/frees.c \
src/stateq.c src/statistics.c src/magfieldfit.c \
src/stokesangles.c src/writefits.c src/weights.c \
src/velospline.c src/getclosest.c src/raythrucells.c \
src/tcpsocket.c src/defaults.c src/fastexp.c
MODELS = model.c
OBJS = src/aux.o src/messages.o src/grid.o src/LTEsolution.o \
src/main.o src/molinit.o src/photon.o src/popsin.o \
src/popsout.o src/predefgrid.o src/raytrace.o \
src/ratranInput.o src/smooth.o src/sourcefunc.o \
src/stateq.o src/statistics.o src/magfieldfit.o \
src/stokesangles.o src/writefits.o src/weights.o \
src/velospline.o src/getclosest.o src/frees.o \
src/tcpsocket.o src/defaults.o src/fastexp.o
OBJS = src/aux.o src/messages.o src/grid.o src/LTEsolution.o \
src/main.o src/molinit.o src/photon.o src/popsin.o \
src/popsout.o src/predefgrid.o src/ratranInput.o \
src/raytrace.o src/smooth.o src/sourcefunc.o src/frees.o \
src/stateq.o src/statistics.o src/magfieldfit.o \
src/stokesangles.o src/writefits.o src/weights.o \
src/velospline.o src/getclosest.o src/raythrucells.o \
src/tcpsocket.o src/defaults.o src/fastexp.o
MODELO = src/model.o

#CCFLAGS = -O3 -falign-loops=16 -fno-strict-aliasing -DTEST
Expand Down
14 changes: 7 additions & 7 deletions doc/usermanual.rst
Original file line number Diff line number Diff line change
Expand Up @@ -435,13 +435,7 @@ file. The default is blend=0 (no line blending).

(integer) par->antialias (optional)

If set, LIME will anti-alias the output image. anti-alias can take the
value of any positive integer, with the value 1 (default) being no
anti-aliasing. Greater values correspond to stronger anti-aliasing. LIME
uses stochastic super-sampling anti-aliasing. This is very effective in
minimizing artifacts in the image, but it also slows down the ray-tracer
by a factor equal to the value of antialias. This parameter is the only
one that will not be ignored in case par->restart is set.
This parameter is no longer used, although it is retained for the present for purposes of backward compatibility.

.. code:: c

Expand Down Expand Up @@ -481,6 +475,12 @@ The final one of the density-linked parameters controls how the dust opacity is

If none of the three density-linked parameters is provided, LIME will attempt to guess the information, in a manner as close as possible to the way it was done in version 1.5 and earlier. This is safe enough when a single density value is returned, and only H2 provided as collision partner in the moldata file(s), but more complicated situations can very easily result in the code guessing wrongly. For this reason we encourage users to make use of these three parameters, although in order to preserve backward compatibility with old model.c files, we have not (yet) made them mandatory.

(integer) par->traceRayAlgorithm (optional)

This parameter specifies the algorithm used by LIME to solve the radiative-transfer equations during ray-tracing. The default value of zero invokes the algorithm used in LIME-1.5 and previous; a value of 1 invokes a new algorithm which is much more time-consuming but which produces much smoother images, free from step-artifacts.

Note that there have been additional modifications to the raytracing algorithm which have significant effects on the output images since LIME-1.5. Image-plane interpolation is now employed in areas of the image where the grid point spacing is larger than the image pixel spacing. This leads both to a smoother image and a shorter processing time.

.. _par-nthreads:

.. code:: c
Expand Down
2 changes: 1 addition & 1 deletion src/LTEsolution.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ LTE(configInfo *par, struct grid *g, molData *m){

for(id=0;id<par->pIntensity;id++){
for(ispec=0;ispec<par->nSpecies;ispec++){
g[id].nmol[ispec]=g[id].abun[ispec]*g[id].dens[0];
g[id].mol[ispec].nmol = g[id].abun[ispec]*g[id].dens[0];
lteOnePoint(par, m, ispec, g[id].t[0], g[id].mol[ispec].pops);
}
}
Expand Down
5 changes: 3 additions & 2 deletions src/aux.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ parseInput(inputPars inpar, configInfo *par, image **img, molData **m){
par->antialias = inpar.antialias;
par->polarization = inpar.polarization;
par->nThreads = inpar.nThreads;
par->traceRayAlgorithm = inpar.traceRayAlgorithm;

/* Now set the additional values in par. */
par->ncell = inpar.pIntensity + inpar.sinkPoints;
Expand Down Expand Up @@ -108,9 +109,9 @@ parseInput(inputPars inpar, configInfo *par, image **img, molData **m){
while((*img)[par->nImages].filename!=NULL && par->nImages<MAX_NIMAGES)
par->nImages++;

/* Check that the user has supplied this function (needed unless par->pregrid):
/* Check that the user has supplied this function (needed unless par->doPregrid):
*/
if(!par->doPregrid)
if(!par->doPregrid || par->traceRayAlgorithm==1)
velocity(0.0,0.0,0.0, dummyVel);

/*
Expand Down
37 changes: 29 additions & 8 deletions src/frees.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,18 @@
#include "lime.h"

void
freeGrid(configInfo *par, const molData *m ,struct grid *g){
freeGAux(const unsigned long numPoints, const int numSpecies, struct gAuxType *gAux) {
unsigned long ppi;

if(gAux !=NULL){
for(ppi=0;ppi<numPoints;ppi++)
freePop2(numSpecies, gAux[ppi].mol);
free(gAux);
}
}

void
freeGrid(configInfo *par, molData *m , struct grid *g){
int i;
if(g != NULL){
for(i=0;i<(par->pIntensity+par->sinkPoints); i++){
Expand All @@ -23,7 +34,6 @@ freeGrid(configInfo *par, const molData *m ,struct grid *g){
free(g[i].neigh);
free(g[i].w);
free(g[i].dens);
free(g[i].nmol);
free(g[i].abun);
free(g[i].ds);
freePopulation( par, m, g[i].mol );
Expand Down Expand Up @@ -80,11 +90,8 @@ void freeMolsWithBlends(struct molWithBlends *mols, const int numMolsWithBlends)
if(mols != NULL){
for(mi=0;mi<numMolsWithBlends;mi++){
if(mols[mi].lines != NULL){
for(li=0;li<mols[mi].numLinesWithBlends;li++){
if(mols[mi].lines[li].blends != NULL){
free(mols[mi].lines[li].blends);
}
}
for(li=0;li<mols[mi].numLinesWithBlends;li++)
free(mols[mi].lines[li].blends);
free(mols[mi].lines);
}
}
Expand Down Expand Up @@ -114,7 +121,21 @@ freeParImg(const int nImages, inputPars *par, image *img){
}

void
freePopulation(configInfo *par, const molData *m, struct populations *pop ){
freePop2(const int numSpecies, struct pop2 *mol){
int i;

if(mol !=NULL){
for(i=0;i<numSpecies;i++){
free(mol[i].specNumDens);
free(mol[i].knu);
free(mol[i].dust);
}
free(mol);
}
}

void
freePopulation(configInfo *par, molData *m, struct populations *pop ){
if(pop != NULL){
int j,k;
for(j=0; j<par->nSpecies; j++){
Expand Down
Loading