Discretize

Latest version: v0.10.0

Safety actively analyzes 638773 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 5 of 9

0.3.3

- allow kwargs for `color` and `linewidth` in the plotgrid function
- helpful when plotting the mesh and model on a highly discretized mesh. e.g.
![commer_model](https://user-images.githubusercontent.com/6361812/43734485-c46981ce-996c-11e8-9a96-7a013ca02244.png)

0.3.2

- from 102
- commits from: cgohlke
- review from: jcapriot, lheagy

- Include tree.pxd in source distribution

0.3.1

- from pr 101
- `".-"` is no longer valid for a linestyle input in matplotlib, it should instead be "-." (however, a solid line looks better anyways for the 1d).

![image](https://user-images.githubusercontent.com/6361812/43050325-739585fa-8dcc-11e8-9b37-e428afeda3f9.png)

0.3.0

- originally from pr 94
- commits from: jcapriot
- review from: rowanc1, fourndo, lheagy

New Implementation of the TreeMesh
At this point consider this branch as EXPERIMENTAL. There are many possible unsafe operations that could arise, so be careful (which will need to be enforced at a later time). The code is certainly not completely up to format standards, but at this point, just wanted to get a pull request going and allow anyone who wants to use it to test it out to find any bugs.

There are many changes to the TreeMesh implementation within this pull request, However it is mostly feature complete compared to the previous implementation with regards to the public members of the class.

It was mostly rewritten in a way that made the construction of the mesh and construction of the operators all done in c++/cython, which resulted in dramatic speedups. As a reference, the 97 nosetests on the tree in the previous implementation took 238.476s on my personal computer. This implementation took 20.281s.

The basic idea is that each object, (`node`, `edge`, etc.) is aware of the structure of the `TreeMesh` as each is a cpp class that contains references to other objects.

A few key differences:

- All tree construction is balanced (no need to call `tree.balance`, or pass `balance=True` to functions)

- `tree.refine` should only be called once (at this point) as it "finalizes" the tree. It might be good to add a flag to the tree initialization that would allow incremental additions (similar to `scipy.spatial.ConvexHull`) and then require a finalization operation to be done before any other operations.

- Interpolation is "lazy" 2nd order now for all `E`, `CC`, and `F` interpolation, meaning we triangulate the grid points to interpolate. Interpolating without triangulation on the TreeMesh is still a point of research. This is not as fast as it could be, but still faster than previously.

- Both `face` and `edge` operations are defined for 2D, (basically a re-ording of x-edges -> y-faces)

- Do not expect any ordering for the faces, edges, and nodes. They are whatever they have decided to be.

- Do not expect any of the private members of the class to have remained consistent between implementations.

- There are many other changes which should hopefully be apparent as you look through the code.

Big things that still need to be implemented

- Serialization, (do not expect to pickle this object and have it work, however with construction being much faster, this shouldn't slow down anyone too much while it is being worked on).

- `PlotImage` and `PlotSlice`.

There are also many areas that this code could be extended to handle different types of underlying meshs, as well as support for differing sizes of axes, but as I said before, the initial goal of this pull request is to mimic the behavior of the current implementation.

Other than that, I hope this speeds up the operations for those who need them.

Update
- Serialization should be implemented now (the `TreeMesh` is pickle-able)
- PlotImage and PlotSlice are also implemented.
- It also now support differing dimensions of the underlying `TensorMesh`
- Interpolation is now NOT triangulated, so do there is no longer 2nd order convergence of the non-node interpolation matrices.
- the `refine` and `insert_cells` function now have a `finalize` keyword arg that can be set to false if you want to do multiple steps of tree building

0.2.1

- from pr 97
- update pypi credentials
- update appveyor and travis to auto-deploy to pypi on tags
- includes upload of wheel files from appveyor

0.2.0

- originally from pr: 36
- commits from: lheagy
- review from: rowanc1

3D Cyl Mesh
First implementation of a 3D cylindrical mesh. We discretize in r, theta and z.
![image](https://cloud.githubusercontent.com/assets/6361812/23571583/f1fb2fea-001e-11e7-88e3-51d154f42085.png)

Operators
- `edgeCurl`
- `faceDiv`
- `aveF2CC`
- `aveF2CCV`
- `aveE2CC`
- `aveE2CCV`

are all implemented and tested for second order convergence

Examples
There are some examples running this code in http://github.com/lheagy/casingResearch
![image](https://cloud.githubusercontent.com/assets/6361812/23572139/eabfdcc8-0021-11e7-937c-c0d90001eae5.png)
- added a simple example that plots a 3D cyl mesh

Plotting
- add plot capabilities for plotSlice (and I think two slices through the mesh for `plotGrid()`)

Testing
- basic elements like the grids, counting of things.
- operator tests for mimetic properties


Other updates

Cell Grad Stencils are properties
- cell grad stencils are properties rather than methods. This pr will need to be followed by an update in the SimPEG regularization (addressed in simpeg/simpeg699)

minor updates
- plotting now uses the `C0`, `C1`, ... colors in matplotlib
- added `*.ipynb` to .gitignore

Page 5 of 9

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.