!---------------------------------------------------------------------! ! NIST AMR Benchmark Reference Solution ! ! ! ! This module contains procedures for manipulating reference ! ! solutions as part of the NIST Adaptive Mesh Refinement Benchmark ! ! Problems project. Reference solutions are provided for some ! ! problems for which the exact solution is not known. For many uses ! ! the reference solution can be used in lieu of the exact solution ! ! up to the accuracy of the reference solution. The primary ! ! procedures are read_refsoln which reads a reference solution from ! ! a file, and evaluate_refsoln which returns the value of the ! ! reference solution and optionally first derivatives at a given set ! ! of points. For further information, see the web page given below. ! ! ! ! This is public domain software. It was produced as part of work ! ! done by the U.S. Government, and is not subject to copyright in ! ! the United States. ! ! ! ! William F. Mitchell ! ! Applied and Computational Mathematics Division ! ! National Institute of Standards and Technology ! ! william.mitchell@nist.gov ! ! http://math.nist.gov/amr-benchmark ! ! ! !---------------------------------------------------------------------! AMRrefsoln.f90 contains the AMRrefsoln Fortran module. The public routines in this module can be called by a Fortran program that USEs the module. The primary purpose of the software is to evaluate the reference solution at a given set of points, but there are also routines to obtain certain information about the reference solution. For a complete description of the public entities in the module, see the comments at the beginning of AMRrefsoln.f90. Briefly, the public routines are: create_refsoln: creates a reference solution object destroy_refsoln: destroys a reference solution object read_refsoln: reads a NIST Reference Solution file evaluate_refsoln: evaluates the reference solution at a given set of points set_verbosity_refsoln: controls how much output the routines print get_refsoln_energy_errest: returns the energy norm estimate of the refsoln error get_refsoln_Linf_errest: returns the L-infinity norm estimate of the r.s. error get_refsoln_L2_errest: returns the L_2 norm estimate of the ref. solution error get_refsoln_H1_errest: returns the H_1 norm estimate of the ref. solution error get_refsoln_energy_solution: returns the energy norm of the reference solution get_refsoln_Linf_solution: returns the L-infinity norm of the reference solution get_refsoln_L2_solution: returns the L_2 norm of the reference solution get_refsoln_H1_solution: returns the H_1 norm of the reference solution get_refsoln_version: returns the version of the NIST Reference Solution format get_refsoln_dimension: returns the number of spacial dimensions get_refsoln_degree: returns the degree of the piecewise polynomials get_refsoln_number_of_solutions: returns the number of solutions at each node get_refsoln_number_of_vertices: returns the number of vertices in the grid get_refsoln_number_of_nodes: returns the number of nodes in the grid get_refsoln_number_of_elements: returns the number of elements in the grid get_refsoln_bounding_box: returns bounds on the extents of the domain contelem.f90 contains the containing_element module. This module is USEd by AMRrefsoln to find which element contains a given point. It is not intended to be USEd by the end user, but must be compiled and linked with the end user's program. example.f90 gives a simple example of how to use the AMRrefsoln module to evaluate the reference solution and obtain simple information. makefile is a makefile to compile the example on Unix-like systems. You may need to edit it to set the Fortran compiler and compiler flags. For other approaches to compiling, e.g. using an IDE, you should compile the files in this order: contelem.f90, AMRrefsoln.f90, example.f90. refsoln2D.nrs is a NIST Reference Solution file read by the example.