https://github.com/adacs-australia/rombus
For full documentation, see:
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (7.7%) to scientific vocabulary
Keywords
Repository
For full documentation, see:
Basic Info
- Host: GitHub
- Owner: ADACS-Australia
- License: mit
- Language: Python
- Default Branch: main
- Homepage: https://rombus.readthedocs.io/en/latest/
- Size: 688 KB
Statistics
- Stars: 1
- Watchers: 4
- Forks: 5
- Open Issues: 2
- Releases: 0
Topics
Metadata Files
README.md
Rombus: Helps you qucikly and easily compute slow and complex models
Rombus is a tool for building reduced order models (ROMs): matrix representations of arbitrary models which can be rapidly and easily computed for arbitrary parameter sets.
Building a ROM with Rombus is easy. All you need to do is install it like so:
console
$ pip install rombus
define your model like this (in this trivial case, a file named my_model.py specifying a simple second-order polynomial):
``` python
from numpy import ndarray, polyval, linspace
from rombus.model import RombusModel
from typing import NamedTuple
class Model(RombusModel): """Class for creating a ROM for the function y(x)=a2x^2+a1x+a0"""
coordinate.set("x", 0.0, 10.0, 11, label="$x$")
ordinate.set("y", label="$y(x)$")
params.add("a0", -10, 10)
params.add("a1", -10, 10)
params.add("a2", -10, 10)
def compute(self, p: NamedTuple, x: ndarray) -> ndarray:
"""Compute the model for a given parameter set."""
return polyval([p.a2, p.a1, p.a0], x)
and specify a set of points (in this case, the file `my_model_samples.py`) to build your ROM from:
-10, -10,-10
-10, 10,-10
-10, -10, 10
-10, 10, 10
10, -10,-10
10, 10,-10
10, -10, 10
10, 10, 10
You build your ROM like this:
console
$ rombus build mymodel:Model mymodelsamples.csv
```
This produces an _HDF5 file named my_model.hdf5. You can then use your new ROM in your Python projects like this:
``` python
from rombus.rom import ReducedOrderModel
ROM = ReducedOrderModel.fromfile('mymodel.hdf5')
sample = ROM.model.sample({"a0":0,"a1":0,"a2":1})
modelROM = ROM.evaluate(sample)
for x, y in zip(ROM.model.domain,modelROM):
print(f"{x:5.2f} {y:6.2f}")
which generates the output:
0.00 0.00
1.00 1.00
2.00 4.00
3.00 9.00
4.00 16.00
5.00 25.00
6.00 36.00
7.00 49.00
8.00 64.00
9.00 81.00
10.00 100.00
```
Owner
- Name: Astronomy Data and Computing Services
- Login: ADACS-Australia
- Kind: organization
- Location: Australia
- Repositories: 43
- Profile: https://github.com/ADACS-Australia
GitHub Events
Total
- Release event: 5
- Push event: 9
- Pull request event: 7
- Create event: 6
Last Year
- Release event: 5
- Push event: 9
- Pull request event: 7
- Create event: 6
Issues and Pull Requests
Last synced: 9 months ago
All Time
- Total issues: 1
- Total pull requests: 38
- Average time to close issues: N/A
- Average time to close pull requests: about 3 hours
- Total issue authors: 1
- Total pull request authors: 2
- Average comments per issue: 0.0
- Average comments per pull request: 0.0
- Merged pull requests: 37
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 4
- Average time to close issues: N/A
- Average time to close pull requests: about 6 hours
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 4
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- Makai-Baker (1)
Pull Request Authors
- gbpoole (35)
- avivajpeyi (1)