Conversation
|
I'd prefer the |
|
Oh, right, I'll change that! I've replaced it with |
4231be2 to
ae6d379
Compare
| ErrMsg = 'Invalid FEMMod in AssembleKM' | ||
| RETURN | ||
| ENDIF | ||
| ! for current application |
There was a problem hiding this comment.
@ebranlard Are these if-statements correct? At least the error messages may not be...
There was a problem hiding this comment.
I'm questioning because the original code allowed FEMMod 1, 2, 3 or 4.
There was a problem hiding this comment.
Yes, only 1 and 3 are implemented so far. These if statements were located in a for loop (line 688 of the old code), and as Bonnie noted, these could be put outside.
| CALL AllocAry( Ke, NNE*6, NNE*6 , 'Ke', ErrStat2, ErrMsg2); CALL SetErrStat ( ErrStat2, ErrMsg2, ErrStat, ErrMsg, 'AssembleKM' ) ! element stiffness matrix | ||
| CALL AllocAry( Me, NNE*6, NNE*6 , 'Me', ErrStat2, ErrMsg2); CALL SetErrStat ( ErrStat2, ErrMsg2, ErrStat, ErrMsg, 'AssembleKM' ) ! element mass matrix | ||
| CALL AllocAry( FGe, NNE*6, 'FGe', ErrStat2, ErrMsg2); CALL SetErrStat ( ErrStat2, ErrMsg2, ErrStat, ErrMsg, 'AssembleKM' ) ! element gravity force vector | ||
| CALL AllocAry( nn, NNE, 'nn', ErrStat2, ErrMsg2); CALL SetErrStat ( ErrStat2, ErrMsg2, ErrStat, ErrMsg, 'AssembleKM' ) ! node number in element array |
There was a problem hiding this comment.
nn is used later but not allocated. Is this ok?
There was a problem hiding this comment.
I allocated it line 484 of the new code. A lot of the code assumes that the number of nodes is 2, and I don't think we'll support higher number of nodes anytime soon. In fact I'll likely have to get rid of this variable in the next implementation.
rafmudaf
left a comment
There was a problem hiding this comment.
I've looked over all changes and everything looks good to me. @ebranlard Thanks a lot!
|
What do you think about replacing all older Fortran number comparisons (i.e. |
|
Sounds reasonable to me to change the |
|
@andrew-platt I was thinking just in SubDyn since so many formatting changes are already here |
|
I've changed these signs in my recent commit. |
|
The SubDyn related tests pass on Eagle: |
Complete this sentence
THIS PULL REQUEST IS READY TO MERGE
Feature or improvement description
Removed about 1500 lines in two of the main SubDyn files, for code readability. I'll be working on a important re-write of the
SubDynmodule, so I'd like to commit this before I start doing updates to the code.Most of the lines removed were gained from using a more concise error handling (see #272), and gathering copy-pasted calls into "contained"subroutines at the end. The input file routine for instance is significantly more condensed and readable. Note that I usually use the concise error handling on parts of the code that are only called "once", to limit additional overhead.
Automated test results
I've run 5 different SubDyn test cases. Hopefully the regression test will capture that as well.
Below is an example of the subfunctions I usually introduce at the end of a routine