From e8cbbf5d550bfc2ae9591ce00b58c4427c39c069 Mon Sep 17 00:00:00 2001 From: Kristian Bendiksen Date: Wed, 13 Sep 2023 13:19:26 +0200 Subject: [PATCH] Fault Reactivation Model Export: fix problems after run. --- .../RifFaultReactivationModelExporter.cpp | 25 +++++++++---------- .../FileInterface/RifInpExportTools.cpp | 2 +- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/ApplicationLibCode/FileInterface/RifFaultReactivationModelExporter.cpp b/ApplicationLibCode/FileInterface/RifFaultReactivationModelExporter.cpp index 8c4065213d..50d0c7eb1b 100644 --- a/ApplicationLibCode/FileInterface/RifFaultReactivationModelExporter.cpp +++ b/ApplicationLibCode/FileInterface/RifFaultReactivationModelExporter.cpp @@ -282,12 +282,11 @@ std::pair const std::map& boundaries ) { auto printBoundaryCondition = - []( std::ostream& stream, const std::string& boundaryConditionName, const std::string& boundaryName, const std::string& symmetryType ) + []( std::ostream& stream, const std::string& boundaryName, const std::string& boundarySetName, const std::string& symmetryType ) { - RifInpExportTools::printComment( stream, "Name: BC-" + boundaryConditionName + " Type: Symmetry/Antisymmetry/Encastre" ); + RifInpExportTools::printComment( stream, "Name: BC-" + boundaryName + " Type: Symmetry/Antisymmetry/Encastre" ); RifInpExportTools::printHeading( stream, "Boundary" ); - std::string setName = "Set-" + boundaryName; - RifInpExportTools::printLine( stream, setName + ", " + symmetryType ); + RifInpExportTools::printLine( stream, boundarySetName + ", " + symmetryType ); }; std::map symmetryTypes = { @@ -301,9 +300,9 @@ std::pair RifInpExportTools::printSectionComment( stream, "BOUNDARY CONDITIONS" ); for ( auto [boundary, boundaryName] : boundaries ) { - std::string boundaryConditionName = boundaryName; - std::string symmetryType = symmetryTypes[boundary]; - printBoundaryCondition( stream, boundaryName, boundaryName, symmetryType ); + std::string boundarySetName = "Set-" + boundaryName; + std::string symmetryType = symmetryTypes[boundary]; + printBoundaryCondition( stream, boundaryName, boundarySetName, symmetryType ); } std::string partSymmetry = "XSYMM"; @@ -376,10 +375,10 @@ std::pair RifFaultReactivationModelExporter::printSteps( std: RifInpExportTools::printSectionComment( stream, "BOUNDARY CONDITIONS" ); RifInpExportTools::printHeading( stream, "Boundary" ); - RifInpExportTools::printHeading( stream, "Part-1-1.part1_PP_, 8, 8" ); + RifInpExportTools::printLine( stream, "Part-1-1.part1_PP_, 8, 8" ); RifInpExportTools::printHeading( stream, "Boundary" ); std::string extra = i != 0 ? ", 1e+07" : ""; - RifInpExportTools::printHeading( stream, "Part-2-1.part2_PP_, 8, 8" + extra ); + RifInpExportTools::printLine( stream, "Part-2-1.part2_PP_, 8, 8" + extra ); RifInpExportTools::printSectionComment( stream, "OUTPUT REQUESTS" ); RifInpExportTools::printHeading( stream, "Restart, write, frequency=0" ); @@ -406,7 +405,7 @@ std::pair RifInpExportTools::printSectionComment( stream, "INTERACTIONS" ); for ( const auto& [border, borderName] : borders ) { - RifInpExportTools::printHeading( stream, "Interaction: " + borderName ); + RifInpExportTools::printComment( stream, "Interaction: " + borderName ); std::string interactionName = "non-fault"; std::string extra; @@ -417,10 +416,10 @@ std::pair } RifInpExportTools::printHeading( stream, - "Contact Pair, interation=" + interactionName + ", small sliding, type=SURFACE TO SURFACE" + extra ); + "Contact Pair, interaction=" + interactionName + ", small sliding, type=SURFACE TO SURFACE" + extra ); - std::string part1Name = "Part1-1"; - std::string part2Name = "Part2-1"; + std::string part1Name = "Part-1-1"; + std::string part2Name = "Part-2-1"; RifInpExportTools::printLine( stream, part1Name + "." + borderName + ", " + part2Name + "." + borderName ); } diff --git a/ApplicationLibCode/FileInterface/RifInpExportTools.cpp b/ApplicationLibCode/FileInterface/RifInpExportTools.cpp index 8e1f7518b6..e340e72c58 100644 --- a/ApplicationLibCode/FileInterface/RifInpExportTools.cpp +++ b/ApplicationLibCode/FileInterface/RifInpExportTools.cpp @@ -158,7 +158,7 @@ bool RifInpExportTools::printElements( std::ostream& stream, const std::vector