Added beamWidth and beamHeight static variables
This commit is contained in:
parent
b4fb31748c
commit
0d07f1c831
|
@ -371,15 +371,16 @@ void ReducedModelOptimizer::createSimulationMeshes(
|
|||
std::cerr << "Error: A rectangular cross section is expected." << std::endl;
|
||||
std::terminate();
|
||||
}
|
||||
|
||||
// Full pattern
|
||||
pFullPatternSimulationMesh = std::make_shared<SimulationMesh>(fullModel);
|
||||
pFullPatternSimulationMesh->setBeamCrossSection(CrossSectionType{0.002, 0.002});
|
||||
pFullPatternSimulationMesh->setBeamCrossSection(CrossSectionType{beamWidth, beamHeight});
|
||||
pFullPatternSimulationMesh->setBeamMaterial(0.3, youngsModulus);
|
||||
pFullPatternSimulationMesh->reset();
|
||||
|
||||
// Reduced pattern
|
||||
pReducedPatternSimulationMesh = std::make_shared<SimulationMesh>(reducedModel);
|
||||
pReducedPatternSimulationMesh->setBeamCrossSection(CrossSectionType{0.002, 0.002});
|
||||
pReducedPatternSimulationMesh->setBeamCrossSection(CrossSectionType{beamWidth, beamHeight});
|
||||
pReducedPatternSimulationMesh->setBeamMaterial(0.3, youngsModulus);
|
||||
pReducedPatternSimulationMesh->reset();
|
||||
}
|
||||
|
@ -972,12 +973,12 @@ void ReducedModelOptimizer::getResults(const FunctionEvaluation &optimalObjectiv
|
|||
<< std::endl;
|
||||
std::cout << std::endl;
|
||||
|
||||
reducedModelResults.registerForDrawing(Colors::reducedDeformed);
|
||||
optimizationState.fullPatternResults[simulationScenarioIndex].registerForDrawing(
|
||||
Colors::patternDeformed);
|
||||
polyscope::show();
|
||||
reducedModelResults.unregister();
|
||||
optimizationState.fullPatternResults[simulationScenarioIndex].unregister();
|
||||
// reducedModelResults.registerForDrawing(Colors::reducedDeformed);
|
||||
// optimizationState.fullPatternResults[simulationScenarioIndex].registerForDrawing(
|
||||
// Colors::patternDeformed);
|
||||
// polyscope::show();
|
||||
// reducedModelResults.unregister();
|
||||
// optimizationState.fullPatternResults[simulationScenarioIndex].unregister();
|
||||
|
||||
#endif
|
||||
}
|
||||
|
@ -1886,8 +1887,6 @@ std::vector<std::shared_ptr<SimulationJob>> ReducedModelOptimizer::createFullPat
|
|||
job.nodalExternalForces.clear();
|
||||
job.constrainedVertices.clear();
|
||||
job.nodalForcedDisplacements.clear();
|
||||
job.label = baseSimulationScenarioNames[baseScenario] + "_"
|
||||
+ std::to_string(simulationScenarioIndex);
|
||||
|
||||
const double forceMagnitude = (forceMagnitudeStep * simulationScenarioIndex
|
||||
+ minForceMagnitude);
|
||||
|
@ -1895,6 +1894,9 @@ std::vector<std::shared_ptr<SimulationJob>> ReducedModelOptimizer::createFullPat
|
|||
m_fullPatternOppositeInterfaceViPairs,
|
||||
job);
|
||||
|
||||
job.label = baseSimulationScenarioNames[baseScenario] + "_"
|
||||
+ std::to_string(simulationScenarioIndex);
|
||||
|
||||
scenarios[scenarioIndex] = std::make_shared<SimulationJob>(job);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue