From 630a8cc789aba08da222a048f93daa42cf82079d Mon Sep 17 00:00:00 2001 From: Congjian Wang Date: Fri, 17 Jan 2025 14:03:59 -0700 Subject: [PATCH 1/3] resolve relap parser issue when processing continuation with operator --- ravenframework/CodeInterfaceClasses/RELAP5/RELAPparser.py | 6 ++++-- .../RELAP5/test_relap5_code_interface.xml | 4 ++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ravenframework/CodeInterfaceClasses/RELAP5/RELAPparser.py b/ravenframework/CodeInterfaceClasses/RELAP5/RELAPparser.py index e95e8a6baf..e8f85770ce 100644 --- a/ravenframework/CodeInterfaceClasses/RELAP5/RELAPparser.py +++ b/ravenframework/CodeInterfaceClasses/RELAP5/RELAPparser.py @@ -385,12 +385,14 @@ def retrieveCardValues(self, listOfCards): cnt = 1 while moveToNextLine: if self.deckLines[deck][lineNum+cnt].strip().startswith("+"): - currentNumberWords = self.countNumberOfWords(self.deckLines[deck][lineNum+cnt]) + currentLine = self.deckLines[deck][lineNum+cnt] + currentNumberWords = self.countNumberOfWords(currentLine) if int(word) <= numberOfWords+currentNumberWords: - cardValues[(deck,readCard,word)] = line.split()[word-currentNumberWords] + cardValues[(deck,readCard,word)] = currentLine.split()[word-numberOfWords] foundWord = True moveToNextLine = False numberOfWords+=currentNumberWords + cnt += 1 else: moveToNextLine=False if not foundWord: diff --git a/tests/framework/CodeInterfaceTests/RELAP5/test_relap5_code_interface.xml b/tests/framework/CodeInterfaceTests/RELAP5/test_relap5_code_interface.xml index 0d1b06166b..f1fa525e64 100644 --- a/tests/framework/CodeInterfaceTests/RELAP5/test_relap5_code_interface.xml +++ b/tests/framework/CodeInterfaceTests/RELAP5/test_relap5_code_interface.xml @@ -40,6 +40,10 @@ + + %card%+13550801:6 + 13550801:7 + True From ce97b4eaa88edd25b60c142c0caea15ddd6b90b4 Mon Sep 17 00:00:00 2001 From: Congjian Wang Date: Fri, 17 Jan 2025 14:10:29 -0700 Subject: [PATCH 2/3] regold generated inputs --- .../RELAP5/gold/RELAP5interfaceTest/testDummyStep/1/snc01.i | 3 ++- .../RELAP5/gold/RELAP5interfaceTest/testDummyStep/2/snc01.i | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/framework/CodeInterfaceTests/RELAP5/gold/RELAP5interfaceTest/testDummyStep/1/snc01.i b/tests/framework/CodeInterfaceTests/RELAP5/gold/RELAP5interfaceTest/testDummyStep/1/snc01.i index b530b8fd7f..aef9e940c2 100644 --- a/tests/framework/CodeInterfaceTests/RELAP5/gold/RELAP5interfaceTest/testDummyStep/1/snc01.i +++ b/tests/framework/CodeInterfaceTests/RELAP5/gold/RELAP5interfaceTest/testDummyStep/1/snc01.i @@ -1,5 +1,6 @@ *RAVEN INPUT VALUES * card: 13550801 word: 6 value: 4.790482e-01 +* card: 13550801 word: 7 value: 4.790482e-01 * card: 20100154 word: 1 value: 3.920277e+02 * card: 20100154 word: 2 value: 4.479190e+01 * card: 20100155 word: 2 value: 4.624756e+01 @@ -1658,7 +1659,7 @@ 13550601 0 0 0 1 0.5 1 13550701 0 0.0 0.0 0.0 1 13550801 0.0 3.0 3.0 0.0 -+ 0.0 4.790482e-01 0.0 1.0 1 ++ 0.0 4.790482e-01 4.790482e-01 1.0 1 13550901 0.0 3.0 3.0 0.0 0.0 0.0 0.0 1.0 1 * * vessel wall diff --git a/tests/framework/CodeInterfaceTests/RELAP5/gold/RELAP5interfaceTest/testDummyStep/2/snc01.i b/tests/framework/CodeInterfaceTests/RELAP5/gold/RELAP5interfaceTest/testDummyStep/2/snc01.i index cdaf1fcbad..f422d5f87a 100644 --- a/tests/framework/CodeInterfaceTests/RELAP5/gold/RELAP5interfaceTest/testDummyStep/2/snc01.i +++ b/tests/framework/CodeInterfaceTests/RELAP5/gold/RELAP5interfaceTest/testDummyStep/2/snc01.i @@ -1,5 +1,6 @@ *RAVEN INPUT VALUES * card: 13550801 word: 6 value: 4.482297e-01 +* card: 13550801 word: 7 value: 4.482297e-01 * card: 20100154 word: 1 value: 3.920310e+02 * card: 20100154 word: 2 value: 4.397478e+01 * card: 20100155 word: 2 value: 4.514053e+01 @@ -1658,7 +1659,7 @@ 13550601 0 0 0 1 0.5 1 13550701 0 0.0 0.0 0.0 1 13550801 0.0 3.0 3.0 0.0 -+ 0.0 4.482297e-01 0.0 1.0 1 ++ 0.0 4.482297e-01 4.482297e-01 1.0 1 13550901 0.0 3.0 3.0 0.0 0.0 0.0 0.0 1.0 1 * * vessel wall From 4fccdbccc5ff49acbe5ae5c62afe3a30098ce006 Mon Sep 17 00:00:00 2001 From: Congjian Wang Date: Fri, 17 Jan 2025 14:18:53 -0700 Subject: [PATCH 3/3] update test info --- .../CodeInterfaceTests/RELAP5/test_relap5_code_interface.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/framework/CodeInterfaceTests/RELAP5/test_relap5_code_interface.xml b/tests/framework/CodeInterfaceTests/RELAP5/test_relap5_code_interface.xml index f1fa525e64..f27e3e763f 100644 --- a/tests/framework/CodeInterfaceTests/RELAP5/test_relap5_code_interface.xml +++ b/tests/framework/CodeInterfaceTests/RELAP5/test_relap5_code_interface.xml @@ -20,6 +20,8 @@ Modified to check we can handle multiple words in the same card. Added csv xml node in the Code block for showing how to use it. Removed clearRunDir flag since in case of interfaceCheck this is set to False automatically (see issue #1688) + Added operator card to test operator issue with continuation lines (see issue #2425) + R-SI-1