Skip to content
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

Enable Yaml input #74

Closed
lxmota opened this issue Feb 25, 2017 · 4 comments
Closed

Enable Yaml input #74

lxmota opened this issue Feb 25, 2017 · 4 comments

Comments

@lxmota
Copy link
Contributor

lxmota commented Feb 25, 2017

Enabling Yaml input in Albany will significantly improve the readability of input files.

All input in Albany is done through Teuchos ParameterLists, which already support Yaml parsing provided that Trilinos is compiled with TeuchosCore_ENABLE_yaml-cpp:BOOL=ON.

@lxmota lxmota self-assigned this Feb 25, 2017
lxmota added a commit that referenced this issue Feb 25, 2017
If Teuchos is compiled with Yaml support, Albany's solver factory
and LCM's material database can optionally be read as Yaml files.

This is determined by the file extension. If the extension is .xml,
the XMl parser for Teuchos ParameterList is invoked. If the extension
is .yaml, the Yaml parser is invoked.

Add small example (test) specifying the same problem with XML and Yaml
formats. The readability of the input using Yaml is significantly
improved.

Only LCM is tested for this. A cursory search finds that ATO and QCAD
call the XML parser for their own purposes. Adding support for
the Yaml parser is not difficult, following the example of the LCM
material database.

Enable Yaml support by default on Fedora.
@lxmota
Copy link
Contributor Author

lxmota commented Feb 25, 2017

Added support for Yaml input for LCM. Other applications can easily use this. See commit message above. Leaving issue open for the time being just in case.

ibaned added a commit that referenced this issue Feb 25, 2017
Part of #74
Unfortuntaly, TeuchosCore_config.h
does not handle the YAML parameter in the
standard way, meaning that the variable
is defined to either 1 or 0 instead
of being defined or not defined.
As an added safety measure, check for
the presence of the YAML header file.
@ibaned
Copy link
Contributor

ibaned commented Feb 25, 2017

@lxmota thank you for doing this !
It did cause a few compile issues though, mostly because Teuchos did things in a non-standard way:

http://my.cdash.org/index.php?project=Albany&date=2017-02-25

I think I have fixed this in 5be9b58.

@ibaned ibaned self-assigned this Feb 25, 2017
ibaned added a commit that referenced this issue Feb 25, 2017
my last commit broke the case
when YAML is present
part of #74
@lxmota
Copy link
Contributor Author

lxmota commented Feb 26, 2017

Thanks for fixing the YAML detection code.

lxmota added a commit that referenced this issue Feb 27, 2017
The list of coupled input files was specified as: Model XML Files
To accommodate YAML files as well this changed to: Model Input Files

Propage change through tests. (#74)

Also fix a compiler error due to const correctness in AAdapt_RC_Field.
ibaned referenced this issue in ibaned/Trilinos Mar 6, 2017
This enhancement supports gahansen/Albany#74.
Albany uses TwoDArray type ParameterLists,
and getting these supported in the YAML parser
would streamline our migration from XML to YAML.
There should be no compatibility issue, as I
don't think the current parser can handle nested
Sequences.
A unit test is included.
ibaned referenced this issue in ibaned/Trilinos Mar 7, 2017
This enhancement supports gahansen/Albany#74.
Albany uses TwoDArray type ParameterLists,
and getting these supported in the YAML parser
would streamline our migration from XML to YAML.
There should be no compatibility issue, as I
don't think the current parser can handle nested
Sequences.
A unit test is included.
@lxmota
Copy link
Contributor Author

lxmota commented Mar 8, 2017

I'm closing this one as duplicate of #21. The discussion should continue there.

@lxmota lxmota closed this as completed Mar 8, 2017
ibaned referenced this issue in trilinos/Trilinos Mar 13, 2017
This enhancement supports gahansen/Albany#74.
Albany uses TwoDArray type ParameterLists,
and getting these supported in the YAML parser
would streamline our migration from XML to YAML.
There should be no compatibility issue, as I
don't think the current parser can handle nested
Sequences.
A unit test is included.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants