Giter VIP home page Giter VIP logo

Comments (6)

gforney avatar gforney commented on September 4, 2024

Jake
Can you upload an example that fails.
Thanks
Glenn

from smv.

JakeOShannessy avatar JakeOShannessy commented on September 4, 2024

Hi Glenn,

Verification/Detectors/aspiration_detector.fds is a valid example. Adding the code below as a diagnostic at readsmv.c:346 (at the end of ReadCSV):

for(int j=0;j<csvfi->ncsvinfo;j++) {
    printf("  longlabel: >%s<\n", csvfi->csvinfo[j].label.longlabel);
  }

I get the following output:

  longlabel: >Time<
  longlabel: >HRR<
  longlabel: >Q_RADI<
  longlabel: >Q_CONV<
  longlabel: >Q_COND<
  longlabel: >Q_DIFF<
  longlabel: >Q_PRES<
  longlabel: >Q_PART<
  longlabel: >Q_ENTH<
  longlabel: >Q_TOTAL<
  longlabel: >MLR_AIR<
  longlabel: >MLR_PROPANE<
  longlabel: >MLR_PRODUCTS<
  longlabel: >ZONE_1<
  longlabel: >Time Step<
  longlabel: >Wall Time<
  longlabel: >Step Size<
  longlabel: >Simulation Time<
  longlabel: >CPU Time<
  longlabel: >Time<
  longlabel: > sp1<
  longlabel: > sp2<
  longlabel: > sp3<
  longlabel: > asp1<

As you can see for standard values (which generally don't have quotes) the output is trimmed, but not for named devices (which generally have quotes, e.g. "sp1".

from smv.

gforney avatar gforney commented on September 4, 2024

Thanks. Ill take a look

from smv.

JakeOShannessy avatar JakeOShannessy commented on September 4, 2024

Note that there is a call to TrimFrontBack, but it's result is not used to set the label. See below:

for(i=0; i<csvfi->ncsvinfo; i++){
csvdata *ci;
char label[64];
char *unit;
ci = csvfi->csvinfo + i;
TrimBack(labels[i]);
strcpy(label, labels[i]);
buffptr = TrimFrontBack(label);
if(strcmp(buffptr, "null") == 0){
sprintf(label, "%s%03i", csvfi->c_type, i + 1);
}
unit = TrimFrontBack(units[i]);
ci->skip = 0;
if(strcmp(unit, "status") == 0)ci->skip = 1;
ci->dimensionless = IsDimensionless(unit);
SetLabels(&(ci->label), label, label, unit);
}

Changing the last line to SetLabels(&(ci->label), buffptr, buffptr, unit); would address it, but I'm not sure if that's overlooking a design choice.

from smv.

gforney avatar gforney commented on September 4, 2024

update your smv repo and try now . thanks for the catch. let me know if you still see a problem

from smv.

JakeOShannessy avatar JakeOShannessy commented on September 4, 2024

Yes that's fixed it, thanks Glenn.

from smv.

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.