-
Notifications
You must be signed in to change notification settings - Fork 107
Add preliminary BoxLib based backend. #438
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
Open
memmett
wants to merge
19
commits into
clawpack:master
Choose a base branch
from
memmett:boxlib
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 14 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
769464b
Add BoxClaw.
b2de466
BoxClaw: Fix rollaxis for multi-dimensions, tidy and add get_auxbc_fr…
91217e6
BoxClaw: Add 'multifab' write routine.
d2aa5ad
BoxClaw: Add 'use_boxlib' arguments.
f5cd753
Merge branch 'master' of github.com:clawpack/pyclaw into boxlib-merge
2348d04
Check for 'multifab' in format_list in Solution.write.
aa7aaf6
Add 'use_boxlib' to acoustics_3d example.
31699ae
BoxClaw: Fix lower/upper bounds of patches.
37a7d59
BoxClaw: Add logging to geometry module. Don't let patches be deepco…
d558d19
BoxClaw: Fix Header in boxclaw.io.write so that VisIt works.
da0687c
BoxClaw: Add README and tidy up a bit.
d64ec40
BoxClaw: Tidy (remove commented block).
aa50fcd
BoxClaw: Fix domain decomposition logic in 1D.
df096d2
Merge branch 'upstream' into boxlib-merge2
309fe78
boxlib: Revert whitespace changes and rename README to README.rst.
d13de03
boxlib: Revert whitespace changes in solution.py.
2fbf81e
boxlib: Add BoxClaw regressions tests for acoustics_1d_homogeneous an…
414250e
Merge branch 'master' of git://github.com/clawpack/pyclaw into boxlib…
a45d61a
BoxClaw: Finish move to Fortran based BoxLib.
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,17 @@ | ||
|
|
||
| BoxLib backend for PyClaw | ||
| ========================= | ||
|
|
||
| This backend uses the C++ version of the CCSE BoxLib_ library. To | ||
| install BoxLib, `download BoxLib`_ and | ||
|
|
||
| .. code-block:: sh | ||
|
|
||
| cd BoxLib/Src/Python | ||
| python setup.py build | ||
| python setup.py install | ||
|
|
||
|
|
||
| .. _BoxLib: https://ccse.lbl.gov/BoxLib/index.html | ||
| .. _`download BoxLib`: https://ccse.lbl.gov/Downloads/downloadBoxLib.html | ||
|
|
||
This file contains hidden or 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,37 @@ | ||
| """Main boxclaw package""" | ||
|
|
||
| import os | ||
| import logging, logging.config | ||
|
|
||
| # Default logging configuration file | ||
| _DEFAULT_LOG_CONFIG_PATH = os.path.join(os.path.dirname(__file__),'log.config') | ||
| del os | ||
|
|
||
| # Setup loggers | ||
| logging.config.fileConfig(_DEFAULT_LOG_CONFIG_PATH) | ||
|
|
||
| __all__ = [] | ||
|
|
||
| # Module imports | ||
| __all__.extend(['Controller','Dimension','Patch','Domain','Solution','State','CFL','riemann']) | ||
| from .controller import Controller | ||
| from clawpack.boxclaw.geometry import Patch, Domain | ||
| from clawpack.pyclaw.geometry import Dimension | ||
| from .solution import Solution | ||
| from .state import State | ||
| from .cfl import CFL | ||
|
|
||
| __all__.extend(['ClawSolver1D','ClawSolver2D','ClawSolver3D','SharpClawSolver1D','SharpClawSolver2D','SharpClawSolver3D']) | ||
| from .classic.solver import ClawSolver1D,ClawSolver2D,ClawSolver3D | ||
| from .sharpclaw.solver import SharpClawSolver1D,SharpClawSolver2D,SharpClawSolver3D | ||
|
|
||
| __all__.append('BC') | ||
| from clawpack.pyclaw.solver import BC | ||
|
|
||
| # Sub-packages | ||
| import limiters | ||
| from limiters import * | ||
| __all__.extend(limiters.__all__) | ||
|
|
||
| import plot | ||
| __all__.append('plot') |
This file contains hidden or 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,32 @@ | ||
|
|
||
| class CFL(object): | ||
| """Parallel CFL object, responsible for computing the | ||
| Courant-Friedrichs-Lewy condition across all processes. | ||
| """ | ||
|
|
||
| def __init__(self, global_max): | ||
| self._local_max = global_max | ||
| self._global_max = global_max | ||
|
|
||
| def get_global_max(self): | ||
| r""" | ||
| Compute the maximum CFL number over all processes for the current step. | ||
|
|
||
| This is used to determine whether the CFL condition was | ||
| violated and adjust the timestep. | ||
| """ | ||
| import boxlib | ||
| self._reduce_vec.array = self._local_max | ||
| self._global_max = boxlib.bl[0].ReduceRealMax(self._local_max) | ||
| return self._global_max | ||
|
|
||
| def get_cached_max(self): | ||
| return self._global_max | ||
|
|
||
| def set_local_max(self,new_local_max): | ||
| self._local_max = new_local_max | ||
|
|
||
| def update_global_max(self,new_local_max): | ||
| import boxlib | ||
| self._global_max = boxlib.bl[0].ReduceRealMax(new_local_max) | ||
|
|
Empty file.
This file contains hidden or 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,10 @@ | ||
| #!/usr/bin/env python | ||
|
|
||
| def configuration(parent_package='',top_path=None): | ||
| from numpy.distutils.misc_util import Configuration | ||
| config = Configuration('classic', parent_package, top_path) | ||
| return config | ||
|
|
||
| if __name__ == '__main__': | ||
| from numpy.distutils.core import setup | ||
| setup(**configuration(top_path='').todict()) |
Oops, something went wrong.
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.
I think if you rename boxclaw/README to boxclaw/README.rst, Github will render it for you.