Changeset - bb80657b6912
[Not reviewed]
default
0 13 0
Michael Guravage - 15 years ago 2010-10-08 16:58:27
michael.guravage@cwi.nl
Export Cell Data at interval specified in the leafML file or explicitly via the file menu.
Added new parameters to VirtualLeafpar.tmpl
Added GPL boilerplate to make_{parameter,pardialog}_source.pl files.
Added new parameters to auxin_growth.xml. See respective ChangeLog files for details.

--
user: Michael Guravage <michael.guravage@cwi.nl>
branch 'default'
changed data/leaves/ChangeLog
changed data/leaves/auxin_growth.xml
changed src/ChangeLog
changed src/VirtualLeafpar.tmpl
changed src/canvas.cpp
changed src/canvas.h
changed src/parameter.cpp
changed src/parameter.h
changed src/pardialog.cpp
changed src/pardialog.h
changed src/perl/ChangeLog
changed src/perl/make_parameter_source.pl
changed src/perl/make_pardialog_source.pl
13 files changed with 1685 insertions and 1448 deletions:
0 comments (0 inline, 0 general)
data/leaves/ChangeLog
Show inline comments
 
2010-10-08    <guravage@caterpie.sen.cwi.nl>
 

	
 
	* auxin_growth.xml: Added export_interval and export_fn_prefix parameters.
 

	
 

	
 
2010-06-23    <guravage@caterpie.sen.cwi.nl>
 

	
 
	* Added: tutorial3_init.xml
 
	tutorial4_init.xml
 
	tutorial5_init.xml
 

	
 
	* Removed: bend.xml
 
	circ.xml
 
	explant.xml
 
	init.xml
 
	one_acc_point_van3.xml
 
	one_acc_point_van3_growth.xml
 
	one_acc_point_van3_growth2.xml
 
	tissue.xml
data/leaves/auxin_growth.xml
Show inline comments
 
@@ -5,48 +5,50 @@
 
  $Author$:  Author of last commit
 
  $Source$:  Source file
 
  $Date$:  Date of last commit
 

	
 
  This file is part of the Virtual Leaf.
 

	
 
  The Virtual Leaf is free software: you can redistribute it and/or modify
 
  it under the terms of the GNU General Public License as published by
 
  the Free Software Foundation, either version 3 of the License, or
 
  (at your option) any later version.
 

	
 
  The Virtual Leaf 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 General Public License for more details.
 

	
 
  You should have received a copy of the GNU General Public License
 
  along with the Virtual Leaf.  If not, see <http://www.gnu.org/licenses/>.
 

	
 
  Copyright 2010 Roeland Merks.
 
-->
 

	
 
<leaf name="/Users/roel/VLeafClean_plugin/Snapshot/VLeafMacOSX/auxin_growth.xml" date="Sat Aug 29 18:28:19 2009" simtime="11660">
 
  <parameter>
 
    <par name="export_interval" val="1000"/>
 
    <par name="export_fn_prefix" val="CELLDATA_"/>
 
    <par name="arrowcolor" val="white"/>
 
    <par name="arrowsize" val="10"/>
 
    <par name="textcolor" val="red"/>
 
    <par name="cellnumsize" val="1"/>
 
    <par name="nodenumsize" val="1"/>
 
    <par name="node_mag" val="1"/>
 
    <par name="outlinewidth" val="1"/>
 
    <par name="cell_outline_color" val="forestgreen"/>
 
    <par name="resize_stride" val="10"/>
 
    <par name="T" val="1"/>
 
    <par name="lambda_length" val="100"/>
 
    <par name="lambda_celllength" val="0"/>
 
    <par name="target_length" val="60"/>
 
    <par name="cell_expansion_rate" val="10"/>
 
    <par name="cell_div_expansion_rate" val="10"/>
 
    <par name="auxin_dependent_growth" val="true"/>
 
    <par name="ode_accuracy" val="0.0001"/>
 
    <par name="mc_stepsize" val="0.4"/>
 
    <par name="mc_cell_stepsize" val="0.2"/>
 
    <par name="energy_threshold" val="1000"/>
 
    <par name="bend_lambda" val="0"/>
 
    <par name="alignment_lambda" val="0"/>
 
    <par name="rel_cell_div_threshold" val="2"/>
 
    <par name="rel_perimeter_stiffness" val="2"/>
src/ChangeLog
Show inline comments
 
2010-10-08    <guravage@caterpie.sen.cwi.nl>
 

	
 

	
 
	* pardialog.h:
 
	* pardialog.cpp:
 
	* parameter.h:
 
	* parameter.cpp: Regenerated to include export_interval and export_fn_prefix.
 

	
 
	* VirtualLeafpar.tmpl: Appended export_interval and export_fn_prefix.
 

	
 
	* canvas.h (MainBase): Declared polymorphic exportCellData() functions.
 

	
 
	* canvas.cpp:
 
	(TimeStamp): New private TimeStamp() function.
 
	(TimeStepWrap): Added invocation of exportCellData().
 
	(exportCellData): Created two polymorphic functions: one with a
 
	single QString argument, the other with no argument. The former is
 
	called from TimeStepWrap() while the latter is called from the
 
	"Export cell areas" item in the file menu.
 

	
 

	
 
2010-10-07    <guravage@caterpie.sen.cwi.nl>
 

	
 
	* canvas.cpp (exportCellData): Added a Q3FileDialog to inquire
 
	where to write the exportCellData.
 

	
 
2010-06-28    <guravage@caterpie.sen.cwi.nl>
 

	
 

	
 
	* VirtualLeaf-install.nsi: Grab gpl3.txt from doc directory.
 

	
 
	* canvas.cpp (gpl): gpl3.txt can be either in an ancestor doc
 
	directory (Linux) or a decedent doc directory (Windows, via the
 
	binary installer).
 

	
 
	* VirtualLeaf-install.nsi: Add VirtualLeaf doc directory.
 

	
 
2010-06-25    <guravage@caterpie.sen.cwi.nl>
 

	
 

	
 
	* gpl3.txt: Moved gpl3.txt from doc to src directory.
 

	
 
	* VirtualLeaf.pro: Added -Wno-write-strings and -Wno-unused-parameter to QMAKE_CXXFLAGS.
 

	
 
	* libplugin.pro: Ditto.
src/VirtualLeafpar.tmpl
Show inline comments
 
@@ -103,24 +103,26 @@ c = 0. / double
 
mu = 0. / double
 
nu = 0. / double
 
rho0 = 0. / double
 
rho1 = 0. / double
 
c0 = 0. / double
 
gamma = 0. / double
 
eps = 0. / double
 
label = / label
 
label = <b>User-defined parameters</b> / label
 
k = 0., 0.0, 0.0, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0. / doublelist
 
i1 = 0 / int
 
i2 = 0 / int
 
i3 = 0 / int
 
i4 = 0 / int
 
i5 = 0 / int
 
s1 =  / string
 
s2 =  / string
 
s3 =  / string
 
b1 = false / bool
 
b2 = false / bool
 
b3 = false / bool
 
b4 = false / bool
 
dir1 = . / directory
 
dir2 = . / directory
 
export_interval = 0 / int
 
export_fn_prefix = CellData_ / string
src/canvas.cpp
Show inline comments
 
/*
 
 *
 
 *  This file is part of the Virtual Leaf.
 
 *
 
 *  VirtualLeaf is free software: you can redistribute it and/or modify
 
 *  it under the terms of the GNU General Public License as published by
 
 *  the Free Software Foundation, either version 3 of the License, or
 
 *  (at your option) any later version.
 
 *
 
 *  VirtualLeaf 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 General Public License for more details.
 
 *
 
 *  You should have received a copy of the GNU General Public License
 
 *  along with the Virtual Leaf.  If not, see <http://www.gnu.org/licenses/>.
 
 *
 
 *  Copyright 2010 Roeland Merks.
 
 *
 
 */
 

	
 
#include <time.h>
 
#include <string>
 
#include <fstream>
 
#include <streambuf>
 
#include <QGraphicsScene>
 
#include <QGraphicsView>
 
#include <qdatetime.h>
 
#include <q3mainwindow.h>
 
#include <qstatusbar.h>
 
#include <qmessagebox.h>
 
#include <qmenubar.h>
 
#include <qapplication.h>
 
#include <qpainter.h>
 
#include <qprinter.h>
 
#include <qlabel.h>
 
#include <qimage.h>
 
#include <q3progressdialog.h>
 
#include <qtimer.h>
 
#include <qslider.h>
 
#include <qpixmap.h>
 
#include <qfile.h>
 
#include <qdir.h>
 
#include <q3filedialog.h>
 
#include <QGraphicsItem>
 
#include <QList>
 
@@ -1145,55 +1146,72 @@ void Main::print()
 
    double ch = (bbur.y - bbll.y);
 
    QPainter pp(printer);
 
    QRect vp=pp.viewport();
 
#ifdef QDEBUG
 
    qDebug() << "Paper width = " << vp.width() << " x " << vp.height() << endl;
 
#endif
 

	
 
    // Note that Cell is also translated...
 
    pp.translate(-bbur.x,-bbur.y);
 
    if (cw>ch) {
 
      pp.scale(vp.width()/(2*cw*Cell::Magnification()), vp.width()/(2*cw*Cell::Magnification()));
 
    } else {
 
      pp.scale(vp.height()/(2*ch*Cell::Magnification()), vp.height()/(2*ch*Cell::Magnification()));
 
    }
 
    canvas.render(&pp, QRectF(), QRectF(0.,0.,canvas.width(),canvas.height()));
 
  }
 
}
 

	
 

	
 
void Main::TimeStepWrap(void)
 
{
 
  static int t=0;
 
  TimeStep();
 
  t++;
 

	
 
  if ((par.export_interval > 0) && ((t % par.export_interval) == 0)){
 
    this->exportCellData(QString(par.datadir) + QString('/') + QString(par.export_fn_prefix) + this->TimeStamp());
 
  }
 

	
 
  // check number of timesteps
 
  if (t==par.nit) {
 
    emit SimulationDone();
 
  }
 
}
 

	
 

	
 
QString Main::TimeStamp(){
 
  time_t rawtime;
 
  struct tm * timeinfo;
 
  char buffer [15];
 

	
 
  time ( &rawtime );
 
  timeinfo = localtime ( &rawtime );
 
  strftime (buffer,15,"%Y%m%d%H%M%S",timeinfo);
 
  return QString(buffer);
 
}
 

	
 

	
 
void Main::RestartSim(void)
 
{
 

	
 
  stopSimulation();
 
  if ( QMessageBox::question(
 
			     this,
 
			     tr("Restart simulation?"),
 
			     tr("Restart simulation.\n"
 
				"Are you sure?"),
 
			     QMessageBox::Yes | QMessageBox::No, QMessageBox::NoButton ) == QMessageBox::Yes ) {
 

	
 
    cerr << "Restarting simulation" << endl;
 
    //    extern Mesh mesh;
 
    mesh.Clear();
 
    Init();
 
    Plot();
 
    editor->FullRedraw();
 
  } 
 
  //startSimulation();
 
}
 

	
 

	
 
void Main::FitCanvasToWindow(void)
 
