Skip to content
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

Add domain of definition for parameters. #2376

Merged
merged 12 commits into from
Mar 1, 2019

Conversation

endJunction
Copy link
Member

Previously, all of the parameters were implicitly defined on the bulk mesh. This lead to such artefacts like 'NonuniformXBoundaryConditions', for example. In this PR a possibility to explicitly define the mesh of a parameter is presented. The non-uniform boundary conditions are herewith no longer needed, because the parameters know the mesh.

Fixes an error if a 'Function' parameter is used on a boundary.

@codecov
Copy link

codecov bot commented Feb 22, 2019

Codecov Report

Merging #2376 into master will decrease coverage by 0.06%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2376      +/-   ##
==========================================
- Coverage   32.75%   32.69%   -0.07%     
==========================================
  Files         528      528              
  Lines       19929    19917      -12     
  Branches     9318     9348      +30     
==========================================
- Hits         6528     6511      -17     
+ Misses      10084    10056      -28     
- Partials     3317     3350      +33
Impacted Files Coverage Δ
Applications/DataHolderLib/BoundaryCondition.h 0% <ø> (ø) ⬆️
Applications/DataHolderLib/BoundaryCondition.cpp 0% <ø> (ø) ⬆️
MeshLib/Mesh.h 39.65% <0%> (-2.94%) ⬇️
MathLib/Vector3.cpp 33.33% <0%> (-33.34%) ⬇️
MeshLib/CoordinateSystem.cpp 42.85% <0%> (-14.29%) ⬇️
GeoLib/SimplePolygonTree.cpp 61.9% <0%> (-4.77%) ⬇️
GeoLib/AnalyticalGeometry-impl.h 71.31% <0%> (-4.1%) ⬇️
...eStepping/Algorithms/EvolutionaryPIDcontroller.cpp 68.18% <0%> (-3.04%) ⬇️
...ng/Algorithms/IterationNumberBasedTimeStepping.cpp 76.74% <0%> (-2.33%) ⬇️
MeshLib/MeshSurfaceExtraction.cpp 30.46% <0%> (-1.33%) ⬇️
... and 11 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a1a5b47...7bd4c73. Read the comment docs.

@endJunction endJunction force-pushed the ParameterDomainOfDefinition branch 3 times, most recently from 8592b0f to bc11b39 Compare February 24, 2019 19:04
for (int i = 0; i < static_cast<int>(GlobalDim); ++i)
N_u.template block<1, displacement_size / GlobalDim>(
i, i * displacement_size / GlobalDim)
.noalias() = N;
Copy link
Member

@TomFischer TomFischer Feb 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curly brackets for the for-loop-body are missing. ✔️

SpatialPosition pos;
pos.setElementID(id);
typename Base::NodalVectorType alpha =
_data.alpha.getNodalValuesOnElement(Base::_element, t);
Copy link
Member

@TomFischer TomFischer Feb 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can alpha be const? ✔️

pos.setElementID(id);
typename Base::NodalVectorType alpha =
_data.alpha.getNodalValuesOnElement(Base::_element, t);
typename Base::NodalVectorType u_0 =
Copy link
Member

@TomFischer TomFischer Feb 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can u_0 be const? ✔️

Copy link
Member

@TomFischer TomFischer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice refactoring!

@endJunction
Copy link
Member Author

I'd like to merge it if there are no further issues.

@endJunction endJunction force-pushed the ParameterDomainOfDefinition branch 2 times, most recently from 11a0061 to 3f558cb Compare February 28, 2019 18:00
@hydromarc
Copy link

@endJunction is this the PR you mentioned which enables use of functions in the prj file?
Is this compatible with Python BCs?

@hydromarc
Copy link

I think you have missed to change some prj files, eg with the tag '''NonuniformVariableDependentNeumann'''

@endJunction
Copy link
Member Author

endJunction commented Feb 28, 2019

This PR fixes a bug when parameters of types Functions are used on boundaries.
Python and Function parameters are independent of each other.

@WaltherM Do you have specific file names at hand, 'cas I didn't find anything?
The mentioned VariableDependentNeumann BC is tested in single ctest Tests/Data/Parabolic/ComponentTransport/VariableNeumannBoundary/vdbc_input.prj, which is updated.

@endJunction
Copy link
Member Author

endJunction commented Feb 28, 2019

One more update/rebase. I forgot to fix the petsc cases. And a documentation file....

@hydromarc
Copy link

This PR fixes a bug when parameters of types Functions are used on boundaries.
Python and Function parameters are independent of each other.

Ok.

@WaltherM Do you have specific file names at hand, 'cas I didn't find anything?
The mentioned VariableDependentNeumann BC is tested in single ctest Tests/Data/Parabolic/ComponentTransport/VariableNeumannBoundary/vdbc_input.prj, which is updated.

Correct - sorry, I oversaw the update of this file.

@endJunction endJunction merged commit de33efd into ufz:master Mar 1, 2019
@endJunction endJunction deleted the ParameterDomainOfDefinition branch March 1, 2019 12:07
@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