Skip to content

Conversation

@jtgrasb
Copy link
Contributor

@jtgrasb jtgrasb commented Mar 9, 2022

In this PR, I’ve implemented warning and error flags that seek to provide more feedback to the user regarding common errors and issues. The following flags/messages have been implemented into wecSim as part of this PR:

  • Argument checks were placed in some functions (such as plotResponse, plotForces, etc) of the response and wave classes to provide context on the expected function inputs.
  • Properties within the simulation and wave class were given more specific requirements (such as requiring a positive timestep value).
  • Error message when non-hydro bodies are specified before hydro in the wecSimInputFile
  • Warning message when waves.waterDepth is defined and there is an .h5 file present
  • Error message when waveSpread does not sum to 1
  • Error when the name or filename is not specified in the body, constraint, pto, cable, mooring, and ptoSim classes, which indicates to the user that the objects have likely been defined in the wrong order.
  • Error messages when necessary parameters (such as cg and cb) are not defined for bodies based on type (hydro, non-hydro, etc)
  • Warning messages when extra parameters specified that don’t affect result (such as cg and cb for hydro body)
  • Warning message for STL greater than half the size of the domain and error message for when it is greater than the domain size
  • Warning for noWaveCIC case that waves.T is not used
  • Errors and warning messages for parameters needed for each wave type
  • Warning message when simu.dtOut < simu.dt

I am working on more warning and error flags, but wanted to get a PR started here so that it can start to be reviewed.

@jtgrasb jtgrasb marked this pull request as draft March 9, 2022 14:59
@jtgrasb jtgrasb changed the title Warning/Error flags DRAFT: Warning/Error flags Mar 9, 2022
@kmruehl
Copy link
Collaborator

kmruehl commented Mar 10, 2022

@jtgrasb thanks for getting start on this. Since we merged #803 there are some merge conflicts with your PR. Can you pull dev into your branch and resolve these merge conflicts? Thank you!

@kmruehl kmruehl added the SCM source code mangagement and warnings label Mar 11, 2022
@jtgrasb
Copy link
Contributor Author

jtgrasb commented Mar 11, 2022

@kmruehl Okay, I unfortunately don't have the time to do it today, but I will plan to have it merged and conflicts resolved by monday.

@kmruehl
Copy link
Collaborator

kmruehl commented Mar 11, 2022

@jtgrasb I'm actively working on #822, an extension of #803, and it will likely affect some of these warnings. For now, just focus on resolving conflicts with dev, but I wanted to let you know that dev will be changing more very soon. You can refer to the comments in #822 to see all the properties that have been changed.

@jtgrasb jtgrasb merged commit 8403a8d into WEC-Sim:dev Mar 14, 2022
@kmruehl
Copy link
Collaborator

kmruehl commented Mar 14, 2022

@jtgrasb did you mean to merge this into dev?

@jtgrasb
Copy link
Contributor Author

jtgrasb commented Mar 14, 2022

No, I was trying to pull dev into my branch and made a mistake. Just created a PR to revert these changes. @kmruehl

@jtgrasb
Copy link
Contributor Author

jtgrasb commented Mar 14, 2022

@kmruehl It should be reverted now. Sorry about that!

@jtgrasb jtgrasb mentioned this pull request Mar 14, 2022
@kmruehl
Copy link
Collaborator

kmruehl commented Mar 14, 2022

@jtgrasb it's okay, we've all done it before. Let me know if it happens in the future because I can overwrite commits (instead of submitting a PR to revert them). I'm actually going to do that to the repo now to clean it up a bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

SCM source code mangagement and warnings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants