SyFi  0.3
test Namespace Reference

Functions

def discover_packages
def discover_tests
def run_suite
def main
def get_status_output
def runcmd
def write_file
def opt
def import_options_iterator
def handle_file
def compute_diff_norm
def compute_eigenvalues
def compare_data
def compare_benchmark
def write_data
def read_data
def make_mesh
def compute_data

Variables

string __author__ = "Martin Alnes (martinal@simula.no) and Anders Logg (logg@simula.no)"
string __date__ = "2008-03-12 -- 2011-04-08"
int inf = 1
int nan = 0
string usage
list option_list
tuple result = main(sys.argv[1:])

Function Documentation

def test.compare_benchmark (   data,
  reference,
  options 
)

Definition at line 403 of file verify_tensors/test.py.

Referenced by handle_file().

00403 
00404 def compare_benchmark(data, reference, options):
00405     msg = []
00406     # For each form
00407     for (b1, b2) in zip(data, reference):
00408         # For each integral type
00409         for (x, y) in zip(b1, b2):
00410             # For each integral
00411             for (r,s) in zip(x,y):
00412                 f = r/s
00413                 if f > 1:
00414                     msg.append("The reference is faster than the new, f = %.2f" % f)
00415                 else:
00416                     msg.append("The new is faster than the reference, f = %.2f" % f)
00417     return msg

def test.compare_data (   data,
  reference,
  options 
)

Definition at line 347 of file verify_tensors/test.py.

References compute_diff_norm(), and compute_eigenvalues().

Referenced by handle_file().

00347 
00348 def compare_data(data, reference, options):
00349     norm = nan
00350     eig = nan
00351     msg = ""
00352     if reference is None:
00353         total_ok = False
00354         msg += "No reference to compare to."
00355     else:
00356         total_ok = True
00357         
00358         if data.shape != reference.shape:
00359             total_ok = False
00360             msg += "\n  ERROR: Data shape is %s, reference shape is %s." % (data.shape, reference.shape)
00361         else:
00362             if options.norm:
00363                 norm = compute_diff_norm(data, reference, options)
00364                 ok = norm < options.tolerance
00365                 if not ok:
00366                     total_ok = False
00367                     msg += "\n  norm = %e >= %e = tol" % (norm, options.tolerance)
00368  
00369             if options.eig:
00370                 sh = data.shape
00371                 #assert len(sh) == 2 # code elsewhere ensures data is represented as a matrix
00372  
00373                 if len(sh) == 1: #sh[0] == 1 or sh[1] == 1:
00374                     # Got a vector, compare sorted vectors
00375                     eig1 = numpy.array(sorted(data))
00376                     eig2 = numpy.array(sorted(reference))
00377                     eig = sum((eig1-eig2)**2)
00378                     ok = eig < options.tolerance
00379                     if not ok:
00380                         total_ok = False
00381                         msg += "\n  eig = %e >= %e = tol" % (eig, options.tolerance)
00382  
00383                 elif sh[0] == sh[1]:
00384                     # Got a matrix, compare matrix
00385                     eig1 = compute_eigenvalues(data)
00386                     eig2 = compute_eigenvalues(reference)
00387                     eig = sum((eig1-eig2)**2)
00388                     ok = eig < options.tolerance
00389                     if not ok:
00390                         total_ok = False
00391                         msg += "\n  eig = %e >= %e = tol" % (eig, options.tolerance)
00392                 else:
00393                     if not options.norm: # if it has passed the norm test, don't mark it as failed
00394                         total_ok = False
00395                     msg += "\n  WARNING: Not computing eigenvalues of data with shape %s" % repr(sh)
00396     
00397     # Make and return summary   
00398     if total_ok:
00399         msg = "Data compared ok."
00400     else:
00401         msg = "Failed because:%s\n\ndata is\n%r\n\nreference is\n%r" % (msg, data, reference)
00402     return (msg, total_ok)

def test.compute_data (   compiled_form,
  form_data,
  random_cell 
)

Definition at line 467 of file verify_tensors/test.py.

References make_mesh().

Referenced by handle_file().

00467 
00468 def compute_data(compiled_form, form_data, random_cell):
00469     # --- Initialize some variables
00470     rank             = form_data.rank
00471     num_coefficients = form_data.num_functions
00472     num_arguments    = num_coefficients + rank
00473     
00474     num_cell_integrals           = compiled_form.num_cell_integrals()
00475     num_exterior_facet_integrals = compiled_form.num_exterior_facet_integrals()
00476     num_interior_facet_integrals = compiled_form.num_interior_facet_integrals()
00477 
00478     # --- Initialize geometry variables
00479     mesh, cell = make_mesh(form_data.cell.domain(), random_cell)
00480     dim = form_data.geometric_dimension
00481     num_facets = cell.num_entities[dim - 1]
00482 
00483     # --- Initialize dofmaps
00484     dof_maps = [0]*num_arguments
00485     for i in range(num_arguments):
00486         dof_maps[i] = compiled_form.create_dof_map(i)
00487         dof_maps[i].init_mesh(mesh)
00488 
00489     # --- Generate arbitrary coefficient dofsdofs
00490     w = [0]*num_coefficients
00491     for i in range(num_coefficients):
00492         w[i] = [0]*(dof_maps[rank+i].local_dimension())
00493         for j in range(dof_maps[rank+i].local_dimension()):
00494             w[i][j] = 1.111 + (i + j)/1.111
00495     macro_w = [0]*num_coefficients
00496     for i in range(num_coefficients):
00497         macro_w[i] = [0]*(2*dof_maps[rank+i].local_dimension())
00498         for j in range(2*dof_maps[rank+i].local_dimension()):
00499             macro_w[i][j] = 1.111 + (i + j)/1.111
00500     
00501     # --- Target variables
00502     A = numpy.zeros((1,1))
00503 
00504     # --- Add contributions from ALL domains from cell integrals
00505     if num_cell_integrals:
00506         domain = 0
00507         # Get shape of A and reset values
00508         try:
00509             A = ufc_benchmark.tabulate_cell_integral(compiled_form, w, cell, domain)
00510             A = numpy.array(A)
00511             A = numpy.zeros(numpy.shape(A))
00512             for domain in range(num_cell_integrals):
00513                 A += ufc_benchmark.tabulate_cell_integral(compiled_form, w, cell, domain)
00514         except Exception, what:
00515             print "*** An error occured while calling tabulate_cell_integral() for domain %d." % domain
00516             raise
00517 
00518     # --- Add contributions from ALL domains and facets from exterior integrals
00519     if num_exterior_facet_integrals:
00520         domain, facet = (0, 0)
00521         try:
00522             if not numpy.any(A):
00523                 A = ufc_benchmark.tabulate_exterior_facet_integral(compiled_form, w, cell, facet, domain)
00524                 A = numpy.array(A)
00525                 A = numpy.zeros(numpy.shape(A))
00526             for domain in range(num_exterior_facet_integrals):
00527                 for facet in range(num_facets):
00528                     A += ufc_benchmark.tabulate_exterior_facet_integral(compiled_form, w, cell, facet, domain)
00529         except Exception, what:
00530             print "*** An error occured while calling tabulate_exterior_facet_integral() for domain %d, facet %d." % (domain, facet)
00531             raise
00532 
00533     # --- Add contributions from ALL domains and facets from interior integrals
00534     # FIXME: this currently makes no sense (integrating interior facets on 1 cell)
00535     #        but it should be OK since we just compare numbers.
00536     macro_A = numpy.array([0.0])
00537     if num_interior_facet_integrals:
00538         domain, facet0, facet1 = (0,0,0)
00539         try:
00540             macro_A = ufc_benchmark.tabulate_interior_facet_integral(compiled_form, macro_w, cell, cell, facet0, facet1, domain)
00541             macro_A = numpy.array(macro_A)
00542             macro_A = numpy.zeros(numpy.shape(macro_A))
00543             for domain in range(num_interior_facet_integrals):
00544                 for facet0 in range(num_facets):
00545                     for facet1 in range(num_facets):
00546                         macro_A += ufc_benchmark.tabulate_interior_facet_integral(compiled_form, macro_w, cell, cell, facet0, facet1, domain)
00547         except Exception, what:
00548             print "*** An error occured while calling tabulate_interior_facet_integral() for domain %d, facet0 %d, facet1 %d." % (domain, facet0, facet1)
00549             raise
00550     
00551     # Add A to the upper left quadrant of macro_A, it makes no sense,
00552     # but the numbers should be OK
00553     if not macro_A.any():
00554         data = A
00555     elif A.any():
00556         data = macro_A
00557         dims = A.shape
00558         data[:dims[0], :dims[1]] += A
00559     
00560     return data
00561 
00562 # --- Execute! ---

def test.compute_diff_norm (   data,
  reference,
  options 
)

Definition at line 310 of file verify_tensors/test.py.

Referenced by compare_data().

00310 
00311 def compute_diff_norm(data, reference, options):
00312     if options.debug:
00313         print ":"*40
00314         print "In compute_diff_norm, comparing:"
00315         print "data ="
00316         print data
00317         print "reference ="
00318         print reference
00319     
00320     # Compute difference
00321     diff = data - reference
00322     
00323     # Compute sums of squares
00324     d2 = numpy.sum(diff**2)
00325     r2 = numpy.sum(reference**2)
00326     n2 = numpy.sum(data**2)
00327     
00328     # Compute normalized norm
00329     norm = math.sqrt(d2 / r2)
00330     
00331     if options.debug:
00332         print "diff ="
00333         print diff
00334         print "d2, r2, n2="
00335         print d2, r2, n2
00336     
00337     # Norm from FFC, don't understand the motivation?
00338     #norm = math.sqrt(numpy.sum(diff / (1 + reference)))
00339     return norm

def test.compute_eigenvalues (   data)

Definition at line 340 of file verify_tensors/test.py.

Referenced by compare_data().

00340 
00341 def compute_eigenvalues(data):
00342     sh = data.shape
00343     assert sh[0] == sh[1]
00344     from scipy.linalg import eig
00345     l, v = eig(data)
00346     return numpy.array(sorted(l))

Definition at line 11 of file test.py.

Referenced by main().

00011 
00012 def discover_packages():
00013     # Looking at tests in all test_foo/ packages
00014     packages = sorted(f for f in glob.glob("test_*")
00015                       if os.path.exists(os.path.join(f,'__init__.py')))
00016     return packages

def test.discover_tests (   p)

Definition at line 17 of file test.py.

Referenced by main().

00017 
00018 def discover_tests(p):
00019     import glob, os
00020     # Running tests from all test_foo.py files in each package
00021     tests = sorted(os.path.basename(f.replace(".py", ""))
00022                    for f in glob.glob(os.path.join(p,"test_*.py")))
00023     return tests

def test.get_status_output (   cmd,
  input = None,
  cwd = None,
  env = None 
)

Definition at line 27 of file verify_tensors/test.py.

Referenced by runcmd().

00027 
00028 def get_status_output(cmd, input=None, cwd=None, env=None):
00029     pipe = Popen(cmd, shell=True, cwd=cwd, env=env, stdout=PIPE, stderr=STDOUT)
00030     (output, errout) = pipe.communicate(input=input)
00031     assert not errout
00032     status = pipe.returncode
00033     return (status, output)

def test.handle_file (   filename,
  options 
)

Definition at line 156 of file verify_tensors/test.py.

References compare_benchmark(), compare_data(), compute_data(), import_options_iterator(), read_data(), and write_data().

00156 
00157 def handle_file(filename, options):
00158     "Handle all aspects of testing a single .ufl file."
00159 
00160     # Split filename
00161     uflfilename = filename
00162     path, name = os.path.split(uflfilename)
00163     basename, ext = os.path.splitext(name)
00164     if ext != ".ufl":
00165         msg = "Expecting a .ufl file, not %s" % uflfilename
00166         return (msg, False)
00167  
00168     if options.debug:
00169         print "."*40   
00170         print "In handle_file, filename parsed as:"
00171         print "filename    =", filename
00172         print "uflfilename =", uflfilename
00173         print "path        =", path
00174         print "name        =", name
00175         print "basename    =", basename
00176         print "ext         =", ext
00177     
00178     # Load forms from this file
00179     try:
00180         forms = load_forms(uflfilename)
00181     except:
00182         msg = "Failed to load file, try running\n\n"\
00183               "  ufl-analyse %s\n\n"\
00184               "to find the bug in the form file or in UFL." % uflfilename
00185         return (msg, False)
00186 
00187     formnames = [form.form_data().name for form in forms]
00188     
00189     if options.debug:
00190         print "."*40   
00191         print "In handle_file, forms loaded: ", ", ".join(formnames)
00192     
00193     # Iterate over a given set of jit compilers and options:
00194     iter_jit_options = import_options_iterator(options.jit_options)
00195     if iter_jit_options is None:
00196         msg = "Failed to import options module '%s'." % options.jit_options
00197         return (msg, False)
00198     
00199     total_ok = True
00200     summary = ""
00201     for jit, jit_options in iter_jit_options():
00202         
00203         #jit_options.cache_dir = options.cache_dir # FIXME
00204         
00205         # Compile forms with given compiler and options
00206         try:
00207             jit_result = jit(forms, jit_options)
00208         except:
00209             msg = "Failed to jit-compile forms in file '%s'." % uflfilename
00210             raise
00211             #return (msg, False)
00212         
00213         if options.debug:
00214             print ":"*60
00215             print "Jit result:"
00216             print jit_result
00217         
00218         # Compute some data for each form from result of jit compilation
00219         data = {}
00220         #compiled_forms = jit_result # Ideally
00221         #compiled_forms, form_datas = jit_result # Previous
00222         compiled_forms, module, form_datas = jit_result # Current
00223         for i in range(len(forms)):
00224             form_data = forms[i].form_data()
00225             assert form_data is form_datas[i]
00226             data[form_data.name] = compute_data(compiled_forms[i], form_data, options.random_cell)
00227         
00228         # Benchmark the generated tabulate_tensor implementations
00229         benchmark_data = {}
00230         if options.benchmark:
00231             for i in range(len(forms)):
00232                 form_data = forms[i].form_data()
00233                 assert form_data is form_datas[i]
00234                 compiled_form = compiled_forms[i]
00235                 result = ufc_benchmark.benchmark_forms([compiled_form], False)
00236                 benchmark_data[form_data.name] = result
00237         
00238         # Store results for future referencing
00239         if options.write:
00240             outputdir = options.referencedir
00241         else:
00242             outputdir = options.outputdir
00243         if options.debug:
00244             print "."*60
00245             print "outputdir =", outputdir
00246         
00247         for formname in formnames:
00248             outputfilename = pjoin(outputdir, "%s_%s.ref" % (basename, formname))
00249             if options.debug:
00250                 print "Writing to output filename: ", outputfilename
00251             if not data[formname].any():
00252                 print "*** Warning: reference tensor only contains zeros!"
00253             write_data(outputfilename, data[formname])
00254         
00255         if options.benchmark:
00256             for formname in formnames:
00257                 outputfilename = pjoin(outputdir, "%s_%s.timing" % (basename, formname))
00258                 if options.debug:
00259                     print "Writing to output filename: ", outputfilename
00260                 write_data(outputfilename, benchmark_data[formname])
00261 
00262         # Compare to references unless we're writing the references
00263         if not options.write:
00264             # Read reference files
00265             reference = {}
00266             for formname in formnames:
00267                 referencefilename = pjoin(options.referencedir, "%s_%s.ref" % (basename, formname))
00268                 if options.debug:
00269                     print "Read reference filename: ", referencefilename
00270                 reference[formname] = read_data(referencefilename)
00271   
00272             if options.benchmark:
00273                 benchmark_reference = {}
00274                 for formname in formnames:
00275                     referencefilename = pjoin(options.referencedir, "%s_%s.timing" % (basename, formname))
00276                     if options.debug:
00277                         print "Read reference filename: ", referencefilename
00278                     benchmark_reference[formname] = read_data(referencefilename)
00279   
00280             # Compare fresh data and reference data
00281             results = []
00282             for formname in formnames:
00283                 msg, ok = compare_data(data[formname], reference[formname], options)
00284                 
00285                 if options.debug:
00286                     print "msg =", msg
00287                     print "ok = ", ok
00288                 
00289                 if not ok:
00290                     total_ok = False
00291                     results.append("--- Errors in form %s:\n" % formname)
00292                     results.append(msg)
00293                 else:
00294                     results.append("--- Form %s is ok.\n" % formname)
00295 
00296                 if options.benchmark:
00297                     msg = compare_benchmark(benchmark_data[formname], benchmark_reference[formname], options)
00298                     results.extend(msg)
00299 
00300             summary += "\n".join(results)
00301     
00302     # Return final report
00303     if total_ok:
00304         summary = "%s passed everything." % uflfilename
00305     else:
00306         summary = ("%s has problems:\n" % uflfilename) + summary
00307         if options.write:
00308             summary += "\n\nWrote reference files for %s." % uflfilename
00309     return (summary, total_ok)

Definition at line 136 of file verify_tensors/test.py.

Referenced by handle_file().

00136 
00137 def import_options_iterator(name):
00138     "Import options iterator from a python file."
00139     assert os.path.exists(name)
00140 
00141     path, name  = os.path.split(name)
00142     basename, dotpy = os.path.splitext(name)
00143     assert dotpy in (".py", "")
00144 
00145     sys.path.insert(0, path)
00146     #cwd = os.getcwd()
00147     #os.chdir(path)
00148     try:
00149         options_module = __import__(basename)
00150         iter_jit_options = options_module.options
00151     finally:
00152         sys.path.pop(0)
00153         #os.chdir(cwd)
00154     
00155     return iter_jit_options

def test::main (   args)

Definition at line 35 of file test.py.

References discover_packages(), discover_tests(), and run_suite().

00035 
00036 def main(args):
00037     s, f = 0, 0
00038     cwd = os.path.abspath(os.curdir)
00039 
00040     tfilter = []
00041     for a in args:
00042         if a.startswith('test_'):
00043             tfilter.append(a)
00044         else:
00045             print "Ignoring argument", a
00046     if tfilter:
00047         print "Running only tests", tfilter
00048 
00049     packages = discover_packages()
00050     for p in packages:
00051         tests = discover_tests(p)
00052         if tfilter:
00053             # Use only tests found in args
00054             tests = [t for t in tests if t in tfilter]
00055             if not tests:
00056                 continue
00057         result = run_suite(p, tests)
00058         os.chdir(cwd) # In case tests mess up current directory...
00059         if result.wasSuccessful():
00060             s += 1
00061         else:
00062             f += 1
00063 
00064     if not f:
00065         print "All tests finished successfully."
00066         return 0
00067     else:
00068         print "Not all tests finished successfully."
00069         return 1

def test.make_mesh (   cell_shape,
  random_cell 
)

Definition at line 440 of file verify_tensors/test.py.

Referenced by compute_data().

00440 
00441 def make_mesh(cell_shape, random_cell):
00442     # Random cells were generated by:
00443     # >>> random.uniform(-2.5,2.5)
00444     if cell_shape == "interval":
00445         mesh = ufc_benchmark.Mesh(1, 1, [2, 1, 0])
00446         if random_cell:
00447             cell = ufc_benchmark.Cell(1, 1, [[-1.445], [0.4713]], [2, 1, 0, 0])
00448         else:
00449             cell = ufc_benchmark.Cell(1, 1, [[0], [1]], [2, 1, 0, 0])
00450     elif cell_shape == "triangle":
00451         mesh = ufc_benchmark.Mesh(2, 2, [3, 3, 1])
00452         if random_cell:
00453             cell = ufc_benchmark.Cell(2, 2, [[-2.2304, -0.88317], [1.3138, -1.0164],\
00454                                              [0.24622, 1.4431]], [3, 3, 1, 0])
00455         else:
00456             cell = ufc_benchmark.Cell(2, 2, [[0, 0], [1, 0], [1, 1]], [3, 3, 1, 0])
00457     elif cell_shape == "tetrahedron":
00458         mesh = ufc_benchmark.Mesh(3, 3, [4, 6, 4, 1])
00459         if random_cell:
00460             cell = ufc_benchmark.Cell(3, 3, [[-2.2561, -1.6144, -1.7349], [-1.5612, -1.5121, -0.17675],\
00461                                              [1.6861, -1.1494, 2.4070], [0.52083, 1.1940, 1.8220]], [4, 6, 4, 1])
00462         else:
00463             cell = ufc_benchmark.Cell(3, 3, [[0, 0, 0], [1, 0, 0], [0, 1, 0], [0, 0, 1]], [4, 6, 4, 1])
00464     else:
00465         raise RuntimeError, "Unknown shape " + cell_shape # FIXME: Define quadrilateral and hexahedral cells
00466     return mesh, cell

def test.opt (   long,
  short,
  t,
  default,
  help 
)

Definition at line 53 of file verify_tensors/test.py.

00053 
00054 def opt(long, short, t, default, help):
00055     return optparse.make_option("--%s" % long, "-%s" % short, action="store", type=t, dest=long, default=default, help=help)

def test.read_data (   fn)

Definition at line 428 of file verify_tensors/test.py.

Referenced by handle_file().

00428 
00429 def read_data(fn):
00430     try:
00431         f = open(fn)
00432         data = pickle.load(f)
00433         #data = f.read()
00434         f.close()
00435     except Exception, what:
00436         print "*** An error occured while trying to load reference file: %s" % fn
00437         print "*** Maybe you need to generate the reference? Returning None."
00438         data = None
00439     return data

def test.run_suite (   package,
  tests 
)

Definition at line 24 of file test.py.

Referenced by main().

00024 
00025 def run_suite(package, tests):
00026     assert tests
00027     loader = unittest.TestLoader()
00028     p = __import__(package, fromlist=tests)
00029     modules = [getattr(p,test) for test in tests]
00030     suite = loader.loadTestsFromModule(modules[0])
00031     for m in modules[1:]:
00032         suite.addTests(loader.loadTestsFromModule(m))
00033     runner = unittest.TextTestRunner(verbosity=2)
00034     return runner.run(suite)

def test.runcmd (   cmd)

Definition at line 34 of file verify_tensors/test.py.

References get_status_output().

00034 
00035 def runcmd(cmd):
00036     get_status_output(cmd)

def test.write_data (   fn,
  data 
)

Definition at line 418 of file verify_tensors/test.py.

Referenced by handle_file().

00418 
00419 def write_data(fn, data):
00420     try:
00421         f = open(fn, "w")
00422         pickle.dump(data, f)
00423         #f.write(data)
00424         f.close()
00425     except Exception, what:
00426         print "*** An error occured while trying to write reference file: %s" % fn
00427         raise

def test.write_file (   filename,
  text 
)

Definition at line 37 of file verify_tensors/test.py.

00037 
00038 def write_file(filename, text):
00039     "Write text to a file and close it."
00040     f = open(filename, "w")
00041     f.write(text)
00042     f.close()
00043     print "Wrote file '%s'" % filename
00044 
00045 # --- Option Parsing Data ---


Variable Documentation

string test::__author__ = "Martin Alnes (martinal@simula.no) and Anders Logg (logg@simula.no)"

Definition at line 6 of file test.py.