{
 
@@ -1345,54 +1363,54 @@ void Main::XMLReadSettings(xmlNode *sett
 
xmlNode *Main::XMLSettingsTree(void) 
 
{
 

	
 
  showcentersp = view->isItemChecked(com_id);
 
  showmeshp = view->isItemChecked(mesh_id);
 
  showbordercellp =  view->isItemChecked(border_id);
 
  shownodenumbersp =  view->isItemChecked(node_number_id);
 
  showcellnumbersp =  view->isItemChecked(cell_number_id);
 
  showcellsaxesp = view->isItemChecked( cell_axes_id );
 
  showcellstrainp = view->isItemChecked( cell_strain_id );
 
  movieframesp = view->isItemChecked(movie_frames_id);;
 
  showboundaryonlyp =  view->isItemChecked(only_boundary_id);
 
  showfluxesp = view->isItemChecked(fluxes_id);
 
  dynamicscellsp = options->isItemChecked(dyn_cells_id);
 
  showwallsp = view->isItemChecked( cell_walls_id);
 
  //showapoplastsp = view->isItemChecked( apoplasts_id);
 
  hidecellsp = view->isItemChecked( hide_cells_id);
 

	
 
  xmlNode *settings = MainBase::XMLSettingsTree();
 
  QTransform viewport(editor->transform());
 
  xmlAddChild(settings, XMLViewportTree(viewport));
 
  return settings;
 
}
 

	
 
void Main::exportCellData(void) {
 
  Q3FileDialog *fd = new Q3FileDialog( this, "file dialog", TRUE );
 
  QString fileName;
 
void Main::exportCellData(QString fileName) {
 
  
 
  stopSimulation();
 
  fd->setMode( Q3FileDialog::AnyFile );
 

	
 
  if ( fd->exec() == QDialog::Accepted ) {
 
    fileName = fd->selectedFile();
 

	
 
#ifdef QDEBUG  
 
    qDebug() << "exportCellData filename: " << fileName << endl;
 
  qDebug() << "exportCellData fileName: " << fileName << endl;
 
#endif
 

	
 
  // perhaps make this more general: a popup window were user selects data he wants to export
 
  // can go to "settings" section of XML file as well so this can also be measured off-line
 
  // mesh.CSVExport would take an QMap or so to record all options
 
  // first line gives legenda
 

	
 
    QFile file(fileName);
 
    if ( file.open( IO_WriteOnly ) ) {
 
      QTextStream stream( &file );
 
      mesh.CSVExportCellData(stream);
 
      mesh.CSVExportMeshData(stream);
 
      file.close();
 
    }
 
  QFile file(fileName);
 
  if ( file.open( IO_WriteOnly ) ) {
 
    QTextStream stream( &file );
 
    mesh.CSVExportCellData(stream);
 
    mesh.CSVExportMeshData(stream);
 
    file.close();
 
  }
 
}
 

	
 

	
 
void Main::exportCellData() {
 
  QString fileName;
 
  Q3FileDialog *fd = new Q3FileDialog( this, "file dialog", TRUE );
 

	
 
  stopSimulation();
 
  fd->setMode( Q3FileDialog::AnyFile );
 
  if ( fd->exec() == QDialog::Accepted ) {
 
    fileName = fd->selectedFile();
 
  }
 
  this->exportCellData(fileName);
 
}
 

	
 

	
 
/* finis */
src/canvas.h
Show inline comments
 
@@ -186,67 +186,70 @@ class Main : public Q3MainWindow, public
 
    options->setItemChecked(rotation_mode_id, false); 
 
    if (editor)
 
      disconnect(editor, SIGNAL(MousePressed()), this, SLOT(ExitRotationMode()));
 
    editor->setMouseTracking(false);
 
 
 
  }
 

	
 
  virtual void UserMessage(QString message, int timeout=0);
 
  void Refresh(void) { Plot(); }
 
  void PauseIfRunning(void);
 
  void ContIfRunning(void);
 
  virtual void XMLReadSettings(xmlNode *settings);
 

	
 
  private slots:
 
  void aboutQt();
 
  void newView();
 
  void EditParameters();
 
  void readStateXML();
 
  int readStateXML(const char *filename, bool geometry = true, bool pars=true, bool simtime = true);
 
  void readNextStateXML();
 
  void readPrevStateXML();
 
  void readFirstStateXML();
 
  void readLastStateXML();
 
  void exportCellData();
 
  void exportCellData(QString);
 
  void saveStateXML();
 
  void snapshot();
 
  void savePars();
 
  void readPars();
 
  void clear();
 
  void init();
 
  virtual void CutSAM() { MainBase::CutSAM(); Refresh();}
 

	
 
  void enlarge();
 
  void shrink();
 
  void zoomIn();
 
  void zoomOut();
 

	
 
  void CleanMesh();
 
  void CleanMeshChemicals(void);
 
  void CleanMeshTransporters(void);
 

	
 
  void RandomizeMesh();
 

	
 
  QString TimeStamp();
 

	
 
 signals:
 
  void SimulationDone(void);
 
  void ParsChanged(void);
 

	
 
 protected:
 
  Mesh &mesh;
 

	
 
 private:
 
  NodeSet *node_set;
 
  FigureEditor *editor;
 
  Q3PopupMenu* options;
 
  Q3PopupMenu *view;
 
  Q3PopupMenu *run;
 
  QMenu *modelmenu;
 
  Q3PopupMenu *helpmenu;
 

	
 
  QPrinter* printer;
 
  const QDir *working_dir;
 
  QString currentFile;
 
  //  toggle item states 
 
  int dbf_id; // options->Double Buffer
 
  int com_id; // view->Show centers
 
  int mesh_id; // view->Show mesh
 
  int node_number_id; // view->Show Node numbers
src/parameter.cpp
Show inline comments
 
/*
 
 *
 
 *  This file is part of the Virtual Leaf.
 
 *
 
 *  VirtualLeaf is free software: you can redistribute it and/or modify
 
 *  it under the terms of the GNU General Public License as published by
 
 *  the Free Software Foundation, either version 3 of the License, or
 
 *  (at your option) any later version.
 
 *
 
 *  VirtualLeaf 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 General Public License for more details.
 
 *
 
 *  You should have received a copy of the GNU General Public License
 
 *  along with the Virtual Leaf.  If not, see <http://www.gnu.org/licenses/>.
 
 *
 
 *  Copyright 2010 Roeland Merks.
 
 *
 
 */
 

	
 
// Do not edit. All edits will be discarded.
 

	
 

	
 
#include "parameter.h"
 
#include <cstdio>
 
#include <cstring>
 
#include <cstdlib>
 
#include <cerrno>
 
#include <iostream>
 
#include <sstream>
 
#include "output.h"
 
#include "parse.h"
 
#include "xmlwrite.h"
 
#include "warning.h"
 
#include <QLocale>
 
#include <QDir>
 
#include <QStringList>
 

	
 
using namespace std;
 

	
 
static const std::string _module_id("$Id$");
 

	
 
Parameter::Parameter() {
 
  arrowcolor = strdup("white");
 
  arrowsize = 100;
 
  textcolor = strdup("red");
 
  cellnumsize = 1;
 
@@ -162,82 +165,86 @@ Parameter::Parameter() {
 
  k[5] = 0.;
 
  k[6] = 0.;
 
  k[7] = 0.;
 
  k[8] = 0.;
 
  k[9] = 0.;
 
  k[10] = 0.;
 
  k[11] = 0.;
 
  k[12] = 0.;
 
  k[13] = 0.;
 
  k[14] = 0.;
 
  i1 = 0;
 
  i2 = 0;
 
  i3 = 0;
 
  i4 = 0;
 
  i5 = 0;
 
  s1 = strdup("");
 
  s2 = strdup("");
 
  s3 = strdup("");
 
  b1 = false;
 
  b2 = false;
 
  b3 = false;
 
  b4 = false;
 
  dir1 = strdup(".");
 
  dir2 = strdup(".");
 
  export_interval = 100;
 
  export_fn_prefix = strdup("CELLDATA");
 
}
 

	
 
Parameter::~Parameter() {
 
    
 
  // destruct parameter object
 
  // free string parameter
 
  CleanUp();
 
// destruct parameter object
 
// free string parameter
 
CleanUp();
 
}
 

	
 
void Parameter::CleanUp(void) {
 
  if (arrowcolor) 
 
    free(arrowcolor);
 
     free(arrowcolor);
 
  if (textcolor) 
 
    free(textcolor);
 
     free(textcolor);
 
  if (cell_outline_color) 
 
    free(cell_outline_color);
 
     free(cell_outline_color);
 
  if (D) 
 
    free(D);
 
     free(D);
 
  if (initval) 
 
    free(initval);
 
     free(initval);
 
  if (datadir) 
 
    free(datadir);
 
     free(datadir);
 
  if (k) 
 
    free(k);
 
     free(k);
 
  if (s1) 
 
    free(s1);
 
     free(s1);
 
  if (s2) 
 
    free(s2);
 
     free(s2);
 
  if (s3) 
 
    free(s3);
 
     free(s3);
 
  if (dir1) 
 
    free(dir1);
 
     free(dir1);
 
  if (dir2) 
 
    free(dir2);
 
     free(dir2);
 
  if (export_fn_prefix) 
 
     free(export_fn_prefix);
 

	
 
}
 

	
 
void Parameter::Read(const char *filename) {
 
    
 
  static bool ReadP=false;
 

	
 
  if (ReadP) {
 

	
 
    //throw "Run Time Error in parameter.cpp: Please Read parameter file only once!!";
 
    CleanUp();
 
	
 
  } else
 
    ReadP=true;
 

	
 
  FILE *fp=OpenReadFile(filename);
 

	
 

	
 
  arrowcolor = sgetpar(fp, "arrowcolor", "white", true);
 
  arrowsize = fgetpar(fp, "arrowsize", 100, true);
 
  textcolor = sgetpar(fp, "textcolor", "red", true);
 
  cellnumsize = igetpar(fp, "cellnumsize", 1, true);
 
  nodenumsize = igetpar(fp, "nodenumsize", 1, true);
 
  node_mag = fgetpar(fp, "node_mag", 1.0, true);
 
@@ -319,76 +326,78 @@ void Parameter::Read(const char *filenam
 
  rho0 = fgetpar(fp, "rho0", 0., true);
 
  rho1 = fgetpar(fp, "rho1", 0., true);
 
  c0 = fgetpar(fp, "c0", 0., true);
 
  gamma = fgetpar(fp, "gamma", 0., true);
 
  eps = fgetpar(fp, "eps", 0., true);
 
  k = dgetparlist(fp, "k", 15, true);
 
  i1 = igetpar(fp, "i1", 0, true);
 
  i2 = igetpar(fp, "i2", 0, true);
 
  i3 = igetpar(fp, "i3", 0, true);
 
  i4 = igetpar(fp, "i4", 0, true);
 
  i5 = igetpar(fp, "i5", 0, true);
 
  s1 = sgetpar(fp, "s1", "", true);
 
  s2 = sgetpar(fp, "s2", "", true);
 
  s3 = sgetpar(fp, "s3", "", true);
 
  b1 = bgetpar(fp, "b1", false, true);
 
  b2 = bgetpar(fp, "b2", false, true);
 
  b3 = bgetpar(fp, "b3", false, true);
 
  b4 = bgetpar(fp, "b4", false, true);
 
  dir1 = sgetpar(fp, "dir1", ".", true);
 
  if (strcmp(dir1, "."))
 
    MakeDir(dir1);
 
  dir2 = sgetpar(fp, "dir2", ".", true);
 
  if (strcmp(dir2, "."))
 
    MakeDir(dir2);
 
  export_interval = igetpar(fp, "export_interval", 100, true);
 
  export_fn_prefix = sgetpar(fp, "export_fn_prefix", "CELLDATA", true);
 
}
 

	
 
const char *sbool(const bool &p) {
 

	
 
  const char *true_str="true";
 
  const char *false_str="false";
 
  if (p)
 
    return true_str;
 
  else
 
    return false_str;
 
}
 

	
 
void Parameter::Write(ostream &os) const {
 

	
 

	
 
  if (arrowcolor) 
 
    os << " arrowcolor = " << arrowcolor << endl;
 
  os << " arrowcolor = " << arrowcolor << endl;
 
  os << " arrowsize = " << arrowsize << endl;
 

	
 
  if (textcolor) 
 
    os << " textcolor = " << textcolor << endl;
 
  os << " textcolor = " << textcolor << endl;
 
  os << " cellnumsize = " << cellnumsize << endl;
 
  os << " nodenumsize = " << nodenumsize << endl;
 
  os << " node_mag = " << node_mag << endl;
 
  os << " outlinewidth = " << outlinewidth << endl;
 

	
 
  if (cell_outline_color) 
 
    os << " cell_outline_color = " << cell_outline_color << endl;
 
  os << " cell_outline_color = " << cell_outline_color << endl;
 
  os << " resize_stride = " << resize_stride << endl;
 
  os << " T = " << T << endl;
 
  os << " lambda_length = " << lambda_length << endl;
 
  os << " lambda_celllength = " << lambda_celllength << endl;
 
  os << " target_length = " << target_length << endl;
 
  os << " cell_expansion_rate = " << cell_expansion_rate << endl;
 
  os << " cell_div_expansion_rate = " << cell_div_expansion_rate << endl;
 
  os << " auxin_dependent_growth = " << sbool(auxin_dependent_growth) << endl;
 
  os << " ode_accuracy = " << ode_accuracy << endl;
 
  os << " mc_stepsize = " << mc_stepsize << endl;
 
  os << " mc_cell_stepsize = " << mc_cell_stepsize << endl;
 
  os << " energy_threshold = " << energy_threshold << endl;
 
  os << " bend_lambda = " << bend_lambda << endl;
 
  os << " alignment_lambda = " << alignment_lambda << endl;
 
  os << " rel_cell_div_threshold = " << rel_cell_div_threshold << endl;
 
  os << " rel_perimeter_stiffness = " << rel_perimeter_stiffness << endl;
 
  os << " collapse_node_threshold = " << collapse_node_threshold << endl;
 
  os << " morphogen_div_threshold = " << morphogen_div_threshold << endl;
 
  os << " morphogen_expansion_threshold = " << morphogen_expansion_threshold << endl;
 
  os << " copy_wall = " << sbool(copy_wall) << endl;
 
  os << " source = " << source << endl;
 
  os << " D = "<< D[0] << ", " << D[1] << ", " << D[2] << ", " << D[3] << ", " << D[4] << ", " << D[5] << ", " << D[6] << ", " << D[7] << ", " << D[8] << ", " << D[9] << ", " << D[10] << ", " << D[11] << ", " << D[12] << ", " << D[13] << ", " << D[14] << endl;
 
  os << " initval = "<< initval[0] << ", " << initval[1] << ", " << initval[2] << ", " << initval[3] << ", " << initval[4] << ", " << initval[5] << ", " << initval[6] << ", " << initval[7] << ", " << initval[8] << ", " << initval[9] << ", " << initval[10] << ", " << initval[11] << ", " << initval[12] << ", " << initval[13] << ", " << initval[14] << endl;
 
  os << " k1 = " << k1 << endl;
 
@@ -402,1458 +411,1486 @@ void Parameter::Write(ostream &os) const
 
  os << " pin_prod = " << pin_prod << endl;
 
  os << " pin_prod_in_epidermis = " << pin_prod_in_epidermis << endl;
 
  os << " pin_breakdown = " << pin_breakdown << endl;
 
  os << " pin_breakdown_internal = " << pin_breakdown_internal << endl;
 
  os << " aux1prod = " << aux1prod << endl;
 
  os << " aux1prodmeso = " << aux1prodmeso << endl;
 
  os << " aux1decay = " << aux1decay << endl;
 
  os << " aux1decaymeso = " << aux1decaymeso << endl;
 
  os << " aux1transport = " << aux1transport << endl;
 
  os << " aux_cons = " << aux_cons << endl;
 
  os << " aux_breakdown = " << aux_breakdown << endl;
 
  os << " kaux1 = " << kaux1 << endl;
 
  os << " kap = " << kap << endl;
 
  os << " leaf_tip_source = " << leaf_tip_source << endl;
 
  os << " sam_efflux = " << sam_efflux << endl;
 
  os << " sam_auxin = " << sam_auxin << endl;
 
  os << " sam_auxin_breakdown = " << sam_auxin_breakdown << endl;
 
  os << " van3prod = " << van3prod << endl;
 
  os << " van3autokat = " << van3autokat << endl;
 
  os << " van3sat = " << van3sat << endl;
 
  os << " k2van3 = " << k2van3 << endl;
 
  os << " dt = " << dt << endl;
 
  os << " rd_dt = " << rd_dt << endl;
 
  if (datadir) {
 
    QDir dataDir = QDir::home().relativeFilePath(datadir);
 
    os << " datadir = " << dataDir.dirName().toStdString() << endl;
 
  }
 
  else {
 
    os << "datadir = ." << endl;
 
  }
 
                                     QDir dataDir = QDir::home().relativeFilePath(datadir);
 
                                     os << " datadir = " << dataDir.dirName().toStdString() << endl;
 
                                 }
 
                                 else {
 
                                     os << "datadir = ." << endl;
 
                                 }
 
  os << " movie = " << sbool(movie) << endl;
 
  os << " nit = " << nit << endl;
 
  os << " maxt = " << maxt << endl;
 
  os << " storage_stride = " << storage_stride << endl;
 
  os << " xml_storage_stride = " << xml_storage_stride << endl;
 
  os << " rseed = " << rseed << endl;
 
  os << " constituous_expansion_limit = " << constituous_expansion_limit << endl;
 
  os << " vessel_inh_level = " << vessel_inh_level << endl;
 
  os << " vessel_expansion_rate = " << vessel_expansion_rate << endl;
 
  os << " d = " << d << endl;
 
  os << " e = " << e << endl;
 
  os << " f = " << f << endl;
 
  os << " c = " << c << endl;
 
  os << " mu = " << mu << endl;
 
  os << " nu = " << nu << endl;
 
  os << " rho0 = " << rho0 << endl;
 
  os << " rho1 = " << rho1 << endl;
 
  os << " c0 = " << c0 << endl;
 
  os << " gamma = " << gamma << endl;
 
  os << " eps = " << eps << endl;
 
  os << " k = "<< k[0] << ", " << k[1] << ", " << k[2] << ", " << k[3] << ", " << k[4] << ", " << k[5] << ", " << k[6] << ", " << k[7] << ", " << k[8] << ", " << k[9] << ", " << k[10] << ", " << k[11] << ", " << k[12] << ", " << k[13] << ", " << k[14] << endl;
 
  os << " i1 = " << i1 << endl;
 
  os << " i2 = " << i2 << endl;
 
  os << " i3 = " << i3 << endl;
 
  os << " i4 = " << i4 << endl;
 
  os << " i5 = " << i5 << endl;
 

	
 
  if (s1) 
 
    os << " s1 = " << s1 << endl;
 
  os << " s1 = " << s1 << endl;
 

	
 
  if (s2) 
 
    os << " s2 = " << s2 << endl;
 
  os << " s2 = " << s2 << endl;
 

	
 
  if (s3) 
 
    os << " s3 = " << s3 << endl;
 
  os << " s3 = " << s3 << endl;
 
  os << " b1 = " << sbool(b1) << endl;
 
  os << " b2 = " << sbool(b2) << endl;
 
  os << " b3 = " << sbool(b3) << endl;
 
  os << " b4 = " << sbool(b4) << endl;
 

	
 
  if (dir1) 
 
    os << " dir1 = " << dir1 << endl;
 
  os << " dir1 = " << dir1 << endl;
 

	
 
  if (dir2) 
 
    os << " dir2 = " << dir2 << endl;
 
  os << " dir2 = " << dir2 << endl;
 
  os << " export_interval = " << export_interval << endl;
 

	
 
  if (export_fn_prefix) 
 
  os << " export_fn_prefix = " << export_fn_prefix << endl;
 
}
 

	
 
void Parameter::XMLAdd(xmlNode *root) const {
 
  xmlNode *xmlparameter = xmlNewChild(root, NULL, BAD_CAST "parameter", NULL);
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "arrowcolor" );
 
    ostringstream text;
 
    xmlNode *xmlparameter = xmlNewChild(root, NULL, BAD_CAST "parameter", NULL);
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "arrowcolor" );
 
  ostringstream text;
 

	
 
    if (arrowcolor) 
 
      text << arrowcolor;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "arrowsize" );
 
    ostringstream text;
 
  if (arrowcolor) 
 
    text << arrowcolor;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "arrowsize" );
 
  ostringstream text;
 
    text << arrowsize;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "textcolor" );
 
    ostringstream text;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "textcolor" );
 
  ostringstream text;
 

	
 
    if (textcolor) 
 
      text << textcolor;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "cellnumsize" );
 
    ostringstream text;
 
  if (textcolor) 
 
    text << textcolor;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "cellnumsize" );
 
  ostringstream text;
 
    text << cellnumsize;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "nodenumsize" );
 
    ostringstream text;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "nodenumsize" );
 
  ostringstream text;
 
    text << nodenumsize;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "node_mag" );
 
    ostringstream text;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "node_mag" );
 
  ostringstream text;
 
    text << node_mag;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "outlinewidth" );
 
    ostringstream text;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "outlinewidth" );
 
  ostringstream text;
 
    text << outlinewidth;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "cell_outline_color" );
 
    ostringstream text;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "cell_outline_color" );
 
  ostringstream text;
 

	
 
    if (cell_outline_color) 
 
      text << cell_outline_color;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "resize_stride" );
 
    ostringstream text;
 
  if (cell_outline_color) 
 
    text << cell_outline_color;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "resize_stride" );
 
  ostringstream text;
 
    text << resize_stride;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "T" );
 
    ostringstream text;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "T" );
 
  ostringstream text;
 
    text << T;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "lambda_length" );
 
    ostringstream text;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "lambda_length" );
 
  ostringstream text;
 
    text << lambda_length;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "lambda_celllength" );
 
    ostringstream text;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "lambda_celllength" );
 
  ostringstream text;
 
    text << lambda_celllength;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "target_length" );
 
    ostringstream text;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "target_length" );
 
  ostringstream text;
 
    text << target_length;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "cell_expansion_rate" );
 
    ostringstream text;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "cell_expansion_rate" );
 
  ostringstream text;
 
    text << cell_expansion_rate;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "cell_div_expansion_rate" );
 
    ostringstream text;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "cell_div_expansion_rate" );
 
  ostringstream text;
 
    text << cell_div_expansion_rate;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "auxin_dependent_growth" );
 
    ostringstream text;
 
    text << sbool(auxin_dependent_growth);
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "ode_accuracy" );
 
    ostringstream text;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "auxin_dependent_growth" );
 
  ostringstream text;
 
