star-line

Structure for accelerating line importance sampling
git clone git://git.meso-star.fr/star-line.git
Log | Files | Refs | README | LICENSE

commit b9a507dda31b40e9c2d7df291cd891217211d63a
parent 81cd4fc0668cc86d6f4a2d89fa3d3787981a7e4d
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Mon, 30 May 2022 07:37:55 +0200

Add a comment in the "merge polylines" function

Diffstat:
Msrc/sln.h | 2+-
Msrc/sln_line.c | 2+-
Msrc/sln_tree_build.c | 3+++
3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/sln.h b/src/sln.h @@ -265,7 +265,7 @@ SLN_API int sln_node_is_leaf (const struct sln_node* node); -/* Return NULL if the nade is a leaf */ +/* Return NULL if the node is a leaf */ SLN_API const struct sln_node* sln_node_get_child (const struct sln_node* node, diff --git a/src/sln_line.c b/src/sln_line.c @@ -449,7 +449,7 @@ save_line_mesh /* Copy the vertices of the line for its lower half */ FOR_EACH_REVERSE(ivertex, nwavenumbers-1, 0) { struct sln_vertex* vtx = darray_vertex_data_get(&tree->vertices)+i; - const double nu = 2*line->wavenumber - wnums[ivertex]; /* Mirror */ + const double nu = MIRROR(wnums[ivertex]); const double ha = vals[ivertex]; /* The wavenumber is less than the lower bound of the spectral range. diff --git a/src/sln_tree_build.c b/src/sln_tree_build.c @@ -97,6 +97,9 @@ eval_ka ka = sln_mesh_eval(&mesh, wavenumber); break; case SLN_MESH_USUAL: + /* We choose not to make any approximation when calculating the usual + * mesh. One thus evaluates ka on the lines of the node and not on the + * mesh of the node. */ ka = sln_node_eval(tree, node, wavenumber); break; default: FATAL("Unreachable code.\n"); break;