[cig-commits] [commit] master: Added stress output to simulation (6653564)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Tue Dec 2 13:56:23 PST 2014
Repository : https://github.com/geodynamics/vq
On branch : master
Link : https://github.com/geodynamics/vq/compare/06902a05cf4d70bc94c85d1c195c073d4e74cdad...c935dfd33f870a081b6c01cce97a060ad1cbdbda
>---------------------------------------------------------------
commit 66535642db279f00bfbaaddb34905aede93ca7c3
Author: Eric Heien <emheien at ucdavis.edu>
Date: Thu Nov 27 00:28:32 2014 -0800
Added stress output to simulation
>---------------------------------------------------------------
66535642db279f00bfbaaddb34905aede93ca7c3
src/core/Simulation.cpp | 2 ++
src/simulation/RunEvent.cpp | 4 ++++
2 files changed, 6 insertions(+)
diff --git a/src/core/Simulation.cpp b/src/core/Simulation.cpp
index 02a586d..fa6b39b 100644
--- a/src/core/Simulation.cpp
+++ b/src/core/Simulation.cpp
@@ -72,6 +72,8 @@ void Simulation::output_stress(quakelib::UIndex event_num, quakelib::UIndex swee
quakelib::ModelStress stress;
quakelib::ModelStressState stress_state;
+ if (getStressOutfileType() == "") return;
+
stress_state.setYear(getYear());
stress_state.setEventNum(event_num);
stress_state.setSweepNum(sweep_num);
diff --git a/src/simulation/RunEvent.cpp b/src/simulation/RunEvent.cpp
index 09955d6..1afeaf1 100644
--- a/src/simulation/RunEvent.cpp
+++ b/src/simulation/RunEvent.cpp
@@ -280,6 +280,8 @@ void RunEvent::processStaticFailure(Simulation *sim) {
// While there are still failed blocks to handle
while (more_blocks_to_fail || final_sweep) {
+ sim->output_stress(sim->getCurrentEvent().getEventNumber(), sweep_num);
+
// Share the failed blocks with other processors to correctly handle
// faults that are split among different processors
sim->distributeBlocks(local_failed_elements, global_failed_elements);
@@ -382,6 +384,8 @@ void RunEvent::processStaticFailure(Simulation *sim) {
sweep_num++;
}
+ sim->output_stress(sim->getCurrentEvent().getEventNumber(), sweep_num);
+
// Set the completed list as the sweep list for the entire event
sim->collectEventSweep(event_sweeps);
sim->getCurrentEvent().setSweeps(event_sweeps);
More information about the CIG-COMMITS
mailing list