Commit 7ccc63bd by Christophe Geuzaine

Merge branch 'patch-1' into 'master'

Update Pos_Format.cpp for NX unv

See merge request !8
parents 5a8dae83 9c25264a
Pipeline #181 passed with stage
in 40 seconds
......@@ -928,7 +928,7 @@ static void StorePostOpResult(int NbrHarmonics, struct Value *Value)
void Unv_PrintHeader(FILE *PostStream, char *name, int SubType, double Time, int TimeStep) NX
void Unv_PrintFooter(FILE *PostStream) NX
void Unv_PrintElement(FILE *PostStream, int Num_Element, int NbrNodes, struct Value *Value) NX
void Unv_PrintElement(FILE *PostStream, int Num_Element, int NbrNodes, struct Value *Value, int NbrHarmonics) NX
void Unv_PrintRegion(FILE *PostStream, int Flag_Comma, int numRegion, int NbrHarmonics,
int Size, struct Value *Value) NX
......@@ -1515,7 +1515,7 @@ void Format_PostElement(struct PostSubOperation *PSO_P, int Contour, int Store,
PE->Value) ;
break ;
case FORMAT_NXUNV :
if(PostStream) Unv_PrintElement(PostStream, Num_Element, PE->NbrNodes, PE->Value) ;
if(PostStream) Unv_PrintElement(PostStream, Num_Element, PE->NbrNodes, PE->Value, NbrHarmonics) ;
break ;
case FORMAT_GMSH :
if(PSO_P->StoreInField >= 0 || PSO_P->StoreInMeshBasedField >= 0){
......
......@@ -414,12 +414,23 @@ void Pos_Formulation(struct Formulation *Formulation_P,
}
}
else {
if((PostStream = FOpen(PostFileName, Flag_BIN ? "ab" : "a")))
Message::Direct(4, " >> '%s'", PostFileName) ;
else{
Message::Error("Unable to open file '%s'", PostFileName) ;
PostStream = stdout ;
}
//Peter Binde: Writing NX binary unv files requires read AND write and fopen64
if(PostSubOperation_P->Format == FORMAT_NXUNV){
if((PostStream = fopen64(PostFileName, Flag_BIN ? "r+b" : "a")))
Message::Direct(4, " >> '%s'", PostFileName) ;
else{
Message::Error("Unable to open file '%s'", PostFileName) ;
PostStream = stdout ;
}
}
else{
if((PostStream = FOpen(PostFileName, Flag_BIN ? "ab" : "a")))
Message::Direct(4, " >> '%s'", PostFileName) ;
else{
Message::Error("Unable to open file '%s'", PostFileName) ;
PostStream = stdout ;
}
}
}
}
else{
......
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