From 2af32767368b148d4572cc19b8265493d8cfcfbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabricio=20Fern=C3=A1ndez?= Date: Wed, 16 Oct 2024 16:30:48 -0300 Subject: [PATCH] adding header in base_acceleration example --- inc/Loads.h | 14 +++++++++++++- src/Loads.cpp | 5 +++-- tests/seismic-load/base_acceleration.csv | 1 + 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/inc/Loads.h b/inc/Loads.h index cba9f1f..f776c38 100644 --- a/inc/Loads.h +++ b/inc/Loads.h @@ -80,7 +80,10 @@ namespace Loads { } }; - // TODO doxygen + /** + * @brief Seismic data structure to manage acceleration and velocity of an earthquake record. + * + */ struct SeismicData { std::vector time; @@ -88,8 +91,17 @@ namespace Loads { std::vector velocity; }; + /** + * @brief Set the Seismic Data object + * + */ void setSeismicData(); + /** + * @brief Get the Seismic Data object + * + * @return SeismicData& + */ SeismicData& getSeismicData(); /// \brief Configures the gravity load in particles diff --git a/src/Loads.cpp b/src/Loads.cpp index ae59e38..d21e300 100644 --- a/src/Loads.cpp +++ b/src/Loads.cpp @@ -242,6 +242,7 @@ void Loads::setSeismicData() { if(!ModelSetup::getSeismicAnalysis()) return; - // set seismic data - seismicRecord = Input::readSeismicData(ModelSetup::getSeismicFileName(),false); + bool has_header = true; + + seismicRecord = Input::readSeismicData(ModelSetup::getSeismicFileName(), has_header); } \ No newline at end of file diff --git a/tests/seismic-load/base_acceleration.csv b/tests/seismic-load/base_acceleration.csv index d6eca93..68781fd 100644 --- a/tests/seismic-load/base_acceleration.csv +++ b/tests/seismic-load/base_acceleration.csv @@ -1,3 +1,4 @@ +t,ax,ay,az,vx,vy,vz 0.0,0.1,0.0,0.0,0.0,0.0,0.0 0.01,0.09999500004166653,0.0,0.0,0.0009999833334166665,0.0,0.0 0.02,0.09998000066665778,0.0,0.0,0.0019998666693333083,0.0,0.0