-
-
Notifications
You must be signed in to change notification settings - Fork 91
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
Refactor Force based data sets #148
Conversation
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.
Looking at the code, I like this refactoring. 👍
- Before we had
Force
andStress : public Force
. - Now we have a
ForceBase
with most functionality, andForce
andStress
essentially changing the normal vectors they are using, overriding the following virtual function:
Foam::vectorField getFaceVectors(const unsigned int patchID) const override;
In the case of Force:
// Normal vectors multiplied by face area
return mesh_.boundary()[patchID].Sf();
In the case of Stress:
return mesh_.boundary()[patchID].nf();
This PR removes more code than adds, so this is highly encouraging! I have not tried to build or test the code, but if you already checked 1-2 cases, it should be fine.
Yes. Considering that there is now more 'c++ structure' code, it removes even more code tom maintain than shown in the overview. Let me address your comment and check the result again. |
692ef0d
to
c2b0f52
Compare
I took the opportunity to clean-up the Force based data classes and split the common functionality in a base class. The PR reverts a crime introduced in #134 and partially #125, reduces code duplication and makes the whole data set much easier to maintain. Closes #139.
I hope we can run the tests on this PR.