string test::__date__ = "2008-03-12 -- 2011-04-08"

Definition at line 7 of file test.py.

int test::inf = 1

Definition at line 22 of file verify_tensors/test.py.

int test::nan = 0

Definition at line 23 of file verify_tensors/test.py.

Initial value:
00001 [ \
00002     # Directories:
00003     opt("ufldir",            "u",   "str",    "ufl",                "Input directory with .ufl files."),
00004     opt("outputdir",         "o",   "str",    "output",             "Output directory to write .ref files to."),
00005     opt("referencedir",      "r",   "str",    "reference",          "Reference directory to read .ref files from."),
00006     opt("cachedir",          "c",   "str",    "cache",              "Reference directory to read .ref files from."),
00007     # Main behaviour options:
00008     opt("skip",              "s",   "str",    "",                   "Comma-separated list of ufl files to skip."),
00009     opt("write",             "w",   "int",    0,                    "Write new reference files."),
00010     opt("debug",             "d",   "int",    0,                    "Print debugging info for this script."),
00011     # Form compiler options:
00012     opt("jit_options",       "j",   "str",    "options/default.py", "Python file containing jit options."),
00013     # Comparison options:
00014     opt("tolerance",         "t",   "float",  1e-10,                "Compare norm of data difference to this tolerance."),
00015     opt("norm",              "n",   "int",    1,                    "Compare data with references using the L2 norm of tensor difference."),
00016     opt("eig",               "e",   "int",    1,                    "Compare data with references using the eigenvalues."),
00017     opt("random_cell",       "a",   "int",    1,                    "Use a (predefined) random cell instead of reference cell."),
00018     opt("benchmark",         "b",   "int",    1,                    "Measure the time to call tabulate_tensor."),
00019     ]

Definition at line 56 of file verify_tensors/test.py.

tuple test::result = main(sys.argv[1:])

Definition at line 564 of file verify_tensors/test.py.

