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
Remove code duplication in initialization of temperature and composition #1154
Merged
gassmoeller
merged 5 commits into
geodynamics:master
from
class4kayaker:one_compute_constraints
Aug 12, 2016
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
c6366ce
Remove duplication of constraint computation in initialization
class4kayaker 3cc745a
Add test for composition normalization
class4kayaker 209b56b
Remove constraint/copy duplication
class4kayaker 06e3c39
Collapse redundancies
class4kayaker a636ee7
Tidy up modification to initial_conditions.cc
class4kayaker File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# This test ensures that the Simpler material model works | ||
# with compositional fields enabled | ||
|
||
set Dimension = 2 | ||
set End time = 0 | ||
|
||
subsection Boundary temperature model | ||
set Model name = initial temperature | ||
end | ||
|
||
subsection Compositional fields | ||
set Number of fields = 2 | ||
set List of normalized fields = 0,1 | ||
end | ||
|
||
subsection Compositional initial conditions | ||
subsection Function | ||
set Function expression = 1;1 | ||
end | ||
end | ||
|
||
subsection Geometry model | ||
set Model name = box | ||
subsection Box | ||
set X extent = 1 | ||
set X repetitions = 2 | ||
set Y extent = 1 | ||
set Y repetitions = 2 | ||
end | ||
end | ||
|
||
subsection Gravity model | ||
set Model name = vertical | ||
subsection Vertical | ||
set Magnitude = 1 | ||
end | ||
end | ||
|
||
subsection Initial conditions | ||
set Model name = function | ||
subsection Function | ||
set Function expression = 1 | ||
end | ||
end | ||
|
||
subsection Material model | ||
set Model name = simple | ||
end | ||
|
||
subsection Mesh refinement | ||
set Initial adaptive refinement = 0 | ||
set Initial global refinement = 0 | ||
end | ||
|
||
subsection Model settings | ||
set Tangential velocity boundary indicators = left, right, top, bottom | ||
end | ||
|
||
subsection Postprocess | ||
set List of postprocessors = composition statistics | ||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
----------------------------------------------------------------------------- | ||
----------------------------------------------------------------------------- | ||
|
||
Number of active cells: 4 (on 1 levels) | ||
Number of degrees of freedom: 134 (50+9+25+25+25) | ||
|
||
Sum of compositional fields is not one, fields will be normalized | ||
*** Timestep 0: t=0 years | ||
Solving temperature system... 0 iterations. | ||
Solving C_1 system ... 0 iterations. | ||
Solving C_2 system ... 0 iterations. | ||
Rebuilding Stokes preconditioner... | ||
Solving Stokes system... 2+0 iterations. | ||
|
||
Postprocessing: | ||
Compositions min/max/mass: 0.5/0.5/0.5 // 0.5/0.5/0.5 | ||
|
||
Termination requested by criterion: end time | ||
|
||
|
||
+---------------------------------------------+------------+------------+ | ||
+---------------------------------+-----------+------------+------------+ | ||
+---------------------------------+-----------+------------+------------+ | ||
|
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.
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.
The tester currently only tests deal.II 8.4.0. Did you test that this changed code works with 8.5.0.pre? If you do not have a development version of deal.II I could also do that for you. Let me know.
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.
Yes, I did check that the changed code worked for 8.5.0-pre. I will check again with the most recent version of deal.II though.