-
Notifications
You must be signed in to change notification settings - Fork 5
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
Implement serialization to YAML format #11
Comments
@speth ... copying from Cantera/cantera#881 as a discussion of auxiliary/custom fields is broader than the
In terms of YAML, I see the appeal of being fully flexible, but am afraid that this will result in clutter, especially if core-Cantera fields are difficult to differentiate from custom fields. Also, doesn't this approach mean that there will be a lot of redundant information (i.e. information stored by both object and |
This is presumably closed via Cantera/cantera#984. |
Abstract
I am working on adding the ability to generate a YAML input which defines the species, reactions, and phase information that define a set of Cantera objects.
Motivation
It is possible to create Cantera objects (species, reactions, phases) dynamically, i.e. without using an input file. However, there is currently no way to save the definition of such objects for later use. Some possible uses for this feature include combining different mechanisms, generating reduced mechanisms, and performing parameter optimization on a mechanism.
Description
Like the creation of Cantera objects from YAML input, serialization is handled using the
AnyMap
class as an intermediary. Much of the implementation is essentially the reverse of the code which is used to set up objects using YAML input.Alternatives
The introduction of the YAML format makes implementing this feature significantly easier and more general than an XML or CTI implementation would have been, due to the use of an existing, fully-featured library for reading and writing YAML files.
References
The text was updated successfully, but these errors were encountered: