-
Notifications
You must be signed in to change notification settings - Fork 184
included readCAPYTAINE() argument to explicitly define KH.dat & Hydro… #962
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
akeeste
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @dav-og
Can you describe the use case here? Typically these files would save to the same directory as the output structure. Also, does this change fit Capytaine's new internal hydrostatics? I haven't run Capytaine since hydrostatics was included, so I'm not sure if that output format has changed at all
Use case is you can have your hydrostatics files saved in a separate location now (if you want to). This is handy for organizing data on a project I'm currently working on that has a lot of floating bodies. |
| [base_dir, name, ~] = fileparts(filename); | ||
|
|
||
| if(~isempty(hydrostatics_sub_dir)) | ||
| hydrostatics_dir = append(base_dir, hydrostatics_sub_dir); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last thought, can you add to the logic here so that user's old BEMIO scripts can function without the hydrostatics_sub_dir argument? Maybe something like if exist('hydrostatics_sub_dir','var') & ~isempty(hydrostatics_sub_dir). I believe that should allow users to not input the directory, but the single '&' should not break the second condition if the variable doesn't exist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure 👍
|
@dav-og That makes sense, seems like a benefit to allow this for cases with many floating bodies. Last request, can you update the logic to make it backwards compatible with no sub directory input? This will only be an easy work around until other arguments are added to Adam |
|
Thanks for the update! Approved and I will merge if there's nothing else. |
|
Thanks @akeeste for pointing out the backwards compatibility. For the future, I think we could introduce a 'config' argument, that will be a structure for all bemio settings. |
|
@salhus Agreed. I'd like to do this for the plotting functions too. I made a project card for Q2 to address this topic https://github.com/WEC-Sim/WEC-Sim/projects/58#card-86577803 |
…statics.dat locations