mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fault Reactivation Export: Use transform instead of orientation.
This commit is contained in:
parent
33670df887
commit
ca89bc429f
@ -69,8 +69,8 @@ std::pair<bool, std::string> RifFaultReactivationModelExporter::exportToStream(
|
|||||||
|
|
||||||
std::vector<std::function<std::pair<bool, std::string>()>> methods = {
|
std::vector<std::function<std::pair<bool, std::string>()>> methods = {
|
||||||
[&]() { return printHeading( stream, applicationNameAndVersion ); },
|
[&]() { return printHeading( stream, applicationNameAndVersion ); },
|
||||||
[&]() { return printParts( stream, *model, partNames, borders, faces, boundaries, rimModel.localCoordSysNormalsXY() ); },
|
[&]() { return printParts( stream, *model, partNames, borders, faces, boundaries ); },
|
||||||
[&]() { return printAssembly( stream, *model, partNames ); },
|
[&]() { return printAssembly( stream, *model, partNames, rimModel.localCoordSysNormalsXY() ); },
|
||||||
[&]() { return printMaterials( stream ); },
|
[&]() { return printMaterials( stream ); },
|
||||||
[&]() { return printInteractionProperties( stream, faultFriction ); },
|
[&]() { return printInteractionProperties( stream, faultFriction ); },
|
||||||
[&]() { return printBoundaryConditions( stream, *model, partNames, boundaries ); },
|
[&]() { return printBoundaryConditions( stream, *model, partNames, boundaries ); },
|
||||||
@ -122,8 +122,7 @@ std::pair<bool, std::string> RifFaultReactivationModelExporter::printParts(
|
|||||||
const std::map<RigFaultReactivationModel::GridPart, std::string>& partNames,
|
const std::map<RigFaultReactivationModel::GridPart, std::string>& partNames,
|
||||||
const std::vector<std::pair<RigGriddedPart3d::BorderSurface, std::string>>& borders,
|
const std::vector<std::pair<RigGriddedPart3d::BorderSurface, std::string>>& borders,
|
||||||
const std::map<std::pair<RigFaultReactivationModel::GridPart, RigGriddedPart3d::BorderSurface>, int>& faces,
|
const std::map<std::pair<RigFaultReactivationModel::GridPart, RigGriddedPart3d::BorderSurface>, int>& faces,
|
||||||
const std::map<RigGriddedPart3d::Boundary, std::string>& boundaries,
|
const std::map<RigGriddedPart3d::Boundary, std::string>& boundaries )
|
||||||
const std::pair<cvf::Vec3d, cvf::Vec3d>& orientation )
|
|
||||||
{
|
{
|
||||||
RifInpExportTools::printSectionComment( stream, "PARTS" );
|
RifInpExportTools::printSectionComment( stream, "PARTS" );
|
||||||
|
|
||||||
@ -180,15 +179,8 @@ std::pair<bool, std::string> RifFaultReactivationModelExporter::printParts(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Print local orientation
|
|
||||||
std::string orientationName = "ori";
|
|
||||||
RifInpExportTools::printHeading( stream, "Orientation, name=" + orientationName );
|
|
||||||
auto [dir1, dir2] = orientation;
|
|
||||||
RifInpExportTools::printNumbers( stream, { dir1.x(), dir1.y(), dir1.z(), dir2.x(), dir2.y(), dir2.z() } );
|
|
||||||
RifInpExportTools::printLine( stream, "3, 0.0" );
|
|
||||||
|
|
||||||
RifInpExportTools::printComment( stream, "Section: sand" );
|
RifInpExportTools::printComment( stream, "Section: sand" );
|
||||||
RifInpExportTools::printHeading( stream, "Solid Section, elset=" + partName + ", orientation=" + orientationName + ", material=sand" );
|
RifInpExportTools::printHeading( stream, "Solid Section, elset=" + partName + ", material=sand" );
|
||||||
|
|
||||||
RifInpExportTools::printLine( stream, "," );
|
RifInpExportTools::printLine( stream, "," );
|
||||||
RifInpExportTools::printHeading( stream, "End Part" );
|
RifInpExportTools::printHeading( stream, "End Part" );
|
||||||
@ -205,7 +197,8 @@ std::pair<bool, std::string> RifFaultReactivationModelExporter::printParts(
|
|||||||
std::pair<bool, std::string>
|
std::pair<bool, std::string>
|
||||||
RifFaultReactivationModelExporter::printAssembly( std::ostream& stream,
|
RifFaultReactivationModelExporter::printAssembly( std::ostream& stream,
|
||||||
const RigFaultReactivationModel& model,
|
const RigFaultReactivationModel& model,
|
||||||
const std::map<RigFaultReactivationModel::GridPart, std::string>& partNames )
|
const std::map<RigFaultReactivationModel::GridPart, std::string>& partNames,
|
||||||
|
const std::pair<cvf::Vec3d, cvf::Vec3d>& transform )
|
||||||
{
|
{
|
||||||
// ASSEMBLY part
|
// ASSEMBLY part
|
||||||
RifInpExportTools::printSectionComment( stream, "ASSEMBLY" );
|
RifInpExportTools::printSectionComment( stream, "ASSEMBLY" );
|
||||||
@ -224,6 +217,17 @@ std::pair<bool, std::string>
|
|||||||
RifInpExportTools::printHeading( stream, "End Instance" );
|
RifInpExportTools::printHeading( stream, "End Instance" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for ( const auto& part : parts )
|
||||||
|
{
|
||||||
|
auto partNameIt = partNames.find( part );
|
||||||
|
CAF_ASSERT( partNameIt != partNames.end() );
|
||||||
|
std::string partName = partNameIt->second;
|
||||||
|
|
||||||
|
RifInpExportTools::printHeading( stream, "Transform, nset=" + partName + "." + partName );
|
||||||
|
auto [dir1, dir2] = transform;
|
||||||
|
RifInpExportTools::printNumbers( stream, { dir1.x(), dir1.y(), dir1.z(), dir2.x(), dir2.y(), dir2.z() } );
|
||||||
|
}
|
||||||
|
|
||||||
RifInpExportTools::printHeading( stream, "End Assembly" );
|
RifInpExportTools::printHeading( stream, "End Assembly" );
|
||||||
|
|
||||||
return { true, "" };
|
return { true, "" };
|
||||||
|
@ -45,12 +45,12 @@ private:
|
|||||||
const std::map<RigFaultReactivationModel::GridPart, std::string>& partNames,
|
const std::map<RigFaultReactivationModel::GridPart, std::string>& partNames,
|
||||||
const std::vector<std::pair<RigGriddedPart3d::BorderSurface, std::string>>& borders,
|
const std::vector<std::pair<RigGriddedPart3d::BorderSurface, std::string>>& borders,
|
||||||
const std::map<std::pair<RigFaultReactivationModel::GridPart, RigGriddedPart3d::BorderSurface>, int>& faces,
|
const std::map<std::pair<RigFaultReactivationModel::GridPart, RigGriddedPart3d::BorderSurface>, int>& faces,
|
||||||
const std::map<RigGriddedPart3d::Boundary, std::string>& boundaries,
|
const std::map<RigGriddedPart3d::Boundary, std::string>& boundaries );
|
||||||
const std::pair<cvf::Vec3d, cvf::Vec3d>& orientation );
|
|
||||||
|
|
||||||
static std::pair<bool, std::string> printAssembly( std::ostream& stream,
|
static std::pair<bool, std::string> printAssembly( std::ostream& stream,
|
||||||
const RigFaultReactivationModel& model,
|
const RigFaultReactivationModel& model,
|
||||||
const std::map<RigFaultReactivationModel::GridPart, std::string>& partNames );
|
const std::map<RigFaultReactivationModel::GridPart, std::string>& partNames,
|
||||||
|
const std::pair<cvf::Vec3d, cvf::Vec3d>& transform );
|
||||||
|
|
||||||
static std::pair<bool, std::string> printMaterials( std::ostream& stream );
|
static std::pair<bool, std::string> printMaterials( std::ostream& stream );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user