Giter Site home page Giter Site logo

Comments (5)

katyhuff avatar katyhuff commented on August 24, 2024

@gridley Perhaps it should be the length of the temperature vector initialized above?

from moltres.

gridley avatar gridley commented on August 24, 2024

Yep! Although there's no stuff in the temperature vector at that point. I'm really confused how this could have got there. Probably some accidental line deletion which didn't get caught in units tests, since this is in a code section which supports not using CHI_D, a previously missing feature in the code. If CHI_D is supplied, this shouldn't get called. Anyways... yes. I'm going to fix this now.

from moltres.

gridley avatar gridley commented on August 24, 2024

It may appear to not be initialized, but always should be by the time that for (j=0; j<xsec_names.size;++j) loop gets to it. That's because xsec_names is hard-coded, and CHI_D always comes past the first element. As long as the first element has been passed, tempLength should be defined.

I think it makes sense to write the code this way. This part of code only gets turned on if CHI_D is missing, and you have to assume that the list of temperatures given for CHI_D matches the length of what was given in previous XSEC files. The best way to remove the "possibility" (someone editing the xsec_names variable) would be assume that cross sections can be interpolated in disparate ways, e.g. cubic splines on CHI, monotone cubics on CHI_D. Then CHI_D could be given a constant value of 1 in group 1. Since that would be a bit of effort and of marginal benefit, I propose we leave the code as-is. I hope this explanation doesn't suck.

from moltres.

lindsayad avatar lindsayad commented on August 24, 2024

You do assignment in splineConstruct but you don't in the methods I cited. In all three cases, you might as well zero initialize tempLength upon declaration to silence the compiler warning. Otherwise you are going to create concerned users when they see compiler warnings

from moltres.

katyhuff avatar katyhuff commented on August 24, 2024

Closed with #76

from moltres.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.