-
Notifications
You must be signed in to change notification settings - Fork 249
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
[OptApp] Refactoring Implicit Filters #12186
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sunethwarna
added
Applications
Optimization
related to OptApp
C++
Python
Refactor
When code is moved or rewrote keeping the same behavior
labels
Mar 14, 2024
sunethwarna
changed the title
[OptApp] Refactoring Implciit Filters
[OptApp] Refactoring Implicit Filters
Mar 18, 2024
RezaNajian
approved these changes
Mar 20, 2024
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.
@sunethwarna thanks for the works
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Applications
C++
Optimization
related to OptApp
Python
Refactor
When code is moved or rewrote keeping the same behavior
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📝 Description
This PR refactors implicit filters in OptApp. It also adds a another "shape" filter type which automatically detects to use "general_vector" or "bulk_surface_shape" depending on the entities present in the filtering model part (Requird for the FilterFactory).
🆕 Changelog
ModelPartUtils::GenerateModelPart
to create surface helmholtz elements from the conditions. The existing python implementation was slow in adding nodes because it needs to sort the nodal container everytime it adds a node according to the ids. This implementation adds all the nodes at once in c++, so the sorting is only done once, hence faster than the master implemenation.ImplicitFilterUtils::AssignProperties
, and uses theReadMaterialUtility
from the core for the same.HelmholtzSolverBase
to make the design more pythonic, and modular.ImplicitFilterUtils::CalculateNodeNeighbourCount
and uses theExpressionUtils::ComputeNumberOfNeighbourElements
. This was duplicated in expressions, so now unifies the implementation.HelmholtzVectorSolver
now implements bare minimum, and usesConnectivityPreserveModeler
to create helmholtz elementsHelmholtzScalarSolver
now implements bare minimum, and usesConnectivityPreserveModeler
to create helmholtz elementsHelmholtzShapeSolver
which is intended to solve for the shape. (It needs to be a seperate solver as it is doing different things depending on the model part.)HelmholtzSolverBase::GetFilterType
is removed. Now there is no need to branch in theHelmhotlzAnalysis
depending on the fitler type.NUMBER_OF_SOLVERS_USING_NODES
) to detect whether the same origin model part is used by multiple filters. This is important, if we are to use implicit filters on two scalar quantity controllers on the same origin model part, then it will use the same nodes for both filters. So this new variable will tell us to apply the BCs every time or not.HelmholtzShapeSolver