-
Notifications
You must be signed in to change notification settings - Fork 239
[SD-LIE] Boundary condition tools #1456
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
e47b238
to
23059c8
Compare
Please rebase to 6.0.7 before merging. |
e146e22
to
9abe8a8
Compare
namespace SmallDeformationWithLIE | ||
{ | ||
|
||
class BoundaryConditionBuilder : public ProcessLib::BoundaryConditionBuilder |
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.
Could you add a description of what is different to the ProcessLib::BoundaryConditionBuilder? ✅
Code is clean, as I've seen it. I'm just wondering if this large code duplication can be resolved different way. I didn't dig up into the details to make own suggestions |
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.
But please check if less copied code is possible with sensible amount of work.
int const variable_id, int const component_id, | ||
unsigned const global_dim, | ||
std::vector<MeshLib::Element*>&& elements, Data&& data, | ||
FractureProperty const& fracture_prop); |
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.
Is it possible to put fracture_prop
into data
? Then you probably wouldn't need to copy the GenericNaturalBoundaryCondition
.
Another way of reducing code duplication could be to define the constructor of the "original" GenericNaturalBoundaryCondition
as follows:
template <typename... Data>
GenericNaturalBoundaryCondition(...)
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.
- no,
data
is actually used to passparameters
. template <typename... Data>
cannot simply solve the issue, because this GenericNaturalBoundaryCondition also needs to passvariable_id
(which is not in the original one) to local assemblers.
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.
I see, but actually it looks like the variable_id is not used inside SmallDeformationWithLIE/BoundaryCondition/NeumannBoundaryConditionLocalAssembler.h. So can it be removed from the local assemblers? Or did I overlook something?
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.
sorry i didn't write comments there, but the variable id is necessary for multiple fractures.
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.
OK, thanks for the explanation. And thanks for the code reduction you already did.
//! \ogs_file_param{boundary_condition__type} | ||
auto const type = config.config.peekConfigParameter<std::string>("type"); | ||
|
||
if (type == "Dirichlet") |
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.
I think this part could be shared with the normal BC creation. getClonedElements()
above probably, too. ✅
I added more virtual functions the original |
👍 |
@endJunction do you have further comments? |
⏩ |
OpenGeoSys development has been moved to GitLab. |
part of #1452, follow up of #1453 and #1455
This PR adds source files under ProcessLib/SmallDeformationWithLIE/BoundaryCondition, which is aimed at providing a custom NeumannBC assembler based on
BoundaryConditionBuilder
in #1453 for displacement jump variables. Boundary integration for Neumann BCs of the variables needs to involve levelset functions.