text << sbool(auxin_dependent_growth);
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "ode_accuracy" );
 
  ostringstream text;
 
    text << ode_accuracy;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "mc_stepsize" );
 
    ostringstream text;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "mc_stepsize" );
 
  ostringstream text;
 
    text << mc_stepsize;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "mc_cell_stepsize" );
 
    ostringstream text;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "mc_cell_stepsize" );
 
  ostringstream text;
 
    text << mc_cell_stepsize;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "energy_threshold" );
 
    ostringstream text;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "energy_threshold" );
 
  ostringstream text;
 
    text << energy_threshold;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "bend_lambda" );
 
    ostringstream text;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "bend_lambda" );
 
  ostringstream text;
 
    text << bend_lambda;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "alignment_lambda" );
 
  ostringstream text;
 
    text << alignment_lambda;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "rel_cell_div_threshold" );
 
  ostringstream text;
 
    text << rel_cell_div_threshold;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "rel_perimeter_stiffness" );
 
  ostringstream text;
 
    text << rel_perimeter_stiffness;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "collapse_node_threshold" );
 
  ostringstream text;
 
    text << collapse_node_threshold;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "morphogen_div_threshold" );
 
  ostringstream text;
 
    text << morphogen_div_threshold;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "morphogen_expansion_threshold" );
 
  ostringstream text;
 
    text << morphogen_expansion_threshold;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "copy_wall" );
 
  ostringstream text;
 
text << sbool(copy_wall);
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "source" );
 
  ostringstream text;
 
    text << source;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "D" );
 
  xmlNode *xmlvalarray = xmlNewChild(xmlpar, NULL, BAD_CAST "valarray", NULL);
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "alignment_lambda" );
 
    ostringstream text;
 
    text << alignment_lambda;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "rel_cell_div_threshold" );
 
    ostringstream text;
 
    text << rel_cell_div_threshold;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "rel_perimeter_stiffness" );
 
    ostringstream text;
 
    text << rel_perimeter_stiffness;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "collapse_node_threshold" );
 
    ostringstream text;
 
    text << collapse_node_threshold;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "morphogen_div_threshold" );
 
    ostringstream text;
 
    text << morphogen_div_threshold;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "morphogen_expansion_threshold" );
 
    ostringstream text;
 
    text << morphogen_expansion_threshold;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "copy_wall" );
 
    ostringstream text;
 
    text << sbool(copy_wall);
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "source" );
 
    ostringstream text;
 
    text << source;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
    text << D[0];
 
    xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
    xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "D" );
 
    xmlNode *xmlvalarray = xmlNewChild(xmlpar, NULL, BAD_CAST "valarray", NULL);
 
    {
 
      ostringstream text;
 
      text << D[0];
 
      xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
      xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
    }
 
    {
 
      ostringstream text;
 
      text << D[1];
 
      xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
      xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
    }
 
    {
 
      ostringstream text;
 
      text << D[2];
 
      xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
      xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
    }
 
    {
 
      ostringstream text;
 
      text << D[3];
 
      xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
      xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
    }
 
    {
 
      ostringstream text;
 
      text << D[4];
 
      xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
      xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
    }
 
    {
 
      ostringstream text;
 
      text << D[5];
 
      xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
      xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
    }
 
    {
 
      ostringstream text;
 
      text << D[6];
 
      xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
      xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
    }
 
    {
 
      ostringstream text;
 
      text << D[7];
 
      xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
      xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
    }
 
    {
 
      ostringstream text;
 
      text << D[8];
 
      xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
      xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
    }
 
    {
 
      ostringstream text;
 
      text << D[9];
 
      xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
      xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
    }
 
    {
 
      ostringstream text;
 
      text << D[10];
 
      xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
      xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
    }
 
    {
 
      ostringstream text;
 
      text << D[11];
 
      xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
      xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
    }
 
    {
 
      ostringstream text;
 
      text << D[12];
 
      xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
      xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
    }
 
    {
 
      ostringstream text;
 
      text << D[13];
 
      xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
      xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
    }
 
    {
 
      ostringstream text;
 
      text << D[14];
 
      xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
      xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
    }
 
    ostringstream text;
 
    text << D[1];
 
    xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
    xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    ostringstream text;
 
    text << D[2];
 
    xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
    xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    ostringstream text;
 
    text << D[3];
 
    xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
    xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    ostringstream text;
 
    text << D[4];
 
    xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
    xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    ostringstream text;
 
    text << D[5];
 
    xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
    xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    ostringstream text;
 
    text << D[6];
 
    xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
    xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    ostringstream text;
 
    text << D[7];
 
    xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
    xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    ostringstream text;
 
    text << D[8];
 
    xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
    xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    ostringstream text;
 
    text << D[9];
 
    xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
    xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    ostringstream text;
 
    text << D[10];
 
    xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
    xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    ostringstream text;
 
    text << D[11];
 
    xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
    xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    ostringstream text;
 
    text << D[12];
 
    xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
    xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    ostringstream text;
 
    text << D[13];
 
    xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
    xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "initval" );
 
    xmlNode *xmlvalarray = xmlNewChild(xmlpar, NULL, BAD_CAST "valarray", NULL);
 
    {
 
      ostringstream text;
 
      text << initval[0];
 
      xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
      xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
    }
 
    {
 
      ostringstream text;
 
      text << initval[1];
 
      xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
      xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
    }
 
    {
 
      ostringstream text;
 
      text << initval[2];
 
      xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
      xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
    }
 
    {
 
      ostringstream text;
 
      text << initval[3];
 
      xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
      xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
    }
 
    {
 
      ostringstream text;
 
      text << initval[4];
 
      xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
      xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
    }
 
    {
 
      ostringstream text;
 
      text << initval[5];
 
      xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
      xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
    }
 
    {
 
      ostringstream text;
 
      text << initval[6];
 
      xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
      xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
    }
 
    {
 
      ostringstream text;
 
      text << initval[7];
 
      xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
      xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
    }
 
    {
 
      ostringstream text;
 
      text << initval[8];
 
      xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
      xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
    }
 
    {
 
      ostringstream text;
 
      text << initval[9];
 
      xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
      xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
    }
 
    {
 
      ostringstream text;
 
      text << initval[10];
 
      xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
      xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
    }
 
    {
 
      ostringstream text;
 
      text << initval[11];
 
      xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
      xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
    }
 
    {
 
      ostringstream text;
 
      text << initval[12];
 
      xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
      xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
    }
 
    {
 
      ostringstream text;
 
      text << initval[13];
 
      xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
      xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
    }
 
    {
 
      ostringstream text;
 
      text << initval[14];
 
      xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
      xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
    }
 
    ostringstream text;
 
    text << D[14];
 
    xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
    xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
  }
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "initval" );
 
  xmlNode *xmlvalarray = xmlNewChild(xmlpar, NULL, BAD_CAST "valarray", NULL);
 
  {
 
    ostringstream text;
 
    text << initval[0];
 
    xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
    xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    ostringstream text;
 
    text << initval[1];
 
    xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
    xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    ostringstream text;
 
    text << initval[2];
 
    xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
    xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    ostringstream text;
 
    text << initval[3];
 
    xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
    xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    ostringstream text;
 
    text << initval[4];
 
    xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
    xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    ostringstream text;
 
    text << initval[5];
 
    xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
    xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "k1" );
 
    ostringstream text;
 
    text << k1;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "k2" );
 
    ostringstream text;
 
    text << k2;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
    text << initval[6];
 
    xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
    xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "r" );
 
    ostringstream text;
 
    text << r;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
    text << initval[7];
 
    xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
    xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "kr" );
 
    ostringstream text;
 
    text << kr;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "km" );
 
    ostringstream text;
 
    text << km;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
    text << initval[8];
 
    xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
    xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "Pi_tot" );
 
    ostringstream text;
 
    text << Pi_tot;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
    text << initval[9];
 
    xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
    xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "transport" );
 
    ostringstream text;
 
    text << transport;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "ka" );
 
    ostringstream text;
 
    text << ka;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
    text << initval[10];
 
    xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
    xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "pin_prod" );
 
    ostringstream text;
 
    text << pin_prod;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
    text << initval[11];
 
    xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
    xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "pin_prod_in_epidermis" );
 
    ostringstream text;
 
    text << pin_prod_in_epidermis;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
    text << initval[12];
 
    xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
    xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "pin_breakdown" );
 
    ostringstream text;
 
    text << pin_breakdown;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "pin_breakdown_internal" );
 
    ostringstream text;
 
    text << pin_breakdown_internal;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
    text << initval[13];
 
    xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
    xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "aux1prod" );
 
    ostringstream text;
 
    text << aux1prod;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "aux1prodmeso" );
 
    ostringstream text;
 
    text << aux1prodmeso;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "aux1decay" );
 
    ostringstream text;
 
    text << aux1decay;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "aux1decaymeso" );
 
    ostringstream text;
 
    text << aux1decaymeso;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "aux1transport" );
 
    ostringstream text;
 
    text << aux1transport;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "aux_cons" );
 
    ostringstream text;
 
    text << aux_cons;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "aux_breakdown" );
 
    ostringstream text;
 
    text << aux_breakdown;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "kaux1" );
 
    ostringstream text;
 
    text << kaux1;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
    text << initval[14];
 
    xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
    xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "kap" );
 
    ostringstream text;
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "k1" );
 
  ostringstream text;
 
    text << k1;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "k2" );
 
  ostringstream text;
 
    text << k2;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "r" );
 
  ostringstream text;
 
    text << r;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "kr" );
 
  ostringstream text;
 
    text << kr;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "km" );
 
  ostringstream text;
 
    text << km;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "Pi_tot" );
 
  ostringstream text;
 
    text << Pi_tot;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "transport" );
 
  ostringstream text;
 
    text << transport;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "ka" );
 
  ostringstream text;
 
    text << ka;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "pin_prod" );
 
  ostringstream text;
 
    text << pin_prod;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "pin_prod_in_epidermis" );
 
  ostringstream text;
 
    text << pin_prod_in_epidermis;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "pin_breakdown" );
 
  ostringstream text;
 
    text << pin_breakdown;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "pin_breakdown_internal" );
 
  ostringstream text;
 
    text << pin_breakdown_internal;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "aux1prod" );
 
  ostringstream text;
 
    text << aux1prod;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "aux1prodmeso" );
 
  ostringstream text;
 
    text << aux1prodmeso;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "aux1decay" );
 
  ostringstream text;
 
    text << aux1decay;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "aux1decaymeso" );
 
  ostringstream text;
 
    text << aux1decaymeso;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "aux1transport" );
 
  ostringstream text;
 
    text << aux1transport;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "aux_cons" );
 
  ostringstream text;
 
    text << aux_cons;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "aux_breakdown" );
 
  ostringstream text;
 
    text << aux_breakdown;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "kaux1" );
 
  ostringstream text;
 
    text << kaux1;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "kap" );
 
  ostringstream text;
 
    text << kap;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "leaf_tip_source" );
 
    ostringstream text;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "leaf_tip_source" );
 
  ostringstream text;
 
    text << leaf_tip_source;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "sam_efflux" );
 
    ostringstream text;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "sam_efflux" );
 
  ostringstream text;
 
    text << sam_efflux;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "sam_auxin" );
 
    ostringstream text;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "sam_auxin" );
 
  ostringstream text;
 
    text << sam_auxin;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "sam_auxin_breakdown" );
 
    ostringstream text;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "sam_auxin_breakdown" );
 
  ostringstream text;
 
    text << sam_auxin_breakdown;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "van3prod" );
 
    ostringstream text;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "van3prod" );
 
  ostringstream text;
 
    text << van3prod;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "van3autokat" );
 
    ostringstream text;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "van3autokat" );
 
  ostringstream text;
 
    text << van3autokat;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "van3sat" );
 
    ostringstream text;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "van3sat" );
 
  ostringstream text;
 
    text << van3sat;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "k2van3" );
 
    ostringstream text;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "k2van3" );
 
  ostringstream text;
 
    text << k2van3;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "dt" );
 
  ostringstream text;
 
    text << dt;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "rd_dt" );
 
  ostringstream text;
 
    text << rd_dt;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "datadir" );
 
  ostringstream text;
 

	
 
  if (datadir) {
 
                                     QDir dataDir = QDir::home().relativeFilePath(datadir);
 
                                     text << dataDir.dirName().toStdString();
 
                                   }
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "movie" );
 
  ostringstream text;
 
text << sbool(movie);
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "nit" );
 
  ostringstream text;
 
    text << nit;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "maxt" );
 
  ostringstream text;
 
    text << maxt;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "storage_stride" );
 
  ostringstream text;
 
    text << storage_stride;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "xml_storage_stride" );
 
  ostringstream text;
 
    text << xml_storage_stride;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "rseed" );
 
  ostringstream text;
 
    text << rseed;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "constituous_expansion_limit" );
 
  ostringstream text;
 
    text << constituous_expansion_limit;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "vessel_inh_level" );
 
  ostringstream text;
 
    text << vessel_inh_level;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "vessel_expansion_rate" );
 
  ostringstream text;
 
    text << vessel_expansion_rate;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "d" );
 
  ostringstream text;
 
    text << d;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "e" );
 
  ostringstream text;
 
    text << e;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "f" );
 
  ostringstream text;
 
    text << f;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "c" );
 
  ostringstream text;
 
    text << c;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "mu" );
 
  ostringstream text;
 
    text << mu;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "nu" );
 
  ostringstream text;
 
    text << nu;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "rho0" );
 
  ostringstream text;
 
    text << rho0;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "rho1" );
 
  ostringstream text;
 
    text << rho1;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "c0" );
 
  ostringstream text;
 
    text << c0;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "gamma" );
 
  ostringstream text;
 
    text << gamma;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "eps" );
 
  ostringstream text;
 
    text << eps;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "k" );
 
  xmlNode *xmlvalarray = xmlNewChild(xmlpar, NULL, BAD_CAST "valarray", NULL);
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "dt" );
 
    ostringstream text;
 
    text << dt;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "rd_dt" );
 
    ostringstream text;
 
    text << rd_dt;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "datadir" );
 
    ostringstream text;
 

	
 
    if (datadir) {
 
      QDir dataDir = QDir::home().relativeFilePath(datadir);
 
      text << dataDir.dirName().toStdString();
 
    }
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "movie" );
 
    ostringstream text;
 
    text << sbool(movie);
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "nit" );
 
    ostringstream text;
 
    text << nit;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "maxt" );
 
    ostringstream text;
 
    text << maxt;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "storage_stride" );
 
    ostringstream text;
 
    text << storage_stride;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "xml_storage_stride" );
 
    ostringstream text;
 
    text << xml_storage_stride;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "rseed" );
 
    ostringstream text;
 
    text << rseed;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "constituous_expansion_limit" );
 
    ostringstream text;
 
    text << constituous_expansion_limit;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "vessel_inh_level" );
 
    ostringstream text;
 
    text << vessel_inh_level;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "vessel_expansion_rate" );
 
    ostringstream text;
 
    text << vessel_expansion_rate;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "d" );
 
    ostringstream text;
 
    text << d;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "e" );
 
    ostringstream text;
 
    text << e;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "f" );
 
    ostringstream text;
 
    text << f;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "c" );
 
    ostringstream text;
 
    text << c;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "mu" );
 
    ostringstream text;
 
    text << mu;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
    text << k[0];
 
    xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
    xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "nu" );
 
    ostringstream text;
 
    text << nu;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
    text << k[1];
 
    xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
    xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    ostringstream text;
 
    text << k[2];
 
    xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
    xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "rho0" );
 
    ostringstream text;
 
    text << k[3];
 
    xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
    xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    ostringstream text;
 
    text << rho0;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
    text << k[4];
 
    xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
    xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    ostringstream text;
 
    text << k[5];
 
    xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
    xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    ostringstream text;
 
    text << k[6];
 
    xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
    xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "rho1" );
 
    ostringstream text;
 
    text << k[7];
 
    xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
    xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    ostringstream text;
 
    text << rho1;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
    text << k[8];
 
    xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
    xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    ostringstream text;
 
    text << k[9];
 
    xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
    xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "c0" );
 
    ostringstream text;
 
    text << c0;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
    text << k[10];
 
    xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
    xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "gamma" );
 
    ostringstream text;
 
    text << gamma;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
    text << k[11];
 
    xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
    xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "eps" );
 
    ostringstream text;
 
    text << eps;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
    text << k[12];
 
    xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
    xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    ostringstream text;
 
    text << k[13];
 
    xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
    xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "k" );
 
    xmlNode *xmlvalarray = xmlNewChild(xmlpar, NULL, BAD_CAST "valarray", NULL);
 
    {
 
      ostringstream text;
 
      text << k[0];
 
      xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
      xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
    }
 
    {
 
      ostringstream text;
 
      text << k[1];
 
      xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
      xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
    }
 
    {
 
      ostringstream text;
 
      text << k[2];
 
      xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
      xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
    }
 
    {
 
      ostringstream text;
 
      text << k[3];
 
      xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
      xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
    }
 
    {
 
      ostringstream text;
 
      text << k[4];
 
      xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
      xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
    }
 
    {
 
      ostringstream text;
 
      text << k[5];
 
      xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
      xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
    }
 
    {
 
      ostringstream text;
 
      text << k[6];
 
      xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
      xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
    }
 
    {
 
      ostringstream text;
 
      text << k[7];
 
      xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
      xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
    }
 
    {
 
      ostringstream text;
 
      text << k[8];
 
      xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
      xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
    }
 
    {
 
      ostringstream text;
 
      text << k[9];
 
      xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
      xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
    }
 
    {
 
      ostringstream text;
 
      text << k[10];
 
      xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
      xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
    }
 
    {
 
      ostringstream text;
 
      text << k[11];
 
      xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
      xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
    }
 
    {
 
      ostringstream text;
 
      text << k[12];
 
      xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
      xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
    }
 
    {
 
      ostringstream text;
 
      text << k[13];
 
      xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
      xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
    }
 
    {
 
      ostringstream text;
 
      text << k[14];
 
      xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
      xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
    }
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "i1" );
 
    ostringstream text;
 
    text << i1;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
    text << k[14];
 
    xmlNode *xmlval = xmlNewChild(xmlvalarray, NULL, BAD_CAST "val", NULL);
 
    xmlNewProp(xmlval, BAD_CAST "v", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "i2" );
 
    ostringstream text;
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "i1" );
 
  ostringstream text;
 
    text << i1;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "i2" );
 
  ostringstream text;
 
    text << i2;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "i3" );
 
    ostringstream text;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "i3" );
 
  ostringstream text;
 
    text << i3;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "i4" );
 
    ostringstream text;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "i4" );
 
  ostringstream text;
 
    text << i4;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "i5" );
 
    ostringstream text;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "i5" );
 
  ostringstream text;
 
    text << i5;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "s1" );
 
    ostringstream text;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "s1" );
 
  ostringstream text;
 

	
 
    if (s1) 
 
      text << s1;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "s2" );
 
    ostringstream text;
 
  if (s1) 
 
    text << s1;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "s2" );
 
  ostringstream text;
 

	
 
    if (s2) 
 
      text << s2;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "s3" );
 
    ostringstream text;
 
  if (s2) 
 
    text << s2;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "s3" );
 
  ostringstream text;
 

	
 
    if (s3) 
 
      text << s3;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "b1" );
 
    ostringstream text;
 
    text << sbool(b1);
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "b2" );
 
    ostringstream text;
 
    text << sbool(b2);
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "b3" );
 
    ostringstream text;
 
    text << sbool(b3);
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "b4" );
 
    ostringstream text;
 
    text << sbool(b4);
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "dir1" );
 
    ostringstream text;
 
  if (s3) 
 
    text << s3;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "b1" );
 
  ostringstream text;
 
text << sbool(b1);
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "b2" );
 
  ostringstream text;
 
text << sbool(b2);
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "b3" );
 
  ostringstream text;
 
text << sbool(b3);
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "b4" );
 
  ostringstream text;
 
text << sbool(b4);
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "dir1" );
 
  ostringstream text;
 

	
 
    if (dir1) 
 
      text << dir1;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  {
 
    xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
    xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "dir2" );
 
    ostringstream text;
 
  if (dir1) 
 
    text << dir1;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "dir2" );
 
  ostringstream text;
 

	
 
    if (dir2) 
 
      text << dir2;
 
    xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
  }
 
  if (dir2) 
 
    text << dir2;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "export_interval" );
 
  ostringstream text;
 
    text << export_interval;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
{
 
  xmlNode *xmlpar = xmlNewChild(xmlparameter, NULL, BAD_CAST "par", NULL);
 
  xmlNewProp(xmlpar, BAD_CAST "name", BAD_CAST "export_fn_prefix" );
 
  ostringstream text;
 

	
 
  if (export_fn_prefix) 
 
    text << export_fn_prefix;
 
xmlNewProp(xmlpar, BAD_CAST "val", BAD_CAST text.str().c_str());
 
}
 
}
 
void Parameter::AssignValToPar(const char *namec, const char *valc) {
 
  QLocale standardlocale(QLocale::C);
 
  bool ok;
 
  if (!strcmp(namec, "arrowcolor")) {
 
    if (arrowcolor) { free(arrowcolor); }
 
    arrowcolor=strdup(valc);
 
  }
 
  if (!strcmp(namec, "arrowsize")) {
 
    arrowsize = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'arrowsize' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "textcolor")) {
 
    if (textcolor) { free(textcolor); }
 
    textcolor=strdup(valc);
 
  }
 
  if (!strcmp(namec, "cellnumsize")) {
 
    cellnumsize = standardlocale.toInt(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to integer while reading parameter 'cellnumsize' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "nodenumsize")) {
 
    nodenumsize = standardlocale.toInt(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to integer while reading parameter 'nodenumsize' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "node_mag")) {
 
    node_mag = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'node_mag' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "outlinewidth")) {
 
    outlinewidth = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'outlinewidth' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "cell_outline_color")) {
 
    if (cell_outline_color) { free(cell_outline_color); }
 
    cell_outline_color=strdup(valc);
 
  }
 
  if (!strcmp(namec, "resize_stride")) {
 
    resize_stride = standardlocale.toInt(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to integer while reading parameter 'resize_stride' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "T")) {
 
    T = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'T' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "lambda_length")) {
 
    lambda_length = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'lambda_length' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "lambda_celllength")) {
 
    lambda_celllength = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'lambda_celllength' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "target_length")) {
 
    target_length = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'target_length' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "cell_expansion_rate")) {
 
    cell_expansion_rate = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'cell_expansion_rate' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "cell_div_expansion_rate")) {
 
    cell_div_expansion_rate = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'cell_div_expansion_rate' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "auxin_dependent_growth")) {
 
    auxin_dependent_growth = strtobool(valc);
 
  }
 
  if (!strcmp(namec, "ode_accuracy")) {
 
    ode_accuracy = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'ode_accuracy' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "mc_stepsize")) {
 
    mc_stepsize = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'mc_stepsize' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "mc_cell_stepsize")) {
 
    mc_cell_stepsize = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'mc_cell_stepsize' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "energy_threshold")) {
 
    energy_threshold = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'energy_threshold' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "bend_lambda")) {
 
    bend_lambda = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'bend_lambda' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "alignment_lambda")) {
 
    alignment_lambda = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'alignment_lambda' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "rel_cell_div_threshold")) {
 
    rel_cell_div_threshold = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'rel_cell_div_threshold' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "rel_perimeter_stiffness")) {
 
    rel_perimeter_stiffness = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'rel_perimeter_stiffness' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "collapse_node_threshold")) {
 
    collapse_node_threshold = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'collapse_node_threshold' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "morphogen_div_threshold")) {
 
    morphogen_div_threshold = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'morphogen_div_threshold' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "morphogen_expansion_threshold")) {
 
    morphogen_expansion_threshold = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'morphogen_expansion_threshold' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "copy_wall")) {
 
    copy_wall = strtobool(valc);
 
  }
 
  if (!strcmp(namec, "source")) {
 
    source = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'source' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "k1")) {
 
    k1 = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'k1' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "k2")) {
 
    k2 = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'k2' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "r")) {
 
    r = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'r' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "kr")) {
 
    kr = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'kr' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "km")) {
 
    km = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'km' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "Pi_tot")) {
 
    Pi_tot = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'Pi_tot' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "transport")) {
 
    transport = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'transport' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "ka")) {
 
    ka = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'ka' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "pin_prod")) {
 
    pin_prod = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'pin_prod' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "pin_prod_in_epidermis")) {
 
    pin_prod_in_epidermis = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'pin_prod_in_epidermis' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "pin_breakdown")) {
 
    pin_breakdown = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'pin_breakdown' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "pin_breakdown_internal")) {
 
    pin_breakdown_internal = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'pin_breakdown_internal' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "aux1prod")) {
 
    aux1prod = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'aux1prod' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "aux1prodmeso")) {
 
    aux1prodmeso = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'aux1prodmeso' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "aux1decay")) {
 
    aux1decay = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'aux1decay' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "aux1decaymeso")) {
 
    aux1decaymeso = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'aux1decaymeso' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "aux1transport")) {
 
    aux1transport = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'aux1transport' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "aux_cons")) {
 
    aux_cons = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'aux_cons' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "aux_breakdown")) {
 
    aux_breakdown = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'aux_breakdown' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "kaux1")) {
 
    kaux1 = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'kaux1' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "kap")) {
 
    kap = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'kap' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "leaf_tip_source")) {
 
    leaf_tip_source = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'leaf_tip_source' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "sam_efflux")) {
 
    sam_efflux = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'sam_efflux' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "sam_auxin")) {
 
    sam_auxin = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'sam_auxin' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "sam_auxin_breakdown")) {
 
    sam_auxin_breakdown = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'sam_auxin_breakdown' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "van3prod")) {
 
    van3prod = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'van3prod' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "van3autokat")) {
 
    van3autokat = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'van3autokat' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "van3sat")) {
 
    van3sat = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'van3sat' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "k2van3")) {
 
    k2van3 = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'k2van3' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "dt")) {
 
    dt = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'dt' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "rd_dt")) {
 
    rd_dt = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'rd_dt' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "datadir")) {
 
    if (datadir) { free(datadir); }
 
    datadir=strdup(valc);
 
    datadir = AppendHomeDirIfPathRelative(datadir);
 
  }
 
  if (!strcmp(namec, "movie")) {
 
    movie = strtobool(valc);
 
  }
 
  if (!strcmp(namec, "nit")) {
 
    nit = standardlocale.toInt(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to integer while reading parameter 'nit' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "maxt")) {
 
    maxt = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'maxt' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "storage_stride")) {
 
    storage_stride = standardlocale.toInt(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to integer while reading parameter 'storage_stride' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "xml_storage_stride")) {
 
    xml_storage_stride = standardlocale.toInt(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to integer while reading parameter 'xml_storage_stride' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "rseed")) {
 
    rseed = standardlocale.toInt(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to integer while reading parameter 'rseed' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "constituous_expansion_limit")) {
 
    constituous_expansion_limit = standardlocale.toInt(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to integer while reading parameter 'constituous_expansion_limit' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "vessel_inh_level")) {
 
    vessel_inh_level = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'vessel_inh_level' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "vessel_expansion_rate")) {
 
    vessel_expansion_rate = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'vessel_expansion_rate' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "d")) {
 
    d = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'd' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "e")) {
 
    e = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'e' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "f")) {
 
    f = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'f' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "c")) {
 
    c = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'c' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "mu")) {
 
    mu = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'mu' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "nu")) {
 
    nu = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'nu' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "rho0")) {
 
    rho0 = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'rho0' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "rho1")) {
 
    rho1 = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'rho1' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "c0")) {
 
    c0 = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'c0' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "gamma")) {
 
    gamma = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'gamma' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "eps")) {
 
    eps = standardlocale.toDouble(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'eps' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "i1")) {
 
    i1 = standardlocale.toInt(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to integer while reading parameter 'i1' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "i2")) {
 
    i2 = standardlocale.toInt(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to integer while reading parameter 'i2' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "i3")) {
 
    i3 = standardlocale.toInt(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to integer while reading parameter 'i3' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "i4")) {
 
    i4 = standardlocale.toInt(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to integer while reading parameter 'i4' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "i5")) {
 
    i5 = standardlocale.toInt(valc, &ok);
 
    if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to integer while reading parameter 'i5' from XML file.",valc); }
 
  }
 
  if (!strcmp(namec, "s1")) {
 
    if (s1) { free(s1); }
 
    s1=strdup(valc);
 
  }
 
  if (!strcmp(namec, "s2")) {
 
    if (s2) { free(s2); }
 
    s2=strdup(valc);
 
  }
 
  if (!strcmp(namec, "s3")) {
 
    if (s3) { free(s3); }
 
    s3=strdup(valc);
 
  }
 
  if (!strcmp(namec, "b1")) {
 
    b1 = strtobool(valc);
 
  }
 
  if (!strcmp(namec, "b2")) {
 
    b2 = strtobool(valc);
 
  }
 
  if (!strcmp(namec, "b3")) {
 
    b3 = strtobool(valc);
 
  }
 
  if (!strcmp(namec, "b4")) {
 
    b4 = strtobool(valc);
 
  }
 
  if (!strcmp(namec, "dir1")) {
 
    if (dir1) { free(dir1); }
 
    dir1=strdup(valc);
 
  }
 
  if (!strcmp(namec, "dir2")) {
 
    if (dir2) { free(dir2); }
 
    dir2=strdup(valc);
 
if (!strcmp(namec, "arrowcolor")) {
 
  if (arrowcolor) { free(arrowcolor); }
 
  arrowcolor=strdup(valc);
 
}
 
if (!strcmp(namec, "arrowsize")) {
 
  arrowsize = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'arrowsize' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "textcolor")) {
 
  if (textcolor) { free(textcolor); }
 
  textcolor=strdup(valc);
 
}
 
if (!strcmp(namec, "cellnumsize")) {
 
  cellnumsize = standardlocale.toInt(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to integer while reading parameter 'cellnumsize' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "nodenumsize")) {
 
  nodenumsize = standardlocale.toInt(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to integer while reading parameter 'nodenumsize' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "node_mag")) {
 
  node_mag = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'node_mag' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "outlinewidth")) {
 
  outlinewidth = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'outlinewidth' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "cell_outline_color")) {
 
  if (cell_outline_color) { free(cell_outline_color); }
 
  cell_outline_color=strdup(valc);
 
}
 
if (!strcmp(namec, "resize_stride")) {
 
  resize_stride = standardlocale.toInt(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to integer while reading parameter 'resize_stride' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "T")) {
 
  T = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'T' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "lambda_length")) {
 
  lambda_length = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'lambda_length' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "lambda_celllength")) {
 
  lambda_celllength = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'lambda_celllength' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "target_length")) {
 
  target_length = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'target_length' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "cell_expansion_rate")) {
 
  cell_expansion_rate = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'cell_expansion_rate' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "cell_div_expansion_rate")) {
 
  cell_div_expansion_rate = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'cell_div_expansion_rate' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "auxin_dependent_growth")) {
 
auxin_dependent_growth = strtobool(valc);
 
}
 
if (!strcmp(namec, "ode_accuracy")) {
 
  ode_accuracy = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'ode_accuracy' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "mc_stepsize")) {
 
  mc_stepsize = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'mc_stepsize' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "mc_cell_stepsize")) {
 
  mc_cell_stepsize = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'mc_cell_stepsize' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "energy_threshold")) {
 
  energy_threshold = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'energy_threshold' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "bend_lambda")) {
 
  bend_lambda = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'bend_lambda' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "alignment_lambda")) {
 
  alignment_lambda = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'alignment_lambda' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "rel_cell_div_threshold")) {
 
  rel_cell_div_threshold = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'rel_cell_div_threshold' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "rel_perimeter_stiffness")) {
 
  rel_perimeter_stiffness = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'rel_perimeter_stiffness' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "collapse_node_threshold")) {
 
  collapse_node_threshold = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'collapse_node_threshold' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "morphogen_div_threshold")) {
 
  morphogen_div_threshold = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'morphogen_div_threshold' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "morphogen_expansion_threshold")) {
 
  morphogen_expansion_threshold = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'morphogen_expansion_threshold' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "copy_wall")) {
 
copy_wall = strtobool(valc);
 
}
 
if (!strcmp(namec, "source")) {
 
  source = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'source' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "k1")) {
 
  k1 = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'k1' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "k2")) {
 
  k2 = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'k2' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "r")) {
 
  r = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'r' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "kr")) {
 
  kr = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'kr' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "km")) {
 
  km = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'km' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "Pi_tot")) {
 
  Pi_tot = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'Pi_tot' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "transport")) {
 
  transport = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'transport' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "ka")) {
 
  ka = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'ka' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "pin_prod")) {
 
  pin_prod = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'pin_prod' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "pin_prod_in_epidermis")) {
 
  pin_prod_in_epidermis = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'pin_prod_in_epidermis' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "pin_breakdown")) {
 
  pin_breakdown = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'pin_breakdown' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "pin_breakdown_internal")) {
 
  pin_breakdown_internal = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'pin_breakdown_internal' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "aux1prod")) {
 
  aux1prod = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'aux1prod' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "aux1prodmeso")) {
 
  aux1prodmeso = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'aux1prodmeso' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "aux1decay")) {
 
  aux1decay = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'aux1decay' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "aux1decaymeso")) {
 
  aux1decaymeso = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'aux1decaymeso' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "aux1transport")) {
 
  aux1transport = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'aux1transport' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "aux_cons")) {
 
  aux_cons = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'aux_cons' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "aux_breakdown")) {
 
  aux_breakdown = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'aux_breakdown' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "kaux1")) {
 
  kaux1 = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'kaux1' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "kap")) {
 
  kap = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'kap' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "leaf_tip_source")) {
 
  leaf_tip_source = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'leaf_tip_source' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "sam_efflux")) {
 
  sam_efflux = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'sam_efflux' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "sam_auxin")) {
 
  sam_auxin = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'sam_auxin' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "sam_auxin_breakdown")) {
 
  sam_auxin_breakdown = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'sam_auxin_breakdown' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "van3prod")) {
 
  van3prod = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'van3prod' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "van3autokat")) {
 
  van3autokat = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'van3autokat' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "van3sat")) {
 
  van3sat = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'van3sat' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "k2van3")) {
 
  k2van3 = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'k2van3' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "dt")) {
 
  dt = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'dt' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "rd_dt")) {
 
  rd_dt = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'rd_dt' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "datadir")) {
 
  if (datadir) { free(datadir); }
 
  datadir=strdup(valc);
 
  datadir = AppendHomeDirIfPathRelative(datadir);
 
}
 
if (!strcmp(namec, "movie")) {
 
movie = strtobool(valc);
 
}
 
if (!strcmp(namec, "nit")) {
 
  nit = standardlocale.toInt(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to integer while reading parameter 'nit' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "maxt")) {
 
  maxt = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'maxt' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "storage_stride")) {
 
  storage_stride = standardlocale.toInt(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to integer while reading parameter 'storage_stride' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "xml_storage_stride")) {
 
  xml_storage_stride = standardlocale.toInt(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to integer while reading parameter 'xml_storage_stride' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "rseed")) {
 
  rseed = standardlocale.toInt(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to integer while reading parameter 'rseed' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "constituous_expansion_limit")) {
 
  constituous_expansion_limit = standardlocale.toInt(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to integer while reading parameter 'constituous_expansion_limit' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "vessel_inh_level")) {
 
  vessel_inh_level = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'vessel_inh_level' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "vessel_expansion_rate")) {
 
  vessel_expansion_rate = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'vessel_expansion_rate' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "d")) {
 
  d = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'd' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "e")) {
 
  e = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'e' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "f")) {
 
  f = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'f' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "c")) {
 
  c = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'c' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "mu")) {
 
  mu = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'mu' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "nu")) {
 
  nu = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'nu' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "rho0")) {
 
  rho0 = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'rho0' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "rho1")) {
 
  rho1 = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'rho1' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "c0")) {
 
  c0 = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'c0' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "gamma")) {
 
  gamma = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'gamma' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "eps")) {
 
  eps = standardlocale.toDouble(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to double while reading parameter 'eps' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "i1")) {
 
  i1 = standardlocale.toInt(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to integer while reading parameter 'i1' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "i2")) {
 
  i2 = standardlocale.toInt(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to integer while reading parameter 'i2' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "i3")) {
 
  i3 = standardlocale.toInt(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to integer while reading parameter 'i3' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "i4")) {
 
  i4 = standardlocale.toInt(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to integer while reading parameter 'i4' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "i5")) {
 
  i5 = standardlocale.toInt(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to integer while reading parameter 'i5' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "s1")) {
 
  if (s1) { free(s1); }
 
  s1=strdup(valc);
 
}
 
if (!strcmp(namec, "s2")) {
 
  if (s2) { free(s2); }
 
  s2=strdup(valc);
 
}
 
if (!strcmp(namec, "s3")) {
 
  if (s3) { free(s3); }
 
  s3=strdup(valc);
 
}
 
if (!strcmp(namec, "b1")) {
 
b1 = strtobool(valc);
 
}
 
if (!strcmp(namec, "b2")) {
 
b2 = strtobool(valc);
 
}
 
if (!strcmp(namec, "b3")) {
 
b3 = strtobool(valc);
 
}
 
if (!strcmp(namec, "b4")) {
 
b4 = strtobool(valc);
 
}
 
if (!strcmp(namec, "dir1")) {
 
  if (dir1) { free(dir1); }
 
  dir1=strdup(valc);
 
}
 
if (!strcmp(namec, "dir2")) {
 
  if (dir2) { free(dir2); }
 
  dir2=strdup(valc);
 
}
 
if (!strcmp(namec, "export_interval")) {
 
  export_interval = standardlocale.toInt(valc, &ok);
 
  if (!ok) { MyWarning::error("Read error: cannot convert string \"%s\" to integer while reading parameter 'export_interval' from XML file.",valc); }
 
}
 
if (!strcmp(namec, "export_fn_prefix")) {
 
  if (export_fn_prefix) { free(export_fn_prefix); }
 
  export_fn_prefix=strdup(valc);
 
}
 
}
 
