Skip to content

Commit

Permalink
adding header in base_acceleration example
Browse files Browse the repository at this point in the history
  • Loading branch information
fabricix committed Oct 16, 2024
1 parent 8622e45 commit 2af3276
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
14 changes: 13 additions & 1 deletion inc/Loads.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,28 @@ namespace Loads {
}
};

// TODO doxygen
/**
* @brief Seismic data structure to manage acceleration and velocity of an earthquake record.
*
*/
struct SeismicData
{
std::vector<double> time;
std::vector<Eigen::Vector3d> acceleration;
std::vector<Eigen::Vector3d> 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
Expand Down
5 changes: 3 additions & 2 deletions src/Loads.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
1 change: 1 addition & 0 deletions tests/seismic-load/base_acceleration.csv
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 2af3276

Please sign in to comment.