-
Notifications
You must be signed in to change notification settings - Fork 10
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
Development #207
Merged
Merged
Development #207
Conversation
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
…g. These are in place now and I am going back to try to get the tests and notebooks working again.
Add a action to build and push a docker to dockerhub
invalid tag name fix
Setting docker build on VEP branch only
Add a action to build and push a docker to dockerhub: `julesg/underworld3:VEP-preliminary-implementation` .
Fix cython version to <3.0
1. Added a pytest with a pic sensitive stokes solve. 2. Merged in non-breaking changes from the Mask2Matrix branch. Still mask variables are NOT a matrix as discussed.
Re-write estimate_dt to remove divide by 0 error
Re-write estimate_dt to remove divide by 0 error
…mode matches jupyter
…nderworldcode/underworld3 into VEP-preliminary-implementation
…s to be a D/DT module.
…nderworldcode/underworld3 into VEP-preliminary-implementation
* Fixes for swarm substepping * Checking * Monitor 1 * breaking in numpy - check that instead * typo * Odd * interaction between swarm.access and swarm.dm.getLocalSize() * IndexError also possible ... * typo - fix
…h probably broke all the NS and AD benchmarks. Suggest we add a test for this based on the 1D adv-diffusion solver example which finally picked up the problem.
…ted (they are currently not imported at all).
changed jupyter_backend to trame
All conditions are now turned into a list before conversion. Modifying test to test the conversion code.
conda recipe updates
Updating the interpolation routines. These c functions are direct copies of the petsc routines DMInterpolation_SetUp and DMInterpolation_Evaluate, only with owning_cell information provided and used. Until petsc can optionally use 'owning_cells' we will have to manually update the c code like this commit.
* importing underworld3.mpi earlier on to avoid circular imports * Only get the communicator via underworld3.mpi.comm
fix pyvista issue in binder, check whether it is running in binder or not
* Add uw_constants functionality (available, but not covered in tests, plugged into jit compiler and function evaluation) * uw_constants: make recursive so we can nest constants in other constants correctly. Also works for nests of functions, constants etc, so perhaps this is really a sub-expression class not a constant class. Fix typo (substitute) * renaming to 'expressions' and providing capacity to substitute all or just one expression. ViscousFlow and ViscoPlastic are converted over. VEP not yet * Converting the solvers so f0, F1 are supplied as properties and any side effects are handled there (e.g. loading RHS for associated projection solvers). This simplifies the flow and make f0, F1 available before solve time so these can be checked by the user beforehand. All tests passing (not all at once, unfortunately) * Tidy up before merging * Surface integral tests should go back in * Fixing up Viscoelasticity using expressions. Need to add meaningful tests. No word on whether VEP produces proper Jacobians or if we need to use a smooth version of Min()/Max() * Managing differentiation of quantities with expressions. Ideally we intercept sympy.diff and make substitutions for non-constant expressions first (sympy sees all the symbols as constants). Not trivial because of sympy's approach to cloning objects. * Fixes for VEP - DDt / functions. Better type-checking in expressions. Update object viewer for meshvariables (so it is actually helpful) * Updates to fix sympy and caching issues * Fixes for problems in Navier-Stokes * Caching mechanism for JIT needs to expand expressions to see if their content has been updated (esp for things like timestep) * Not sure u.degree - 1 or just 1 for the interpolation degree of the flux field terms. * Implement penalty term in NS (go inheritence, go !!) * Fix read_timestep function for discontinuous variables. * Free surface (or ALE) models. The mesh-coordinate changes now reset the relevant parts of solvers * New BC interface: add_bc() (#195) Unifying the two BC functions add_dirichlet and add_natural. + The single add_condition() function is much easier to maintain. + Improvements in the handling of what 'conds' can be was also made. def add_condition(self, f_id, c_type, conds, label, components=None): """ Add a dirichlet or neumann condition to the mesh. This function prepares UW data to use PetscDSAddBoundary(). Parameters ---------- f_id: int Index of the solver's field (equation) to apply the condition. c_type: string BC type. Either dirichlet (essential) or neumann (natural) conditions. conds: array_like of floats or a sympy.Matrix eg. For a 3D model with an unconstraint x component: (None, 5, 1.2) or sympy.Matrix([sympy.oo, 5, 1.2]) label: string The label name to apply the BC. To find a label/boundary name run something like mesh.view() components: array_like, single int value or None. (optional) tuple, or int of active conds components to use. Use 'None' for all conds to be used. If 'None' and components in 'cond' equal sympy.oo or -sympy.oo those components won't be used. eg. For the 3D example cond = (2, 5, 1.2), components = (1,2) the x components is ignored and uncontrainted. """ * Cleaning up the warning messages from the tests. re: no longer needing 'components' * Adding some info on testing --------- Co-authored-by: Julian Giordani <julesghub@users.noreply.github.com> Co-authored-by: Julian Giordani <house.of.jules@gmail.com>
* Add uw_constants functionality (available, but not covered in tests, plugged into jit compiler and function evaluation) * uw_constants: make recursive so we can nest constants in other constants correctly. Also works for nests of functions, constants etc, so perhaps this is really a sub-expression class not a constant class. Fix typo (substitute) * renaming to 'expressions' and providing capacity to substitute all or just one expression. ViscousFlow and ViscoPlastic are converted over. VEP not yet * Converting the solvers so f0, F1 are supplied as properties and any side effects are handled there (e.g. loading RHS for associated projection solvers). This simplifies the flow and make f0, F1 available before solve time so these can be checked by the user beforehand. All tests passing (not all at once, unfortunately) * Tidy up before merging * Surface integral tests should go back in * Fixing up Viscoelasticity using expressions. Need to add meaningful tests. No word on whether VEP produces proper Jacobians or if we need to use a smooth version of Min()/Max() * Managing differentiation of quantities with expressions. Ideally we intercept sympy.diff and make substitutions for non-constant expressions first (sympy sees all the symbols as constants). Not trivial because of sympy's approach to cloning objects. * Fixes for VEP - DDt / functions. Better type-checking in expressions. Update object viewer for meshvariables (so it is actually helpful) * Updates to fix sympy and caching issues * Fixes for problems in Navier-Stokes * Caching mechanism for JIT needs to expand expressions to see if their content has been updated (esp for things like timestep) * Not sure u.degree - 1 or just 1 for the interpolation degree of the flux field terms. * Implement penalty term in NS (go inheritence, go !!) * Fix read_timestep function for discontinuous variables. * Free surface (or ALE) models. The mesh-coordinate changes now reset the relevant parts of solvers * New BC interface: add_bc() (#195) Unifying the two BC functions add_dirichlet and add_natural. + The single add_condition() function is much easier to maintain. + Improvements in the handling of what 'conds' can be was also made. def add_condition(self, f_id, c_type, conds, label, components=None): """ Add a dirichlet or neumann condition to the mesh. This function prepares UW data to use PetscDSAddBoundary(). Parameters ---------- f_id: int Index of the solver's field (equation) to apply the condition. c_type: string BC type. Either dirichlet (essential) or neumann (natural) conditions. conds: array_like of floats or a sympy.Matrix eg. For a 3D model with an unconstraint x component: (None, 5, 1.2) or sympy.Matrix([sympy.oo, 5, 1.2]) label: string The label name to apply the BC. To find a label/boundary name run something like mesh.view() components: array_like, single int value or None. (optional) tuple, or int of active conds components to use. Use 'None' for all conds to be used. If 'None' and components in 'cond' equal sympy.oo or -sympy.oo those components won't be used. eg. For the 3D example cond = (2, 5, 1.2), components = (1,2) the x components is ignored and uncontrainted. """ * Cleaning up the warning messages from the tests. re: no longer needing 'components' * Adding some info on testing * Adding a disc / ball mesh with internal boundaries --------- Co-authored-by: Julian Giordani <julesghub@users.noreply.github.com> Co-authored-by: Julian Giordani <house.of.jules@gmail.com>
…he varname, uses this if no over-riding symbol is used. r-string still needed to escape special characters if present. Account for {} in test of JIT
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Sync dev into main. Not sure why so main commits are showing.