From fb43f405d683878deae3d6c9071927c149ecd188 Mon Sep 17 00:00:00 2001 From: Nicholas Malaya Date: Wed, 30 Oct 2013 15:02:07 -0500 Subject: [PATCH 1/4] Massage AUTHORS to make email addresses line up --- AUTHORS | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/AUTHORS b/AUTHORS index e2dfff9a..68d7a5e0 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,5 +1,5 @@ -Paul T. Bauman (pbauman@ices.utexas.edu) +Paul T. Bauman (pbauman@ices.utexas.edu) Benjamin S. Kirk (benjamin.kirk-1@nasa.gov) -Todd A. Oliver (oliver@ices.utexas.edu) -Sylvain Plessis (sylvain.plessis@gmail.com) -Roy H. Stogner (roystngr@ices.utexas.edu) +Todd A. Oliver (oliver@ices.utexas.edu) +Sylvain Plessis (sylvain.plessis@gmail.com) +Roy H. Stogner (roystngr@ices.utexas.edu) From 1589ac66705487a88eb79551b55a109b47430e4c Mon Sep 17 00:00:00 2001 From: nicholasmalaya Date: Wed, 6 Jul 2016 15:59:11 -0500 Subject: [PATCH 2/4] adding example --- examples/antioch_init.C | 102 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 examples/antioch_init.C diff --git a/examples/antioch_init.C b/examples/antioch_init.C new file mode 100644 index 00000000..0acccc70 --- /dev/null +++ b/examples/antioch_init.C @@ -0,0 +1,102 @@ +//-----------------------------------------------------------------------bl- +//-------------------------------------------------------------------------- +// +// Antioch - A Gas Dynamics Thermochemistry Library +// +// Copyright (C) 2014-2016 Paul T. Bauman, Benjamin S. Kirk, +// Sylvain Plessis, Roy H. Stonger +// +// Copyright (C) 2013 The PECOS Development Team +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the Version 2.1 GNU Lesser General +// Public License as published by the Free Software Foundation. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc. 51 Franklin Street, Fifth Floor, +// Boston, MA 02110-1301 USA +// +//-----------------------------------------------------------------------el- +// +// $Id$ +// +//-------------------------------------------------------------------------- +//-------------------------------------------------------------------------- + +// C++ +#include +#include + +// Antioch +#include "antioch/blottner_viscosity.h" + +template +int test_viscosity( const Scalar mu, const Scalar mu_exact, const Scalar tol ) +{ + using std::abs; + + int return_flag = 0; + + const double rel_error = abs( (mu - mu_exact)/mu_exact); + + if( rel_error > tol ) + { + std::cerr << "Error: Mismatch in viscosity" << std::endl + << "mu(T) = " << mu << std::endl + << "mu_exact = " << mu_exact << std::endl + << "rel_error = " << rel_error << std::endl + << "tol = " << tol << std::endl; + return_flag = 1; + } + + return return_flag; +} + +template +int tester() +{ + const Scalar a = 3.14e-3; + const Scalar b = 2.71e-2; + const Scalar c = 42.0e-5; + + Antioch::BlottnerViscosity mu(a,b,c); + + std::cout << mu << std::endl; + + const Scalar T = 1521.2; + + // octave gives + const Scalar mu_exact = 0.144422234167703; + + int return_flag = 0; + + const Scalar tol = 1.0e-14; + + return_flag = test_viscosity( mu(T), mu_exact, tol ); + + const Scalar a2 = 1e-3; + const Scalar b2 = 2e-2; + const Scalar c2 = 3e-5; + + mu.reset_coeffs( a2, b2, c2 ); + + // octave gives + const Scalar mu_exact2 = 0.122172495548880; + + return_flag = test_viscosity( mu(T), mu_exact2, tol ); + + return return_flag; +} + +int main() +{ + return (tester() || + tester() || + tester()); +} From 26c5ae3902cb59d9b5d9b19e7888c65693c1c901 Mon Sep 17 00:00:00 2001 From: nicholasmalaya Date: Wed, 6 Jul 2016 15:11:25 -0500 Subject: [PATCH 3/4] adding makefile.am with representative example routine --- examples/Makefile.am | 45 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 examples/Makefile.am diff --git a/examples/Makefile.am b/examples/Makefile.am new file mode 100644 index 00000000..7d66b2d9 --- /dev/null +++ b/examples/Makefile.am @@ -0,0 +1,45 @@ +EXTRA_DIST = + +examplesdir = $(top_srcdir)/examples + +examples_PROGRAMS = +examples_PROGRAMS += antioch_init + +AM_CPPFLAGS = +AM_CPPFLAGS += -I$(top_srcdir)/src/core/include +AM_CPPFLAGS += -I$(top_srcdir)/src/units/include +AM_CPPFLAGS += -I$(top_srcdir)/src/particles_flux/include +AM_CPPFLAGS += -I$(top_srcdir)/src/kinetics/include +AM_CPPFLAGS += -I$(top_srcdir)/src/parsing/include +AM_CPPFLAGS += -I$(top_srcdir)/src/thermo/include +AM_CPPFLAGS += -I$(top_srcdir)/src/viscosity/include +AM_CPPFLAGS += -I$(top_srcdir)/src/diffusion/include +AM_CPPFLAGS += -I$(top_srcdir)/src/thermal_conduction/include +AM_CPPFLAGS += -I$(top_srcdir)/src/transport/include +AM_CPPFLAGS += -I$(top_srcdir)/src/utilities/include +AM_CPPFLAGS += -I$(top_builddir)/src/utilities/include +AM_CPPFLAGS += -I$(top_srcdir)/examples/antioch_test +AM_CPPFLAGS += $(antioch_optional_test_INCLUDES) + +AM_LDFLAGS = $(antioch_optional_test_LDFLAGS) + +LIBS = $(antioch_optional_test_LIBS) + +LDADD = $(top_builddir)/src/libantioch.la + +pkginclude_HEADERS = + +# +# CPP TESTS +# +antioch_init_SOURCES = antioch_init.C + +#Define examples to actually be run +TESTS = +XFAIL_TESTS = +TESTS += antioch_init + +CLEANFILES = +if CODE_COVERAGE_ENABLED + CLEANFILES += *.gcda *.gcno +endif From d6fd195f6d8b5af2d2810ecb46ddcd84532fba4f Mon Sep 17 00:00:00 2001 From: nicholasmalaya Date: Wed, 6 Jul 2016 15:05:49 -0500 Subject: [PATCH 4/4] adding examples to build pattern --- Makefile.am | 2 +- configure.ac | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index b64f9539..3d4aeb3b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,7 +4,7 @@ include $(top_srcdir)/doxygen/aminclude.am AUTOMAKE_OPTIONS = foreign ACLOCAL_AMFLAGS = -I m4 -I m4/common -SUBDIRS = src test doxygen share +SUBDIRS = src test doxygen share examples EXTRA_DIST = CHANGES LICENSE COPYING share # Eliminate .svn directories in dist tarball diff --git a/configure.ac b/configure.ac index debf266f..bb631407 100644 --- a/configure.ac +++ b/configure.ac @@ -244,6 +244,7 @@ AC_CONFIG_FILES([ share/Makefile src/Makefile test/Makefile + examples/Makefile ]) dnl-----------------------------------------------