void Parameter::AssignValArrayToPar(const char *namec, vector<double> valarray) {
 
if (!strcmp(namec, "D")) {
 
  int i=0;
 
  vector<double>::const_iterator v=valarray.begin();
 
  while (v!=valarray.end() && i <= 14 ) {
 
     D[i++]=*(v++);
 
  }
 
}
 
void Parameter::AssignValArrayToPar(const char *namec, vector<double> valarray) {
 
  if (!strcmp(namec, "D")) {
 
    int i=0;
 
    vector<double>::const_iterator v=valarray.begin();
 
    while (v!=valarray.end() && i <= 14 ) {
 
      D[i++]=*(v++);
 
    }
 
if (!strcmp(namec, "initval")) {
 
  int i=0;
 
  vector<double>::const_iterator v=valarray.begin();
 
  while (v!=valarray.end() && i <= 14 ) {
 
     initval[i++]=*(v++);
 
  }
 
  if (!strcmp(namec, "initval")) {
 
    int i=0;
 
    vector<double>::const_iterator v=valarray.begin();
 
    while (v!=valarray.end() && i <= 14 ) {
 
      initval[i++]=*(v++);
 
    }
 
}
 
if (!strcmp(namec, "k")) {
 
  int i=0;
 
  vector<double>::const_iterator v=valarray.begin();
 
  while (v!=valarray.end() && i <= 14 ) {
 
     k[i++]=*(v++);
 
  }
 
  if (!strcmp(namec, "k")) {
 
    int i=0;
 
    vector<double>::const_iterator v=valarray.begin();
 
    while (v!=valarray.end() && i <= 14 ) {
 
      k[i++]=*(v++);
 
    }
 
  }
 
}
 
}
 

	
 
ostream &operator<<(ostream &os, Parameter &p) {
 
  p.Write(os);
 
  return os;
 
    p.Write(os);
 
    return os;
 
}
 

	
 
/* finis */
src/parameter.h
Show inline comments
 
/*
 
 *
 
 *  $Id$
 
 *
 
 *  This file is part of the Virtual Leaf.
 
 *
 
 *  VirtualLeaf is free software: you can redistribute it and/or modify
 
 *  it under the terms of the GNU General Public License as published by
 
 *  the Free Software Foundation, either version 3 of the License, or
 
 *  (at your option) any later version.
 
 *
 
 *  VirtualLeaf 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 General Public License for more details.
 
 *
 
 *  You should have received a copy of the GNU General Public License
 
 *  along with the Virtual Leaf.  If not, see <http://www.gnu.org/licenses/>.
 
 *
 
 *  Copyright 2010 Roeland Merks.
 
 *
 
 */
 

	
 
// WARNING: This file is automatically generated by make_parameter_source.pl. Do not edit.
 
// All edits will be discarded.
 

	
 
#ifndef _PARAMETER_H_
 
#define _PARAMETER_H_
 
#include "vector.h"
 
#include <vector>
 

	
 
#include <libxml/parser.h>
 
#include <libxml/tree.h>
 

	
 
 class Parameter {
 
		
 
 public: 
 
   Parameter();
 
   ~Parameter();
 
   void CleanUp(void);
 
   void Read(const char *filename);
 
   void Write(ostream &os) const;
 
   void XMLAdd(xmlNode *root) const;
 
   void XMLRead(xmlNode *root);
 
   void AssignValToPar(const char *namec, const char *valc);
 
   void AssignValArrayToPar(const char *namec, vector<double> valarray);
 
  char * arrowcolor;
 
  double arrowsize;
 
  char * textcolor;
 
  int cellnumsize;
 
@@ -118,34 +121,34 @@
 
  double f;
 
  double c;
 
  double mu;
 
  double nu;
 
  double rho0;
 
  double rho1;
 
  double c0;
 
  double gamma;
 
  double eps;
 
  double * k;
 
  int i1;
 
  int i2;
 
  int i3;
 
  int i4;
 
  int i5;
 
  char * s1;
 
  char * s2;
 
  char * s3;
 
  bool b1;
 
  bool b2;
 
  bool b3;
 
  bool b4;
 
  char * dir1;
 
  char * dir2;
 
  int export_interval;
 
  char * export_fn_prefix;
 
 private:
 
 };
 

	
 
 ostream &operator<<(ostream &os, Parameter &p);
 
 const char *sbool(const bool &p);
 

	
 

	
 
#endif
 

	
 
/* finis */
src/pardialog.cpp
Show inline comments
 
/*
 
 *
 
 *  This file is part of the Virtual Leaf.
 
 *
 
 *  VirtualLeaf is free software: you can redistribute it and/or modify
 
 *  it under the terms of the GNU General Public License as published by
 
 *  the Free Software Foundation, either version 3 of the License, or
 
 *  (at your option) any later version.
 
 *
 
 *  VirtualLeaf 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 General Public License for more details.
 
 *
 
 *  You should have received a copy of the GNU General Public License
 
 *  along with the Virtual Leaf.  If not, see <http://www.gnu.org/licenses/>.
 
 *
 
 *  Copyright 2010 Roeland Merks.
 
 *
 
 */
 

	
 
// Do not edit. All edits will be discarded.
 

	
 
#include "pardialog.h"
 
#include "parameter.h"
 
#include <cstring>
 
#include <qdialog.h>
 
#include <qlabel.h>
 
#include <qlineedit.h>
 
#include <qmessagebox.h>
 

	
 
static const std::string _module_id("$Id$");
 

	
 
ParameterDialog::ParameterDialog(QWidget *parent, const char *name, Qt::WindowFlags f) : QDialog(parent,name,false,f) {
 
  extern Parameter par;
 
    extern Parameter par;
 
  arrowcolor_edit = new QLineEdit( QString("%1").arg(par.arrowcolor), this, "arrowcolor_edit" );
 
  arrowsize_edit = new QLineEdit( QString("%1").arg(par.arrowsize), this, "arrowsize_edit" );
 
  textcolor_edit = new QLineEdit( QString("%1").arg(par.textcolor), this, "textcolor_edit" );
 
  cellnumsize_edit = new QLineEdit( QString("%1").arg(par.cellnumsize), this, "cellnumsize_edit" );
 
  nodenumsize_edit = new QLineEdit( QString("%1").arg(par.nodenumsize), this, "nodenumsize_edit" );
 
  node_mag_edit = new QLineEdit( QString("%1").arg(par.node_mag), this, "node_mag_edit" );
 
  outlinewidth_edit = new QLineEdit( QString("%1").arg(par.outlinewidth), this, "outlinewidth_edit" );
 
  cell_outline_color_edit = new QLineEdit( QString("%1").arg(par.cell_outline_color), this, "cell_outline_color_edit" );
 
  resize_stride_edit = new QLineEdit( QString("%1").arg(par.resize_stride), this, "resize_stride_edit" );
 
  T_edit = new QLineEdit( QString("%1").arg(par.T), this, "T_edit" );
 
  lambda_length_edit = new QLineEdit( QString("%1").arg(par.lambda_length), this, "lambda_length_edit" );
 
  lambda_celllength_edit = new QLineEdit( QString("%1").arg(par.lambda_celllength), this, "lambda_celllength_edit" );
 
  target_length_edit = new QLineEdit( QString("%1").arg(par.target_length), this, "target_length_edit" );
 
  cell_expansion_rate_edit = new QLineEdit( QString("%1").arg(par.cell_expansion_rate), this, "cell_expansion_rate_edit" );
 
  cell_div_expansion_rate_edit = new QLineEdit( QString("%1").arg(par.cell_div_expansion_rate), this, "cell_div_expansion_rate_edit" );
 
  auxin_dependent_growth_edit = new QLineEdit( QString("%1").arg(sbool(par.auxin_dependent_growth)), this, "auxin_dependent_growth_edit" );
 
  ode_accuracy_edit = new QLineEdit( QString("%1").arg(par.ode_accuracy), this, "ode_accuracy_edit" );
 
  mc_stepsize_edit = new QLineEdit( QString("%1").arg(par.mc_stepsize), this, "mc_stepsize_edit" );
 
  mc_cell_stepsize_edit = new QLineEdit( QString("%1").arg(par.mc_cell_stepsize), this, "mc_cell_stepsize_edit" );
 
  energy_threshold_edit = new QLineEdit( QString("%1").arg(par.energy_threshold), this, "energy_threshold_edit" );
 
  bend_lambda_edit = new QLineEdit( QString("%1").arg(par.bend_lambda), this, "bend_lambda_edit" );
 
  alignment_lambda_edit = new QLineEdit( QString("%1").arg(par.alignment_lambda), this, "alignment_lambda_edit" );
 
  rel_cell_div_threshold_edit = new QLineEdit( QString("%1").arg(par.rel_cell_div_threshold), this, "rel_cell_div_threshold_edit" );
 
  rel_perimeter_stiffness_edit = new QLineEdit( QString("%1").arg(par.rel_perimeter_stiffness), this, "rel_perimeter_stiffness_edit" );
 
@@ -114,54 +116,56 @@ ParameterDialog::ParameterDialog(QWidget
 
  mu_edit = new QLineEdit( QString("%1").arg(par.mu), this, "mu_edit" );
 
  nu_edit = new QLineEdit( QString("%1").arg(par.nu), this, "nu_edit" );
 
  rho0_edit = new QLineEdit( QString("%1").arg(par.rho0), this, "rho0_edit" );
 
  rho1_edit = new QLineEdit( QString("%1").arg(par.rho1), this, "rho1_edit" );
 
  c0_edit = new QLineEdit( QString("%1").arg(par.c0), this, "c0_edit" );
 
  gamma_edit = new QLineEdit( QString("%1").arg(par.gamma), this, "gamma_edit" );
 
  eps_edit = new QLineEdit( QString("%1").arg(par.eps), this, "eps_edit" );
 
  QString k_string("%1,%2,%3,%4,%5,%6,%7,%8,%9,%10,%11,%12,%13,%14,%15");
 
  k_string = k_string.arg(par.k[0]).arg(par.k[1]).arg(par.k[2]).arg(par.k[3]).arg(par.k[4]).arg(par.k[5]).arg(par.k[6]).arg(par.k[7]).arg(par.k[8]).arg(par.k[9]).arg(par.k[10]).arg(par.k[11]).arg(par.k[12]).arg(par.k[13]).arg(par.k[14]);
 
  k_edit = new QLineEdit( k_string, this, "k_edit" );
 
  i1_edit = new QLineEdit( QString("%1").arg(par.i1), this, "i1_edit" );
 
  i2_edit = new QLineEdit( QString("%1").arg(par.i2), this, "i2_edit" );
 
  i3_edit = new QLineEdit( QString("%1").arg(par.i3), this, "i3_edit" );
 
  i4_edit = new QLineEdit( QString("%1").arg(par.i4), this, "i4_edit" );
 
  i5_edit = new QLineEdit( QString("%1").arg(par.i5), this, "i5_edit" );
 
  s1_edit = new QLineEdit( QString("%1").arg(par.s1), this, "s1_edit" );
 
  s2_edit = new QLineEdit( QString("%1").arg(par.s2), this, "s2_edit" );
 
  s3_edit = new QLineEdit( QString("%1").arg(par.s3), this, "s3_edit" );
 
  b1_edit = new QLineEdit( QString("%1").arg(sbool(par.b1)), this, "b1_edit" );
 
  b2_edit = new QLineEdit( QString("%1").arg(sbool(par.b2)), this, "b2_edit" );
 
  b3_edit = new QLineEdit( QString("%1").arg(sbool(par.b3)), this, "b3_edit" );
 
  b4_edit = new QLineEdit( QString("%1").arg(sbool(par.b4)), this, "b4_edit" );
 
  dir1_edit = new QLineEdit( QString("%1").arg(par.dir1), this, "dir1_edit" );
 
  dir2_edit = new QLineEdit( QString("%1").arg(par.dir2), this, "dir2_edit" );
 
  // make a 1x1 grid; it will auto-expand
 
  QGridLayout *grid = new QGridLayout( this, 1, 1 );
 
  export_interval_edit = new QLineEdit( QString("%1").arg(par.export_interval), this, "export_interval_edit" );
 
  export_fn_prefix_edit = new QLineEdit( QString("%1").arg(par.export_fn_prefix), this, "export_fn_prefix_edit" );
 
// make a 1x1 grid; it will auto-expand
 
QGridLayout *grid = new QGridLayout( this, 1, 1 );
 
    
 
  // add the first four widgets with (row, column) addressing
 
  setWindowTitle( QString( " Parameter values for VirtualLeaf") );
 
  grid->addWidget( new QLabel( "<h3> Parameter values for VirtualLeaf</h3>",this), 0, 0, 1, -1, Qt::AlignCenter);
 
// add the first four widgets with (row, column) addressing
 
  setWindowTitle( QString( " Parameter values for The Virtual Leaf") );
 
  grid->addWidget( new QLabel( "<h3> Parameter values for The Virtual Leaf</h3>",this), 0, 0, 1, -1, Qt::AlignCenter);
 
  grid->addWidget( new QLabel( "", this), 0+1, 0, 1, -1);
 
  grid->addWidget( new QLabel( " <b>Visualization</b>", this), 3, 0, 1, 2 );
 
  grid->addWidget( new QLabel( "arrowcolor", this ),4, 0 );
 
  grid->addWidget( arrowcolor_edit, 4, 0+1  );
 
  grid->addWidget( new QLabel( "arrowsize", this ),5, 0 );
 
  grid->addWidget( arrowsize_edit, 5, 0+1  );
 
  grid->addWidget( new QLabel( "textcolor", this ),6, 0 );
 
  grid->addWidget( textcolor_edit, 6, 0+1  );
 
  grid->addWidget( new QLabel( "cellnumsize", this ),7, 0 );
 
  grid->addWidget( cellnumsize_edit, 7, 0+1  );
 
  grid->addWidget( new QLabel( "nodenumsize", this ),8, 0 );
 
  grid->addWidget( nodenumsize_edit, 8, 0+1  );
 
  grid->addWidget( new QLabel( "node_mag", this ),9, 0 );
 
  grid->addWidget( node_mag_edit, 9, 0+1  );
 
  grid->addWidget( new QLabel( "outlinewidth", this ),10, 0 );
 
  grid->addWidget( outlinewidth_edit, 10, 0+1  );
 
  grid->addWidget( new QLabel( "cell_outline_color", this ),11, 0 );
 
  grid->addWidget( cell_outline_color_edit, 11, 0+1  );
 
  grid->addWidget( new QLabel( "resize_stride", this ),12, 0 );
 
  grid->addWidget( resize_stride_edit, 12, 0+1  );
 
  grid->addWidget( new QLabel( "", this), 13, 0, 1, 2 );
 
  grid->addWidget( new QLabel( " <b>Cell mechanics</b>", this), 14, 0, 1, 2 );
 
  grid->addWidget( new QLabel( "T", this ),15, 0 );
 
  grid->addWidget( T_edit, 15, 0+1  );
 
@@ -328,204 +332,210 @@ ParameterDialog::ParameterDialog(QWidget
 
  grid->addWidget( new QLabel( "i3", this ),19, 6 );
 
  grid->addWidget( i3_edit, 19, 6+1  );
 
  grid->addWidget( new QLabel( "i4", this ),20, 6 );
 
  grid->addWidget( i4_edit, 20, 6+1  );
 
  grid->addWidget( new QLabel( "i5", this ),21, 6 );
 
  grid->addWidget( i5_edit, 21, 6+1  );
 
  grid->addWidget( new QLabel( "s1", this ),22, 6 );
 
  grid->addWidget( s1_edit, 22, 6+1  );
 
  grid->addWidget( new QLabel( "s2", this ),23, 6 );
 
  grid->addWidget( s2_edit, 23, 6+1  );
 
  grid->addWidget( new QLabel( "s3", this ),24, 6 );
 
  grid->addWidget( s3_edit, 24, 6+1  );
 
  grid->addWidget( new QLabel( "b1", this ),25, 6 );
 
  grid->addWidget( b1_edit, 25, 6+1  );
 
  grid->addWidget( new QLabel( "b2", this ),26, 6 );
 
  grid->addWidget( b2_edit, 26, 6+1  );
 
  grid->addWidget( new QLabel( "b3", this ),27, 6 );
 
  grid->addWidget( b3_edit, 27, 6+1  );
 
  grid->addWidget( new QLabel( "b4", this ),28, 6 );
 
  grid->addWidget( b4_edit, 28, 6+1  );
 
  grid->addWidget( new QLabel( "dir1", this ),29, 6 );
 
  grid->addWidget( dir1_edit, 29, 6+1  );
 
  grid->addWidget( new QLabel( "dir2", this ),3, 8 );
 
  grid->addWidget( dir2_edit, 3, 8+1  );
 
  QPushButton *pb = new QPushButton( "&Write", this );
 
  grid->addWidget(pb, 31, 6 );
 
  connect( pb, SIGNAL( clicked() ), this, SLOT( write() ) );
 
  QPushButton *pb2 = new QPushButton( "&Close", this );
 
  grid->addWidget(pb2,31, 6+1 );
 
  connect( pb2, SIGNAL( clicked() ), this, SLOT( close() ) );
 
  QPushButton *pb3 = new QPushButton( "&Reset", this );
 
  grid->addWidget(pb3, 31, 6+2 );
 
  connect( pb3, SIGNAL( clicked() ), this, SLOT( Reset() ) );
 
  show();
 
  grid->addWidget( new QLabel( "export_interval", this ),4, 8 );
 
  grid->addWidget( export_interval_edit, 4, 8+1  );
 
  grid->addWidget( new QLabel( "export_fn_prefix", this ),5, 8 );
 
  grid->addWidget( export_fn_prefix_edit, 5, 8+1  );
 
QPushButton *pb = new QPushButton( "&Write", this );
 
grid->addWidget(pb, 31, 6 );
 
connect( pb, SIGNAL( clicked() ), this, SLOT( write() ) );
 
QPushButton *pb2 = new QPushButton( "&Close", this );
 
grid->addWidget(pb2,31, 6+1 );
 
connect( pb2, SIGNAL( clicked() ), this, SLOT( close() ) );
 
QPushButton *pb3 = new QPushButton( "&Reset", this );
 
grid->addWidget(pb3, 31, 6+2 );
 
connect( pb3, SIGNAL( clicked() ), this, SLOT( Reset() ) );
 
show();
 
};
 

	
 
ParameterDialog::~ParameterDialog(void) {
 
  delete arrowcolor_edit;
 
  delete arrowsize_edit;
 
  delete textcolor_edit;
 
  delete cellnumsize_edit;
 
  delete nodenumsize_edit;
 
  delete node_mag_edit;
 
  delete outlinewidth_edit;
 
  delete cell_outline_color_edit;
 
  delete resize_stride_edit;
 
  delete T_edit;
 
  delete lambda_length_edit;
 
  delete lambda_celllength_edit;
 
  delete target_length_edit;
 
  delete cell_expansion_rate_edit;
 
  delete cell_div_expansion_rate_edit;
 
  delete auxin_dependent_growth_edit;
 
  delete ode_accuracy_edit;
 
  delete mc_stepsize_edit;
 
  delete mc_cell_stepsize_edit;
 
  delete energy_threshold_edit;
 
  delete bend_lambda_edit;
 
  delete alignment_lambda_edit;
 
  delete rel_cell_div_threshold_edit;
 
  delete rel_perimeter_stiffness_edit;
 
  delete collapse_node_threshold_edit;
 
  delete morphogen_div_threshold_edit;
 
  delete morphogen_expansion_threshold_edit;
 
  delete copy_wall_edit;
 
  delete source_edit;
 
  delete D_edit;
 
  delete initval_edit;
 
  delete k1_edit;
 
  delete k2_edit;
 
  delete r_edit;
 
  delete kr_edit;
 
  delete km_edit;
 
  delete Pi_tot_edit;
 
  delete transport_edit;
 
  delete ka_edit;
 
  delete pin_prod_edit;
 
  delete pin_prod_in_epidermis_edit;
 
  delete pin_breakdown_edit;
 
  delete pin_breakdown_internal_edit;
 
  delete aux1prod_edit;
 
  delete aux1prodmeso_edit;
 
  delete aux1decay_edit;
 
  delete aux1decaymeso_edit;
 
  delete aux1transport_edit;
 
  delete aux_cons_edit;
 
  delete aux_breakdown_edit;
 
  delete kaux1_edit;
 
  delete kap_edit;
 
  delete leaf_tip_source_edit;
 
  delete sam_efflux_edit;
 
  delete sam_auxin_edit;
 
  delete sam_auxin_breakdown_edit;
 
  delete van3prod_edit;
 
  delete van3autokat_edit;
 
  delete van3sat_edit;
 
  delete k2van3_edit;
 
  delete dt_edit;
 
  delete rd_dt_edit;
 
  delete datadir_edit;
 
  delete movie_edit;
 
  delete nit_edit;
 
  delete maxt_edit;
 
  delete storage_stride_edit;
 
  delete xml_storage_stride_edit;
 
  delete rseed_edit;
 
  delete constituous_expansion_limit_edit;
 
  delete vessel_inh_level_edit;
 
  delete vessel_expansion_rate_edit;
 
  delete d_edit;
 
  delete e_edit;
 
  delete f_edit;
 
  delete c_edit;
 
  delete mu_edit;
 
  delete nu_edit;
 
  delete rho0_edit;
 
  delete rho1_edit;
 
  delete c0_edit;
 
  delete gamma_edit;
 
  delete eps_edit;
 
  delete k_edit;
 
  delete i1_edit;
 
  delete i2_edit;
 
  delete i3_edit;
 
  delete i4_edit;
 
  delete i5_edit;
 
  delete s1_edit;
 
  delete s2_edit;
 
  delete s3_edit;
 
  delete b1_edit;
 
  delete b2_edit;
 
  delete b3_edit;
 
  delete b4_edit;
 
  delete dir1_edit;
 
  delete dir2_edit;
 
delete arrowcolor_edit;
 
delete arrowsize_edit;
 
delete textcolor_edit;
 
delete cellnumsize_edit;
 
delete nodenumsize_edit;
 
delete node_mag_edit;
 
delete outlinewidth_edit;
 
delete cell_outline_color_edit;
 
delete resize_stride_edit;
 
delete T_edit;
 
delete lambda_length_edit;
 
delete lambda_celllength_edit;
 
delete target_length_edit;
 
delete cell_expansion_rate_edit;
 
delete cell_div_expansion_rate_edit;
 
delete auxin_dependent_growth_edit;
 
delete ode_accuracy_edit;
 
delete mc_stepsize_edit;
 
delete mc_cell_stepsize_edit;
 
delete energy_threshold_edit;
 
delete bend_lambda_edit;
 
delete alignment_lambda_edit;
 
delete rel_cell_div_threshold_edit;
 
delete rel_perimeter_stiffness_edit;
 
delete collapse_node_threshold_edit;
 
delete morphogen_div_threshold_edit;
 
delete morphogen_expansion_threshold_edit;
 
delete copy_wall_edit;
 
delete source_edit;
 
delete D_edit;
 
delete initval_edit;
 
delete k1_edit;
 
delete k2_edit;
 
delete r_edit;
 
delete kr_edit;
 
delete km_edit;
 
delete Pi_tot_edit;
 
delete transport_edit;
 
delete ka_edit;
 
delete pin_prod_edit;
 
delete pin_prod_in_epidermis_edit;
 
delete pin_breakdown_edit;
 
delete pin_breakdown_internal_edit;
 
delete aux1prod_edit;
 
delete aux1prodmeso_edit;
 
delete aux1decay_edit;
 
delete aux1decaymeso_edit;
 
delete aux1transport_edit;
 
delete aux_cons_edit;
 
delete aux_breakdown_edit;
 
delete kaux1_edit;
 
delete kap_edit;
 
delete leaf_tip_source_edit;
 
delete sam_efflux_edit;
 
delete sam_auxin_edit;
 
delete sam_auxin_breakdown_edit;
 
delete van3prod_edit;
 
delete van3autokat_edit;
 
delete van3sat_edit;
 
delete k2van3_edit;
 
delete dt_edit;
 
delete rd_dt_edit;
 
delete datadir_edit;
 
delete movie_edit;
 
delete nit_edit;
 
delete maxt_edit;
 
delete storage_stride_edit;
 
delete xml_storage_stride_edit;
 
delete rseed_edit;
 
delete constituous_expansion_limit_edit;
 
delete vessel_inh_level_edit;
 
delete vessel_expansion_rate_edit;
 
delete d_edit;
 
delete e_edit;
 
delete f_edit;
 
delete c_edit;
 
delete mu_edit;
 
delete nu_edit;
 
delete rho0_edit;
 
delete rho1_edit;
 
delete c0_edit;
 
delete gamma_edit;
 
delete eps_edit;
 
delete k_edit;
 
delete i1_edit;
 
delete i2_edit;
 
delete i3_edit;
 
delete i4_edit;
 
delete i5_edit;
 
delete s1_edit;
 
delete s2_edit;
 
delete s3_edit;
 
delete b1_edit;
 
delete b2_edit;
 
delete b3_edit;
 
delete b4_edit;
 
delete dir1_edit;
 
delete dir2_edit;
 
delete export_interval_edit;
 
delete export_fn_prefix_edit;
 
}
 

	
 
void ParameterDialog::write(void) {
 
    
 
  extern Parameter par;
 
  QString tmpval;
 
extern Parameter par;
 
QString tmpval;
 
  par.arrowcolor = strdup((const char *)arrowcolor_edit->text());
 
  par.arrowsize = arrowsize_edit->text().toDouble();
 
  par.textcolor = strdup((const char *)textcolor_edit->text());
 
  par.cellnumsize = cellnumsize_edit->text().toInt();
 
  par.nodenumsize = nodenumsize_edit->text().toInt();
 
  par.node_mag = node_mag_edit->text().toDouble();
 
  par.outlinewidth = outlinewidth_edit->text().toDouble();
 
  par.cell_outline_color = strdup((const char *)cell_outline_color_edit->text());
 
  par.resize_stride = resize_stride_edit->text().toInt();
 
  par.T = T_edit->text().toDouble();
 
  par.lambda_length = lambda_length_edit->text().toDouble();
 
  par.lambda_celllength = lambda_celllength_edit->text().toDouble();
 
  par.target_length = target_length_edit->text().toDouble();
 
  par.cell_expansion_rate = cell_expansion_rate_edit->text().toDouble();
 
  par.cell_div_expansion_rate = cell_div_expansion_rate_edit->text().toDouble();
 
  tmpval = auxin_dependent_growth_edit->text().stripWhiteSpace();
 
  if (tmpval == "true" || tmpval == "yes" ) par.auxin_dependent_growth = true;
 
  else if (tmpval == "false" || tmpval == "no") par.auxin_dependent_growth = false;
 
  else {
 
    if (QMessageBox::question(this, "Syntax error", tr("Value %1 of parameter %2 is not recognized as Boolean.\nDo you mean TRUE or FALSE?").arg(tmpval).arg("auxin_dependent_growth"),"True","False", QString::null, 0, 1)==0) par.auxin_dependent_growth=true;
 
    else par.auxin_dependent_growth=false;
 
      else par.auxin_dependent_growth=false;
 
  }
 
  par.ode_accuracy = ode_accuracy_edit->text().toDouble();
 
  par.mc_stepsize = mc_stepsize_edit->text().toDouble();
 
  par.mc_cell_stepsize = mc_cell_stepsize_edit->text().toDouble();
 
  par.energy_threshold = energy_threshold_edit->text().toDouble();
 
  par.bend_lambda = bend_lambda_edit->text().toDouble();
 
  par.alignment_lambda = alignment_lambda_edit->text().toDouble();
 
  par.rel_cell_div_threshold = rel_cell_div_threshold_edit->text().toDouble();
 
  par.rel_perimeter_stiffness = rel_perimeter_stiffness_edit->text().toDouble();
 
  par.collapse_node_threshold = collapse_node_threshold_edit->text().toDouble();
 
  par.morphogen_div_threshold = morphogen_div_threshold_edit->text().toDouble();
 
  par.morphogen_expansion_threshold = morphogen_expansion_threshold_edit->text().toDouble();
 
  tmpval = copy_wall_edit->text().stripWhiteSpace();
 
  if (tmpval == "true" || tmpval == "yes" ) par.copy_wall = true;
 
  else if (tmpval == "false" || tmpval == "no") par.copy_wall = false;
 
  else {
 
    if (QMessageBox::question(this, "Syntax error", tr("Value %1 of parameter %2 is not recognized as Boolean.\nDo you mean TRUE or FALSE?").arg(tmpval).arg("copy_wall"),"True","False", QString::null, 0, 1)==0) par.copy_wall=true;
 
    else par.copy_wall=false;
 
      else par.copy_wall=false;
 
  }
 
  par.source = source_edit->text().toDouble();
 
  tmpval = D_edit->text().section(',', 0, 0);
 
  par.D[0] = tmpval.toDouble();
 
  tmpval = D_edit->text().section(',', 1, 1);
 
  par.D[1] = tmpval.toDouble();
 
  tmpval = D_edit->text().section(',', 2, 2);
 
  par.D[2] = tmpval.toDouble();
 
  tmpval = D_edit->text().section(',', 3, 3);
 
  par.D[3] = tmpval.toDouble();
 
  tmpval = D_edit->text().section(',', 4, 4);
 
  par.D[4] = tmpval.toDouble();
 
  tmpval = D_edit->text().section(',', 5, 5);
 
  par.D[5] = tmpval.toDouble();
 
  tmpval = D_edit->text().section(',', 6, 6);
 
  par.D[6] = tmpval.toDouble();
 
  tmpval = D_edit->text().section(',', 7, 7);
 
  par.D[7] = tmpval.toDouble();
 
  tmpval = D_edit->text().section(',', 8, 8);
 
  par.D[8] = tmpval.toDouble();
 
  tmpval = D_edit->text().section(',', 9, 9);
 
  par.D[9] = tmpval.toDouble();
 
  tmpval = D_edit->text().section(',', 10, 10);
 
  par.D[10] = tmpval.toDouble();
 
@@ -583,49 +593,49 @@ void ParameterDialog::write(void) {
 
  par.aux1prodmeso = aux1prodmeso_edit->text().toDouble();
 
  par.aux1decay = aux1decay_edit->text().toDouble();
 
  par.aux1decaymeso = aux1decaymeso_edit->text().toDouble();
 
  par.aux1transport = aux1transport_edit->text().toDouble();
 
  par.aux_cons = aux_cons_edit->text().toDouble();
 
  par.aux_breakdown = aux_breakdown_edit->text().toDouble();
 
  par.kaux1 = kaux1_edit->text().toDouble();
 
  par.kap = kap_edit->text().toDouble();
 
  par.leaf_tip_source = leaf_tip_source_edit->text().toDouble();
 
  par.sam_efflux = sam_efflux_edit->text().toDouble();
 
  par.sam_auxin = sam_auxin_edit->text().toDouble();
 
  par.sam_auxin_breakdown = sam_auxin_breakdown_edit->text().toDouble();
 
  par.van3prod = van3prod_edit->text().toDouble();
 
  par.van3autokat = van3autokat_edit->text().toDouble();
 
  par.van3sat = van3sat_edit->text().toDouble();
 
  par.k2van3 = k2van3_edit->text().toDouble();
 
  par.dt = dt_edit->text().toDouble();
 
  par.rd_dt = rd_dt_edit->text().toDouble();
 
  par.datadir = strdup((const char *)datadir_edit->text());
 
  tmpval = movie_edit->text().stripWhiteSpace();
 
  if (tmpval == "true" || tmpval == "yes" ) par.movie = true;
 
  else if (tmpval == "false" || tmpval == "no") par.movie = false;
 
  else {
 
    if (QMessageBox::question(this, "Syntax error", tr("Value %1 of parameter %2 is not recognized as Boolean.\nDo you mean TRUE or FALSE?").arg(tmpval).arg("movie"),"True","False", QString::null, 0, 1)==0) par.movie=true;
 
    else par.movie=false;
 
      else par.movie=false;
 
  }
 
  par.nit = nit_edit->text().toInt();
 
  par.maxt = maxt_edit->text().toDouble();
 
  par.storage_stride = storage_stride_edit->text().toInt();
 
  par.xml_storage_stride = xml_storage_stride_edit->text().toInt();
 
  par.rseed = rseed_edit->text().toInt();
 
  par.constituous_expansion_limit = constituous_expansion_limit_edit->text().toInt();
 
  par.vessel_inh_level = vessel_inh_level_edit->text().toDouble();
 
  par.vessel_expansion_rate = vessel_expansion_rate_edit->text().toDouble();
 
  par.d = d_edit->text().toDouble();
 
  par.e = e_edit->text().toDouble();
 
  par.f = f_edit->text().toDouble();
 
  par.c = c_edit->text().toDouble();
 
  par.mu = mu_edit->text().toDouble();
 
  par.nu = nu_edit->text().toDouble();
 
  par.rho0 = rho0_edit->text().toDouble();
 
  par.rho1 = rho1_edit->text().toDouble();
 
  par.c0 = c0_edit->text().toDouble();
 
  par.gamma = gamma_edit->text().toDouble();
 
  par.eps = eps_edit->text().toDouble();
 
  tmpval = k_edit->text().section(',', 0, 0);
 
  par.k[0] = tmpval.toDouble();
 
  tmpval = k_edit->text().section(',', 1, 1);
 
  par.k[1] = tmpval.toDouble();
 
@@ -647,74 +657,76 @@ void ParameterDialog::write(void) {
 
  par.k[9] = tmpval.toDouble();
 
  tmpval = k_edit->text().section(',', 10, 10);
 
  par.k[10] = tmpval.toDouble();
 
  tmpval = k_edit->text().section(',', 11, 11);
 
  par.k[11] = tmpval.toDouble();
 
  tmpval = k_edit->text().section(',', 12, 12);
 
  par.k[12] = tmpval.toDouble();
 
  tmpval = k_edit->text().section(',', 13, 13);
 
  par.k[13] = tmpval.toDouble();
 
  tmpval = k_edit->text().section(',', 14, 14);
 
  par.k[14] = tmpval.toDouble();
 
  par.i1 = i1_edit->text().toInt();
 
  par.i2 = i2_edit->text().toInt();
 
  par.i3 = i3_edit->text().toInt();
 
  par.i4 = i4_edit->text().toInt();
 
  par.i5 = i5_edit->text().toInt();
 
  par.s1 = strdup((const char *)s1_edit->text());
 
  par.s2 = strdup((const char *)s2_edit->text());
 
  par.s3 = strdup((const char *)s3_edit->text());
 
  tmpval = b1_edit->text().stripWhiteSpace();
 
  if (tmpval == "true" || tmpval == "yes" ) par.b1 = true;
 
  else if (tmpval == "false" || tmpval == "no") par.b1 = false;
 
  else {
 
    if (QMessageBox::question(this, "Syntax error", tr("Value %1 of parameter %2 is not recognized as Boolean.\nDo you mean TRUE or FALSE?").arg(tmpval).arg("b1"),"True","False", QString::null, 0, 1)==0) par.b1=true;
 
    else par.b1=false;
 
      else par.b1=false;
 
  }
 
  tmpval = b2_edit->text().stripWhiteSpace();
 
  if (tmpval == "true" || tmpval == "yes" ) par.b2 = true;
 
  else if (tmpval == "false" || tmpval == "no") par.b2 = false;
 
  else {
 
    if (QMessageBox::question(this, "Syntax error", tr("Value %1 of parameter %2 is not recognized as Boolean.\nDo you mean TRUE or FALSE?").arg(tmpval).arg("b2"),"True","False", QString::null, 0, 1)==0) par.b2=true;
 
    else par.b2=false;
 
      else par.b2=false;
 
  }
 
  tmpval = b3_edit->text().stripWhiteSpace();
 
  if (tmpval == "true" || tmpval == "yes" ) par.b3 = true;
 
  else if (tmpval == "false" || tmpval == "no") par.b3 = false;
 
  else {
 
    if (QMessageBox::question(this, "Syntax error", tr("Value %1 of parameter %2 is not recognized as Boolean.\nDo you mean TRUE or FALSE?").arg(tmpval).arg("b3"),"True","False", QString::null, 0, 1)==0) par.b3=true;
 
    else par.b3=false;
 
      else par.b3=false;
 
  }
 
  tmpval = b4_edit->text().stripWhiteSpace();
 
  if (tmpval == "true" || tmpval == "yes" ) par.b4 = true;
 
  else if (tmpval == "false" || tmpval == "no") par.b4 = false;
 
  else {
 
    if (QMessageBox::question(this, "Syntax error", tr("Value %1 of parameter %2 is not recognized as Boolean.\nDo you mean TRUE or FALSE?").arg(tmpval).arg("b4"),"True","False", QString::null, 0, 1)==0) par.b4=true;
 
    else par.b4=false;
 
      else par.b4=false;
 
  }
 
  par.dir1 = strdup((const char *)dir1_edit->text());
 
  par.dir2 = strdup((const char *)dir2_edit->text());
 
  Reset();
 
  par.export_interval = export_interval_edit->text().toInt();
 
  par.export_fn_prefix = strdup((const char *)export_fn_prefix_edit->text());
 
Reset();
 

	
 
}
 
void ParameterDialog::Reset(void) {
 
  extern Parameter par;
 
  arrowcolor_edit->setText( QString("%1").arg(par.arrowcolor) );
 
  arrowsize_edit->setText( QString("%1").arg(par.arrowsize) );
 
  textcolor_edit->setText( QString("%1").arg(par.textcolor) );
 
  cellnumsize_edit->setText( QString("%1").arg(par.cellnumsize) );
 
  nodenumsize_edit->setText( QString("%1").arg(par.nodenumsize) );
 
  node_mag_edit->setText( QString("%1").arg(par.node_mag) );
 
  outlinewidth_edit->setText( QString("%1").arg(par.outlinewidth) );
 
  cell_outline_color_edit->setText( QString("%1").arg(par.cell_outline_color) );
 
  resize_stride_edit->setText( QString("%1").arg(par.resize_stride) );
 
  T_edit->setText( QString("%1").arg(par.T) );
 
  lambda_length_edit->setText( QString("%1").arg(par.lambda_length) );
 
  lambda_celllength_edit->setText( QString("%1").arg(par.lambda_celllength) );
 
  target_length_edit->setText( QString("%1").arg(par.target_length) );
 
  cell_expansion_rate_edit->setText( QString("%1").arg(par.cell_expansion_rate) );
 
  cell_div_expansion_rate_edit->setText( QString("%1").arg(par.cell_div_expansion_rate) );
 
  auxin_dependent_growth_edit->setText( QString("%1").arg(sbool(par.auxin_dependent_growth)));
 
  ode_accuracy_edit->setText( QString("%1").arg(par.ode_accuracy) );
 
  mc_stepsize_edit->setText( QString("%1").arg(par.mc_stepsize) );
 
  mc_cell_stepsize_edit->setText( QString("%1").arg(par.mc_cell_stepsize) );
 
  energy_threshold_edit->setText( QString("%1").arg(par.energy_threshold) );
 
@@ -781,27 +793,29 @@ void ParameterDialog::Reset(void) {
 
  mu_edit->setText( QString("%1").arg(par.mu) );
 
  nu_edit->setText( QString("%1").arg(par.nu) );
 
  rho0_edit->setText( QString("%1").arg(par.rho0) );
 
  rho1_edit->setText( QString("%1").arg(par.rho1) );
 
  c0_edit->setText( QString("%1").arg(par.c0) );
 
  gamma_edit->setText( QString("%1").arg(par.gamma) );
 
  eps_edit->setText( QString("%1").arg(par.eps) );
 
  QString k_string("%1,%2,%3,%4,%5,%6,%7,%8,%9,%10,%11,%12,%13,%14,%15");
 
  k_string = k_string.arg(par.k[0]).arg(par.k[1]).arg(par.k[2]).arg(par.k[3]).arg(par.k[4]).arg(par.k[5]).arg(par.k[6]).arg(par.k[7]).arg(par.k[8]).arg(par.k[9]).arg(par.k[10]).arg(par.k[11]).arg(par.k[12]).arg(par.k[13]).arg(par.k[14]);
 
  k_edit->setText( k_string );
 
  i1_edit->setText( QString("%1").arg(par.i1) );
 
  i2_edit->setText( QString("%1").arg(par.i2) );
 
  i3_edit->setText( QString("%1").arg(par.i3) );
 
  i4_edit->setText( QString("%1").arg(par.i4) );
 
  i5_edit->setText( QString("%1").arg(par.i5) );
 
  s1_edit->setText( QString("%1").arg(par.s1) );
 
  s2_edit->setText( QString("%1").arg(par.s2) );
 
  s3_edit->setText( QString("%1").arg(par.s3) );
 
  b1_edit->setText( QString("%1").arg(sbool(par.b1)));
 
  b2_edit->setText( QString("%1").arg(sbool(par.b2)));
 
  b3_edit->setText( QString("%1").arg(sbool(par.b3)));
 
  b4_edit->setText( QString("%1").arg(sbool(par.b4)));
 
  dir1_edit->setText( QString("%1").arg(par.dir1) );
 
  dir2_edit->setText( QString("%1").arg(par.dir2) );
 
  export_interval_edit->setText( QString("%1").arg(par.export_interval) );
 
  export_fn_prefix_edit->setText( QString("%1").arg(par.export_fn_prefix) );
 
}
 

	
 
/* finis */
src/pardialog.h
Show inline comments
 
/*
 
 *
 
 *  $Id$
 
 *
 
 *  This file is part of the Virtual Leaf.
 
 *
 
 *  VirtualLeaf is free software: you can redistribute it and/or modify
 
 *  it under the terms of the GNU General Public License as published by
 
 *  the Free Software Foundation, either version 3 of the License, or
 
 *  (at your option) any later version.
 
 *
 
 *  VirtualLeaf 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 General Public License for more details.
 
 *
 
 *  You should have received a copy of the GNU General Public License
 
 *  along with the Virtual Leaf.  If not, see <http://www.gnu.org/licenses/>.
 
 *
 
 *  Copyright 2010 Roeland Merks.
 
 *
 
 */
 

	
 
// WARNING: This file is automatically generated by make_parameter_source.pl. Do not edit.
 
// All edits will be discarded.
 

	
 
#ifndef PARAMETER_DIALOG_H
 
#define PARAMETER_DIALOG_H
 
#include <qdialog.h>
 
#include <qspinbox.h>
 
#include <qlineedit.h>
 
#include <qlayout.h>
 
#include <qpushbutton.h>
 
#include <iostream>
 

	
 
class ParameterDialog : public QDialog {
 
    Q_OBJECT
 
	
 
      public:
 
	ParameterDialog(QWidget *parent=0, const char *name = 0, Qt::WindowFlags f = 0);
 
    virtual ~ParameterDialog(void);
 
    public slots:
 
    void Reset(void);
 

	
 
    private slots:
 
    void write(void);
 

	
 
  private:
 
  QLineEdit *arrowcolor_edit;
 
  QLineEdit *arrowsize_edit;
 
@@ -97,26 +123,29 @@ class ParameterDialog : public QDialog {
 
  QLineEdit *f_edit;
 
  QLineEdit *c_edit;
 
  QLineEdit *mu_edit;
 
  QLineEdit *nu_edit;
 
  QLineEdit *rho0_edit;
 
  QLineEdit *rho1_edit;
 
  QLineEdit *c0_edit;
 
  QLineEdit *gamma_edit;
 
  QLineEdit *eps_edit;
 
  QLineEdit *k_edit;
 
  QLineEdit *i1_edit;
 
  QLineEdit *i2_edit;
 
  QLineEdit *i3_edit;
 
  QLineEdit *i4_edit;
 
  QLineEdit *i5_edit;
 
  QLineEdit *s1_edit;
 
  QLineEdit *s2_edit;
 
  QLineEdit *s3_edit;
 
  QLineEdit *b1_edit;
 
  QLineEdit *b2_edit;
 
  QLineEdit *b3_edit;
 
  QLineEdit *b4_edit;
 
  QLineEdit *dir1_edit;
 
  QLineEdit *dir2_edit;
 
  QLineEdit *export_interval_edit;
 
  QLineEdit *export_fn_prefix_edit;
 
};
 
#endif
 

	
src/perl/ChangeLog
Show inline comments
 
2010-10-08    <guravage@caterpie.sen.cwi.nl>
 

	
 
	* make_pardialog_source.pl:
 
	* make_parameter_source.pl: Added GPL boilerplate and mercurial keywords.
 

	
 
2010-06-25    <guravage@caterpie.sen.cwi.nl>
 

	
 
	* make_parameter_source.pl: Added datadir changes.
 

	
 
2010-06-21    <guravage@caterpie.sen.cwi.nl>
 

	
 
	* make_pardialog_source.pl: Reformatted. If datadir is relative append it to the user's home directory.
 
	* make_parameter_source.pl: Ditto.
 
	* make_xmlwritecode.pl: Ditto.
 

	
src/perl/make_parameter_source.pl
Show inline comments
 
@@ -67,68 +67,91 @@ while (<parfile>) {
 
    $value_type=$line[1];
 

	
 
    @typel=split(/ \/ /,$value_type);
 
    $value[$i] = $typel[0];
 
    $type[$i] = $typel[1];
 
    
 
#get rid of spaces
 
    $param[$i] =~ s/ //g;
 
    $value[$i] =~ s/ //g;
 
    $type[$i] =~ s/ //g;
 
    $type[$i] =~s/\n//g;
 
    $convtype[$i]=$typetrans{$type[$i]};
 

	
 
    if ($convtype[$i] eq "char *") {
 
	$value[$i] = "\"$value[$i]\"";
 
    }
 
    #print cppfile "param = $param, value = $value, type = $type\n";
 

	
 
    $i++;
 
}
 

	
 
$lines=$i;
 

	
 
print cppfile <<END_HEADER;
 
/*
 
 *
 
 *  This file is part of the Virtual Leaf.
 
 *
 
 *  VirtualLeaf is free software: you can redistribute it and/or modify
 
 *  it under the terms of the GNU General Public License as published by
 
 *  the Free Software Foundation, either version 3 of the License, or
 
 *  (at your option) any later version.
 
 *
 
 *  VirtualLeaf 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 General Public License for more details.
 
 *
 
 *  You should have received a copy of the GNU General Public License
 
 *  along with the Virtual Leaf.  If not, see <http://www.gnu.org/licenses/>.
 
 *
 
 *  Copyright 2010 Roeland Merks.
 
 *
 
 */
 

	
 
// WARNING: This file is automatically generated by make_parameter_source.pl.
 
// Do not edit. All edits will be discarded.
 

	
 
#include "parameter.h"
 
#include <cstdio>
 
#include <cstring>
 
#include <cstdlib>
 
#include <cerrno>
 
#include <iostream>
 
#include <sstream>
 
#include "output.h"
 
#include "parse.h"
 
#include "xmlwrite.h"
 
#include "warning.h"
 
#include <QLocale>
 
#include <QDir>
 
#include <QStringList>
 

	
 
using namespace std;
 

	
 
static const std::string _module_id("\$Id\$");
 

	
 
Parameter::Parameter() {
 
END_HEADER
 

	
 
for ($i=0;$i<$lines;$i++) {
 
    if ($convtype[$i] ne "label" && $convtype[$i] ne "title") {
 
	if ($convtype[$i] eq "char *") {
 
	    print cppfile "  $param[$i] = strdup($value[$i]);\n";
 
	    if ($param[$i] eq "datadir") {
 
		print cppfile "  datadir = AppendHomeDirIfPathRelative(datadir);\n";
 
	    }
 
	} else {
 
	    if ($convtype[$i] eq "double *") {
 
                #comma separated list expected
 
		@paramlist = split(/,/, $value[$i]);
 
		$length = $#paramlist+1;
 
		print cppfile "  $param[$i] = new double\[$length\];\n";
 
		for ($j=0;$j<=$#paramlist;$j++) {
 
		    print cppfile "  $param[$i]\[$j\] = $paramlist[$j];\n";
 
		}
 
	    } else {
 
		print cppfile "  $param[$i] = $value[$i];\n";
 
	    }
 
	}
 
    }
 
@@ -352,50 +375,73 @@ for ($i=0;$i<$lines;$i++) {
 
	print cppfile "  while (v!=valarray.end() && i <= $#paramlist ) {\n";
 
	print cppfile "     $param[$i]\[i++\]=*(v++);\n";
 
	print cppfile "  }\n";
 
	print cppfile "}\n";
 
    }
 
}
 

	
 
print cppfile "}\n";
 

	
 
print cppfile <<END_TRAILER;
 

	
 
ostream &operator<<(ostream &os, Parameter &p) {
 
    p.Write(os);
 
    return os;
 
}
 

	
 
END_TRAILER
 

	
 

	
 

	
 
# parameter.h
 

	
 
open hfile, ">parameter.h";
 
print hfile <<END_HEADER2;
 
/*
 
 *
 
 *  \$Id\$
 
 *
 
 *  This file is part of the Virtual Leaf.
 
 *
 
 *  VirtualLeaf is free software: you can redistribute it and/or modify
 
 *  it under the terms of the GNU General Public License as published by
 
 *  the Free Software Foundation, either version 3 of the License, or
 
 *  (at your option) any later version.
 
 *
 
 *  VirtualLeaf 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 General Public License for more details.
 
 *
 
 *  You should have received a copy of the GNU General Public License
 
 *  along with the Virtual Leaf.  If not, see <http://www.gnu.org/licenses/>.
 
 *
 
 *  Copyright 2010 Roeland Merks.
 
 *
 
 */
 

	
 
// WARNING: This file is automatically generated by make_parameter_source.pl. Do not edit.
 
// All edits will be discarded.
 
// Do not edit. All edits will be discarded.
 

	
 
#ifndef _PARAMETER_H_
 
#define _PARAMETER_H_
 
#include "vector.h"
 
#include <vector>
 

	
 
#include <libxml/parser.h>
 
#include <libxml/tree.h>
 

	
 
 class Parameter {
 
		
 
 public: 
 
   Parameter();
 
   ~Parameter();
 
   void CleanUp(void);
 
   void Read(const char *filename);
 
   void Write(ostream &os) const;
 
   void XMLAdd(xmlNode *root) const;
 
   void XMLRead(xmlNode *root);
 
   void AssignValToPar(const char *namec, const char *valc);
 
   void AssignValArrayToPar(const char *namec, vector<double> valarray);
 
END_HEADER2
 

	
 
   for ($i=0;$i<$lines;$i++) {
src/perl/make_pardialog_source.pl
Show inline comments
 
@@ -67,56 +67,82 @@ while (<parfile>) {
 
    $value[$i] = $typel[0];
 
    $type[$i] = $typel[1];
 

	
 
    #get rid of spaces
 
    $type[$i] =~ s/ //g;
 
    $type[$i] =~s/\n//g;
 
    $convtype[$i]=$typetrans{$type[$i]};
 
    $param[$i] =~ s/ //g;
 
    if ($convtype[$i] ne "label" && $convtype[$i] ne "title") {
 
	#get rid of spaces
 
	$value[$i] =~ s/ //g;
 
    }
 
    if ($convtype[$i] eq "char *") {
 
	$value[$i] = "\"$value[$i]\"";
 
    }
 
    #print cppfile "param = $param, value = $value, type = $type\n";
 

	
 
    $i++;
 
}
 

	
 
$lines=$i;
 

	
 

	
 
print cppfile <<END_HEADER;
 
/*
 
 *
 
 *  This file is part of the Virtual Leaf.
 
 *
 
 *  VirtualLeaf is free software: you can redistribute it and/or modify
 
 *  it under the terms of the GNU General Public License as published by
 
 *  the Free Software Foundation, either version 3 of the License, or
 
 *  (at your option) any later version.
 
 *
 
 *  VirtualLeaf 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 General Public License for more details.
 
 *
 
 *  You should have received a copy of the GNU General Public License
 
 *  along with the Virtual Leaf.  If not, see <http://www.gnu.org/licenses/>.
 
 *
 
 *  Copyright 2010 Roeland Merks.
 
 *
 
 */
 

	
 
// WARNING: This file is automatically generated by make_parameter_source.pl. Do not edit.
 
// Do not edit. All edits will be discarded.
 

	
 
#include "$basename.h"
 
#include "parameter.h"
 
#include <cstring>
 
#include <qdialog.h>
 
#include <qlabel.h>
 
#include <qlineedit.h>
 
#include <qmessagebox.h>
 

	
 
static const std::string _module_id("\$Id\$");
 

	
 
ParameterDialog::ParameterDialog(QWidget *parent, const char *name, Qt::WindowFlags f) : QDialog(parent,name,false,f) {
 
    extern Parameter par;
 
END_HEADER
 

	
 
for ($i=0;$i<$lines;$i++) {
 
    if ($convtype[$i] eq "label" || $convtype[$i] eq "title") {
 
	next;
 
    }
 
    if ($convtype[$i] eq "double *") {
 
	print cppfile  "  QString $param[$i]_string(\"";
 
	@paramlist = split(/,/,$value[$i]);
 
	for ($j=1;$j<=$#paramlist;$j++) {
 
	    print cppfile "%$j,";
 
	}
 
	print cppfile "%$j\");\n";
 
	print cppfile "  $param[$i]_string = $param[$i]_string";
 
	for ($j=0;$j<=$#paramlist;$j++) {
 
	    print cppfile ".arg(par.$param[$i]\[$j\])";
 
	}
 
	print cppfile ";\n";
 
	print cppfile "  $param[$i]_edit = new QLineEdit( $param[$i]_string, this, \"$param[$i]_edit\" );\n";
 
    } else {
 
	if ($convtype[$i] eq "bool") {
 
	    print cppfile "  $param[$i]_edit = new QLineEdit( QString(\"%1\").arg(sbool(par.$param[$i])), this, \"$param[$i]_edit\" );\n";
 
@@ -244,48 +270,74 @@ for ($i=0;$i<$lines;$i++) {
 
	    print cppfile "%$j,";
 
	}
 
	print cppfile "%$j\");\n";
 
	print cppfile "  $param[$i]_string = $param[$i]_string";
 
	for ($j=0;$j<=$#paramlist;$j++) {
 
	    print cppfile ".arg(par.$param[$i]\[$j\])";
 
	}
 
	print cppfile ";\n";
 
	print cppfile "  $param[$i]_edit->setText( $param[$i]_string );\n";
 
    } else {
 
	if ($convtype[$i] eq "bool") {
 
	    print cppfile "  $param[$i]_edit->setText( QString(\"%1\").arg(sbool(par.$param[$i])));\n";
 
	} else {
 
	    print cppfile "  $param[$i]_edit->setText( QString(\"%1\").arg(par.$param[$i]) );\n";
 
	}
 
    }
 
}
 

	
 
print cppfile "}\n\n";
 

	
 
# qparameter.h
 

	
 
open hfile, ">$basename.h";
 
print hfile <<END_HEADER2;
 
/*
 
 *
 
 *  \$Id\$
 
 *
 
 *  This file is part of the Virtual Leaf.
 
 *
 
 *  VirtualLeaf is free software: you can redistribute it and/or modify
 
 *  it under the terms of the GNU General Public License as published by
 
 *  the Free Software Foundation, either version 3 of the License, or
 
 *  (at your option) any later version.
 
 *
 
 *  VirtualLeaf 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 General Public License for more details.
 
 *
 
 *  You should have received a copy of the GNU General Public License
 
 *  along with the Virtual Leaf.  If not, see <http://www.gnu.org/licenses/>.
 
 *
 
 *  Copyright 2010 Roeland Merks.
 
 *
 
 */
 

	
 
// WARNING: This file is automatically generated by make_parameter_source.pl. Do not edit.
 
// Do not edit. All edits will be discarded.
 

	
 
#ifndef PARAMETER_DIALOG_H
 
#define PARAMETER_DIALOG_H
 
#include <qdialog.h>
 
#include <qspinbox.h>
 
#include <qlineedit.h>
 
#include <qlayout.h>
 
#include <qpushbutton.h>
 
#include <iostream>
 

	
 
class ParameterDialog : public QDialog {
 
    Q_OBJECT
 
	
 
      public:
 
	ParameterDialog(QWidget *parent=0, const char *name = 0, Qt::WindowFlags f = 0);
 
    virtual ~ParameterDialog(void);
 
    public slots:
 
    void Reset(void);
 

	
 
    private slots:
 
    void write(void);
 

	
 
  private:
 
END_HEADER2
 

	
0 comments (0 inline, 0 general)