Skip to content

Conversation

@akeeste
Copy link
Contributor

@akeeste akeeste commented Mar 22, 2022

This PR addresses some refactoring items, namely updates the setAccess and getAccess of various class properties based on how they are used. Some setX() methods are added so that properties can be private-public while still set in initializeWecSim

  • make number properties private-public.
  • Add setNumber() methods so that number properties can still be set in initializeWecSim
  • Remove mooring.orientation as it is not used anywhere. Note, this is not used in the same way as the other classes
  • move waves.type to private-public. typeNum is set privately and only in the class constructor so type must be set through the constructor as well
  • body.geometry, body.h5File to private-public and update the docstring so that the API pulls the full description
  • body.dofCoupled, body.total to private-public and defined in a body.setup() method
  • remove body.hydroTotal, not used
  • body.massCalcMethod to private-public and removed from initializeWecSim line 149. This should not be called there
  • simu.cicTime, simu.cicLength, simu.caseFile, simu.date, simu.gitCommit, simu.maxIt, simu.outputDir, simu.wsVersion to private-public, not used outside of the simulationClass
  • remove simu.inputFile, simu.logFile, not used

@akeeste akeeste added the SCM source code mangagement and warnings label Mar 22, 2022
@kmruehl
Copy link
Collaborator

kmruehl commented Mar 23, 2022

@akeeste can you submit this PR this into my fork so that it's included in PR into #832? Thank you

Copy link
Collaborator

@kmruehl kmruehl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @akeeste, this looks good, but please put it into my fork so we have the last refactoring revisions in one place.

Copy link
Collaborator

@kmruehl kmruehl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments

@kmruehl
Copy link
Collaborator

kmruehl commented Mar 23, 2022

@akeeste it looks like there are some conflicts with dev now, please resolve. I'm also going to resolve them on my branch

@kmruehl
Copy link
Collaborator

kmruehl commented Mar 24, 2022

@akeeste tests are failing due to waves.checkinputs();, the error says this method doesn't exist. Any ideas?

 Error occurred while setting up or tearing down regressionTest.
  As a result, all regressionTest tests failed and did not run to completion.
      ---------
      Error ID:
      ---------
      'MATLAB:noSuchMethodOrField'
      --------------
      Error Details:
      --------------
      Unrecognized method, property, or field 'checkinputs' for class 'waveClass'.
      
      Error in initializeWecSim (line 93)
      waves.checkinputs();
      
      Error in run (line 91)
      evalin('caller', strcat(script, ';'));
      
      Error in wecSim (line 44)
      run('initializeWecSim');
      
      Error in runLoadRegular (line 25)
      wecSim;                     % Run Simulation

@kmruehl
Copy link
Collaborator

kmruehl commented Mar 24, 2022

@akeeste I think it's a case issue, checkInputs() not checkinputs()

Copy link
Collaborator

@kmruehl kmruehl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@akeeste I'm going to go ahead and merge this into dev

@kmruehl kmruehl merged commit 1636f94 into WEC-Sim:dev Mar 25, 2022
@akeeste akeeste deleted the updateGetSetAccess branch March 25, 2022 13:36
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