From b50ef038382cdf0717b13329bcf837b94dc7941e Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Thu, 14 Apr 2016 15:01:25 -0400 Subject: [PATCH] [Examples] Update C++ flamespeed to use current best-practices Wider, uniform initial grid; initial profiles with zero-gradient section on both ends of the domain; skip initial fixed-temperature solve. --- samples/cxx/flamespeed/flamespeed.cpp | 52 +++++++-------------------- 1 file changed, 13 insertions(+), 39 deletions(-) diff --git a/samples/cxx/flamespeed/flamespeed.cpp b/samples/cxx/flamespeed/flamespeed.cpp index ee257c457..b23fc8c25 100644 --- a/samples/cxx/flamespeed/flamespeed.cpp +++ b/samples/cxx/flamespeed/flamespeed.cpp @@ -68,16 +68,13 @@ int flamespeed(double phi) FreeFlame flow(&gas); // create an initial grid - int nz=5; - doublereal lz=0.02; - vector_fp z(nz+1); + int nz = 6; + doublereal lz=0.1; + vector_fp z(nz); doublereal dz=lz/((doublereal)(nz-1)); for (int iz=0; iz