Referenced by _wrap_barycenter(), _wrap_barycenter_line(), _wrap_barycenter_tetrahedron(), _wrap_barycenter_triangle(), _wrap_bernstein(), _wrap_bernsteinv(), _wrap_bezier_ordinates__SWIG_0(), _wrap_bezier_ordinates__SWIG_1(), _wrap_bezier_ordinates__SWIG_2(), _wrap_Box_copy(), _wrap_Box_integrate__SWIG_0(), _wrap_Box_integrate__SWIG_1(), _wrap_Box_repr__SWIG_0(), _wrap_Box_repr__SWIG_1(), _wrap_coeff(), _wrap_coeffs__SWIG_0(), _wrap_coeffs__SWIG_1(), _wrap_collapse(), _wrap_collect_symbols__SWIG_1(), _wrap_compare(), _wrap_compare_archives__SWIG_0(), _wrap_compare_archives__SWIG_1(), _wrap_count_ops(), _wrap_count_symbols(), _wrap_cross(), _wrap_dirac(), _wrap_div__SWIG_0(), _wrap_div__SWIG_1(), _wrap_div__SWIG_2(), _wrap_div__SWIG_3(), _wrap_Dof_glob2loc(), _wrap_Dof_glob_dof__SWIG_0(), _wrap_Dof_glob_dof__SWIG_1(), _wrap_Dof_glob_dof__SWIG_2(), _wrap_Dof_insert_dof(), _wrap_Dof_max_dofs_per_element(), _wrap_Dof_num_elements(), _wrap_Dof_size(), _wrap_equations2matrix(), _wrap_ex2equations(), _wrap_ex_int_map___bool__(), _wrap_ex_int_map___contains__(), _wrap_ex_int_map___getitem__(), _wrap_ex_int_map___len__(), _wrap_ex_int_map___nonzero__(), _wrap_ex_int_map_asdict(), _wrap_ex_int_map_begin(), _wrap_ex_int_map_count(), _wrap_ex_int_map_empty(), _wrap_ex_int_map_end(), _wrap_ex_int_map_erase__SWIG_0(), _wrap_ex_int_map_find(), _wrap_ex_int_map_get_allocator(), _wrap_ex_int_map_has_key(), _wrap_ex_int_map_items(), _wrap_ex_int_map_iterator(), _wrap_ex_int_map_key_iterator(), _wrap_ex_int_map_keys(), _wrap_ex_int_map_lower_bound(), _wrap_ex_int_map_rbegin(), _wrap_ex_int_map_rend(), _wrap_ex_int_map_size(), _wrap_ex_int_map_upper_bound(), _wrap_ex_int_map_value_iterator(), _wrap_ex_int_map_values(), _wrap_exlist___bool__(), _wrap_exlist___getitem____SWIG_0(), _wrap_exlist___getitem____SWIG_1(), _wrap_exlist___getslice__(), _wrap_exlist___len__(), _wrap_exlist___nonzero__(), _wrap_exlist_back(), _wrap_exlist_begin(), _wrap_exlist_empty(), _wrap_exlist_end(), _wrap_exlist_erase__SWIG_0(), _wrap_exlist_erase__SWIG_1(), _wrap_exlist_front(), _wrap_exlist_get_allocator(), _wrap_exlist_insert__SWIG_0(), _wrap_exlist_iterator(), _wrap_exlist_pop(), _wrap_exlist_rbegin(), _wrap_exlist_rend(), _wrap_exlist_size(), _wrap_exmap___bool__(), _wrap_exmap___contains__(), _wrap_exmap___getitem__(), _wrap_exmap___len__(), _wrap_exmap___nonzero__(), _wrap_exmap_asdict(), _wrap_exmap_begin(), _wrap_exmap_count(), _wrap_exmap_empty(), _wrap_exmap_end(), _wrap_exmap_erase__SWIG_0(), _wrap_exmap_find(), _wrap_exmap_get_allocator(), _wrap_exmap_has_key(), _wrap_exmap_items(), _wrap_exmap_iterator(), _wrap_exmap_key_iterator(), _wrap_exmap_keys(), _wrap_exmap_lower_bound(), _wrap_exmap_rbegin(), _wrap_exmap_rend(), _wrap_exmap_size(), _wrap_exmap_upper_bound(), _wrap_exmap_value_iterator(), _wrap_exmap_values(), _wrap_exset___bool__(), _wrap_exset___contains__(), _wrap_exset___getitem__(), _wrap_exset___len__(), _wrap_exset___nonzero__(), _wrap_exset_begin(), _wrap_exset_count(), _wrap_exset_empty(), _wrap_exset_end(), _wrap_exset_equal_range(), _wrap_exset_erase__SWIG_0(), _wrap_exset_find(), _wrap_exset_insert(), _wrap_exset_iterator(), _wrap_exset_lower_bound(), _wrap_exset_rbegin(), _wrap_exset_rend(), _wrap_exset_size(), _wrap_exset_upper_bound(), _wrap_ExStats___iadd__(), _wrap_ExStats_adds_get(), _wrap_ExStats_flops_get(), _wrap_ExStats_functions_get(), _wrap_ExStats_muls_get(), _wrap_ExStats_pows_get(), _wrap_extract_symbols(), _wrap_exvector___bool__(), _wrap_exvector___getitem____SWIG_0(), _wrap_exvector___getitem____SWIG_1(), _wrap_exvector___getslice__(), _wrap_exvector___len__(), _wrap_exvector___nonzero__(), _wrap_exvector_back(), _wrap_exvector_begin(), _wrap_exvector_capacity(), _wrap_exvector_empty(), _wrap_exvector_end(), _wrap_exvector_erase__SWIG_0(), _wrap_exvector_erase__SWIG_1(), _wrap_exvector_front(), _wrap_exvector_get_allocator(), _wrap_exvector_insert__SWIG_0(), _wrap_exvector_iterator(), _wrap_exvector_pop(), _wrap_exvector_rbegin(), _wrap_exvector_rend(), _wrap_exvector_size(), _wrap_FE_dof(), _wrap_FE_get_polygon(), _wrap_FE_N(), _wrap_FE_nbf(), _wrap_FE_str(), _wrap_find(), _wrap_get_symbol(), _wrap_get_symbolic_matrix(), _wrap_get_symbolic_vector(), _wrap_grad__SWIG_0(), _wrap_grad__SWIG_1(), _wrap_homogenous_pol(), _wrap_homogenous_polv(), _wrap_inner__SWIG_0(), _wrap_inner__SWIG_1(), _wrap_inner__SWIG_2(), _wrap_inner__SWIG_3(), _wrap_int2string(), _wrap_interior_coordinates__SWIG_0(), _wrap_interior_coordinates__SWIG_1(), _wrap_interior_coordinates__SWIG_2(), _wrap_istr__SWIG_0(), _wrap_istr__SWIG_1(), _wrap_isymb__SWIG_0(), _wrap_isymb__SWIG_1(), _wrap_lagrange(), _wrap_lagrangev(), _wrap_legendre(), _wrap_legendrev(), _wrap_Line_a(), _wrap_Line_b(), _wrap_Line_copy(), _wrap_Line_integrate__SWIG_0(), _wrap_Line_integrate__SWIG_1(), _wrap_Line_repr__SWIG_0(), _wrap_Line_repr__SWIG_1(), _wrap_Line_repr__SWIG_2(), _wrap_Line_repr__SWIG_3(), _wrap_lst2string(), _wrap_lst_equals(), _wrap_lst_to_matrix2(), _wrap_matrix_to_lst2(), _wrap_matvec__SWIG_0(), _wrap_matvec__SWIG_1(), _wrap_MixedFE_get(), _wrap_MixedFE_mfe_get(), _wrap_Nedelec2Hdiv_dof_repr_get(), _wrap_new_ArnoldFalkWintherWeakSymP__SWIG_0(), _wrap_new_ArnoldFalkWintherWeakSymP__SWIG_1(), _wrap_new_ArnoldFalkWintherWeakSymP__SWIG_2(), _wrap_new_ArnoldFalkWintherWeakSymSigma__SWIG_0(), _wrap_new_ArnoldFalkWintherWeakSymSigma__SWIG_1(), _wrap_new_ArnoldFalkWintherWeakSymSigma__SWIG_2(), _wrap_new_ArnoldFalkWintherWeakSymU__SWIG_0(), _wrap_new_ArnoldFalkWintherWeakSymU__SWIG_1(), _wrap_new_ArnoldFalkWintherWeakSymU__SWIG_2(), _wrap_new_Box__SWIG_0(), _wrap_new_Box__SWIG_1(), _wrap_new_Box__SWIG_2(), _wrap_new_Box__SWIG_3(), _wrap_new_Box__SWIG_4(), _wrap_new_Box__SWIG_5(), _wrap_new_Bubble__SWIG_0(), _wrap_new_Bubble__SWIG_1(), _wrap_new_Bubble__SWIG_2(), _wrap_new_CrouzeixRaviart__SWIG_0(), _wrap_new_CrouzeixRaviart__SWIG_1(), _wrap_new_CrouzeixRaviart__SWIG_2(), _wrap_new_DiscontinuousLagrange__SWIG_0(), _wrap_new_DiscontinuousLagrange__SWIG_1(), _wrap_new_DiscontinuousLagrange__SWIG_2(), _wrap_new_Dof__SWIG_0(), _wrap_new_Dof__SWIG_1(), _wrap_new_Dof__SWIG_2(), _wrap_new_ex_int_map__SWIG_0(), _wrap_new_ex_int_map__SWIG_1(), _wrap_new_ex_int_map__SWIG_2(), _wrap_new_exlist__SWIG_0(), _wrap_new_exlist__SWIG_1(), _wrap_new_exlist__SWIG_2(), _wrap_new_exlist__SWIG_3(), _wrap_new_exmap__SWIG_0(), _wrap_new_exmap__SWIG_1(), _wrap_new_exmap__SWIG_2(), _wrap_new_exset__SWIG_0(), _wrap_new_exset__SWIG_1(), _wrap_new_exset__SWIG_2(), _wrap_new_ExStats(), _wrap_new_exvector__SWIG_0(), _wrap_new_exvector__SWIG_1(), _wrap_new_exvector__SWIG_2(), _wrap_new_exvector__SWIG_3(), _wrap_new_Hermite__SWIG_0(), _wrap_new_Hermite__SWIG_1(), _wrap_new_Hermite__SWIG_2(), _wrap_new_Lagrange__SWIG_0(), _wrap_new_Lagrange__SWIG_1(), _wrap_new_Lagrange__SWIG_2(), _wrap_new_Line__SWIG_0(), _wrap_new_Line__SWIG_1(), _wrap_new_Line__SWIG_2(), _wrap_new_Line__SWIG_3(), _wrap_new_Line__SWIG_4(), _wrap_new_MixedFE__SWIG_0(), _wrap_new_MixedFE__SWIG_1(), _wrap_new_Nedelec2Hdiv__SWIG_0(), _wrap_new_Nedelec2Hdiv__SWIG_1(), _wrap_new_Nedelec2Hdiv__SWIG_2(), _wrap_new_Nedelec__SWIG_0(), _wrap_new_Nedelec__SWIG_1(), _wrap_new_Nedelec__SWIG_2(), _wrap_new_P0__SWIG_0(), _wrap_new_P0__SWIG_1(), _wrap_new_P0__SWIG_2(), _wrap_new_RaviartThomas__SWIG_0(), _wrap_new_RaviartThomas__SWIG_1(), _wrap_new_RaviartThomas__SWIG_2(), _wrap_new_RaviartThomas__SWIG_3(), _wrap_new_Rectangle__SWIG_2(), _wrap_new_Rectangle__SWIG_3(), _wrap_new_Rectangle__SWIG_4(), _wrap_new_Rectangle__SWIG_5(), _wrap_new_Rectangle__SWIG_6(), _wrap_new_ReferenceBox__SWIG_0(), _wrap_new_ReferenceBox__SWIG_1(), _wrap_new_ReferenceBox__SWIG_2(), _wrap_new_ReferenceLine__SWIG_0(), _wrap_new_ReferenceLine__SWIG_1(), _wrap_new_ReferenceLine__SWIG_2(), _wrap_new_ReferenceRectangle__SWIG_0(), _wrap_new_ReferenceRectangle__SWIG_1(), _wrap_new_ReferenceRectangle__SWIG_2(), _wrap_new_ReferenceTetrahedron__SWIG_0(), _wrap_new_ReferenceTetrahedron__SWIG_1(), _wrap_new_ReferenceTetrahedron__SWIG_2(), _wrap_new_ReferenceTriangle__SWIG_0(), _wrap_new_ReferenceTriangle__SWIG_1(), _wrap_new_ReferenceTriangle__SWIG_2(), _wrap_new_Robust__SWIG_0(), _wrap_new_Robust__SWIG_1(), _wrap_new_Robust__SWIG_2(), _wrap_new_Robust__SWIG_3(), _wrap_new_Simplex__SWIG_0(), _wrap_new_Simplex__SWIG_1(), _wrap_new_Simplex__SWIG_2(), _wrap_new_SpaceTimeDomain__SWIG_0(), _wrap_new_SpaceTimeDomain__SWIG_1(), _wrap_new_SpaceTimeElement__SWIG_0(), _wrap_new_SpaceTimeElement__SWIG_1(), _wrap_new_StandardFE__SWIG_0(), _wrap_new_StandardFE__SWIG_1(), _wrap_new_symexlist__SWIG_0(), _wrap_new_symexlist__SWIG_1(), _wrap_new_symexlist__SWIG_2(), _wrap_new_symexlist__SWIG_3(), _wrap_new_symexpair__SWIG_0(), _wrap_new_symexpair__SWIG_1(), _wrap_new_symexpair__SWIG_2(), _wrap_new_TensorLagrange__SWIG_0(), _wrap_new_TensorLagrange__SWIG_1(), _wrap_new_TensorLagrange__SWIG_2(), _wrap_new_TensorLagrange__SWIG_3(), _wrap_new_TensorP0__SWIG_0(), _wrap_new_TensorP0__SWIG_1(), _wrap_new_TensorP0__SWIG_2(), _wrap_new_TensorP0__SWIG_3(), _wrap_new_Tetrahedron__SWIG_0(), _wrap_new_Tetrahedron__SWIG_1(), _wrap_new_Tetrahedron__SWIG_2(), _wrap_new_Triangle__SWIG_2(), _wrap_new_Triangle__SWIG_3(), _wrap_new_Triangle__SWIG_4(), _wrap_new_VectorCrouzeixRaviart__SWIG_0(), _wrap_new_VectorCrouzeixRaviart__SWIG_1(), _wrap_new_VectorCrouzeixRaviart__SWIG_2(), _wrap_new_VectorCrouzeixRaviart__SWIG_3(), _wrap_new_VectorDiscontinuousLagrange__SWIG_0(), _wrap_new_VectorDiscontinuousLagrange__SWIG_1(), _wrap_new_VectorDiscontinuousLagrange__SWIG_2(), _wrap_new_VectorLagrange__SWIG_0(), _wrap_new_VectorLagrange__SWIG_1(), _wrap_new_VectorLagrange__SWIG_2(), _wrap_new_VectorLagrange__SWIG_3(), _wrap_new_VectorP0__SWIG_0(), _wrap_new_VectorP0__SWIG_1(), _wrap_new_VectorP0__SWIG_2(), _wrap_new_VectorP0__SWIG_3(), _wrap_normal__SWIG_0(), _wrap_normal__SWIG_1(), _wrap_pol(), _wrap_pol2basisandcoeff__SWIG_0(), _wrap_pol2basisandcoeff__SWIG_1(), _wrap_polb(), _wrap_polv(), _wrap_Polygon_copy(), _wrap_Polygon_integrate__SWIG_0(), _wrap_Polygon_integrate__SWIG_1(), _wrap_Polygon_line(), _wrap_Polygon_no_space_dim(), _wrap_Polygon_no_vertices(), _wrap_Polygon_rectangle(), _wrap_Polygon_repr__SWIG_0(), _wrap_Polygon_repr__SWIG_1(), _wrap_Polygon_str(), _wrap_Polygon_triangle(), _wrap_Polygon_vertex(), _wrap_RaviartThomas_dof_repr_get(), _wrap_RaviartThomas_pointwise_get(), _wrap_Rectangle_copy(), _wrap_Rectangle_integrate__SWIG_0(), _wrap_Rectangle_integrate__SWIG_1(), _wrap_Rectangle_repr__SWIG_0(), _wrap_Rectangle_repr__SWIG_1(), _wrap_ReferenceBox_copy(), _wrap_ReferenceLine_copy(), _wrap_ReferenceLine_integrate__SWIG_0(), _wrap_ReferenceLine_integrate__SWIG_1(), _wrap_ReferenceLine_repr__SWIG_0(), _wrap_ReferenceLine_repr__SWIG_1(), _wrap_ReferenceRectangle_copy(), _wrap_ReferenceTetrahedron_copy(), _wrap_ReferenceTetrahedron_integrate__SWIG_0(), _wrap_ReferenceTetrahedron_integrate__SWIG_1(), _wrap_ReferenceTriangle_copy(), _wrap_ReferenceTriangle_integrate__SWIG_0(), _wrap_ReferenceTriangle_integrate__SWIG_1(), _wrap_replace_powers__SWIG_0(), _wrap_replace_powers__SWIG_1(), _wrap_Robust_dof_repr_get(), _wrap_Robust_pointwise_get(), _wrap_Simplex_copy(), _wrap_Simplex_integrate__SWIG_0(), _wrap_Simplex_integrate__SWIG_1(), _wrap_Simplex_repr__SWIG_0(), _wrap_Simplex_repr__SWIG_1(), _wrap_Simplex_sub_simplex(), _wrap_SpaceTimeDomain_copy(), _wrap_SpaceTimeDomain_get_space_domain(), _wrap_SpaceTimeDomain_get_time_domain(), _wrap_SpaceTimeDomain_integrate__SWIG_0(), _wrap_SpaceTimeDomain_integrate__SWIG_1(), _wrap_SpaceTimeDomain_repr__SWIG_0(), _wrap_SpaceTimeDomain_repr__SWIG_1(), _wrap_StandardFE_get_order(), _wrap_SwigPyIterator___add__(), _wrap_SwigPyIterator___eq__(), _wrap_SwigPyIterator___iadd__(), _wrap_SwigPyIterator___isub__(), _wrap_SwigPyIterator___ne__(), _wrap_SwigPyIterator___next__(), _wrap_SwigPyIterator___sub____SWIG_0(), _wrap_SwigPyIterator___sub____SWIG_1(), _wrap_SwigPyIterator_advance(), _wrap_SwigPyIterator_copy(), _wrap_SwigPyIterator_decr__SWIG_0(), _wrap_SwigPyIterator_decr__SWIG_1(), _wrap_SwigPyIterator_distance(), _wrap_SwigPyIterator_equal(), _wrap_SwigPyIterator_incr__SWIG_0(), _wrap_SwigPyIterator_incr__SWIG_1(), _wrap_SwigPyIterator_next(), _wrap_SwigPyIterator_previous(), _wrap_SwigPyIterator_value(), _wrap_symbol_exists(), _wrap_symexlist___bool__(), _wrap_symexlist___getitem____SWIG_0(), _wrap_symexlist___getitem____SWIG_1(), _wrap_symexlist___getslice__(), _wrap_symexlist___len__(), _wrap_symexlist___nonzero__(), _wrap_symexlist_back(), _wrap_symexlist_begin(), _wrap_symexlist_empty(), _wrap_symexlist_end(), _wrap_symexlist_erase__SWIG_0(), _wrap_symexlist_erase__SWIG_1(), _wrap_symexlist_front(), _wrap_symexlist_get_allocator(), _wrap_symexlist_insert__SWIG_0(), _wrap_symexlist_iterator(), _wrap_symexlist_pop(), _wrap_symexlist_rbegin(), _wrap_symexlist_rend(), _wrap_symexlist_size(), _wrap_symexpair_first_get(), _wrap_symexpair_second_get(), _wrap_tangent(), _wrap_Tetrahedron_copy(), _wrap_Tetrahedron_integrate__SWIG_0(), _wrap_Tetrahedron_integrate__SWIG_1(), _wrap_Tetrahedron_repr__SWIG_0(), _wrap_Tetrahedron_repr__SWIG_1(), _wrap_Triangle_copy(), _wrap_Triangle_integrate__SWIG_0(), _wrap_Triangle_integrate__SWIG_1(), _wrap_Triangle_repr__SWIG_0(), _wrap_Triangle_repr__SWIG_1(), PyBool_FromLong(), PyNumber_AsSsize_t(), SWIG_Python_AppendOutput(), SWIG_Python_MustGetPtr(), SWIG_Python_newvarlink(), SwigPyObject_str(), SwigPyPacked_print(), SwigPyPacked_repr(), and SwigPyPacked_str().

string test::usage
Initial value:
00001 """Compile UFL forms, compute element tensors, and compare with reference values.
00002 
00003 Examples:
00004 
00005   FIXME: Write usage examples.
00006 """

Definition at line 46 of file verify_tensors/test.py.

Referenced by _wrap_usage__SWIG_0(), _wrap_usage__SWIG_1(), check_CrouzeixRaviart(), check_RaviartThomas(), and main().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines