i-RIC / iriclib

1 stars 3 forks source link

Closes i-RIC/iriclib#2 #3

Closed kskinoue0612 closed 7 years ago

kskinoue0612 commented 7 years ago

Writing Grid and calculation result at the same time does not work.

The test case for this bug is also added. The case is case_addGridAndResult().

scharlton2 commented 7 years ago

Sorry Keisuke,

I didn't see the first notification. When I first started I was consistently getting these errors in both the release and debug versions:

C:\iricdev\lib\src\iriclib\unittests_cgnsfile\case_add_grid_and_result.cpp 61: cg_iRIC_Write_Sol_Time() ier == 0 [NG]
C:\iricdev\lib\src\iriclib\unittests_cgnsfile\case_add_grid_and_result.cpp 64: cg_iRIC_Write_Sol_GridCoord2d() ier == 0 [NG]
C:\iricdev\lib\src\iriclib\unittests_cgnsfile\case_add_grid_and_result.cpp 67: cg_iRIC_Write_Sol_Real() ier == 0 [NG]

I noticed that if i commented out case_SolWriteDivide in main.cpp everything was [OK]. I'll continue debugging and write more if I find something.

Scott

scharlton2 commented 7 years ago

Hello Keisuke,

I have two ideas that might be the cause of the errors.

The first is that I'm wondering if the call to iRIC_InitOption(IRIC_OPTION_DIVIDESOLUTIONS) needs a subsequent call to iRIC_InitOption(IRIC_OPTION_STDSOLUTION) at the end of case_SolWriteDivide.

The second being that the last files (case_soldivide_Solution5.cgn and case_soldivide3d_Solution5.cgn) are left open and need to be closed at the end of case_SolWriteDivide.

Let me know if you have any ideas.

Thanks, Scott

kskinoue0612 commented 7 years ago

Hi Scott,

Thanks for your review. You are right, the unit test failed when case_SolWriteDivide() is executed before case_addGridAndResult(). I've fixed the problem by adding iRIC_InitOption(IRIC_OPTION_STDSOLUTION) call.

kskinoue0612 commented 7 years ago

Hi, Scott,

I've registered your second issue (about xxxx_Solution5.cgn) as separate issue #4.