Skip to content

Commit

Permalink
Added: Simplifed NonlinearDriver::solveProblem() interface.
Browse files Browse the repository at this point in the history
Changed: Default zero tolerance for dynamics simulation drivers.
  • Loading branch information
kmokstad committed Jun 8, 2024
1 parent bde9d53 commit bf54758
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Linear/DynamicSim.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class DataExporter;

int modalSim (char* infile, size_t nM, bool dumpModes, bool qstatic,
SIMoutput* model, DataExporter* exporter = nullptr,
double zero_tol = -1.0, std::streamsize outPrec = 6);
double zero_tol = 1.0e-8, std::streamsize outPrec = 6);

/*!
\brief Driver for direct simulation of linear dynamics problems.
Expand All @@ -48,6 +48,6 @@ int modalSim (char* infile, size_t nM, bool dumpModes, bool qstatic,
*/

int dynamicSim (char* infile, SIMoutput* model, bool fixDup = false,
double zero_tol = -1.0, std::streamsize outPrec = 6);
double zero_tol = 1.0e-8, std::streamsize outPrec = 6);

#endif
14 changes: 13 additions & 1 deletion NonlinearDriver.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,18 @@ class NonlinearDriver : public NonLinSIM
//! \brief Reads model data from the specified input file \a *fileName.
virtual bool read(const char* fileName);

//! \brief Invokes the main pseudo-time stepping simulation loop.
//! \param writer HDF5 results exporter
//! \param restart HDF5 restart handler
//! \param[in] zero_tol Truncate norm values smaller than this to zero
//! \param[in] outPrec Number of digits after the decimal point in norm print
int solveProblem(DataExporter* writer = nullptr,
HDF5Restart* restart = nullptr,
double zero_tol = 1.0e-8, std::streamsize outPrec = 0)
{
return this->solveProblem(writer,restart,nullptr,0,0.0,zero_tol,outPrec);
}

//! \brief Invokes the main pseudo-time stepping simulation loop.
//! \param writer HDF5 results exporter
//! \param restart HDF5 restart handler
Expand All @@ -84,7 +96,7 @@ class NonlinearDriver : public NonLinSIM
//! \param[in] outPrec Number of digits after the decimal point in norm print
int solveProblem(DataExporter* writer, HDF5Restart* restart,
utl::LogStream* oss, bool printMax, double dtDump,
double zero_tol, std::streamsize outPrec);
double zero_tol = 1.0e-8, std::streamsize outPrec = 0);

//! \brief Serialize solution state for restarting purposes.
//! \param data Container for serialized data
Expand Down

0 comments on commit bf54758

Please sign in to comment.