gmarkall / manycore_form_compiler

MCFC is deprecated. See https://code.launchpad.net/~grm08/ffc/pyop2
https://code.launchpad.net/~grm08/ffc/pyop2
GNU General Public License v3.0
3 stars 1 forks source link

Convert the test cases that are used in our Fluidity branch to Flmls #59

Closed gmarkall closed 12 years ago

gmarkall commented 12 years ago

All the test ufl inputs that are tested (using MMS, MES, or whatever) in our Fluidity branch have been converted to flml files based on the Fluidity schema. To create a new model, you open up diamond with the fluidity schema from the launchpad ufl-input branch, and for a field, change it's equation type to "UFL" and then type your UFL in the box in the GUI.

The changes that have been made (mainly to do with the testing, a couple of bugfixes as well) are:

  1. fluidityequation.py - getFieldFromCoeff would return fields on the same function space as a given coefficient that were in the state but weren't necessarily used in the UFL and were not on the GPU, so they weren't suitable for being copied into new, temporary fields. This method now returns the name of a field that has the same function space and has been accessed, so will be available on the GPU.
  2. Since multiple fields can be present in an FLML, there can now be multiple output files. The frontend now creates a folder for the output, based on the name of the input, and the output files are saved in the folder with the name .{cu,cpp} etc.
  3. When parsing UFL files, the input parser creates FluidityEquation objects whose name is now "model" - previously the name of the equation was the empty string. This is so that an output file gets generated with the name "model.cu" in the folder named after the input file.
  4. The autotester has been refactored to deal with the fact that there may be multiple output files for a single input file. In particular, the AutoTester class is now the base class for a tester, and the SingleFileTester and MultiFileTester are descendants of it.
  5. It turned out that the exit code returned by autotest.py was not being set correctly, since a while ago - it would only return 1 if the very last test failed - it now returns 1 if any test fails.
  6. Addition of the flml files for noop, identity, helmholtz, euler-advection, diffusion-3 and simple-advection-diffusion. Removal of the ufl files with the same name.
  7. The expected output for each test case that was converted from ufl to flml has been changed to give the correct expectations.
kynan commented 12 years ago

Looks great to me, no complaints.