[cig-commits] [commit] master: Descriptions of event fields (1022f40)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Wed Oct 8 17:04:59 PDT 2014
Repository : https://github.com/geodynamics/vc
On branch : master
Link : https://github.com/geodynamics/vc/compare/23464fca3efa2b6ad7ee0ce8f60c225b18b49741...e4325192ad1118379f46ba66899cb98143d09e04
>---------------------------------------------------------------
commit 1022f406bfd85122ceb5797f5a4cd40d0eb09190
Author: Eric Heien <emheien at ucdavis.edu>
Date: Wed Sep 17 21:43:41 2014 -0700
Descriptions of event fields
>---------------------------------------------------------------
1022f406bfd85122ceb5797f5a4cd40d0eb09190
src/io/EventOutput.cpp | 26 ++++++++++++++++++++++++++
src/io/EventOutput.h | 6 ++++++
2 files changed, 32 insertions(+)
diff --git a/src/io/EventOutput.cpp b/src/io/EventOutput.cpp
index 1f3d20a..1507e9f 100644
--- a/src/io/EventOutput.cpp
+++ b/src/io/EventOutput.cpp
@@ -40,6 +40,30 @@ void EventOutput::initDesc(const SimFramework *_sim) const {
sim->console() << "# Writing events in format " << sim->getEventOutfileType() << " to file " << sim->getEventOutfile() << std::endl;
}
+void EventOutput::writeEventFileHeader(void) {
+ event_outfile << "# Event number" << "\n";
+ event_outfile << "# Event year" << "\n";
+ event_outfile << "# Event trigger element ID" << "\n";
+ event_outfile << "# Event magnitude" << "\n";
+ event_outfile << "# Total initial shear stress of elements involved in event (Pascals)" << "\n";
+ event_outfile << "# Total final shear stress of elements involved in event (Pascals)" << "\n";
+ event_outfile << "# Total initial normal stress of elements involved in event (Pascals)" << "\n";
+ event_outfile << "# Total final normal stress of elements involved in event (Pascals)" << "\n";
+}
+
+void EventOutput::writeSweepFileHeader(void) {
+ sweep_outfile << "# Event number corresponding to this sweep" << "\n";
+ sweep_outfile << "# Sweep number" << "\n";
+ sweep_outfile << "# Element ID" << "\n";
+ sweep_outfile << "# Slip on element in this sweep (meters)" << "\n";
+ sweep_outfile << "# Area of element (square meters)" << "\n";
+ sweep_outfile << "# Element Lame mu parameter (Pascals)" << "\n";
+ sweep_outfile << "# Shear stress of element before sweep (Pascals)" << "\n";
+ sweep_outfile << "# Shear stress of element after sweep (Pascals)" << "\n";
+ sweep_outfile << "# Normal stress of element before sweep (Pascals)" << "\n";
+ sweep_outfile << "# Normal stress of element after sweep (Pascals)" << "\n";
+}
+
void EventOutput::init(SimFramework *_sim) {
VCSimulation *sim = static_cast<VCSimulation *>(_sim);
BlockList::const_iterator it;
@@ -67,6 +91,8 @@ void EventOutput::init(SimFramework *_sim) {
std::cerr << "ERROR: Could not open output file " << sim->getEventOutfile() << std::endl;
exit(-1);
}
+ writeEventFileHeader();
+ writeSweepFileHeader();
} else {
std::cerr << "ERROR: Unknown output file type " << sim->getEventOutfileType() << std::endl;
exit(-1);
diff --git a/src/io/EventOutput.h b/src/io/EventOutput.h
index 562b662..bd6199e 100644
--- a/src/io/EventOutput.h
+++ b/src/io/EventOutput.h
@@ -30,6 +30,10 @@
#define PAUSE_FILE_NAME "pause_vc"
+char **event_fields = { "# Event number", "# Event year", "# Event trigger element ID", "# Event magnitude", "# Total initial shear stress of elements involved in event (Pascals)", "# Total final shear stress of elements involved in event (Pascals)", "# Total initial normal stress of elements involved in event (Pascals)", "# Total final normal stress of elements involved in event (Pascals)"};
+
+char **sweep_fields = { "# Event number corresponding to this sweep", "# Sweep number", "# Element ID", "# Slip on element in this sweep (meters)", "# Area of element (square meters)", "# Element Lame mu parameter (Pascals)", "# Shear stress of element before sweep (Pascals)", "# Shear stress of element after sweep (Pascals)", "# Normal stress of element before sweep (Pascals)", "# Normal stress of element after sweep (Pascals)" };
+
/*!
Manages the HDF5 format data output for VC program.
*/
@@ -44,6 +48,8 @@ class EventOutput : public SimPlugin {
std::ofstream event_outfile, sweep_outfile;
bool pauseFileExists(void);
+ void writeEventFileHeader(void);
+ void writeSweepFileHeader(void);
public:
virtual std::string name(void) const {
More information about the CIG-COMMITS
mailing list