Commit 8d19b0b4 authored by Christophe Geuzaine's avatar Christophe Geuzaine

Hack for NodeTable format in Print[ ... OnRegion NodesOf[...] ... ] from @Francois

FIXME: this leads to files with a different format than the NodeTable format for Print[ ... OnElementsOf ... ], as the first line of the file should contain the total number of nodes (missing here)
parent 8610fc15
Pipeline #1637 passed with stage
in 9 minutes 43 seconds
......@@ -1759,6 +1759,20 @@ void Format_PostValue(struct PostQuantity *PQ_P,
else if (Format == FORMAT_LOOP_ERROR) {
StorePostOpResult(NbrHarmonics, Value);
}
else if (Format == FORMAT_NODE_TABLE) {
// FIXME: this leads to output files without the total number of nodes at
// the beginning (i.e. not compatible with NodeTable obtained e.g. for
// OnElementsOf)
fprintf(PostStream, "%d", numRegion) ;
Geo_GetNodesCoordinates(1, &numRegion, &x, &y, &z) ;
fprintf(PostStream, " %.16g %.16g %.16g", x,y,z) ;
for (k = 0 ; k < NbrHarmonics ; k++) {
for(j = 0 ; j < Size ; j++) {
fprintf(PostStream, " %.16g", Value->Val[MAX_DIM*k+j]) ;
}
}
fprintf(PostStream, "\n") ;
}
// else, for other FORMATs, e.g., FORMAT_FREQUENCY_TABLE
else {
if(iRegion == 0){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment