8000 [SD-LIE] Boundary condition tools by norihiro-w · Pull Request #1456 · ufz/ogs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[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

Merged
merged 6 commits into from
Oct 17, 2016
Merged

Conversation

norihiro-w
Copy link
Collaborator
@norihiro-w norihiro-w commented Sep 29, 2016

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.

@endJunction
Copy link
Member

Please rebase to 6.0.7 before merging.

@norihiro-w norihiro-w force-pushed the sd-lie-bc branch 6 times, most recently from e146e22 to 9abe8a8 Compare October 13, 2016 12:15
namespace SmallDeformationWithLIE
{

class BoundaryConditionBuilder : public ProcessLib::BoundaryConditionBuilder
Copy link
Member
@endJunction endJunction Oct 14, 2016

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? ✅

@endJunction
Copy link
Member

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

Copy link
Collaborator
@chleh chleh left a 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);
Copy link
Collaborator

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(...)

Copy link
Collaborator Author

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 pass parameters.
  • template <typename... Data> cannot simply solve the issue, because this GenericNaturalBoundaryCondition also needs to pass variable_id (which is not in the original one) to local assemblers.

Copy link
Collaborator

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?

Copy link
Collaborator Author

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.

Copy link
Collaborator

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")
Copy link
Collaborator
@chleh chleh Oct 14, 2016

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. ✅

@norihiro-w
Copy link
Collaborator Author

I added more virtual functions the original BoundaryConditionBuilder class to reduce duplicated codes in the derived.

@chleh
Copy link
Collaborator
chleh commented Oct 17, 2016

👍

@norihiro-w
Copy link
Collaborator Author

@endJunction do you have further comments?

@endJunction
Copy link
Member

@norihiro-w norihiro-w merged commit 2ae83c4 into ufz:master Oct 17, 2016
@norihiro-w norihiro-w deleted the sd-lie-bc branch October 17, 2016 10:19
@ogsbot
Copy link
Member
ogsbot commented Jun 19, 2020

OpenGeoSys development has been moved to GitLab.

See this pull request on GitLab.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0