[cig-commits] [commit] master: Cosmetic changes (dad95ea)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Wed Oct 8 17:05:46 PDT 2014
Repository : https://github.com/geodynamics/vc
On branch : master
Link : https://github.com/geodynamics/vc/compare/23464fca3efa2b6ad7ee0ce8f60c225b18b49741...e4325192ad1118379f46ba66899cb98143d09e04
>---------------------------------------------------------------
commit dad95ea51d2ea69c8c1b9000a23df1e1d12d8571
Author: Eric Heien <emheien at ucdavis.edu>
Date: Thu Sep 25 11:23:49 2014 -0700
Cosmetic changes
>---------------------------------------------------------------
dad95ea51d2ea69c8c1b9000a23df1e1d12d8571
src/simulation/BASSAftershocks.cpp | 4 ++--
src/simulation/RunEvent.cpp | 3 +--
src/simulation/UpdateBlockStress.cpp | 3 +--
3 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/simulation/BASSAftershocks.cpp b/src/simulation/BASSAftershocks.cpp
index 5e1bd24..db53436 100644
--- a/src/simulation/BASSAftershocks.cpp
+++ b/src/simulation/BASSAftershocks.cpp
@@ -80,8 +80,8 @@ SimRequest BASSAftershocks::run(SimFramework *_sim) {
// Remove the initial seed event (main shock)
events_to_process.erase(events_to_process.begin());
- // Finally we sort the events into time order since the aftershocks in the
- // BASS model are usually not generated in ordered time sequence.
+ // Finally we add the aftershocks to the simulation list. This is
+ // a set so we don't need to sort the aftershocks manually.
for (it=events_to_process.begin(); it!=events_to_process.end(); ++it) {
sim->addAftershock(*it);
}
diff --git a/src/simulation/RunEvent.cpp b/src/simulation/RunEvent.cpp
index b5c4ea4..94e9c5c 100644
--- a/src/simulation/RunEvent.cpp
+++ b/src/simulation/RunEvent.cpp
@@ -390,7 +390,6 @@ void RunEvent::processAftershock(VCSimulation *sim) {
// Determine the target rupture area given the aftershock magnitude
// TODO: make this equation user specifiable?
double rupture_area = pow(10, -3.49+0.91*as.mag);
- std::cerr << "mag: " << as.mag << " ra: " << rupture_area << std::endl;
double selected_rupture_area = 0;
double selected_rupture_area_mu = 0;
@@ -458,7 +457,7 @@ SimRequest RunEvent::run(SimFramework *_sim) {
}
// TODO: reinstate this check
- //assertThrow(sim->getCurrentEvent().getNumSweeps() > 0, "There was a trigger but no failed blocks.");
+ assertThrow(sim->getCurrentEvent().size() > 0, "There was a trigger but no failed blocks.");
return SIM_STOP_OK;
}
diff --git a/src/simulation/UpdateBlockStress.cpp b/src/simulation/UpdateBlockStress.cpp
index 836a63b..61e61d5 100644
--- a/src/simulation/UpdateBlockStress.cpp
+++ b/src/simulation/UpdateBlockStress.cpp
@@ -133,11 +133,10 @@ SimRequest UpdateBlockStress::run(SimFramework *_sim) {
void UpdateBlockStress::nextAftershock(BlockVal &next_aftershock) {
if (sim->isRootNode() && sim->numAftershocksToProcess() > 0) {
next_aftershock.val = sim->nextAftershockTime() - sim->getYear();
- next_aftershock.block_id = UNDEFINED_ELEMENT_ID;
} else {
next_aftershock.val = DBL_MAX;
- next_aftershock.block_id = UNDEFINED_ELEMENT_ID;
}
+ next_aftershock.block_id = UNDEFINED_ELEMENT_ID;
}
/*!
More information about the CIG-COMMITS
mailing list