Skip to content

Commit

Permalink
reverted from std::isnan to isnan
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmaxwilson committed Dec 8, 2017
1 parent 757d36f commit 732b55e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/simulation/RunEvent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ void RunEvent::processStaticFailure(Simulation *sim) {
//
// yoder: as per request by KS, change std::isnan() --> std::isnan(); std::isnan() appears to throw an error on some platforms.
// Eric: Probably don't need this if check
if (std::isnan(s_it->_shear_final) and std::isnan(s_it->_normal_final)) {
if (isnan(s_it->_shear_final) and isnan(s_it->_normal_final)) {
// note: the stress entries are initialized with nan values, but if there are cases where non nan values need to be updated,
// this logic should be revisited.
event_sweeps.setFinalStresses(sweep_num,
Expand Down
4 changes: 2 additions & 2 deletions src/simulation/SanityCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ bool SanityCheck::assertCFFValueCorrectness(Simulation *sim) {
gid = sim->getGlobalBID(lid);
double val = sim->getCFF(gid);

if (std::isnan(val) || fabs(val) > 1e20) {
if (isnan(val) || fabs(val) > 1e20) {
failed_cffs.push_back(std::make_pair(gid, val));
failed = true;
}
Expand All @@ -53,7 +53,7 @@ bool SanityCheck::assertUpdateFieldCorrectness(Simulation *sim) {
gid = sim->getGlobalBID(lid);
double val = sim->getUpdateField(gid);

if (std::isnan(val) || fabs(val) > 1e20) {
if (isnan(val) || fabs(val) > 1e20) {
failed_update_fields.push_back(std::make_pair(gid, val));
failed = true;
}
Expand Down
2 changes: 1 addition & 1 deletion src/simulation/UpdateBlockStress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ void UpdateBlockStress::init(SimFramework *_sim) {
// And update the slip deficit on each process to take this into account
for (gid=0; gid<sim->numGlobalBlocks(); ++gid) {
// If we haven't loaded slip deficits, updateField is NaN so set slip deficit to zero in that case
sim->setSlipDeficit(gid, std::isnan(sim->getUpdateField(gid)) ? 0.0 : sim->getUpdateField(gid));
sim->setSlipDeficit(gid, isnan(sim->getUpdateField(gid)) ? 0.0 : sim->getUpdateField(gid));
//std::cout << gid << " slip deficit: " << sim->getSlipDeficit(gid) << std::endl;
}

Expand Down

0 comments on commit 732b55e

Please sign in to comment.