Skip to content

Commit

Permalink
Merge branch 'develop' into feb4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveMaas1978 committed Mar 27, 2023
2 parents 17ae329 + cf21eb1 commit 8620c4b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
7 changes: 7 additions & 0 deletions FECore/FEModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1651,6 +1651,13 @@ void FEModel::SetPrintParametersFlag(bool b)
m_imp->m_printParams = b;
}

//-----------------------------------------------------------------------------
//! Get the print parameter flag
bool FEModel::GetPrintParametersFlag() const
{
return m_imp->m_printParams;
}

//-----------------------------------------------------------------------------
bool FEModel::EvaluateLoadParameters()
{
Expand Down
3 changes: 3 additions & 0 deletions FECore/FEModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,9 @@ class FECORE_API FEModel : public FECoreBase, public CallbackHandler
//! Set the print parameters flag
void SetPrintParametersFlag(bool b);

//! Get the print parameter flag
bool GetPrintParametersFlag() const;

public: // --- Miscellaneous routines ---

//! call the callback function
Expand Down
11 changes: 7 additions & 4 deletions FECore/FEPIDController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,13 @@ double FEPIDController::GetValue(double time)
m_prev = error;
m_prevTime = time;

feLog("PID controller %d:\n", GetID());
feLog("\tparameter = %lg\n", val);
feLog("\terror = %lg\n", error);
feLog("\tvalue = %lg\n", newVal);
if (GetFEModel()->GetPrintParametersFlag())
{
feLog("PID controller %d:\n", GetID());
feLog("\tparameter = %lg\n", val);
feLog("\terror = %lg\n", error);
feLog("\tvalue = %lg\n", newVal);
}

return newVal;
}

0 comments on commit 8620c4b

Please sign in to comment.