Skip to content
Snippets Groups Projects

Draft: Trying to send Tables (PostOperation) via ONELAB (as a string)

Closed Nicolas Marsic requested to merge SimpleTableOnelab into master

Hi Christophe,

I was wondering if there is a way to send a SimpleTable (and co.) via ONELAB with a PostOperation? I tried a simple

Print[bPhiM, OnGrid ..., File ..., Format SimpleTable, SendToServer "Output/bPhiM"];

but it doesn't work... am I missing something?

If I'm not, I looked a bit in the code, and hacked Kernel/Pos_Format.cpp...

I basically changed Tabular_PrintElement such that the table is printed in a string (in addition to the old PostStream) line-by-line.

With this string, I can send the lines of the tables via Message::AddOnelabStringChoice (by mimicking the case PE->NbrNodes == 1 && PSO_P->Format != FORMAT_NODE_TABLE && PSO_P->Format != FORMAT_ELEMENT_TABLE).

In the end, I have a ONELAB string with different choices, each of them being a line of the table, and I can get it back in python via c.getStringChoices.

We could also parse back the numbers in the string and send onelab::number instead of onelab::string, but I don't know if we can safely parse %.16g in a systematic way?

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading