Comments (4)
I added the simplified options as default branches to the code; feel free to delete the low-level variants if you don't see them as necessary to keep
mupif/examples/Example11/model2.py
Lines 75 to 152 in b69bdf2
from mupif.
Hi, I think the first option (copy old state into a new one) should be avoided, as the use needs knowledge about internal representation (needs to copy file). The code at this level should abstract from this and rely solely on methods provided by a datatype.
The second option is ok. But what is the difference between inject and set method?
from mupif.
Hi, I think the first option (copy old state into a new one) should be avoided, as the use needs knowledge about internal representation (needs to copy file).
The file copy could be hidden by a method or perhaps by an additional data access mode, e.g. getData(mode='clone',...)
. It is by far the most efficient way of cloning the data.
But what is the difference between inject and set method?
inject
takes another context as parameter (the data pass through serialization/deserizalization in RAM) and replaces the whole subtree. set*
methods are only defined for leaf nodes (such as setMolecularWeight(…)
) , not for a whole hierarchy of data (there is no setMolecules(…)
, for instance).
from mupif.
If abstracted by method (like copy()) then the first approach is ok. My objections were mainly to the direct file copying in workflow.
Related to the second, from a perspective of the user, who has no knowledge about the internals, the meaning of inject and set methods is quite close. Can we merge them together? So there will be jut set method defined for leaf nodes as well as for sub trees.
from mupif.
Related Issues (20)
- PyroFile & permissions HOT 8
- Wine64 CI broken (subprocess with PYTHONPATH in simplejobmanager) HOT 1
- unittest for crashing Model
- Pass workDirectory path to model __init__ HOT 1
- munin alarms HOT 1
- octree subdivides to tiny cells without limit, until recursion limit is reached HOT 1
- Octree localizer takes 10 minutes to fill for 155k-tetra mesh HOT 6
- tqdm progress bar should show chunks better HOT 1
- Safe termination of JobManager
- tools/ should be revived HOT 2
- Add Dumpable.preDumpHook
- support multiple schedulers
- Convert monitor to and other tools to mupif.monitor (exposed as JSON endpoint in the future) HOT 3
- Clean abstract field class HOT 6
- MuPIF examples HOT 2
- remote logging HOT 1
- checkpointing in workflows
- Export fields to VTK HDF (as an alternative or simplification of .h5 + xdmf)
- temporal field (for both EDM and HeavyStruct) HOT 1
- Add VPN peer human-readable names to montiro API (with external JSON) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mupif.