echempp-devel Mailing List for EChem++ (Page 5)
Status: Beta
Brought to you by:
berndspeiser
You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(6) |
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
(6) |
Nov
(6) |
Dec
(1) |
| 2005 |
Jan
(3) |
Feb
(12) |
Mar
(4) |
Apr
|
May
|
Jun
(4) |
Jul
|
Aug
(9) |
Sep
(2) |
Oct
|
Nov
(5) |
Dec
(4) |
| 2006 |
Jan
(56) |
Feb
(2) |
Mar
|
Apr
(1) |
May
(29) |
Jun
(38) |
Jul
(3) |
Aug
(4) |
Sep
(5) |
Oct
(1) |
Nov
(33) |
Dec
(26) |
| 2007 |
Jan
|
Feb
(56) |
Mar
(68) |
Apr
(14) |
May
(25) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(60) |
| 2008 |
Jan
(15) |
Feb
|
Mar
(59) |
Apr
(5) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
| 2009 |
Jan
|
Feb
|
Mar
|
Apr
(17) |
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: beeblbrox <bee...@us...> - 2008-01-09 20:43:25
|
Update of /cvsroot/echempp/Experiment/Experiment In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv23798/Experiment/Experiment Modified Files: Experiment.hpp Log Message: Changed to deal with recent changes made in Quantities. Index: Experiment.hpp =================================================================== RCS file: /cvsroot/echempp/Experiment/Experiment/Experiment.hpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Experiment.hpp 27 Dec 2007 19:17:21 -0000 1.8 --- Experiment.hpp 9 Jan 2008 20:43:21 -0000 1.9 *************** *** 30,36 **** // BSUtilities includes - //#include "SerializationTools.h" #include "TemplateTools.h" - #include "TypeToName.h" // STL includes --- 30,34 ---- *************** *** 63,77 **** { - template<class T> - const std::string type2name() - { - return T::create_guid(); - } - template<> - inline const std::string type2name<Loki::EmptyType>() - { - return "EmptyType"; - } - //! Unary functor for deletion. template<typename Obj> --- 61,64 ---- *************** *** 94,120 **** { //! Type used to designate simulated experiments. ! struct Simulated ! { ! static const std::string create_guid() ! { ! return "Simulated"; ! } ! }; //! Type used to designate real experiments. ! struct Real ! { ! static const std::string create_guid() ! { ! return "Real"; ! } ! }; //! Type used to designate dual experiments, e.g. one part real the other simulated. ! struct Dual ! { ! static const std::string create_guid() ! { ! return "Dual"; ! } ! }; } //! Namespace for dynamics types. --- 81,89 ---- { //! Type used to designate simulated experiments. ! struct Simulated {}; //! Type used to designate real experiments. ! struct Real {}; //! Type used to designate dual experiments, e.g. one part real the other simulated. ! struct Dual {}; } //! Namespace for dynamics types. *************** *** 122,140 **** { //! Type used to designate dynamic experiments. ! struct Dynamic ! { ! static const std::string create_guid() ! { ! return "Dynamic"; ! } ! }; //! Type used to designate static experiments. ! struct Static ! { ! static const std::string create_guid() ! { ! return "Static"; ! } ! }; } --- 91,97 ---- { //! Type used to designate dynamic experiments. ! struct Dynamic {}; //! Type used to designate static experiments. ! struct Static {}; } *************** *** 305,317 **** typedef Action<Tech> _Action; - static const std::string create_guid() - { - // TODO Use Segment Type as well - return "Action_" + type2name<Realism>() + "_" - + type2name<Dynamics>() + "_" + I::create_guid() + "_" - + type2name<D>() + "_" + type2name<R>(); - } - // BSUtilities::Serialization::AutoRegistor<Action<Tech> > reg; - static const std::string GUID; Action() {} Action(const std::string title) : _AtomicBase(title) {} --- 262,265 ---- *************** *** 414,426 **** }; - template<class Realism, - class Dynamics, - class I, - class D, - class R, - template<class, class> class S> - const std::string Action<Technique<Realism,Dynamics,I,D,R,S> >::GUID = - Action<Technique<Realism,Dynamics,I,D,R,S> >::create_guid(); - //! Class to represent induced experiments. //! Induced experiments influence the system like Action but --- 362,365 ---- *************** *** 444,456 **** typedef Induced<Tech> _Induced; - static const std::string create_guid() - { - // TODO Use Segment Type as well - return "Induced_" + type2name<Realism>() + "_" - + type2name<Dynamics>() + "_" + type2name<I>() + "_" - + type2name<D>() + "_" + type2name<R>(); - } - //BSUtilities::Serialization::AutoRegistor<Induced<Tech> > reg; - static const std::string GUID; Induced() { cond_data = NULL; meas_data = NULL; }; Induced(ConditionData* cd, MeasurementData* md) --- 383,386 ---- *************** *** 565,577 **** }; - template<class Realism, - class Dynamics, - class I, - class D, - class R, - template<class, class> class S> - const std::string Induced<Technique<Realism,Dynamics,I,D,R,S> >::GUID = - Induced<Technique<Realism,Dynamics,I,D,R,S> >::create_guid(); - //! Class to represent Observations. //! Dynamic Observations collect information about the --- 495,498 ---- *************** *** 593,604 **** public: typedef Technique<Realism, dynamics::Dynamic, I, Loki::EmptyType, R, BSUtilities::EmptyTemplate_2> Tech; - static const std::string create_guid() - { - return "Observation_" + type2name<Realism>() + "_" - + type2name<dynamics::Dynamic>() + "_" - + type2name<I>() + "_" + type2name<R>(); - } - //BSUtilities::Serialization::AutoRegistor<Observation<Tech> > reg; - static const std::string GUID; Observation() { cond_data = NULL; }; typedef Observation<Tech> _Observation; --- 514,517 ---- *************** *** 699,712 **** I end_; ConditionData *cond_data; - // TODO: insert StateData? }; template<class Realism, - class I, - class R> - const std::string Observation<Technique<Realism,dynamics::Dynamic,I,Loki::EmptyType,R,BSUtilities::EmptyTemplate_2> >::GUID = - Observation<Technique<Realism,dynamics::Dynamic,I,Loki::EmptyType,R,BSUtilities::EmptyTemplate_2> >::create_guid(); - - template<class Realism, class R> class Observation<Technique<Realism, dynamics::Static, Loki::EmptyType, --- 612,618 ---- *************** *** 721,731 **** Loki::EmptyType, R, BSUtilities::EmptyTemplate_2> Tech; - static const std::string create_guid() - { - return "Observation_" + type2name<Realism>() + "_" - + type2name<R>(); - } - //BSUtilities::Serialization::AutoRegistor<Observation<Tech> > reg; - static const std::string GUID; typedef Observation<Tech> _Observation; --- 627,630 ---- *************** *** 794,802 **** }; - template<class Realism, - class R> - const std::string Observation<Technique<Realism,dynamics::Static,Loki::EmptyType,Loki::EmptyType,R,BSUtilities::EmptyTemplate_2> >::GUID = - Observation<Technique<Realism,dynamics::Static,Loki::EmptyType,Loki::EmptyType,R,BSUtilities::EmptyTemplate_2> >::create_guid(); - //! Base class for all composed experiments. //! \sa Collection --- 693,696 ---- *************** *** 807,812 **** { public: - static const std::string GUID; - //BSUtilities::Serialization::AutoRegistor<Compound> reg; Compound() {} Compound(const Compound& c) --- 701,704 ---- *************** *** 978,983 **** virtual ~Collection() {}; // No restricton on add, just inherit the one from Compound - static const std::string GUID; - //BSUtilities::Serialization::AutoRegistor<Collection> reg; private: friend class boost::serialization::access; --- 870,873 ---- *************** *** 1000,1005 **** { public: - static const std::string GUID; - //BSUtilities::Serialization::AutoRegistor<Homogeneous> reg; Homogeneous(){} virtual ~Homogeneous(){} --- 890,893 ---- *************** *** 1050,1055 **** { public: - static const std::string GUID; - //BSUtilities::Serialization::AutoRegistor<Sequential> reg; virtual ~Sequential() {}; void add(Experiment* e) --- 938,941 ---- *************** *** 1081,1086 **** { public: - static const std::string GUID; - //BSUtilities::Serialization::AutoRegistor<Simultaneous> reg; virtual ~Simultaneous() {}; void add(Experiment* e) --- 967,970 ---- |
|
From: beeblbrox <bee...@us...> - 2007-12-28 16:50:15
|
Update of /cvsroot/echempp/examples In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv3073/examples Modified Files: example5.xml Log Message: New example5. Yet unsure whether this works correctly. Index: example5.xml =================================================================== RCS file: /cvsroot/echempp/examples/example5.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** example5.xml 19 Dec 2007 13:58:29 -0000 1.2 --- example5.xml 28 Dec 2007 16:50:10 -0000 1.3 *************** *** 2,9 **** <!DOCTYPE boost_serialization> <boost_serialization signature="serialization::archive" version="3"> ! <ep class_id="0" class_name="Induced_Simulated_Dynamic_doubleSecondTimeVariable_doubleVoltElectricPotentialVariable_doubleAmpereElectricCurrentVariable" tracking_level="1" version="0" object_id="_0"> <_AtomicBase class_id="1" tracking_level="0" version="0"> <Experiment class_id="2" tracking_level="0" version="0"> ! <title_>/home/dome/echempp/examples/example5_new.xml</title_> </Experiment> </_AtomicBase> --- 2,9 ---- <!DOCTYPE boost_serialization> <boost_serialization signature="serialization::archive" version="3"> ! <ep class_id="0" class_name="experiment::cv::SimInduced" tracking_level="1" version="0" object_id="_0"> <_AtomicBase class_id="1" tracking_level="0" version="0"> <Experiment class_id="2" tracking_level="0" version="0"> ! <title_>/home/dome/echempp/examples/example5.xml</title_> </Experiment> </_AtomicBase> *************** *** 18,22 **** </ptime_date> </induction_end> ! <cond_data class_id="6" class_name="ConditionDataModSim" tracking_level="1" version="0" object_id="_1"> <ConditionData class_id="5" tracking_level="1" version="0" object_id="_2"></ConditionData> <safety>3</safety> --- 18,22 ---- </ptime_date> </induction_end> ! <cond_data class_id="6" class_name="experiment::ConditionDataModSim" tracking_level="1" version="0" object_id="_1"> <ConditionData class_id="5" tracking_level="1" version="0" object_id="_2"></ConditionData> <safety>3</safety> *************** *** 24,28 **** <currentControlled>0</currentControlled> <potentialControlled>1</potentialControlled> ! <finiteDistance class_id="7" tracking_level="1" version="0" object_id="_3"> <ABQ class_id="8" tracking_level="0" version="0"> <namestring>length</namestring> --- 24,28 ---- <currentControlled>0</currentControlled> <potentialControlled>1</potentialControlled> ! <finiteDistance class_id="7" tracking_level="0" version="0"> <ABQ class_id="8" tracking_level="0" version="0"> <namestring>length</namestring> *************** *** 37,45 **** <boundary0>0</boundary0> <boundary1>1</boundary1> ! <etExcitation0 class_id="9" tracking_level="1" version="0" object_id="_4"> <ExcitationFunction class_id="10" tracking_level="0" version="0"></ExcitationFunction> <_Imax class_id="11" tracking_level="0" version="0"> <count>3</count> ! <item class_id="12" tracking_level="1" version="0" object_id="_5"> <ABQ class_id="13" tracking_level="0" version="0"> <namestring>time</namestring> --- 37,45 ---- <boundary0>0</boundary0> <boundary1>1</boundary1> ! <etExcitation0 class_id="9" tracking_level="1" version="0" object_id="_3"> <ExcitationFunction class_id="10" tracking_level="0" version="0"></ExcitationFunction> <_Imax class_id="11" tracking_level="0" version="0"> <count>3</count> ! <item class_id="12" tracking_level="0" version="0"> <ABQ class_id="13" tracking_level="0" version="0"> <namestring>time</namestring> *************** *** 48,52 **** <_value>0</_value> </item> ! <item object_id="_6"> <ABQ> <namestring></namestring> --- 48,52 ---- <_value>0</_value> </item> ! <item> <ABQ> <namestring></namestring> *************** *** 55,59 **** <_value>0.5</_value> </item> ! <item object_id="_7"> <ABQ> <namestring></namestring> --- 55,59 ---- <_value>0.5</_value> </item> ! <item> <ABQ> <namestring></namestring> *************** *** 65,72 **** <_segments class_id="14" tracking_level="0" version="0"> <count>2</count> ! <item class_id="16" class_name="LinearSegment_doubleVoltElectricPotentialVariable_doubleSecondTimeVariable" tracking_level="1" version="0" object_id="_8"> ! <Base class_id="15" tracking_level="1" version="0" object_id="_9"> ! <Segment class_id="17" tracking_level="1" version="0" object_id="_10"></Segment> ! <_Imax object_id="_11"> <ABQ> <namestring></namestring> --- 65,72 ---- <_segments class_id="14" tracking_level="0" version="0"> <count>2</count> ! <item class_id="15" class_name="ExcitationFunctions::Segments::LinearEtSegment" tracking_level="1" version="0" object_id="_4"> ! <Base class_id="16" tracking_level="0" version="0"> ! <Segment class_id="17" tracking_level="0" version="0"></Segment> ! <_Imax> <ABQ> <namestring></namestring> *************** *** 76,80 **** </_Imax> </Base> ! <_startingValue class_id="18" tracking_level="1" version="0" object_id="_12"> <ABQ class_id="19" tracking_level="0" version="0"> <namestring>electric potential</namestring> --- 76,80 ---- </_Imax> </Base> ! <_startingValue class_id="18" tracking_level="0" version="0"> <ABQ class_id="19" tracking_level="0" version="0"> <namestring>electric potential</namestring> *************** *** 83,87 **** <_value>0</_value> </_startingValue> ! <_endValue object_id="_13"> <ABQ> <namestring>electric potential</namestring> --- 83,87 ---- <_value>0</_value> </_startingValue> ! <_endValue> <ABQ> <namestring>electric potential</namestring> *************** *** 90,94 **** <_value>0.5</_value> </_endValue> ! <_derivative class_id="20" tracking_level="1" version="0" object_id="_14"> <ABQ class_id="21" tracking_level="0" version="0"> <namestring></namestring> --- 90,94 ---- <_value>0.5</_value> </_endValue> ! <_derivative class_id="20" tracking_level="0" version="0"> <ABQ class_id="21" tracking_level="0" version="0"> <namestring></namestring> *************** *** 98,105 **** </_derivative> </item> ! <item class_id_reference="16" object_id="_15"> ! <Base object_id="_16"> ! <Segment object_id="_17"></Segment> ! <_Imax object_id="_18"> <ABQ> <namestring></namestring> --- 98,105 ---- </_derivative> </item> ! <item class_id_reference="15" object_id="_5"> ! <Base> ! <Segment></Segment> ! <_Imax> <ABQ> <namestring></namestring> *************** *** 109,113 **** </_Imax> </Base> ! <_startingValue object_id="_19"> <ABQ> <namestring>electric potential</namestring> --- 109,113 ---- </_Imax> </Base> ! <_startingValue> <ABQ> <namestring>electric potential</namestring> *************** *** 116,120 **** <_value>0.5</_value> </_startingValue> ! <_endValue object_id="_20"> <ABQ> <namestring>electric potential</namestring> --- 116,120 ---- <_value>0.5</_value> </_startingValue> ! <_endValue> <ABQ> <namestring>electric potential</namestring> *************** *** 123,127 **** <_value>0</_value> </_endValue> ! <_derivative object_id="_21"> <ABQ> <namestring></namestring> --- 123,127 ---- <_value>0</_value> </_endValue> ! <_derivative> <ABQ> <namestring></namestring> *************** *** 133,141 **** </_segments> </etExcitation0> ! <etExcitation1 object_id="_22"> <ExcitationFunction></ExcitationFunction> <_Imax> <count>1</count> ! <item object_id="_23"> <ABQ> <namestring>time</namestring> --- 133,141 ---- </_segments> </etExcitation0> ! <etExcitation1 object_id="_6"> <ExcitationFunction></ExcitationFunction> <_Imax> <count>1</count> ! <item> <ABQ> <namestring>time</namestring> *************** *** 149,157 **** </_segments> </etExcitation1> ! <itExcitation0 class_id="22" tracking_level="1" version="0" object_id="_24"> <ExcitationFunction></ExcitationFunction> <_Imax> <count>1</count> ! <item object_id="_25"> <ABQ> <namestring>time</namestring> --- 149,157 ---- </_segments> </etExcitation1> ! <itExcitation0 class_id="22" tracking_level="1" version="0" object_id="_7"> <ExcitationFunction></ExcitationFunction> <_Imax> <count>1</count> ! <item> <ABQ> <namestring>time</namestring> *************** *** 165,173 **** </_segments> </itExcitation0> ! <itExcitation1 object_id="_26"> <ExcitationFunction></ExcitationFunction> <_Imax> <count>1</count> ! <item object_id="_27"> <ABQ> <namestring>time</namestring> --- 165,173 ---- </_segments> </itExcitation0> ! <itExcitation1 object_id="_8"> <ExcitationFunction></ExcitationFunction> <_Imax> <count>1</count> ! <item> <ABQ> <namestring>time</namestring> *************** *** 181,438 **** </_segments> </itExcitation1> ! <chargeBalance>0</chargeBalance> ! <stoichiometricBalance>1</stoichiometricBalance> ! <mechanism>A <=> B + e-; b<0>; B + C --> D; r = kf1*c<B>; </mechanism> ! <activeBoundaries> ! <count>1</count> ! <item>0</item> ! </activeBoundaries> ! <temp class_id="25" tracking_level="1" version="0" object_id="_28"> ! <ABQ class_id="26" tracking_level="0" version="0"> ! <namestring>temperature</namestring> ! <symbolstring>T</symbolstring> ! </ABQ> ! <_value>293.14999999999998</_value> ! </temp> ! <area class_id="27" tracking_level="1" version="0" object_id="_29"> ! <ABQ class_id="28" tracking_level="0" version="0"> ! <namestring>area</namestring> ! <symbolstring>A</symbolstring> ! </ABQ> ! <_value>6.0000000000000002e-06</_value> ! </area> ! <dissConcs class_id="29" tracking_level="0" version="0"> ! <count>4</count> ! <item class_id="30" tracking_level="0" version="0"> ! <first>0</first> ! <second class_id="31" tracking_level="1" version="0" object_id="_30"> ! <ABQ class_id="32" tracking_level="0" version="0"> ! <namestring>concentration</namestring> ! <symbolstring>c</symbolstring> ! </ABQ> ! <_value>0.0001</_value> ! </second> ! </item> ! <item> ! <first>1</first> ! <second object_id="_31"> ! <ABQ> ! <namestring>concentration</namestring> ! <symbolstring>c</symbolstring> ! </ABQ> ! <_value>0</_value> ! </second> ! </item> ! <item> ! <first>2</first> ! <second object_id="_32"> ! <ABQ> ! <namestring>concentration</namestring> ! <symbolstring>c</symbolstring> ! </ABQ> ! <_value>0.01</_value> ! </second> ! </item> ! <item> ! <first>3</first> ! <second object_id="_33"> ! <ABQ> ! <namestring>concentration</namestring> ! <symbolstring>c</symbolstring> ! </ABQ> ! <_value>0</_value> ! </second> ! </item> ! </dissConcs> ! <refDissConc object_id="_34"> ! <ABQ> ! <namestring>concentration</namestring> ! <symbolstring>c</symbolstring> ! </ABQ> ! <_value>0.01</_value> ! </refDissConc> ! <refConcIndex>2</refConcIndex> ! <adsConcs class_id="33" tracking_level="0" version="0"> ! <count>0</count> ! </adsConcs> ! <saturationConcs class_id="34" tracking_level="0" version="0"> ! <count>0</count> ! </saturationConcs> ! <diffCoeffs class_id="35" tracking_level="0" version="0"> ! <count>4</count> ! <item class_id="36" tracking_level="0" version="0"> ! <first>0</first> ! <second class_id="37" tracking_level="1" version="0" object_id="_35"> ! <ABQ class_id="38" tracking_level="0" version="0"> ! <namestring>diffusioncoefficient</namestring> ! <symbolstring>D</symbolstring> ! </ABQ> ! <_value>1.0000000000000001e-09</_value> ! </second> ! </item> ! <item> ! <first>1</first> ! <second object_id="_36"> ! <ABQ> ! <namestring>diffusioncoefficient</namestring> ! <symbolstring>D</symbolstring> ! </ABQ> ! <_value>1.0000000000000001e-09</_value> ! </second> ! </item> ! <item> ! <first>2</first> ! <second object_id="_37"> ! <ABQ> ! <namestring>diffusioncoefficient</namestring> ! <symbolstring>D</symbolstring> ! </ABQ> ! <_value>1.0000000000000001e-09</_value> ! </second> ! </item> ! <item> ! <first>3</first> ! <second object_id="_38"> ! <ABQ> ! <namestring>diffusioncoefficient</namestring> ! <symbolstring>D</symbolstring> ! </ABQ> ! <_value>1.0000000000000001e-09</_value> ! </second> ! </item> ! </diffCoeffs> ! <refDiffCoeff object_id="_39"> ! <ABQ> ! <namestring>diffusioncoefficient</namestring> ! <symbolstring>D</symbolstring> ! </ABQ> ! <_value>1.0000000000000001e-09</_value> ! </refDiffCoeff> ! <maxDiffCoeff>3</maxDiffCoeff> ! <formalPotentials class_id="39" tracking_level="0" version="0"> ! <count>1</count> ! <item class_id="40" tracking_level="0" version="0"> ! <first>0</first> ! <second object_id="_40"> ! <ABQ> ! <namestring>electric potential</namestring> ! <symbolstring>E</symbolstring> ! </ABQ> ! <_value>0.25</_value> ! </second> ! </item> ! </formalPotentials> ! <alphas class_id="41" tracking_level="0" version="0"> ! <count>1</count> ! <item class_id="42" tracking_level="0" version="0"> ! <first>0</first> ! <second>0.5</second> ! </item> ! </alphas> ! <khs class_id="43" tracking_level="0" version="0"> ! <count>1</count> ! <item class_id="44" tracking_level="0" version="0"> ! <first>0</first> ! <second class_id="45" tracking_level="1" version="0" object_id="_41"> ! <ABQ class_id="46" tracking_level="0" version="0"> ! <namestring>heterogeneousrateconstant</namestring> ! <symbolstring>k_s</symbolstring> ! </ABQ> ! <_value>0.01</_value> ! </second> ! </item> ! </khs> ! <langEquilConstants class_id="47" tracking_level="0" version="0"> ! <count>0</count> ! </langEquilConstants> ! <langAdsRateConstants class_id="48" tracking_level="0" version="0"> ! <count>0</count> ! </langAdsRateConstants> ! <firstOrderRateConstants class_id="49" tracking_level="0" version="0"> ! <count>0</count> ! </firstOrderRateConstants> ! <homEquilibriumConstants> ! <count>0</count> ! </homEquilibriumConstants> ! <homForwardRateConstants> ! <count>0</count> ! </homForwardRateConstants> ! <homBackwardRateConstants> ! <count>0</count> ! </homBackwardRateConstants> ! <homSurfEquilibriumConstants> ! <count>0</count> ! </homSurfEquilibriumConstants> ! <homSurfForwardRateConstants> ! <count>0</count> ! </homSurfForwardRateConstants> ! <homSurfBackwardRateConstants> ! <count>0</count> ! </homSurfBackwardRateConstants> ! <hetSurfEquilibriumConstants> ! <count>0</count> ! </hetSurfEquilibriumConstants> ! <hetSurfForwardRateConstants> ! <count>0</count> ! </hetSurfForwardRateConstants> ! <hetSurfBackwardRateConstants> ! <count>0</count> ! </hetSurfBackwardRateConstants> ! <fixed> ! <count>0</count> ! </fixed> ! <numRowsDissSpecies>4</numRowsDissSpecies> ! <numRowsAdsSpecies>0</numRowsAdsSpecies> ! <numRowsSaturation>0</numRowsSaturation> ! <numRowsBvDiss>1</numRowsBvDiss> ! <numRowsBvAds>0</numRowsBvAds> ! <numRowsLangmuir>0</numRowsLangmuir> ! <numRowsHomPower>0</numRowsHomPower> ! <numRowsHomGen>1</numRowsHomGen> ! <numColsHomGen>1</numColsHomGen> ! <numRowsHomSurfPower>0</numRowsHomSurfPower> ! <numRowsHomSurfGen>0</numRowsHomSurfGen> ! <numColsHomSurfGen>0</numColsHomSurfGen> ! <numRowsHetSurfPower>0</numRowsHetSurfPower> ! <numRowsHetSurfGen>0</numRowsHetSurfGen> ! <numColsHetSurfGen>0</numColsHetSurfGen> ! <genParams class_id="51" tracking_level="0" version="0"> ! <count>1</count> ! <item class_id="52" tracking_level="0" version="0"> ! <first>kf1</first> ! <second class_id="53" tracking_level="0" version="0"> ! <count>1</count> ! <item class_id="54" tracking_level="0" version="0"> ! <first>1</first> ! <second> ! <count>0</count> ! </second> ! </item> ! </second> ! </item> ! </genParams> ! <genColsParams class_id="56" tracking_level="0" version="0"> ! <count>1</count> ! <item class_id="57" tracking_level="0" version="0"> ! <first>0</first> ! <second>kf1</second> ! </item> ! </genColsParams> ! <genParamsCols class_id="58" tracking_level="0" version="0"> ! <count>1</count> ! <item class_id="59" tracking_level="0" version="0"> ! <first>kf1</first> ! <second>0</second> ! </item> ! </genParamsCols> ! <genParamsValues class_id="60" tracking_level="0" version="0"> ! <count>1</count> ! <item class_id="61" tracking_level="0" version="0"> ! <first>kf1</first> ! <second>5</second> ! </item> ! </genParamsValues> <maxTime>100</maxTime> <accuracy>0.001</accuracy> --- 181,445 ---- </_segments> </itExcitation1> ! <mc class_id="24" tracking_level="0" version="0"> ! <chargeBalance>0</chargeBalance> ! <stoichiometricBalance>1</stoichiometricBalance> ! <mechanism>A <=> B + e-; b<0>; B + C --> D; r = kf1*c<B>; + + + </mechanism> ! <activeBoundaries> ! <count>1</count> ! <item>0</item> ! </activeBoundaries> ! </mc> ! <mpc class_id="26" tracking_level="0" version="0"> ! <temp class_id="27" tracking_level="0" version="0"> ! <ABQ class_id="28" tracking_level="0" version="0"> ! <namestring>temperature</namestring> ! <symbolstring>T</symbolstring> ! </ABQ> ! <_value>293.14999999999998</_value> ! </temp> ! <area class_id="29" tracking_level="0" version="0"> ! <ABQ class_id="30" tracking_level="0" version="0"> ! <namestring>area</namestring> ! <symbolstring>A</symbolstring> ! </ABQ> ! <_value>6.0000000000000002e-06</_value> ! </area> ! <dissConcs class_id="31" tracking_level="0" version="0"> ! <count>4</count> ! <item class_id="32" tracking_level="0" version="0"> ! <first>0</first> ! <second class_id="33" tracking_level="0" version="0"> ! <ABQ class_id="34" tracking_level="0" version="0"> ! <namestring>concentration</namestring> ! <symbolstring>c</symbolstring> ! </ABQ> ! <_value>0.0001</_value> ! </second> ! </item> ! <item> ! <first>1</first> ! <second> ! <ABQ> ! <namestring>concentration</namestring> ! <symbolstring>c</symbolstring> ! </ABQ> ! <_value>0</_value> ! </second> ! </item> ! <item> ! <first>2</first> ! <second> ! <ABQ> ! <namestring>concentration</namestring> ! <symbolstring>c</symbolstring> ! </ABQ> ! <_value>0.01</_value> ! </second> ! </item> ! <item> ! <first>3</first> ! <second> ! <ABQ> ! <namestring>concentration</namestring> ! <symbolstring>c</symbolstring> ! </ABQ> ! <_value>0</_value> ! </second> ! </item> ! </dissConcs> ! <refDissConc> ! <ABQ> ! <namestring>concentration</namestring> ! <symbolstring>c</symbolstring> ! </ABQ> ! <_value>0.01</_value> ! </refDissConc> ! <refConcIndex>2</refConcIndex> ! <adsConcs class_id="35" tracking_level="0" version="0"> ! <count>0</count> ! </adsConcs> ! <saturationConcs class_id="36" tracking_level="0" version="0"> ! <count>0</count> ! </saturationConcs> ! <diffCoeffs class_id="37" tracking_level="0" version="0"> ! <count>4</count> ! <item class_id="38" tracking_level="0" version="0"> ! <first>0</first> ! <second class_id="39" tracking_level="0" version="0"> ! <ABQ class_id="40" tracking_level="0" version="0"> ! <namestring>diffusioncoefficient</namestring> ! <symbolstring>D</symbolstring> ! </ABQ> ! <_value>1.0000000000000001e-09</_value> ! </second> ! </item> ! <item> ! <first>1</first> ! <second> ! <ABQ> ! <namestring>diffusioncoefficient</namestring> ! <symbolstring>D</symbolstring> ! </ABQ> ! <_value>1.0000000000000001e-09</_value> ! </second> ! </item> ! <item> ! <first>2</first> ! <second> ! <ABQ> ! <namestring>diffusioncoefficient</namestring> ! <symbolstring>D</symbolstring> ! </ABQ> ! <_value>1.0000000000000001e-09</_value> ! </second> ! </item> ! <item> ! <first>3</first> ! <second> ! <ABQ> ! <namestring>diffusioncoefficient</namestring> ! <symbolstring>D</symbolstring> ! </ABQ> ! <_value>1.0000000000000001e-09</_value> ! </second> ! </item> ! </diffCoeffs> ! <refDiffCoeff> ! <ABQ> ! <namestring>diffusioncoefficient</namestring> ! <symbolstring>D</symbolstring> ! </ABQ> ! <_value>1.0000000000000001e-09</_value> ! </refDiffCoeff> ! <maxDiffCoeff>3</maxDiffCoeff> ! <formalPotentials class_id="41" tracking_level="0" version="0"> ! <count>1</count> ! <item class_id="42" tracking_level="0" version="0"> ! <first>0</first> ! <second> ! <ABQ> ! <namestring>electric potential</namestring> ! <symbolstring>E</symbolstring> ! </ABQ> ! <_value>0.25</_value> ! </second> ! </item> ! </formalPotentials> ! <alphas class_id="43" tracking_level="0" version="0"> ! <count>1</count> ! <item class_id="44" tracking_level="0" version="0"> ! <first>0</first> ! <second>0.5</second> ! </item> ! </alphas> ! <khs class_id="45" tracking_level="0" version="0"> ! <count>1</count> ! <item class_id="46" tracking_level="0" version="0"> ! <first>0</first> ! <second class_id="47" tracking_level="0" version="0"> ! <ABQ class_id="48" tracking_level="0" version="0"> ! <namestring>heterogeneousrateconstant</namestring> ! <symbolstring>k_s</symbolstring> ! </ABQ> ! <_value>0.01</_value> ! </second> ! </item> ! </khs> ! <langEquilConstants class_id="49" tracking_level="0" version="0"> ! <count>0</count> ! </langEquilConstants> ! <langAdsRateConstants class_id="50" tracking_level="0" version="0"> ! <count>0</count> ! </langAdsRateConstants> ! <firstOrderRateConstants class_id="51" tracking_level="0" version="0"> ! <count>0</count> ! </firstOrderRateConstants> ! <homEquilibriumConstants> ! <count>0</count> ! </homEquilibriumConstants> ! <homForwardRateConstants> ! <count>0</count> ! </homForwardRateConstants> ! <homBackwardRateConstants> ! <count>0</count> ! </homBackwardRateConstants> ! <homSurfEquilibriumConstants> ! <count>0</count> ! </homSurfEquilibriumConstants> ! <homSurfForwardRateConstants> ! <count>0</count> ! </homSurfForwardRateConstants> ! <homSurfBackwardRateConstants> ! <count>0</count> ! </homSurfBackwardRateConstants> ! <hetSurfEquilibriumConstants> ! <count>0</count> ! </hetSurfEquilibriumConstants> ! <hetSurfForwardRateConstants> ! <count>0</count> ! </hetSurfForwardRateConstants> ! <hetSurfBackwardRateConstants> ! <count>0</count> ! </hetSurfBackwardRateConstants> ! <fixed> ! <count>0</count> ! </fixed> ! <numRowsDissSpecies>4</numRowsDissSpecies> ! <numRowsAdsSpecies>0</numRowsAdsSpecies> ! <numRowsSaturation>0</numRowsSaturation> ! <numRowsBvDiss>1</numRowsBvDiss> ! <numRowsBvAds>0</numRowsBvAds> ! <numRowsLangmuir>0</numRowsLangmuir> ! <numRowsHomPower>0</numRowsHomPower> ! <numRowsHomGen>1</numRowsHomGen> ! <numColsHomGen>1</numColsHomGen> ! <numRowsHomSurfPower>0</numRowsHomSurfPower> ! <numRowsHomSurfGen>0</numRowsHomSurfGen> ! <numColsHomSurfGen>0</numColsHomSurfGen> ! <numRowsHetSurfPower>0</numRowsHetSurfPower> ! <numRowsHetSurfGen>0</numRowsHetSurfGen> ! <numColsHetSurfGen>0</numColsHetSurfGen> ! <genParams class_id="53" tracking_level="0" version="0"> ! <count>1</count> ! <item class_id="54" tracking_level="0" version="0"> ! <first>kf1</first> ! <second class_id="55" tracking_level="0" version="0"> ! <count>1</count> ! <item class_id="56" tracking_level="0" version="0"> ! <first>1</first> ! <second> ! <count>0</count> ! </second> ! </item> ! </second> ! </item> ! </genParams> ! <genColsParams class_id="58" tracking_level="0" version="0"> ! <count>1</count> ! <item class_id="59" tracking_level="0" version="0"> ! <first>0</first> ! <second>kf1</second> ! </item> ! </genColsParams> ! <genParamsCols class_id="60" tracking_level="0" version="0"> ! <count>1</count> ! <item class_id="61" tracking_level="0" version="0"> ! <first>kf1</first> ! <second>0</second> ! </item> ! </genParamsCols> ! <genParamsValues class_id="62" tracking_level="0" version="0"> ! <count>1</count> ! <item class_id="63" tracking_level="0" version="0"> ! <first>kf1</first> ! <second>5</second> ! </item> ! </genParamsValues> ! </mpc> <maxTime>100</maxTime> <accuracy>0.001</accuracy> *************** *** 486,490 **** <count>0</count> </timeSteps> ! <profiles class_id="63" tracking_level="0" version="0"> <count>0</count> </profiles> --- 493,497 ---- <count>0</count> </timeSteps> ! <profiles class_id="65" tracking_level="0" version="0"> <count>0</count> </profiles> *************** *** 495,499 **** <plotDiss>0</plotDiss> <plotAds>0</plotAds> ! <sc class_id="64" tracking_level="1" version="0" object_id="_42"> <rho>0.11111111111111108</rho> <TOL>0.02</TOL> --- 502,506 ---- <plotDiss>0</plotDiss> <plotAds>0</plotAds> ! <sc class_id="66" tracking_level="0" version="0"> <rho>0.11111111111111108</rho> <TOL>0.02</TOL> *************** *** 550,556 **** <visConcProfiles>0</visConcProfiles> </cond_data> ! <meas_data class_id="66" class_name="MeasurementDataModSim" tracking_level="1" version="0" object_id="_43"> ! <MeasurementData class_id="65" tracking_level="1" version="0" object_id="_44"></MeasurementData> ! <responseCurves class_id="67" tracking_level="0" version="0"> <count>0</count> </responseCurves> --- 557,563 ---- <visConcProfiles>0</visConcProfiles> </cond_data> ! <meas_data class_id="68" class_name="experiment::MeasurementDataModSim" tracking_level="1" version="0" object_id="_9"> ! <MeasurementData class_id="67" tracking_level="1" version="0" object_id="_10"></MeasurementData> ! <responseCurves class_id="69" tracking_level="0" version="0"> <count>0</count> </responseCurves> |
|
From: beeblbrox <bee...@us...> - 2007-12-27 19:23:18
|
Update of /cvsroot/echempp/examples In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv15599/examples Modified Files: example1.xml example2.xml example3.xml example4.xml example6.xml example7.xml example8.xml example9.xml Log Message: New examples to conform with current ModSim. example5.xml is missing since it does not work with the patched parser.hpp Index: example1.xml =================================================================== RCS file: /cvsroot/echempp/examples/example1.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** example1.xml 19 Dec 2007 13:58:29 -0000 1.2 --- example1.xml 27 Dec 2007 19:23:11 -0000 1.3 *************** *** 2,9 **** <!DOCTYPE boost_serialization> <boost_serialization signature="serialization::archive" version="3"> ! <ep class_id="0" class_name="Induced_Simulated_Dynamic_doubleSecondTimeVariable_doubleVoltElectricPotentialVariable_doubleAmpereElectricCurrentVariable" tracking_level="1" version="0" object_id="_0"> <_AtomicBase class_id="1" tracking_level="0" version="0"> <Experiment class_id="2" tracking_level="0" version="0"> ! <title_>Insert Experiment title</title_> </Experiment> </_AtomicBase> --- 2,9 ---- <!DOCTYPE boost_serialization> <boost_serialization signature="serialization::archive" version="3"> ! <ep class_id="0" class_name="experiment::cv::SimInduced" tracking_level="1" version="0" object_id="_0"> <_AtomicBase class_id="1" tracking_level="0" version="0"> <Experiment class_id="2" tracking_level="0" version="0"> ! <title_>/home/dome/echempp/examples/example1.xml</title_> </Experiment> </_AtomicBase> *************** *** 18,22 **** </ptime_date> </induction_end> ! <cond_data class_id="6" class_name="ConditionDataModSim" tracking_level="1" version="0" object_id="_1"> <ConditionData class_id="5" tracking_level="1" version="0" object_id="_2"></ConditionData> <safety>3</safety> --- 18,22 ---- </ptime_date> </induction_end> ! <cond_data class_id="6" class_name="experiment::ConditionDataModSim" tracking_level="1" version="0" object_id="_1"> <ConditionData class_id="5" tracking_level="1" version="0" object_id="_2"></ConditionData> <safety>3</safety> *************** *** 24,28 **** <currentControlled>0</currentControlled> <potentialControlled>1</potentialControlled> ! <finiteDistance class_id="7" tracking_level="1" version="0" object_id="_3"> <ABQ class_id="8" tracking_level="0" version="0"> <namestring>length</namestring> --- 24,28 ---- <currentControlled>0</currentControlled> <potentialControlled>1</potentialControlled> ! <finiteDistance class_id="7" tracking_level="0" version="0"> <ABQ class_id="8" tracking_level="0" version="0"> <namestring>length</namestring> *************** *** 31,35 **** <_value>5.0000000000000002e-05</_value> </finiteDistance> ! <num_electrodes>2</num_electrodes> <dimension>1</dimension> <technique0>CV</technique0> --- 31,35 ---- <_value>5.0000000000000002e-05</_value> </finiteDistance> ! <num_electrodes>1</num_electrodes> <dimension>1</dimension> <technique0>CV</technique0> *************** *** 37,45 **** <boundary0>0</boundary0> <boundary1>1</boundary1> ! <etExcitation0 class_id="9" tracking_level="1" version="0" object_id="_4"> <ExcitationFunction class_id="10" tracking_level="0" version="0"></ExcitationFunction> <_Imax class_id="11" tracking_level="0" version="0"> <count>3</count> ! <item class_id="12" tracking_level="1" version="0" object_id="_5"> <ABQ class_id="13" tracking_level="0" version="0"> <namestring>time</namestring> --- 37,45 ---- <boundary0>0</boundary0> <boundary1>1</boundary1> ! <etExcitation0 class_id="9" tracking_level="1" version="0" object_id="_3"> <ExcitationFunction class_id="10" tracking_level="0" version="0"></ExcitationFunction> <_Imax class_id="11" tracking_level="0" version="0"> <count>3</count> ! <item class_id="12" tracking_level="0" version="0"> <ABQ class_id="13" tracking_level="0" version="0"> <namestring>time</namestring> *************** *** 48,52 **** <_value>0</_value> </item> ! <item object_id="_6"> <ABQ> <namestring></namestring> --- 48,52 ---- <_value>0</_value> </item> ! <item> <ABQ> <namestring></namestring> *************** *** 55,59 **** <_value>0.5</_value> </item> ! <item object_id="_7"> <ABQ> <namestring></namestring> --- 55,59 ---- <_value>0.5</_value> </item> ! <item> <ABQ> <namestring></namestring> *************** *** 65,72 **** <_segments class_id="14" tracking_level="0" version="0"> <count>2</count> ! <item class_id="16" class_name="LinearSegment_doubleVoltElectricPotentialVariable_doubleSecondTimeVariable" tracking_level="1" version="0" object_id="_8"> ! <Base class_id="15" tracking_level="1" version="0" object_id="_9"> ! <Segment class_id="17" tracking_level="1" version="0" object_id="_10"></Segment> ! <_Imax object_id="_11"> <ABQ> <namestring></namestring> --- 65,72 ---- <_segments class_id="14" tracking_level="0" version="0"> <count>2</count> ! <item class_id="15" class_name="ExcitationFunctions::Segments::LinearEtSegment" tracking_level="1" version="0" object_id="_4"> ! <Base class_id="16" tracking_level="0" version="0"> ! <Segment class_id="17" tracking_level="0" version="0"></Segment> ! <_Imax> <ABQ> <namestring></namestring> *************** *** 76,80 **** </_Imax> </Base> ! <_startingValue class_id="18" tracking_level="1" version="0" object_id="_12"> <ABQ class_id="19" tracking_level="0" version="0"> <namestring>electric potential</namestring> --- 76,80 ---- </_Imax> </Base> ! <_startingValue class_id="18" tracking_level="0" version="0"> <ABQ class_id="19" tracking_level="0" version="0"> <namestring>electric potential</namestring> *************** *** 83,87 **** <_value>0</_value> </_startingValue> ! <_endValue object_id="_13"> <ABQ> <namestring>electric potential</namestring> --- 83,87 ---- <_value>0</_value> </_startingValue> ! <_endValue> <ABQ> <namestring>electric potential</namestring> *************** *** 90,94 **** <_value>0.5</_value> </_endValue> ! <_derivative class_id="20" tracking_level="1" version="0" object_id="_14"> <ABQ class_id="21" tracking_level="0" version="0"> <namestring></namestring> --- 90,94 ---- <_value>0.5</_value> </_endValue> ! <_derivative class_id="20" tracking_level="0" version="0"> <ABQ class_id="21" tracking_level="0" version="0"> <namestring></namestring> *************** *** 98,105 **** </_derivative> </item> ! <item class_id_reference="16" object_id="_15"> ! <Base object_id="_16"> ! <Segment object_id="_17"></Segment> ! <_Imax object_id="_18"> <ABQ> <namestring></namestring> --- 98,105 ---- </_derivative> </item> ! <item class_id_reference="15" object_id="_5"> ! <Base> ! <Segment></Segment> ! <_Imax> <ABQ> <namestring></namestring> *************** *** 109,113 **** </_Imax> </Base> ! <_startingValue object_id="_19"> <ABQ> <namestring>electric potential</namestring> --- 109,113 ---- </_Imax> </Base> ! <_startingValue> <ABQ> <namestring>electric potential</namestring> *************** *** 116,120 **** <_value>0.5</_value> </_startingValue> ! <_endValue object_id="_20"> <ABQ> <namestring>electric potential</namestring> --- 116,120 ---- <_value>0.5</_value> </_startingValue> ! <_endValue> <ABQ> <namestring>electric potential</namestring> *************** *** 123,127 **** <_value>0</_value> </_endValue> ! <_derivative object_id="_21"> <ABQ> <namestring></namestring> --- 123,127 ---- <_value>0</_value> </_endValue> ! <_derivative> <ABQ> <namestring></namestring> *************** *** 133,141 **** </_segments> </etExcitation0> ! <etExcitation1 object_id="_22"> <ExcitationFunction></ExcitationFunction> <_Imax> <count>1</count> ! <item object_id="_23"> <ABQ> <namestring>time</namestring> --- 133,141 ---- </_segments> </etExcitation0> ! <etExcitation1 object_id="_6"> <ExcitationFunction></ExcitationFunction> <_Imax> <count>1</count> ! <item> <ABQ> <namestring>time</namestring> *************** *** 149,157 **** </_segments> </etExcitation1> ! <itExcitation0 class_id="22" tracking_level="1" version="0" object_id="_24"> <ExcitationFunction></ExcitationFunction> <_Imax> <count>1</count> ! <item object_id="_25"> <ABQ> <namestring>time</namestring> --- 149,157 ---- </_segments> </etExcitation1> ! <itExcitation0 class_id="22" tracking_level="1" version="0" object_id="_7"> <ExcitationFunction></ExcitationFunction> <_Imax> <count>1</count> ! <item> <ABQ> <namestring>time</namestring> *************** *** 165,173 **** </_segments> </itExcitation0> ! <itExcitation1 object_id="_26"> <ExcitationFunction></ExcitationFunction> <_Imax> <count>1</count> ! <item object_id="_27"> <ABQ> <namestring>time</namestring> --- 165,173 ---- </_segments> </itExcitation0> ! <itExcitation1 object_id="_8"> <ExcitationFunction></ExcitationFunction> <_Imax> <count>1</count> ! <item> <ABQ> <namestring>time</namestring> *************** *** 181,374 **** </_segments> </itExcitation1> ! <chargeBalance>0</chargeBalance> ! <stoichiometricBalance>1</stoichiometricBalance> ! <mechanism>A <=> B + e-; b<0>; ! ! </mechanism> ! <activeBoundaries> ! <count>1</count> ! <item>0</item> ! </activeBoundaries> ! <temp class_id="25" tracking_level="1" version="0" object_id="_28"> ! <ABQ class_id="26" tracking_level="0" version="0"> ! <namestring>temperature</namestring> ! <symbolstring>T</symbolstring> ! </ABQ> ! <_value>293.14999999999998</_value> ! </temp> ! <area class_id="27" tracking_level="1" version="0" object_id="_29"> ! <ABQ class_id="28" tracking_level="0" version="0"> ! <namestring>area</namestring> ! <symbolstring>A</symbolstring> ! </ABQ> ! <_value>6.0000000000000002e-06</_value> ! </area> ! <dissConcs class_id="29" tracking_level="0" version="0"> ! <count>2</count> ! <item class_id="30" tracking_level="0" version="0"> ! <first>0</first> ! <second class_id="31" tracking_level="1" version="0" object_id="_30"> ! <ABQ class_id="32" tracking_level="0" version="0"> ! <namestring>concentration</namestring> ! <symbolstring>c</symbolstring> ! </ABQ> ! <_value>0.0001</_value> ! </second> ! </item> ! <item> ! <first>1</first> ! <second object_id="_31"> ! <ABQ> ! <namestring>concentration</namestring> ! <symbolstring>c</symbolstring> ! </ABQ> ! <_value>0</_value> ! </second> ! </item> ! </dissConcs> ! <refDissConc object_id="_32"> ! <ABQ> ! <namestring>concentration</namestring> ! <symbolstring>c</symbolstring> ! </ABQ> ! <_value>0.0001</_value> ! </refDissConc> ! <refConcIndex>0</refConcIndex> ! <adsConcs class_id="33" tracking_level="0" version="0"> ! <count>0</count> ! </adsConcs> ! <saturationConcs class_id="34" tracking_level="0" version="0"> ! <count>0</count> ! </saturationConcs> ! <diffCoeffs class_id="35" tracking_level="0" version="0"> ! <count>2</count> ! <item class_id="36" tracking_level="0" version="0"> ! <first>0</first> ! <second class_id="37" tracking_level="1" version="0" object_id="_33"> ! <ABQ class_id="38" tracking_level="0" version="0"> ! <namestring>diffusioncoefficient</namestring> ! <symbolstring>D</symbolstring> ! </ABQ> ! <_value>1.0000000000000001e-09</_value> ! </second> ! </item> ! <item> ! <first>1</first> ! <second object_id="_34"> ! <ABQ> ! <namestring>diffusioncoefficient</namestring> ! <symbolstring>D</symbolstring> ! </ABQ> ! <_value>1.0000000000000001e-09</_value> ! </second> ! </item> ! </diffCoeffs> ! <refDiffCoeff object_id="_35"> ! <ABQ> ! <namestring>diffusioncoefficient</namestring> ! <symbolstring>D</symbolstring> ! </ABQ> ! <_value>1.0000000000000001e-09</_value> ! </refDiffCoeff> ! <maxDiffCoeff>1</maxDiffCoeff> ! <formalPotentials class_id="39" tracking_level="0" version="0"> ! <count>1</count> ! <item class_id="40" tracking_level="0" version="0"> ! <first>0</first> ! <second object_id="_36"> ! <ABQ> ! <namestring>electric potential</namestring> ! <symbolstring>E</symbolstring> ! </ABQ> ! <_value>0.25</_value> ! </second> ! </item> ! </formalPotentials> ! <alphas class_id="41" tracking_level="0" version="0"> ! <count>1</count> ! <item class_id="42" tracking_level="0" version="0"> ! <first>0</first> ! <second>0.5</second> ! </item> ! </alphas> ! <khs class_id="43" tracking_level="0" version="0"> ! <count>1</count> ! <item class_id="44" tracking_level="0" version="0"> ! <first>0</first> ! <second class_id="45" tracking_level="1" version="0" object_id="_37"> ! <ABQ class_id="46" tracking_level="0" version="0"> ! <namestring>heterogeneousrateconstant</namestring> ! <symbolstring>k_s</symbolstring> ! </ABQ> ! <_value>0.01</_value> ! </second> ! </item> ! </khs> ! <langEquilConstants class_id="47" tracking_level="0" version="0"> ! <count>0</count> ! </langEquilConstants> ! <langAdsRateConstants class_id="48" tracking_level="0" version="0"> ! <count>0</count> ! </langAdsRateConstants> ! <firstOrderRateConstants class_id="49" tracking_level="0" version="0"> ! <count>0</count> ! </firstOrderRateConstants> ! <homEquilibriumConstants> ! <count>0</count> ! </homEquilibriumConstants> ! <homForwardRateConstants> ! <count>0</count> ! </homForwardRateConstants> ! <homBackwardRateConstants> ! <count>0</count> ! </homBackwardRateConstants> ! <homSurfEquilibriumConstants> ! <count>0</count> ! </homSurfEquilibriumConstants> ! <homSurfForwardRateConstants> ! <count>0</count> ! </homSurfForwardRateConstants> ! <homSurfBackwardRateConstants> ! <count>0</count> ! </homSurfBackwardRateConstants> ! <hetSurfEquilibriumConstants> ! <count>0</count> ! </hetSurfEquilibriumConstants> ! <hetSurfForwardRateConstants> ! <count>0</count> ! </hetSurfForwardRateConstants> ! <hetSurfBackwardRateConstants> ! <count>0</count> ! </hetSurfBackwardRateConstants> ! <fixed> ! <count>0</count> ! </fixed> ! <numRowsDissSpecies>2</numRowsDissSpecies> ! <numRowsAdsSpecies>0</numRowsAdsSpecies> ! <numRowsSaturation>0</numRowsSaturation> ! <numRowsBvDiss>1</numRowsBvDiss> ! <numRowsBvAds>0</numRowsBvAds> ! <numRowsLangmuir>0</numRowsLangmuir> ! <numRowsHomPower>0</numRowsHomPower> ! <numRowsHomGen>0</numRowsHomGen> ! <numColsHomGen>0</numColsHomGen> ! <numRowsHomSurfPower>0</numRowsHomSurfPower> ! <numRowsHomSurfGen>0</numRowsHomSurfGen> ! <numColsHomSurfGen>0</numColsHomSurfGen> ! <numRowsHetSurfPower>0</numRowsHetSurfPower> ! <numRowsHetSurfGen>0</numRowsHetSurfGen> ! <numColsHetSurfGen>0</numColsHetSurfGen> ! <genParams class_id="51" tracking_level="0" version="0"> ! <count>0</count> ! </genParams> ! <genColsParams class_id="52" tracking_level="0" version="0"> ! <count>0</count> ! </genColsParams> ! <genParamsCols class_id="53" tracking_level="0" version="0"> ! <count>0</count> ! </genParamsCols> ! <genParamsValues class_id="54" tracking_level="0" version="0"> ! <count>0</count> ! </genParamsValues> <maxTime>100</maxTime> <accuracy>0.001</accuracy> --- 181,376 ---- </_segments> </itExcitation1> ! <mc class_id="24" tracking_level="0" version="0"> ! <chargeBalance>0</chargeBalance> ! <stoichiometricBalance>1</stoichiometricBalance> ! <mechanism>A <=> B + e-; b<0>;</mechanism> ! <activeBoundaries> ! <count>1</count> ! <item>0</item> ! </activeBoundaries> ! </mc> ! <mpc class_id="26" tracking_level="0" version="0"> ! <temp class_id="27" tracking_level="0" version="0"> ! <ABQ class_id="28" tracking_level="0" version="0"> ! <namestring>temperature</namestring> ! <symbolstring>T</symbolstring> ! </ABQ> ! <_value>293.14999999999998</_value> ! </temp> ! <area class_id="29" tracking_level="0" version="0"> ! <ABQ class_id="30" tracking_level="0" version="0"> ! <namestring>area</namestring> ! <symbolstring>A</symbolstring> ! </ABQ> ! <_value>6.0000000000000002e-06</_value> ! </area> ! <dissConcs class_id="31" tracking_level="0" version="0"> ! <count>2</count> ! <item class_id="32" tracking_level="0" version="0"> ! <first>0</first> ! <second class_id="33" tracking_level="0" version="0"> ! <ABQ class_id="34" tracking_level="0" version="0"> ! <namestring>concentration</namestring> ! <symbolstring>c</symbolstring> ! </ABQ> ! <_value>0.0001</_value> ! </second> ! </item> ! <item> ! <first>1</first> ! <second> ! <ABQ> ! <namestring>concentration</namestring> ! <symbolstring>c</symbolstring> ! </ABQ> ! <_value>0</_value> ! </second> ! </item> ! </dissConcs> ! <refDissConc> ! <ABQ> ! <namestring>concentration</namestring> ! <symbolstring>c</symbolstring> ! </ABQ> ! <_value>0.0001</_value> ! </refDissConc> ! <refConcIndex>0</refConcIndex> ! <adsConcs class_id="35" tracking_level="0" version="0"> ! <count>0</count> ! </adsConcs> ! <saturationConcs class_id="36" tracking_level="0" version="0"> ! <count>0</count> ! </saturationConcs> ! <diffCoeffs class_id="37" tracking_level="0" version="0"> ! <count>2</count> ! <item class_id="38" tracking_level="0" version="0"> ! <first>0</first> ! <second class_id="39" tracking_level="0" version="0"> ! <ABQ class_id="40" tracking_level="0" version="0"> ! <namestring>diffusioncoefficient</namestring> ! <symbolstring>D</symbolstring> ! </ABQ> ! <_value>1.0000000000000001e-09</_value> ! </second> ! </item> ! <item> ! <first>1</first> ! <second> ! <ABQ> ! <namestring>diffusioncoefficient</namestring> ! <symbolstring>D</symbolstring> ! </ABQ> ! <_value>1.0000000000000001e-09</_value> ! </second> ! </item> ! </diffCoeffs> ! <refDiffCoeff> ! <ABQ> ! <namestring>diffusioncoefficient</namestring> ! <symbolstring>D</symbolstring> ! </ABQ> ! <_value>1.0000000000000001e-09</_value> ! </refDiffCoeff> ! <maxDiffCoeff>1</maxDiffCoeff> ! <formalPotentials class_id="41" tracking_level="0" version="0"> ! <count>1</count> ! <item class_id="42" tracking_level="0" version="0"> ! <first>0</first> ! <second> ! <ABQ> ! <namestring>electric potential</namestring> ! <symbolstring>E</symbolstring> ! </ABQ> ! <_value>0.25</_value> ! </second> ! </item> ! </formalPotentials> ! <alphas class_id="43" tracking_level="0" version="0"> ! <count>1</count> ! <item class_id="44" tracking_level="0" version="0"> ! <first>0</first> ! <second>0.5</second> ! </item> ! </alphas> ! <khs class_id="45" tracking_level="0" version="0"> ! <count>1</count> ! <item class_id="46" tracking_level="0" version="0"> ! <first>0</first> ! <second class_id="47" tracking_level="0" version="0"> ! <ABQ class_id="48" tracking_level="0" version="0"> ! <namestring>heterogeneousrateconstant</namestring> ! <symbolstring>k_s</symbolstring> ! </ABQ> ! <_value>0.01</_value> ! </second> ! </item> ! </khs> ! <langEquilConstants class_id="49" tracking_level="0" version="0"> ! <count>0</count> ! </langEquilConstants> ! <langAdsRateConstants class_id="50" tracking_level="0" version="0"> ! <count>0</count> ! </langAdsRateConstants> ! <firstOrderRateConstants class_id="51" tracking_level="0" version="0"> ! <count>0</count> ! </firstOrderRateConstants> ! <homEquilibriumConstants> ! <count>0</count> ! </homEquilibriumConstants> ! <homForwardRateConstants> ! <count>0</count> ! </homForwardRateConstants> ! <homBackwardRateConstants> ! <count>0</count> ! </homBackwardRateConstants> ! <homSurfEquilibriumConstants> ! <count>0</count> ! </homSurfEquilibriumConstants> ! <homSurfForwardRateConstants> ! <count>0</count> ! </homSurfForwardRateConstants> ! <homSurfBackwardRateConstants> ! <count>0</count> ! </homSurfBackwardRateConstants> ! <hetSurfEquilibriumConstants> ! <count>0</count> ! </hetSurfEquilibriumConstants> ! <hetSurfForwardRateConstants> ! <count>0</count> ! </hetSurfForwardRateConstants> ! <hetSurfBackwardRateConstants> ! <count>0</count> ! </hetSurfBackwardRateConstants> ! <fixed> ! <count>0</count> ! </fixed> ! <numRowsDissSpecies>2</numRowsDissSpecies> ! <numRowsAdsSpecies>0</numRowsAdsSpecies> ! <numRowsSaturation>0</numRowsSaturation> ! <numRowsBvDiss>1</numRowsBvDiss> ! <numRowsBvAds>0</numRowsBvAds> ! <numRowsLangmuir>0</numRowsLangmuir> ! <numRowsHomPower>0</numRowsHomPower> ! <numRowsHomGen>0</numRowsHomGen> ! <numColsHomGen>0</numColsHomGen> ! <numRowsHomSurfPower>0</numRowsHomSurfPower> ! <numRowsHomSurfGen>0</numRowsHomSurfGen> ! <numColsHomSurfGen>0</numColsHomSurfGen> ! <numRowsHetSurfPower>0</numRowsHetSurfPower> ! <numRowsHetSurfGen>0</numRowsHetSurfGen> ! <numColsHetSurfGen>0</numColsHetSurfGen> ! <genParams class_id="53" tracking_level="0" version="0"> ! <count>0</count> ! </genParams> ! <genColsParams class_id="54" tracking_level="0" version="0"> ! <count>0</count> ! </genColsParams> ! <genParamsCols class_id="55" tracking_level="0" version="0"> ! <count>0</count> ! </genParamsCols> ! <genParamsValues class_id="56" tracking_level="0" version="0"> ! <count>0</count> ! </genParamsValues> ! </mpc> <maxTime>100</maxTime> <accuracy>0.001</accuracy> *************** *** 403,416 **** <count>0</count> </timeSteps> ! <profiles class_id="56" tracking_level="0" version="0"> <count>0</count> </profiles> ! <homReactions>0</homReactions> ! <ads>0</ads> ! <homSurfReactions>0</homSurfReactions> <hetSurfReactions>0</hetSurfReactions> <plotDiss>0</plotDiss> <plotAds>0</plotAds> ! <sc class_id="57" tracking_level="1" version="0" object_id="_38"> <rho>0.11111111111111108</rho> <TOL>0.02</TOL> --- 405,418 ---- <count>0</count> </timeSteps> ! <profiles class_id="58" tracking_level="0" version="0"> <count>0</count> </profiles> ! <homReactions>1</homReactions> ! <ads>1</ads> ! <homSurfReactions>1</homSurfReactions> <hetSurfReactions>0</hetSurfReactions> <plotDiss>0</plotDiss> <plotAds>0</plotAds> ! <sc class_id="59" tracking_level="0" version="0"> <rho>0.11111111111111108</rho> <TOL>0.02</TOL> *************** *** 463,469 **** <visConcProfiles>0</visConcProfiles> </cond_data> ! <meas_data class_id="59" class_name="MeasurementDataModSim" tracking_level="1" version="0" object_id="_39"> ! <MeasurementData class_id="58" tracking_level="1" version="0" object_id="_40"></MeasurementData> ! <responseCurves class_id="60" tracking_level="0" version="0"> <count>0</count> </responseCurves> --- 465,471 ---- <visConcProfiles>0</visConcProfiles> </cond_data> ! <meas_data class_id="61" class_name="experiment::MeasurementDataModSim" tracking_level="1" version="0" object_id="_9"> ! <MeasurementData class_id="60" tracking_level="1" version="0" object_id="_10"></MeasurementData> ! <responseCurves class_id="62" tracking_level="0" version="0"> <count>0</count> </responseCurves> Index: example8.xml =================================================================== RCS file: /cvsroot/echempp/examples/example8.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** example8.xml 19 Dec 2007 13:58:29 -0000 1.2 --- example8.xml 27 Dec 2007 19:23:11 -0000 1.3 *************** *** 2,9 **** <!DOCTYPE boost_serialization> <boost_serialization signature="serialization::archive" version="3"> ! <ep class_id="0" class_name="Induced_Simulated_Dynamic_doubleSecondTimeVariable_doubleVoltElectricPotentialVariable_doubleAmpereElectricCurrentVariable" tracking_level="1" version="0" object_id="_0"> <_AtomicBase class_id="1" tracking_level="0" version="0"> <Experiment class_id="2" tracking_level="0" version="0"> ! <title_>Insert Experiment title</title_> </Experiment> </_AtomicBase> --- 2,9 ---- <!DOCTYPE boost_serialization> <boost_serialization signature="serialization::archive" version="3"> ! <ep class_id="0" class_name="experiment::cv::SimInduced" tracking_level="1" version="0" object_id="_0"> <_AtomicBase class_id="1" tracking_level="0" version="0"> <Experiment class_id="2" tracking_level="0" version="0"> ! <title_>/home/dome/echempp/examples/example8.xml</title_> </Experiment> </_AtomicBase> *************** *** 18,22 **** </ptime_date> </induction_end> ! <cond_data class_id="6" class_name="ConditionDataModSim" tracking_level="1" version="0" object_id="_1"> <ConditionData class_id="5" tracking_level="1" version="0" object_id="_2"></ConditionData> <safety>3</safety> --- 18,22 ---- </ptime_date> </induction_end> ! <cond_data class_id="6" class_name="experiment::ConditionDataModSim" tracking_level="1" version="0" object_id="_1"> <ConditionData class_id="5" tracking_level="1" version="0" object_id="_2"></ConditionData> <safety>3</safety> *************** *** 24,28 **** <currentControlled>0</currentControlled> <potentialControlled>1</potentialControlled> ! <finiteDistance class_id="7" tracking_level="1" version="0" object_id="_3"> <ABQ class_id="8" tracking_level="0" version="0"> <namestring>length</namestring> --- 24,28 ---- <currentControlled>0</currentControlled> <potentialControlled>1</potentialControlled> ! <finiteDistance class_id="7" tracking_level="0" version="0"> <ABQ class_id="8" tracking_level="0" version="0"> <namestring>length</namestring> *************** *** 33,45 **** <num_electrodes>2</num_electrodes> <dimension>1</dimension> ! <technique0>CV</technique0> <technique1>CV</technique1> <boundary0>0</boundary0> <boundary1>1</boundary1> ! <etExcitation0 class_id="9" tracking_level="1" version="0" object_id="_4"> <ExcitationFunction class_id="10" tracking_level="0" version="0"></ExcitationFunction> <_Imax class_id="11" tracking_level="0" version="0"> ! <count>3</count> ! <item class_id="12" tracking_level="1" version="0" object_id="_5"> <ABQ class_id="13" tracking_level="0" version="0"> <namestring>time</namestring> --- 33,45 ---- <num_electrodes>2</num_electrodes> <dimension>1</dimension> ! <technique0>User Defined</technique0> <technique1>CV</technique1> <boundary0>0</boundary0> <boundary1>1</boundary1> ! <etExcitation0 class_id="9" tracking_level="1" version="0" object_id="_3"> <ExcitationFunction class_id="10" tracking_level="0" version="0"></ExcitationFunction> <_Imax class_id="11" tracking_level="0" version="0"> ! <count>4</count> ! <item class_id="12" tracking_level="0" version="0"> <ABQ class_id="13" tracking_level="0" version="0"> <namestring>time</namestring> *************** *** 48,80 **** <_value>0</_value> </item> ! <item object_id="_6"> <ABQ> <namestring></namestring> <symbolstring></symbolstring> </ABQ> ! <_value>0.5</_value> </item> ! <item object_id="_7"> <ABQ> <namestring></namestring> <symbolstring></symbolstring> </ABQ> ! <_value>1</_value> </item> </_Imax> <_segments class_id="14" tracking_level="0" version="0"> ! <count>2</count> ! <item class_id="16" class_name="LinearSegment_doubleVoltElectricPotentialVariable_doubleSecondTimeVariable" tracking_level="1" version="0" object_id="_8"> ! <Base class_id="15" tracking_level="1" version="0" object_id="_9"> ! <Segment class_id="17" tracking_level="1" version="0" object_id="_10"></Segment> ! <_Imax object_id="_11"> <ABQ> <namestring></namestring> <symbolstring></symbolstring> </ABQ> ! <_value>0.5</_value> </_Imax> </Base> ! <_startingValue class_id="18" tracking_level="1" version="0" object_id="_12"> <ABQ class_id="19" tracking_level="0" version="0"> <namestring>electric potential</namestring> --- 48,87 ---- <_value>0</_value> </item> ! <item> <ABQ> <namestring></namestring> <symbolstring></symbolstring> </ABQ> ! <_value>1</_value> </item> ! <item> ! <ABQ> ! <namestring>time</namestring> ! <symbolstring>t</symbolstring> ! </ABQ> ! <_value>2</_value> ! </item> ! <item> <ABQ> <namestring></namestring> <symbolstring></symbolstring> </ABQ> ! <_value>3.3999999999999999</_value> </item> </_Imax> <_segments class_id="14" tracking_level="0" version="0"> ! <count>3</count> ! <item class_id="15" class_name="ExcitationFunctions::Segments::LinearEtSegment" tracking_level="1" version="0" object_id="_4"> ! <Base class_id="16" tracking_level="0" version="0"> ! <Segment class_id="17" tracking_level="0" version="0"></Segment> ! <_Imax> <ABQ> <namestring></namestring> <symbolstring></symbolstring> </ABQ> ! <_value>1</_value> </_Imax> </Base> ! <_startingValue class_id="18" tracking_level="0" version="0"> <ABQ class_id="19" tracking_level="0" version="0"> <namestring>electric potential</namestring> *************** *** 83,87 **** <_value>0</_value> </_startingValue> ! <_endValue object_id="_13"> <ABQ> <namestring>electric potential</namestring> --- 90,94 ---- <_value>0</_value> </_startingValue> ! <_endValue> <ABQ> <namestring>electric potential</namestring> *************** *** 90,113 **** <_value>0.5</_value> </_endValue> ! <_derivative class_id="20" tracking_level="1" version="0" object_id="_14"> <ABQ class_id="21" tracking_level="0" version="0"> <namestring></namestring> <symbolstring></symbolstring> </ABQ> ! <_value>1</_value> </_derivative> </item> ! <item class_id_reference="16" object_id="_15"> ! <Base object_id="_16"> ! <Segment object_id="_17"></Segment> ! <_Imax object_id="_18"> <ABQ> <namestring></namestring> <symbolstring></symbolstring> </ABQ> ! <_value>0.5</_value> </_Imax> </Base> ! <_startingValue object_id="_19"> <ABQ> <namestring>electric potential</namestring> --- 97,139 ---- <_value>0.5</_value> </_endValue> ! <_derivative class_id="20" tracking_level="0" version="0"> <ABQ class_id="21" tracking_level="0" version="0"> <namestring></namestring> <symbolstring></symbolstring> </ABQ> ! <_value>0.5</_value> </_derivative> </item> ! <item class_id="22" class_name="ExcitationFunctions::Segments::ConstantEtSegment" tracking_level="1" version="0" object_id="_5"> ! <Base> ! <Segment></Segment> ! <_Imax> ! <ABQ> ! <namestring>time</namestring> ! <symbolstring>t</symbolstring> ! </ABQ> ! <_value>1</_value> ! </_Imax> ! </Base> ! <_constantValue> ! <ABQ> ! <namestring>electric potential</namestring> ! <symbolstring>E</symbolstring> ! </ABQ> ! <_value>0.5</_value> ! </_constantValue> ! </item> ! <item class_id_reference="15" object_id="_6"> ! <Base> ! <Segment></Segment> ! <_Imax> <ABQ> <namestring></namestring> <symbolstring></symbolstring> </ABQ> ! <_value>1.3999999999999999</_value> </_Imax> </Base> ! <_startingValue> <ABQ> <namestring>electric potential</namestring> *************** *** 116,141 **** <_value>0.5</_value> </_startingValue> ! <_endValue object_id="_20"> <ABQ> <namestring>electric potential</namestring> <symbolstring>E</symbolstring> </ABQ> ! <_value>0</_value> </_endValue> ! <_derivative object_id="_21"> <ABQ> <namestring></namestring> <symbolstring></symbolstring> </ABQ> ! <_value>-1</_value> </_derivative> </item> </_segments> </etExcitation0> ! <etExcitation1 object_id="_22"> <ExcitationFunction></ExcitationFunction> <_Imax> <count>1</count> ! <item object_id="_23"> <ABQ> <namestring>time</namestring> --- 142,167 ---- <_value>0.5</_value> </_startingValue> ! <_endValue> <ABQ> <namestring>electric potential</namestring> <symbolstring>E</symbolstring> </ABQ> ! <_value>-0.20000000000000001</_value> </_endValue> ! <_derivative> <ABQ> <namestring></namestring> <symbolstring></symbolstring> </ABQ> ! <_value>-0.5</_value> </_derivative> </item> </_segments> </etExcitation0> ! <etExcitation1 object_id="_7"> <ExcitationFunction></ExcitationFunction> <_Imax> <count>1</count> ! <item> <ABQ> <namestring>time</namestring> *************** *** 149,157 **** </_segments> </etExcitation1> ! <itExcitation0 class_id="22" tracking_level="1" version="0" object_id="_24"> <ExcitationFunction></ExcitationFunction> <_Imax> <count>1</count> ! <item object_id="_25"> <ABQ> <namestring>time</namestring> --- 175,183 ---- </_segments> </etExcitation1> ! <itExcitation0 class_id="23" tracking_level="1" version="0" object_id="_8"> <ExcitationFunction></ExcitationFunction> <_Imax> <count>1</count> ! <item> <ABQ> <namestring>time</namestring> *************** *** 161,173 **** </item> </_Imax> ! <_segments class_id="23" tracking_level="0" version="0"> <count>0</count> </_segments> </itExcitation0> ! <itExcitation1 object_id="_26"> <ExcitationFunction></ExcitationFunction> <_Imax> <count>1</count> ! <item object_id="_27"> <ABQ> <namestring>time</namestring> --- 187,199 ---- </item> </_Imax> ! <_segments class_id="24" tracking_level="0" version="0"> <count>0</count> </_segments> </itExcitation0> ! <itExcitation1 object_id="_9"> <ExcitationFunction></ExcitationFunction> <_Imax> <count>1</count> ! <item> <ABQ> <namestring>time</namestring> *************** *** 181,373 **** </_segments> </itExcitation1> ! <chargeBalance>0</chargeBalance> ! <stoichiometricBalance>1</stoichiometricBalance> ! <mechanism>A <=> B + e-; b<0>; </mechanism> ! <activeBoundaries> ! <count>1</count> ! <item>0</item> ! </activeBoundaries> ! <temp class_id="25" tracking_level="1" version="0" object_id="_28"> ! <ABQ class_id="26" tracking_level="0" version="0"> ! <namestring>temperature</namestring> ! <symbolstring>T</symbolstring> ! </ABQ> ! <_value>293.14999999999998</_value> ! </temp> ! <area class_id="27" tracking_level="1" version="0" object_id="_29"> ! <ABQ class_id="28" tracking_level="0" version="0"> ! <namestring>area</namestring> ! <symbolstring>A</symbolstring> ! </ABQ> ! <_value>6.0000000000000002e-06</_value> ! </area> ! <dissConcs class_id="29" tracking_level="0" version="0"> ! <count>2</count> ! <item class_id="30" tracking_level="0" version="0"> ! <first>0</first> ! <second class_id="31" tracking_level="1" version="0" object_id="_30"> ! <ABQ class_id="32" tracking_level="0" version="0"> ! <namestring>concentration</namestring> ! <symbolstring>c</symbolstring> ! </ABQ> ! <_value>0.0001</_value> ! </second> ! </item> ! <item> ! <first>1</first> ! <second object_id="_31"> ! <ABQ> ! <namestring>concentration</namestring> ! <symbolstring>c</symbolstring> ! </ABQ> ! <_value>0</_value> ! </second> ! </item> ! </dissConcs> ! <refDissConc object_id="_32"> ! <ABQ> ! <namestring>concentration</namestring> ! <symbolstring>c</symbolstring> ! </ABQ> ! <_value>0.0001</_value> ! </refDissConc> ! <refConcIndex>0</refConcIndex> ! <adsConcs class_id="33" tracking_level="0" version="0"> ! <count>0</count> ! </adsConcs> ! <saturationConcs class_id="34" tracking_level="0" version="0"> ! <count>0</count> ! </saturationConcs> ! <diffCoeffs class_id="35" tracking_level="0" version="0"> ! <count>2</count> ! <item class_id="36" tracking_level="0" version="0"> ! <first>0</first> ! <second class_id="37" tracking_level="1" version="0" object_id="_33"> ! <ABQ class_id="38" tracking_level="0" version="0"> ! <namestring>diffusioncoefficient</namestring> ! <symbolstring>D</symbolstring> ! </ABQ> ! <_value>1.0000000000000001e-09</_value> ! </second> ! </item> ! <item> ! <first>1</first> ! <second object_id="_34"> ! <ABQ> ! <namestring>diffusioncoefficient</namestring> ! <symbolstring>D</symbolstring> ! </ABQ> ! <_value>1.0000000000000001e-09</_value> ! </second> ! </item> ! </diffCoeffs> ! <refDiffCoeff object_id="_35"> ! <ABQ> ! <namestring>diffusioncoefficient</namestring> ! <symbolstring>D</symbolstring> ! </ABQ> ! <_value>1.0000000000000001e-09</_value> ! </refDiffCoeff> ! <maxDiffCoeff>1</maxDiffCoeff> ! <formalPotentials class_id="39" tracking_level="0" version="0"> ! <count>1</count> ! <item class_id="40" tracking_level="0" version="0"> ! <first>0</first> ! <second object_id="_36"> ! <ABQ> ! <namestring>electric potential</namestring> ! <symbolstring>E</symbolstring> ! </ABQ> ! <_value>0.25</_value> ! </second> ! </item> ! </formalPotentials> ! <alphas class_id="41" tracking_level="0" version="0"> ! <count>1</count> ! <item class_id="42" tracking_level="0" version="0"> ! <first>0</first> ! <second>0.5</second> ! </item> ! </alphas> ! <khs class_id="43" tracking_level="0" version="0"> ! <count>1</count> ! <item class_id="44" tracking_level="0" version="0"> ! <first>0</first> ! <second class_id="45" tracking_level="1" version="0" object_id="_37"> ! <ABQ class_id="46" tracking_level="0" version="0"> ! <namestring>heterogeneousrateconstant</namestring> ! <symbolstring>k_s</symbolstring> ! </ABQ> ! <_value>0.01</_value> ! </second> ! </item> ! </khs> ! <langEquilConstants class_id="47" tracking_level="0" version="0"> ! <count>0</count> ! </langEquilConstants> ! <langAdsRateConstants class_id="48" tracking_level="0" version="0"> ! <count>0</count> ! </langAdsRateConstants> ! <firstOrderRateConstants class_id="49" tracking_level="0" version="0"> ! <count>0</count> ! </firstOrderRateConstants> ! <homEquilibriumConstants> ! <count>0</count> ! </homEquilibriumConstants> ! <homForwardRateConstants> ! <count>0</count> ! </homForwardRateConstants> ! <homBackwardRateConstants> ! <count>0</count> ! </homBackwardRateConstants> ! <homSurfEquilibriumConstants> ! <count>0</count> ! </homSurfEquilibriumConstants> ! <homSurfForwardRateConstants> ! <count>0</count> ! </homSurfForwardRateConstants> ! <homSurfBackwardRateConstants> ! <count>0</count> ! </homSurfBackwardRateConstants> ! <hetSurfEquilibriumConstants> ! <count>0</count> ! </hetSurfEquilibriumConstants> ! <hetSurfForwardRateConstants> ! <count>0</count> ! </hetSurfForwardRateConstants> ! <hetSurfBackwardRateConstants> ! <count>0</count> ! </hetSurfBackwardRateConstants> ! <fixed> ! <count>0</count> ! </fixed> ! <numRowsDissSpecies>2</numRowsDissSpecies> ! <numRowsAdsSpecies>0</numRowsAdsSpecies> ! <numRowsSaturation>0</numRowsSaturation> ! <numRowsBvDiss>1</numRowsBvDiss> ! <numRowsBvAds>0</numRowsBvAds> ! <numRowsLangmuir>0</numRowsLangmuir> ! <numRowsHomPower>0</numRowsHomPower> ! <numRowsHomGen>0</numRowsHomGen> ! <numColsHomGen>0</numColsHomGen> ! <numRowsHomSurfPower>0</numRowsHomSurfPower> ! <numRowsHomSurfGen>0</numRowsHomSurfGen> ! <numColsHomSurfGen>0</numColsHomSurfGen> ! <numRowsHetSurfPower>0</numRowsHetSurfPower> ! <numRowsHetSurfGen>0</numRowsHetSurfGen> ! <numColsHetSurfGen>0</numColsHetSurfGen> ! <genParams class_id="51" tracking_level="0" version="0"> ! <count>0</count> ! </genParams> ! <genColsParams class_id="52" tracking_level="0" version="0"> ! <count>0</count> ! </genColsParams> ! <genParamsCols class_id="53" tracking_level="0" version="0"> ! <count>0</count> ! </genParamsCols> ! <genParamsValues class_id="54" tracking_level="0" version="0"> ! <count>0</count> ! </genParamsValues> <maxTime>100</maxTime> <accuracy>0.001</accuracy> --- 207,405 ---- </_segments> </itExcitation1> ! <mc class_id="25" tracking_level="0" version="0"> ! <chargeBalance>0</chargeBalance> ! <stoichiometricBalance>1</stoichiometricBalance> ! <mechanism>A <=> B + e-; b<0>; ! ! </mechanism> ! <activeBoundaries> ! <count>1</count> ! <item>0</item> ! </activeBoundaries> ! </mc> ! <mpc class_id="27" tracking_level="0" version="0"> ! <temp class_id="28" tracking_level="0" version="0"> ! <ABQ class_id="29" tracking_level="0" version="0"> ! <namestring>temperature</namestring> ! <symbolstring>T</symbolstring> ! </ABQ> ! <_value>293.14999999999998</_value> ! </temp> ! <area class_id="30" tracking_level="0" version="0"> ! <ABQ class_id="31" tracking_level="0" version="0"> ! <namestring>area</namestring> ! <symbolstring>A</symbolstring> ! </ABQ> ! <_value>6.0000000000000002e-06</_value> ! </area> ! <dissConcs class_id="32" tracking_level="0" version="0"> ! <count>2</count> ! <item class_id="33" tracking_level="0" version="0"> ! <first>0</first> ! <second class_id="34" tracking_level="0" version="0"> ! <ABQ class_id="35" tracking_level="0" version="0"> ! <namestring>concentration</namestring> ! <symbolstring>c</symbolstring> ! </ABQ> ! <_value>0.0001</_value> ! </second> ! </item> ! <item> ! <first>1</first> ! <second> ! <ABQ> ! <namestring>concentration</namestring> ! <symbolstring>c</symbolstring> ! </ABQ> ! <_value>0</_value> ! </second> ! </item> ! </dissConcs> ! <refDissConc> ! <ABQ> ! <namestring>concentration</namestring> ! <symbolstring>c</symbolstring> ! </ABQ> ! <_value>0.0001</_value> ! </refDissConc> ! <refConcIndex>0</refConcIndex> ! <adsConcs class_id="36" tracking_level="0" version="0"> ! <count>0</count> ! </adsConcs> ! <saturationConcs class_id="37" tracking_level="0" version="0"> ! <count>0</count> ! </saturationConcs> ! <diffCoeffs class_id="38" tracking_level="0" version="0"> ! <count>2</count> ! <item class_id="39" tracking_level="0" version="0"> ! <first>0</first> ! <second class_id="40" tracking_level="0" version="0"> ! <ABQ class_id="41" tracking_level="0" version="0"> ! <namestring>diffusioncoefficient</namestring> ! <symbolstring>D</symbolstring> ! </ABQ> ! <_value>1.0000000000000001e-09</_value> ! </second> ! </item> ! <item> ! <first>1</first> ! <second> ! <ABQ> ! <namestring>diffusioncoefficient</namestring> ! <symbolstring>D</symbolstring> ! </ABQ> ! <_value>1.0000000000000001e-09</_value> ! </second> ! </item> ! </diffCoeffs> ! <refDiffCoeff> ! <ABQ> ! <namestring>diffusioncoefficient</namestring> ! <symbolstring>D</symbolstring> ! </ABQ> ! <_value>1.0000000000000001e-09</_value> ! </refDiffCoeff> ! <maxDiffCoeff>1</maxDiffCoeff> ! <formalPotentials class_id="42" tracking_level="0" version="0"> ! <count>1</count> ! <item class_id="43" tracking_level="0" version="0"> ! <first>0</first> ! <second> ! <ABQ> ! <namestring>electric potential</namestring> ! <symbolstring>E</symbolstring> ! </ABQ> ! <_value>0.25</_value> ! </second> ! </item> ! </formalPotentials> ! <alphas class_id="44" tracking_level="0" version="0"> ! <count>1</count> ! <item class_id="45" tracking_level="0" version="0"> ! <first>0</first> ! <second>0.5</second> ! </item> ! </alphas> ! <khs class_id="46" tracking_level="0" version="0"> ! <count>1</count> ! <item class_id="47" tracking_level="0" version="0"> ! <first>0</first> ! <second class_id="48" tracking_level="0" version="0"> ! <ABQ class_id="49" tracking_level="0" version="0"> ! <namestring>heterogeneousrateconstant</namestring> ! <symbolstring>k_s</symbolstring> ! </ABQ> ! <_value>0.01</_value> ! </second> ! </item> ! </khs> ! <langEquilConstants class_id="50" tracking_level="0" version="0"> ! <count>0</count> ! </langEquilConstants> ! <langAdsRateConstants class_id="51" tracking_level="0" version="0"> ! <count>0</count> ! </langAdsRateConstants> ! <firstOrderRateConstants class_id="52" tracking_level="0" version="0"> ! <count>0</count> ! </firstOrderRateConstants> ! <homEquilibriumConstants> ! <count>0</count> ! </homEquilibriumConstants> ! <homForwardRateConstants> ! <count>0</count> ! </homForwardRateConstants> ! <homBackwardRateConstants> ! <count>0</count> ! </homBackwardRateConstants> ! <homSurfEquilibriumConstants> ! <count>0</count> ! </homSurfEquilibriumConstants> ! <homSurfForwardRateConstants> ! <count>0</count> ! </homSurfForwardRateConstants> ! <homSurfBackwardRateConstants> ! <count>0</count> ! </homSurfBackwardRateConstants> ! <hetSurfEquilibriumConstants> ! <count>0</count> ! </hetSurfEquilibriumConstants> ! <hetSurfForwardRateConstants> ! <count>0</count> ! </hetSurfForwardRateConstants> ! <hetSurfBackwardRateConstants> ! <count>0</count> ! </hetSurfBackwardRateConstants> ! <fixed> ! <count>0</count> ! </fixed> ! <numRowsDissSpecies>2</numRowsDissSpecies> ! <numRowsAdsSpecies>0</numRowsAdsSpecies> ! <numRowsSaturation>0</numRowsSaturation> ! <numRowsBvDiss>1</numRowsBvDiss> ! <numRowsBvAds>0</numRowsBvAds> ! <numRowsLangmuir>0</numRowsLangmuir> ! <numRowsHomPower>0</numRowsHomPower> ! <numRowsHomGen>0</numRowsHomGen> ! <numColsHomGen>0</numColsHomGen> ! <numRowsHomSurfPower>0</numRowsHomSurfPower> ! <numRowsHomSurfGen>0</numRowsHomSurfGen> ! <numColsHomSurfGen>0</numColsHomSurfGen> ! <numRowsHetSurfPower>0</numRowsHetSurfPower> ! <numRowsHetSurfGen>0</numRowsHetSurfGen> ! <numColsHetSurfGen>0</numColsHetSurfGen> ! <genParams class_id="54" tracking_level="0" version="0"> ! <count>0</count> ! </genParams> ! <genColsParams class_id="55" tracking_level="0" version="0"> ! <count>0</count> ! </genColsParams> ! <genParamsCols class_id="56" tracking_level="0" version="0"> ! <count>0</count> ! </genParamsCols> ! <genParamsValues class_id="57" tracking_level="0" version="0"> ! <count>0</count> ! </genParamsValues> ! </mpc> <maxTime>100</maxTime> <accuracy>0.001</accuracy> *************** *** 402,406 **** <count>0</count> </timeSteps> ! <profiles class_id="56" tracking_level="0" version="0"> <count>0</count> </profiles> --- 434,438 ---- <count>0</count> </timeSteps> ! <profiles class_id="59" tracking_level="0" version="0"> <count>0</count> </profiles> *************** *** 410,416 **** <hetSurfReactions>0</hetSurfReactions> <plotDiss>0</plotDiss> ! <plotAds>1</plotAds> ! <sc class_id="57" tracking_level="1" version="0" object_id="_38"> ! <rho>0.11111111111111108</rho> <TOL>0.02</TOL> <ATOLs> --- 442,448 ---- <hetSurfReactions>0</hetSurfReactions> <plotDiss>0</plotDiss> ! <plotAds>0</plotAds> ! <sc class_id="60" tracking_level="0" version="0"> ! <rho>0.1111111111111111</rho> <TOL>0.02</TOL> <ATOLs> *************** *** 462,468 **** <visConcProfiles>0</visConcProfiles> </cond_data> ! <meas_data class_id="59" class_name="MeasurementDataModSim" tracking_level="1" version="0" object_id="_39"> ! <MeasurementData class_id="58" tracking_level="1" version="0" object_id="_40"></MeasurementData> ! <responseCurves class_id="60" tracking_level="0" version="0"> <count>0</count> </responseCurves> --- 494,500 ---- <visConcProfiles>0</visConcProfiles> </cond_data> ! <meas_data class_id="62" class_name="experiment::MeasurementDataModSim" tracking_level="1" version="0" object_id="_10"> ! <MeasurementData class_id="61" tracking_level="1" version="0" object_id="_11"></MeasurementData> ! <responseCurves class_id="63" tracking_level="0" version="0"> <count>0</count> </responseCurves> Index: example2.xml =================================================================== RCS file: /cvsroot/echempp/examples/example2.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** example2.xml 19 Dec 2007 13:58:29 -0000 1.2 --- example2.xml 27 Dec 2007 19:23:11 -0000 1.3 *************** *** 2,9 **** <!DOCTYPE boost_serialization> <boost_serialization signature="serialization::archive" version="3"> ! <ep class_id="0" class_name="Induced_Simulated_Dynamic_doubleSecondTimeVariable_doubleVoltElectricPotentialVariable_doubleAmpereElectricCurrentVariable" tracking_level="1" version="0" object_id="_0"> <_AtomicBase class_id="1" tracking_level="0" version="0"> <Experiment class_id="2" tracking_level="0" version="0"> ! <title_>Insert Experiment title</title_> </Experiment> </_AtomicBase> --- 2,9 ---- <!DOCTYPE boost_serialization> [...1979 lines suppressed...] ! <item>0.99511296322920584</item> ! <item>1</item> </timeSteps> ! <conversionFactor>6.1022667500274173e-07</conversionFactor> </meas_data> </ep> --- 521,533 ---- <visConcProfiles>0</visConcProfiles> </cond_data> ! <meas_data class_id="61" class_name="experiment::MeasurementDataModSim" tracking_level="1" version="0" object_id="_9"> ! <MeasurementData class_id="60" tracking_level="1" version="0" object_id="_10"></MeasurementData> ! <responseCurves class_id="62" tracking_level="0" version="0"> ! <count>0</count> </responseCurves> <timeSteps> ! <count>0</count> </timeSteps> ! <conversionFactor>0</conversionFactor> </meas_data> </ep> Index: example4.xml =================================================================== RCS file: /cvsroot/echempp/examples/example4.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** example4.xml 19 Dec 2007 13:58:29 -0000 1.2 --- example4.xml 27 Dec 2007 19:23:11 -0000 1.3 *************** *** 2,9 **** <!DOCTYPE boost_serialization> <boost_serialization signature="serialization::archive" version="3"> ! <ep class_id="0" class_name="Induced_Simulated_Dynamic_doubleSecondTimeVariable_doubleVoltElectricPotentialVariable_doubleAmpereElectricCurrentVariable" tracking_level="1" version="0" object_id="_0"> <_AtomicBase class_id="1" tracking_level="0" version="0"> <Experiment class_id="2" tracking_level="0" version="0"> ! <title_>Insert Experiment title</title_> </Experiment> </_AtomicBase> --- 2,9 ---- <!DOCTYPE boost_serialization> <boost_serialization signature="serialization::archive" version="3"> ! <ep class_id="0" class_name="experiment::cv::SimInduced" tracking_level="1" version="0" object_id="_0"> <_AtomicBase class_id="1" tracking_level="0" version="0"> <Experiment class_id="2" tracking_level="0" version="0"> ! <title_>/home/dome/echempp/examples/example4.xml</title_> </Experiment> </_AtomicBase> *************** *** 18,35 **** </ptime_date> </induction_end> ! <cond_data class_id="6" class_name="ConditionDataModSim" tracking_level="1" version="0" object_id="_1"> <ConditionData class_id="5" tracking_level="1" version="0" object_id="_2"></ConditionData> <safety>3</safety> ! <is_finite>0</is_finite> <currentControlled>0</currentControlled> <potentialControlled>1</potentialControlled> ! <finiteDistance class_id="7" tracking_level="1" version="0" object_id="_3"> <ABQ class_id="8" tracking_level="0" version="0"> <namestring>length</namestring> <symbolstring>l</symbolstring> </ABQ> ! <_value>5.0000000000000002e-05</_value> </finiteDistance> ! <num_electrodes>2</num_electrodes> <dimension>1</dimension> <technique0>CV</technique0> --- 18,35 ---- </ptime_date> </induction_end> ! <cond_data class_id="6" class_name="experiment::ConditionDataModSim" tracking_level="1" version="0" object_id="_1"> <ConditionData class_id="5" tracking_level="1" version="0" object_id="_2"></ConditionData> <safety>3</safety> ! <is_finite>1</is_finite> <currentControlled>0</currentControlled> <potentialControlled>1</potentialControlled> ! <finiteDistance class_id="7" tracking_level="0" version="0"> <ABQ class_id="8" tracking_level="0" version="0"> <namestring>length</namestring> <symbolstring>l</symbolstring> </ABQ> ! <_value>1.0000000000000001e-05</_value> </finiteDistance> ! <num_electrodes>1</num_electrodes> <dimension>1</dimension> <technique0>CV</technique0> *************** *** 37,45 **** <boundary0>0</boundary0> <boundary1>1</boundary1> ! <etExcitation0 class_id="9" tracking_level="1" version="0" object_id="_4"> <ExcitationFunction class_id="10" tracking_level="0" version="0"></ExcitationFunction> <_Imax class_id="11" tracking_level="0" version="0"> <count>3</count> ! <item class_id="12" tracking_level="1" version="0" object_id="_5"> <ABQ class_id="13" tracking_level="0" version="0"> <namestring>time</namestring> --- 37,45 ---- <boundary0>0</boundary0> <boundary1>1</boundary1> ! <etExcitation0 class_id="9" tracking_level="1" version="0" object_id="_3"> <ExcitationFunction class_id="10" tracking_level="0" version="0"></ExcitationFunction> <_Imax class_id="11" tracking_level="0" version="0"> <count>3</count> ! <item class_id="12" tracking_level="0" version="0"> <ABQ class_id="13" tracking_level="0" version="0"> <namestring>time</namestring> *************** *** 48,52 **** <_value>0</_value> </item> ! <item object_id="_6"> <ABQ> <namestring></namestring> --- 48,52 ---- <_value>0</_value> </item> ! <item> <ABQ> <namestring></namestring> *************** *** 55,59 **** <_value>0.5</_value> </item> ! <item object_id="_7"> <ABQ> <namestring></namestring> --- 55,59 ---- <_value>0.5</_value> </item> ! <item> <ABQ> <namestring></namestring> *************** *** 65,72 **** <_segments class_id="14" tracking_level="0" version="0"> <count>2</count> ! <item class_id="16" class_name="LinearSegment_doubleVoltElectricPotentialVariable_doubleSecondTimeVariable" tracking_level="1" version="0" object_id="_8"> ! <Base class_id="15" tracking_level="1" version="0" object_id="_9"> ! <Segment class_id="17" tracking_level="1" version="0" object_id="_10"></Segment> ! <_Imax object_id="_11"> <ABQ> <namestring></namestring> --- 65,72 ---- <_segments class_id="14" tracking_level="0" version="0"> <count>2</count> ! <item class_id="15" class_name="ExcitationFunctions::Segments::LinearEtSegment" tracking_level="1" version="0" object_id="_4"> ! <Base class_id="16" tracking_level="0" version="0"> ! <Segment class_id="17" tracking_level="0" version="0"></Segment> ! <_Imax> <ABQ> <namestring></namestring> *************** *** 76,80 **** </_Imax> </Base> ! <_startingValue class_id="18" tracking_level="1" version="0" object_id="_12"> <ABQ class_id="19" tracking_level="0" version="0"> <namestring>electric potential</namestring> --- 76,80 ---- </_Imax> </Base> ! <_startingValue class_id="18" tracking_level="0" version="0"> <ABQ class_id="19" tracking_level="0" version="0"> <namestring>electric potential</namestring> *************** *** 83,87 **** <_value>0</_value> </_startingValue> ! <_endValue object_id="_13"> <ABQ> <namestring>electric potential</namestring> --- 83,87 ---- <_value>0</_value> </_startingValue> ! <_endValue> <ABQ> <namestring>electric potential</namestring> *************** *** 90,94 **** <_value>0.5</_value> </_endValue> ! <_derivative class_id="20" tracking_level="1" version="0" object_id="_14"> <ABQ class_id="21" tracking_level="0" version="0"> <namestring></namestring> --- 90,94 ---- <_value>0.5</_value> </_endValue> ! <_derivative class_id="20" tracking_level="0" version="0"> <ABQ class_id="21" tracking_level="0" version="0"> <namestring></namestring> *************** *** 98,105 **** </_derivative> </item> ! <item class_id_reference="16" object_id="_15"> ! <Base object_id="_16"> ! <Segment object_id="_17"></Segment> ! <_Imax object_id="_18"> <ABQ> <namestring></namestring> --- 98,105 ---- </_derivative> </item> ! <item class_id_reference="15" object_id="_5"> ! <Base> ! <Segment></Segment> ! <_Imax> <ABQ> <namestring></namestring> *************** *** 109,113 **** </_Imax> </Base> ! <_startingValue object_id="_19"> <ABQ> <namestring>electric potential</namestring> --- 109,113 ---- </_Imax> </Base> ! <_startingValue> <ABQ> <namestring>electric potential</namestring> *************** *** 116,120 **** <_value>0.5</_value> </_startingValue> ! <_endValue object_id="_20"> <ABQ> <namestring>electric potential</namestring> --- 116,120 ---- <_value>0.5</_value> </_startingValue> ! <_endValue> <ABQ> <namestring>electric potential</namestring> *************** *** 123,127 **** <_value>0</_value> </_endValue> ! <_derivative object_id="_21"> <ABQ> <namestring></namestring> --- 123,127 ---- <_value>0</_value> </_endValue> ! <_derivative> <ABQ> <namestring></namestring> *************** *** 133,141 **** </_segments> </etExcitation0> ! <etExcitation1 object... [truncated message content] |
|
From: beeblbrox <bee...@us...> - 2007-12-27 19:21:48
|
Update of /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv14828/GUI/Windows/Qt/EChem++/Model Added Files: num_get_special.hpp Log Message: iostream facet needed for reading special double/float values "inf" and "nan". Note that this is not supported by std::iostream, so we need to add this facet via a std::locale. --- NEW FILE: num_get_special.hpp --- /*! \file num_get_special.hpp \brief facet to use with the standard iostream library to read special values "inf" and "nan" which are *not* supported by the standard */ /* Copyright (C) 2007, Dominik Brugger */ /* This file is part of EChem++. EChem++ 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 2 of the License, or (at your option) any later version. EChem++ 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 this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include <clocale> #include <cmath> // for special values #include <locale> #include <iostream> template<typename _CharT, typename _InIter> class num_get_special : public std::num_get<_CharT,_InIter> { public: typedef typename std::num_get<_CharT, _InIter>::iter_type iter_type; protected: virtual ~num_get_special() {} virtual iter_type do_get(iter_type __beg, iter_type __end, std::ios_base& __io, std::ios_base::iostate& __err, float& __v) const { std::string __xstrc; __xstrc.reserve(32); __beg = _M_extract_float(__beg, __end, __io, __err, __xstrc); if(__xstrc == "") { // check for special inf,nan while(__beg != __end && !std::isalnum(*__beg)) ++__beg; while(__beg != __end && !std::isspace(*__beg) && std::isalnum(*__beg))__xstrc += std::tolower(*__beg++); if(__xstrc == "inf") __v = INFINITY; if(__xstrc == "nan") __v = NAN; } else { std::__convert_to_v(__xstrc.c_str(), __v, __err, std::locale::facet::_S_get_c_locale()); } return __beg; } virtual iter_type do_get(iter_type __beg, iter_type __end, std::ios_base& __io, std::ios_base::iostate& __err, double& __d) const { std::string __xstrc; __xstrc.reserve(32); __beg = _M_extract_float(__beg, __end, __io, __err, __xstrc); if(__xstrc == "") { // check for special inf,nan while(__beg != __end && !std::isalnum(*__beg)) ++__beg; while(__beg != __end && !std::isspace(*__beg) && std::isalnum(*__beg))__xstrc += std::tolower(*__beg++); if(__xstrc == "inf") __d = INFINITY; if(__xstrc == "nan") __d = NAN; } else { std::__convert_to_v(__xstrc.c_str(), __d, __err, std::locale::facet::_S_get_c_locale()); } return __beg; } }; |
|
From: beeblbrox <bee...@us...> - 2007-12-27 19:20:02
|
Update of /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model/test In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv13984/GUI/Windows/Qt/EChem++/Model/test Modified Files: main.cpp Log Message: Changed. All I/O is now within modelMainWindow to improve compilation time. Index: main.cpp =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model/test/main.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** main.cpp 23 Dec 2007 11:35:30 -0000 1.19 --- main.cpp 27 Dec 2007 19:19:56 -0000 1.20 *************** *** 28,32 **** Icons::load(); - // ModelMainWindowBase* w = new ModelMainWindow(); ModelMainWindow* w = new ModelMainWindow(); --- 28,31 ---- *************** *** 34,38 **** if( projectFile.size() != 0 ) { ! w->readXML(projectFile.c_str()); } --- 33,37 ---- if( projectFile.size() != 0 ) { ! w->readProject(projectFile.c_str()); } |
|
From: beeblbrox <bee...@us...> - 2007-12-27 19:20:02
|
Update of /cvsroot/echempp/GUI/Windows/Qt/EChem++/Experiment In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv13984/GUI/Windows/Qt/EChem++/Experiment Modified Files: caExcitationFunctionDialog.cpp cvExcitationFunctionDialog.cpp optionsDialog.hpp userDefinedEtExcitationFunctionDialog.cpp userDefinedItExcitationFunctionDialog.cpp Log Message: Changed. All I/O is now within modelMainWindow to improve compilation time. Index: cvExcitationFunctionDialog.cpp =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Experiment/cvExcitationFunctionDialog.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** cvExcitationFunctionDialog.cpp 22 Dec 2007 15:51:24 -0000 1.27 --- cvExcitationFunctionDialog.cpp 27 Dec 2007 19:19:55 -0000 1.28 *************** *** 30,33 **** --- 30,34 ---- #include "cvExcitationFunctionDialog.hpp" #include "experimentError.hpp" + #include "Model/modelMainWindow.hpp" //STL includes *************** *** 1028,1056 **** } ! EtExcitationFunction temp; ! ExcitationFunctions::Segments::LinearEtSegment temp_seg(1,2,3); ! std::ifstream ifs_xml(fileName.ascii()); ! if(!ifs_xml) ! { ! QMessageBox::warning( 0, QObject::tr( "I/O Warning" ), ! QObject::tr( "Cannot open file %1" ).arg(fileName)); ! return; ! } ! boost::archive::xml_iarchive ia_xml(ifs_xml); ! try ! { ! ia_xml >> BOOST_SERIALIZATION_NVP(temp); ! } ! catch(std::exception& e) ! { ! QMessageBox::critical( 0, QObject::tr( "Critical Error" ), ! QObject::tr(e.what()) ); ! ! ifs_xml.close(); ! return; ! } ! ifs_xml.close(); ! ! _EtFunction = temp; _xmax = this->time2pixel( _EtFunction.maximum() ); _segmentNumber = _EtFunction.size()-1; --- 1029,1033 ---- } ! _EtFunction = ::GUI::model::ModelMainWindow::readEtExcitationFunction(fileName.ascii()); _xmax = this->time2pixel( _EtFunction.maximum() ); _segmentNumber = _EtFunction.size()-1; *************** *** 1092,1114 **** fileName.append(".xml"); } ! std::ofstream ofs_xml(fileName.ascii()); ! if(!ofs_xml) ! { ! QMessageBox::warning( 0, QObject::tr( "I/O Warning" ), ! QObject::tr( "Cannot open file %1" ).arg( fileName.ascii() ) ); ! return; ! } ! boost::archive::xml_oarchive oa_xml(ofs_xml); ! try{ ! oa_xml << BOOST_SERIALIZATION_NVP(_EtFunction); ! } ! catch(std::exception& e) ! { ! QMessageBox::critical( 0, QObject::tr( "Critical Error" ), ! QObject::tr(e.what()) ); ! ofs_xml.close(); ! return; ! } ! ofs_xml.close(); } --- 1069,1073 ---- fileName.append(".xml"); } ! ::GUI::model::ModelMainWindow::saveEtExcitationFunction(fileName.ascii(), _EtFunction); } Index: optionsDialog.hpp =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Experiment/optionsDialog.hpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** optionsDialog.hpp 29 Nov 2006 15:36:16 -0000 1.4 --- optionsDialog.hpp 27 Dec 2007 19:19:55 -0000 1.5 *************** *** 28,33 **** #define OPTIONS_DIALOG_HPP - - #include "optionsDialogBase.h" --- 28,31 ---- Index: userDefinedItExcitationFunctionDialog.cpp =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Experiment/userDefinedItExcitationFunctionDialog.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** userDefinedItExcitationFunctionDialog.cpp 22 Dec 2007 15:51:24 -0000 1.5 --- userDefinedItExcitationFunctionDialog.cpp 27 Dec 2007 19:19:55 -0000 1.6 *************** *** 31,34 **** --- 31,35 ---- #include "userDefinedItExcitationFunctionDialog.hpp" #include "experimentError.hpp" + #include "Model/modelMainWindow.hpp" //STL includes *************** *** 324,355 **** const std::string id = _itFunction.segment(i)->id(); ! if( id == "Constant" ) { efType.push_back(0); } ! else if( id == "Linear" ) { efType.push_back(1); } ! else if( id == "Sine" ) { efType.push_back(2); } ! else if( id == "Exp" ) { efType.push_back(3); } ! else if( id == "Power" ) { efType.push_back(4); } ! else if( id == "PowerExp" ) { efType.push_back(5); } ! else if( id == "Cosine" ) ! { ! efType.push_back(6); ! } else --- 325,357 ---- const std::string id = _itFunction.segment(i)->id(); ! if( id == ConstantitSegment::GUID ) { efType.push_back(0); } ! else if( id == LinearitSegment::GUID ) { efType.push_back(1); } ! else if( id == SineitSegment::GUID ) { efType.push_back(2); } ! else if( id == ExponentialitSegment::GUID ) { efType.push_back(3); } ! else if( id == PoweritSegment::GUID ) { efType.push_back(4); } ! else if( id == PowerExponentialitSegment::GUID ) { efType.push_back(5); } ! // There are no Cosine Segments! ! // else if( id == CosineitSegment::GUID ) ! // { ! // efType.push_back(6); ! // } else *************** *** 369,376 **** } - // catch( ExcitationFunctions::LoadError& error ) - // { - // QMessageBox::warning( this, "Load button", error.message().c_str() ); - // } catch( const ExperimentError& error ) { --- 371,374 ---- *************** *** 1424,1450 **** try { ! itExcitationFunction temp; ! ExcitationFunctions::Segments::LinearitSegment temp_seg(1,2,3); ! std::ifstream ifs_xml(fileName.ascii()); ! if(!ifs_xml) ! { ! QMessageBox::warning( 0, QObject::tr( "I/O Warning" ), ! QObject::tr( "Cannot open file %1" ).arg(fileName)); ! return; ! } ! boost::archive::xml_iarchive ia_xml(ifs_xml); ! try ! { ! ia_xml >> BOOST_SERIALIZATION_NVP(temp); ! } ! catch(std::exception& e) ! { ! QMessageBox::critical( 0, QObject::tr( "Critical Error" ), ! QObject::tr(e.what()) ); ! ! ifs_xml.close(); ! return; ! } ! ifs_xml.close(); std::vector<int> efType; --- 1422,1426 ---- try { ! itExcitationFunction temp = ::GUI::model::ModelMainWindow::readitExcitationFunction(fileName.ascii()); std::vector<int> efType; *************** *** 1533,1555 **** fileName.append(".xml"); } ! std::ofstream ofs_xml(fileName.ascii()); ! if(!ofs_xml) ! { ! QMessageBox::warning( 0, QObject::tr( "I/O Warning" ), ! QObject::tr( "Cannot open file %1" ).arg( fileName.ascii() ) ); ! return; ! } ! boost::archive::xml_oarchive oa_xml(ofs_xml); ! try{ ! oa_xml << BOOST_SERIALIZATION_NVP(_itFunction); ! } ! catch(std::exception& e) ! { ! QMessageBox::critical( 0, QObject::tr( "Critical Error" ), ! QObject::tr(e.what()) ); ! ofs_xml.close(); ! return; ! } ! ofs_xml.close(); } --- 1509,1513 ---- fileName.append(".xml"); } ! ::GUI::model::ModelMainWindow::saveitExcitationFunction(fileName.ascii(), _itFunction); } Index: caExcitationFunctionDialog.cpp =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Experiment/caExcitationFunctionDialog.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** caExcitationFunctionDialog.cpp 22 Dec 2007 15:51:24 -0000 1.21 --- caExcitationFunctionDialog.cpp 27 Dec 2007 19:19:55 -0000 1.22 *************** *** 30,33 **** --- 30,34 ---- #include "caExcitationFunctionDialog.hpp" #include "experimentError.hpp" + #include "Model/modelMainWindow.hpp" //STL includes *************** *** 960,989 **** _RemoveLE->setText("0"); } ! ! EtExcitationFunction temp; ! ExcitationFunctions::Segments::LinearEtSegment temp_seg(1,2,3); ! std::ifstream ifs_xml(fileName.ascii()); ! if(!ifs_xml) ! { ! QMessageBox::warning( 0, QObject::tr( "I/O Warning" ), ! QObject::tr( "Cannot open file %1" ).arg(fileName)); ! return; ! } ! boost::archive::xml_iarchive ia_xml(ifs_xml); ! try ! { ! ia_xml >> BOOST_SERIALIZATION_NVP(temp); ! } ! catch(std::exception& e) ! { ! QMessageBox::critical( 0, QObject::tr( "Critical Error" ), ! QObject::tr(e.what()) ); ! ! ifs_xml.close(); ! return; ! } ! ifs_xml.close(); ! ! _EtFunction = temp; _xmax = this->time2pixel( _EtFunction.maximum() ); _segmentNumber = _EtFunction.size()-1; --- 961,965 ---- _RemoveLE->setText("0"); } ! _EtFunction = ::GUI::model::ModelMainWindow::readEtExcitationFunction(fileName.ascii()); _xmax = this->time2pixel( _EtFunction.maximum() ); _segmentNumber = _EtFunction.size()-1; *************** *** 1026,1049 **** fileName.append(".xml"); } ! std::ofstream ofs_xml(fileName.ascii()); ! if(!ofs_xml) ! { ! QMessageBox::warning( 0, QObject::tr( "I/O Warning" ), ! QObject::tr( "Cannot open file %1" ).arg( fileName.ascii() ) ); ! return; ! } ! boost::archive::xml_oarchive oa_xml(ofs_xml); ! try ! { ! oa_xml << BOOST_SERIALIZATION_NVP(_EtFunction); ! } ! catch(std::exception& e) ! { ! QMessageBox::critical( 0, QObject::tr( "Critical Error" ), ! QObject::tr(e.what()) ); ! ofs_xml.close(); ! return; ! } ! ofs_xml.close(); } --- 1002,1006 ---- fileName.append(".xml"); } ! ::GUI::model::ModelMainWindow::saveEtExcitationFunction(fileName.ascii(), _EtFunction); } Index: userDefinedEtExcitationFunctionDialog.cpp =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Experiment/userDefinedEtExcitationFunctionDialog.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** userDefinedEtExcitationFunctionDialog.cpp 22 Dec 2007 15:51:24 -0000 1.5 --- userDefinedEtExcitationFunctionDialog.cpp 27 Dec 2007 19:19:55 -0000 1.6 *************** *** 30,33 **** --- 30,34 ---- #include "userDefinedEtExcitationFunctionDialog.hpp" #include "experimentError.hpp" + #include "Model/modelMainWindow.hpp" //STL includes *************** *** 302,322 **** const std::string id = _EtFunction.segment(i)->id(); ! if( id == "Constant" ) { efType.push_back(0); } ! else if( id == "Linear" ) { efType.push_back(1); } ! else if( id == "Sine" ) { efType.push_back(2); } ! else if( id == "Exp" ) { efType.push_back(3); } ! else if( id == "Power" ) { efType.push_back(4); --- 303,323 ---- const std::string id = _EtFunction.segment(i)->id(); ! if( id == ConstantEtSegment::GUID ) { efType.push_back(0); } ! else if( id == LinearEtSegment::GUID ) { efType.push_back(1); } ! else if( id == SineEtSegment::GUID ) { efType.push_back(2); } ! else if( id == ExponentialEtSegment::GUID ) { efType.push_back(3); } ! else if( id == PowerEtSegment::GUID ) { efType.push_back(4); *************** *** 1350,1378 **** try { ! EtExcitationFunction temp; ! ExcitationFunctions::Segments::LinearEtSegment temp_seg(1,2,3); ! std::ifstream ifs_xml(fileName.ascii()); ! if(!ifs_xml) ! { ! QMessageBox::warning( 0, QObject::tr( "I/O Warning" ), ! QObject::tr( "Cannot open file %1" ).arg(fileName)); ! return; ! } ! boost::archive::xml_iarchive ia_xml(ifs_xml); ! try ! { ! ia_xml >> BOOST_SERIALIZATION_NVP(temp); ! } ! catch(std::exception& e) ! { ! QMessageBox::critical( 0, QObject::tr( "Critical Error" ), ! QObject::tr(e.what()) ); ! ! ifs_xml.close(); ! return; ! } ! ifs_xml.close(); ! ! std::vector<int> efType; unsigned int i = 0; --- 1351,1357 ---- try { ! EtExcitationFunction temp = ::GUI::model::ModelMainWindow::readEtExcitationFunction(fileName.ascii()); ! ! std::vector<int> efType; unsigned int i = 0; *************** *** 1382,1402 **** id = temp.segment(i)->id(); ! if( id == "Constant" ) { efType.push_back(0); } ! else if( id == "Linear" ) { efType.push_back(1); } ! else if( id == "Sine" ) { efType.push_back(2); } ! else if( id == "Exp" ) { efType.push_back(3); } ! else if( id == "Power" ) { efType.push_back(4); --- 1361,1381 ---- id = temp.segment(i)->id(); ! if( id == ConstantEtSegment::GUID ) { efType.push_back(0); } ! else if( id == LinearEtSegment::GUID ) { efType.push_back(1); } ! else if( id == SineEtSegment::GUID ) { efType.push_back(2); } ! else if( id == ExponentialEtSegment::GUID ) { efType.push_back(3); } ! else if( id == PowerEtSegment::GUID ) { efType.push_back(4); *************** *** 1451,1473 **** fileName.append(".xml"); } ! std::ofstream ofs_xml(fileName.ascii()); ! if(!ofs_xml) ! { ! QMessageBox::warning( 0, QObject::tr( "I/O Warning" ), ! QObject::tr( "Cannot open file %1" ).arg( fileName.ascii() ) ); ! return; ! } ! boost::archive::xml_oarchive oa_xml(ofs_xml); ! try{ ! oa_xml << BOOST_SERIALIZATION_NVP(_EtFunction); ! } ! catch(std::exception& e) ! { ! QMessageBox::critical( 0, QObject::tr( "Critical Error" ), ! QObject::tr(e.what()) ); ! ofs_xml.close(); ! return; ! } ! ofs_xml.close(); } --- 1430,1434 ---- fileName.append(".xml"); } ! ::GUI::model::ModelMainWindow::saveEtExcitationFunction(fileName.ascii(), _EtFunction); } |
|
From: beeblbrox <bee...@us...> - 2007-12-27 19:20:02
|
Update of /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv13984/GUI/Windows/Qt/EChem++/Model Modified Files: Makefile.am batchExperimentDialog.cpp dataDialog.cpp dataDialog.hpp mechanismDialog.cpp modelMainWindow.cpp modelMainWindow.hpp modelParametersDialog.cpp modelPlotWidget.cpp Log Message: Changed. All I/O is now within modelMainWindow to improve compilation time. Index: dataDialog.hpp =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model/dataDialog.hpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** dataDialog.hpp 19 Dec 2007 11:52:44 -0000 1.7 --- dataDialog.hpp 27 Dec 2007 19:19:56 -0000 1.8 *************** *** 37,42 **** #include "Ecco/reactionNetwork.hpp" - #include "xmlwriter.h" - #include <qdom.h> --- 37,40 ---- *************** *** 58,63 **** void supply(); - void supply( const QDomElement& dialog ); - void save( BSUtilities::xmlw::XmlStream& xml ); void visResponse(); --- 56,59 ---- Index: modelMainWindow.cpp =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model/modelMainWindow.cpp,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** modelMainWindow.cpp 22 Dec 2007 15:53:16 -0000 1.60 --- modelMainWindow.cpp 27 Dec 2007 19:19:56 -0000 1.61 *************** *** 31,34 **** --- 31,37 ---- #endif + #include <boost/archive/xml_iarchive.hpp> + #include <boost/archive/xml_oarchive.hpp> + #include "Model/modelMainWindow.hpp" *************** *** 40,43 **** --- 43,47 ---- #include "Model/mediator.hpp" #include "Model/logger.hpp" + #include "Model/num_get_special.hpp" #include <qaction.h> *************** *** 205,209 **** this->ep = new experiment::cv::SimInduced(new experiment::ConditionDataModSim(), new experiment::MeasurementDataModSim()); - std::cout << "Initial value: ep = " << ep << std::endl; this->ep->set_title("New Experiment"); --- 209,212 ---- *************** *** 290,294 **** void ModelMainWindow::clearExperiment() { - std::cout << "clearExperiment()..." << std::endl; ecount = 0; std::cout << "ep = " << ep << std::endl; --- 293,296 ---- *************** *** 298,302 **** ep = NULL; } - std::cout << "done.!" << std::endl; } --- 300,303 ---- *************** *** 380,390 **** } ! void ModelMainWindow::readXML(const char* filename) { log << Message << "Reading " << filename << Flush; ! ExcitationFunctions::Segments::LinearEtSegment dummy(1,2,3); ! experiment::Homogeneous hom; std::ifstream ifs_xml(filename); ! boost::archive::xml_iarchive ia_xml(ifs_xml); try { --- 381,400 ---- } ! bool ModelMainWindow::readProject(const char* filename) { log << Message << "Reading " << filename << Flush; ! // use the standard locale with num_get_special to read inf,nan ! // into double/float with standard iostreams ! typedef std::istreambuf_iterator<char, std::char_traits<char> > Iter; ! std::locale loc(std::locale(), new num_get_special<char,Iter>); std::ifstream ifs_xml(filename); ! if(!ifs_xml) ! { ! QMessageBox::warning( 0, QObject::tr( "I/O Warning" ), ! QObject::tr( "Cannot open file %1" ).arg(filename)); ! return false; ! } ! ifs_xml.imbue(loc); ! boost::archive::xml_iarchive ia_xml(ifs_xml,boost::archive::no_codecvt); try { *************** *** 395,405 **** QMessageBox::critical( 0, QObject::tr( "Critical Error" ), QObject::tr(e.what()) ); } ifs_xml.close(); ! _mediator->supply(); } ! void ! ModelMainWindow::sltFileOpen() { QFileDialog* fd = new QFileDialog( this, "file dialog", TRUE ); --- 405,662 ---- QMessageBox::critical( 0, QObject::tr( "Critical Error" ), QObject::tr(e.what()) ); + experiment::ConditionDataModSim* cond_data = dynamic_cast<experiment::ConditionDataModSim*>(ep->get_cond_data()); + std::cout << "cond_data->mc.mechanism = " << cond_data->mc.mechanism << std::endl; + ifs_xml.close(); + return false; } ifs_xml.close(); ! return true; } ! bool ModelMainWindow::saveProject(const char* filename) ! { ! std::ofstream ofs_xml(filename); ! if(!ofs_xml) ! { ! QMessageBox::warning( 0, QObject::tr( "I/O Warning" ), ! QObject::tr( "Cannot open file %1" ).arg(filename)); ! return false; ! } ! boost::archive::xml_oarchive oa_xml(ofs_xml); ! try{ ! oa_xml << BOOST_SERIALIZATION_NVP(ep); ! } ! catch(std::exception& e) ! { ! QMessageBox::critical( 0, QObject::tr( "Critical Error" ), ! QObject::tr(e.what()) ); ! ofs_xml.close(); ! return false; ! } ! ofs_xml.close(); ! return true; ! } ! ! ! ExcitationFunctions::EtExcitationFunction ModelMainWindow::readEtExcitationFunction(const char* filename) ! { ! ExcitationFunctions::EtExcitationFunction temp; ! // use the standard locale with num_get_special to read inf,nan ! // into double/float with standard iostreams ! typedef std::istreambuf_iterator<char, std::char_traits<char> > Iter; ! std::locale loc(std::locale(), new num_get_special<char,Iter>); ! std::ifstream ifs_xml(filename); ! if(!ifs_xml) ! { ! QMessageBox::warning( 0, QObject::tr( "I/O Warning" ), ! QObject::tr( "Cannot open file %1" ).arg(filename)); ! } ! ifs_xml.imbue(loc); ! boost::archive::xml_iarchive ia_xml(ifs_xml); ! try ! { ! ia_xml >> BOOST_SERIALIZATION_NVP(temp); ! } ! catch(std::exception& e) ! { ! QMessageBox::critical( 0, QObject::tr( "Critical Error" ), ! QObject::tr(e.what()) ); ! ifs_xml.close(); ! } ! ifs_xml.close(); ! return temp; ! } ! ! bool ModelMainWindow::saveEtExcitationFunction(const char* filename, const ExcitationFunctions::EtExcitationFunction& ef) ! { ! std::ofstream ofs_xml(filename); ! if(!ofs_xml) ! { ! QMessageBox::warning( 0, QObject::tr( "I/O Warning" ), ! QObject::tr( "Cannot open file %1" ).arg(filename)); ! return false; ! } ! boost::archive::xml_oarchive oa_xml(ofs_xml); ! try{ ! oa_xml << BOOST_SERIALIZATION_NVP(ef); ! } ! catch(std::exception& e) ! { ! QMessageBox::critical( 0, QObject::tr( "Critical Error" ), ! QObject::tr(e.what()) ); ! ofs_xml.close(); ! return false; ! } ! ofs_xml.close(); ! return true; ! } ! ! ExcitationFunctions::itExcitationFunction ModelMainWindow::readitExcitationFunction(const char* filename) ! { ! ExcitationFunctions::itExcitationFunction temp; ! // use the standard locale with num_get_special to read inf,nan ! // into double/float with standard iostreams ! typedef std::istreambuf_iterator<char, std::char_traits<char> > Iter; ! std::locale loc(std::locale(), new num_get_special<char,Iter>); ! std::ifstream ifs_xml(filename); ! if(!ifs_xml) ! { ! QMessageBox::warning( 0, QObject::tr( "I/O Warning" ), ! QObject::tr( "Cannot open file %1" ).arg(filename)); ! } ! ifs_xml.imbue(loc); ! boost::archive::xml_iarchive ia_xml(ifs_xml); ! try ! { ! ia_xml >> BOOST_SERIALIZATION_NVP(temp); ! } ! catch(std::exception& e) ! { ! QMessageBox::critical( 0, QObject::tr( "Critical Error" ), ! QObject::tr(e.what()) ); ! ifs_xml.close(); ! } ! ifs_xml.close(); ! return temp; ! } ! ! bool ModelMainWindow::saveitExcitationFunction(const char* filename, const ExcitationFunctions::itExcitationFunction& ef) ! { ! std::ofstream ofs_xml(filename); ! if(!ofs_xml) ! { ! QMessageBox::warning( 0, QObject::tr( "I/O Warning" ), ! QObject::tr( "Cannot open file %1" ).arg(filename)); ! return false; ! } ! boost::archive::xml_oarchive oa_xml(ofs_xml); ! try{ ! oa_xml << BOOST_SERIALIZATION_NVP(ef); ! } ! catch(std::exception& e) ! { ! QMessageBox::critical( 0, QObject::tr( "Critical Error" ), ! QObject::tr(e.what()) ); ! ofs_xml.close(); ! return false; ! } ! ofs_xml.close(); ! return true; ! } ! ! bool ModelMainWindow::readMechanism(const char* filename) ! { ! std::ifstream ifs_xml(filename); ! // use the standard locale with num_get_special to read inf,nan ! // into double/float with standard iostreams ! typedef std::istreambuf_iterator<char, std::char_traits<char> > Iter; ! std::locale loc(std::locale(), new num_get_special<char,Iter>); ! if(!ifs_xml) ! { ! QMessageBox::warning( 0, QObject::tr( "I/O Warning" ), ! QObject::tr( "Cannot open file %1" ).arg(filename)); ! return false; ! } ! ifs_xml.imbue(loc); ! boost::archive::xml_iarchive ia_xml(ifs_xml); ! experiment::ConditionDataModSim* _cond_data = getActiveConditionData(); ! try ! { ! ia_xml >> boost::serialization::make_nvp("mc", _cond_data->mc); ! } ! catch(std::exception& e) ! { ! QMessageBox::critical( 0, QObject::tr( "Critical Error" ), ! QObject::tr(e.what()) ); ! ! ifs_xml.close(); ! return false; ! } ! ifs_xml.close(); ! return true; ! } ! ! bool ModelMainWindow::saveMechanism(const char* filename) ! { ! std::ofstream ofs_xml(filename); ! if(!ofs_xml) ! { ! QMessageBox::warning( 0, QObject::tr( "I/O Warning" ), ! QObject::tr( "Cannot open file %1" ).arg(filename)); ! return false; ! } ! boost::archive::xml_oarchive oa_xml(ofs_xml); ! experiment::ConditionDataModSim* _cond_data = getActiveConditionData(); ! try{ ! oa_xml << boost::serialization::make_nvp("mc", _cond_data->mc); ! } ! catch(std::exception& e) ! { ! QMessageBox::critical( 0, QObject::tr( "Critical Error" ), ! QObject::tr(e.what()) ); ! ofs_xml.close(); ! return false; ! } ! ofs_xml.close(); ! return true; ! } ! ! bool ModelMainWindow::readModelParameters(const char* filename) ! { ! std::ifstream ifs_xml(filename); ! // use the standard locale with num_get_special to read inf,nan ! // into double/float with standard iostreams ! typedef std::istreambuf_iterator<char, std::char_traits<char> > Iter; ! std::locale loc(std::locale(), new num_get_special<char,Iter>); ! if(!ifs_xml) ! { ! QMessageBox::warning( 0, QObject::tr( "I/O Warning" ), ! QObject::tr( "Cannot open file %1" ).arg(filename)); ! return false; ! } ! ifs_xml.imbue(loc); ! boost::archive::xml_iarchive ia_xml(ifs_xml); ! experiment::ConditionDataModSim* _cond_data = getActiveConditionData(); ! try ! { ! ia_xml >> boost::serialization::make_nvp("mpc", _cond_data->mpc); ! } ! catch(std::exception& e) ! { ! QMessageBox::critical( 0, QObject::tr( "Critical Error" ), ! QObject::tr(e.what()) ); ! ifs_xml.close(); ! return false; ! } ! ifs_xml.close(); ! return true; ! } ! ! bool ModelMainWindow::saveModelParameters(const char* filename) ! { ! std::ofstream ofs_xml(filename); ! if(!ofs_xml) ! { ! QMessageBox::warning( 0, QObject::tr( "I/O Warning" ), ! QObject::tr( "Cannot open file %1" ).arg(filename)); ! return false; ! } ! boost::archive::xml_oarchive oa_xml(ofs_xml); ! experiment::ConditionDataModSim* _cond_data = getActiveConditionData(); ! try{ ! oa_xml << boost::serialization::make_nvp("mpc", _cond_data->mpc); ! } ! catch(std::exception& e) ! { ! QMessageBox::critical( 0, QObject::tr( "Critical Error" ), ! QObject::tr(e.what()) ); ! ofs_xml.close(); ! return false; ! } ! ofs_xml.close(); ! return true; ! } ! ! void ModelMainWindow::sltFileOpen() { QFileDialog* fd = new QFileDialog( this, "file dialog", TRUE ); *************** *** 419,425 **** try { ! readXML(fileName.ascii()); this->setCaption("EChem++ - ModSim " + temp ); - } catch( const ModelError& error ) --- 676,682 ---- try { ! if(readProject(fileName.ascii())) ! _mediator->supply(); this->setCaption("EChem++ - ModSim " + temp ); } catch( const ModelError& error ) *************** *** 433,441 **** this->setCaption("EChem++ - ModSim"); } - - } delete fd; - } --- 690,695 ---- *************** *** 463,487 **** { ep->set_title(fileName.ascii()); ! std::ofstream ofs_xml(fileName.ascii()); ! if(!ofs_xml) ! { ! QMessageBox::warning( 0, QObject::tr( "I/O Warning" ), ! QObject::tr( "Cannot open file %1" ).arg( fileName.ascii() ) ); ! delete fd; ! return; ! } ! boost::archive::xml_oarchive oa_xml(ofs_xml); ! try{ ! oa_xml << BOOST_SERIALIZATION_NVP(ep); ! } ! catch(std::exception& e) ! { ! QMessageBox::critical( 0, QObject::tr( "Critical Error" ), ! QObject::tr(e.what()) ); ! ofs_xml.close(); ! delete fd; ! return; ! } ! ofs_xml.close(); } catch( const ModelError& error ) --- 717,721 ---- { ep->set_title(fileName.ascii()); ! saveProject(fileName.ascii()); } catch( const ModelError& error ) *************** *** 637,640 **** --- 871,875 ---- void ModelMainWindow::sltNewBatchExperiment() { + this->ep = new experiment::Homogeneous(); if(ep != NULL) { Index: modelPlotWidget.cpp =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model/modelPlotWidget.cpp,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** modelPlotWidget.cpp 22 Dec 2007 15:53:16 -0000 1.60 --- modelPlotWidget.cpp 27 Dec 2007 19:19:56 -0000 1.61 *************** *** 512,536 **** } } - - std::ofstream ofs_xml(fileName.ascii()); - if(!ofs_xml) - { - QMessageBox::warning( 0, QObject::tr( "I/O Warning" ), - QObject::tr( "Cannot open file %1" ).arg( fileName.ascii() ) ); - return; - } - boost::archive::xml_oarchive oa_xml(ofs_xml); - try{ - oa_xml << BOOST_SERIALIZATION_NVP(mpwd); - } - catch(std::exception& e) - { - QMessageBox::critical( 0, QObject::tr( "Critical Error" ), - QObject::tr(e.what()) ); - ofs_xml.close(); - return; - } - ofs_xml.close(); } catch( VisualizationError& error ) { --- 512,536 ---- } } } + // std::ofstream ofs_xml(fileName.ascii()); + // if(!ofs_xml) + // { + // QMessageBox::warning( 0, QObject::tr( "I/O Warning" ), + // QObject::tr( "Cannot open file %1" ).arg( fileName.ascii() ) ); + // return; + // } + // boost::archive::xml_oarchive oa_xml(ofs_xml); + // try{ + // oa_xml << BOOST_SERIALIZATION_NVP(mpwd); + // } + // catch(std::exception& e) + // { + // QMessageBox::critical( 0, QObject::tr( "Critical Error" ), + // QObject::tr(e.what()) ); + // ofs_xml.close(); + // return; + // } + // ofs_xml.close(); + // } catch( VisualizationError& error ) { Index: Makefile.am =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model/Makefile.am,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** Makefile.am 22 Dec 2007 15:53:16 -0000 1.44 --- Makefile.am 27 Dec 2007 19:19:56 -0000 1.45 *************** *** 245,248 **** --- 245,249 ---- logger.hpp \ logger.cpp \ + num_get_special.hpp \ mediator.hpp \ mediator.cpp \ Index: mechanismDialog.cpp =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model/mechanismDialog.cpp,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** mechanismDialog.cpp 22 Dec 2007 15:53:16 -0000 1.29 --- mechanismDialog.cpp 27 Dec 2007 19:19:56 -0000 1.30 *************** *** 101,105 **** { // std::cout << "MechanismDialog::sltOpenMechanism()" << std::endl; - QFileDialog* fd = new QFileDialog( this, "file dialog", TRUE ); fd->setCaption( tr("Open File") ); --- 101,104 ---- *************** *** 109,142 **** fd->setDir( "~/echempp/data" ); - QString fileName; if ( fd->exec() == QDialog::Accepted ) { ! experiment::ConditionDataModSim* _cond_data = _mainWindow->getActiveConditionData(); ! fileName = fd->selectedFile(); ! ! std::ifstream ifs_xml(fileName.ascii()); ! if(!ifs_xml) ! { ! QMessageBox::warning( 0, QObject::tr( "I/O Warning" ), ! QObject::tr( "Cannot open file %1" ).arg(fileName)); ! delete fd; ! return; ! } ! boost::archive::xml_iarchive ia_xml(ifs_xml); ! try ! { ! ia_xml >> boost::serialization::make_nvp("mc", _cond_data->mc); ! } ! catch(std::exception& e) ! { ! QMessageBox::critical( 0, QObject::tr( "Critical Error" ), ! QObject::tr(e.what()) ); ! ! ifs_xml.close(); ! delete fd; ! return; ! } ! ifs_xml.close(); ! this->supply(); QString s = _currentTextEdit->text(); --- 108,115 ---- fd->setDir( "~/echempp/data" ); if ( fd->exec() == QDialog::Accepted ) { ! if(_mainWindow->readMechanism(fd->selectedFile().ascii())) ! this->supply(); QString s = _currentTextEdit->text(); *************** *** 161,167 **** } delete fd; - // std::cout << "MechanismDialog::sltOpenMechanism() --END" << std::endl; - } --- 134,138 ---- *************** *** 176,207 **** fd->setViewMode( QFileDialog::List ); fd->setDir( "~/echempp/data" ); - - QString fileName; if ( fd->exec() == QDialog::Accepted ) { ! experiment::ConditionDataModSim* _cond_data = _mainWindow->getActiveConditionData(); ! fileName = fd->selectedFile(); ! ! std::ofstream ofs_xml(fileName.ascii()); ! if(!ofs_xml) ! { ! QMessageBox::warning( 0, QObject::tr( "I/O Warning" ), ! QObject::tr( "Cannot open file %1" ).arg( fileName.ascii() ) ); ! delete fd; ! return; ! } ! boost::archive::xml_oarchive oa_xml(ofs_xml); ! try{ ! oa_xml << boost::serialization::make_nvp("mc", _cond_data->mc); ! } ! catch(std::exception& e) ! { ! QMessageBox::critical( 0, QObject::tr( "Critical Error" ), ! QObject::tr(e.what()) ); ! ofs_xml.close(); ! delete fd; ! return; ! } ! ofs_xml.close(); } delete fd; --- 147,153 ---- fd->setViewMode( QFileDialog::List ); fd->setDir( "~/echempp/data" ); if ( fd->exec() == QDialog::Accepted ) { ! _mainWindow->saveMechanism(fd->selectedFile().ascii()); } delete fd; Index: dataDialog.cpp =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model/dataDialog.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** dataDialog.cpp 19 Dec 2007 11:52:44 -0000 1.12 --- dataDialog.cpp 27 Dec 2007 19:19:56 -0000 1.13 *************** *** 406,552 **** } - void - DataDialog::save( BSUtilities::xmlw::XmlStream& xml ) - { - // <data_dialog> - // <processor plain="0" storage="1" dynamic="0"></processor> - // </data_dialog> - - xml << BSUtilities::xmlw::tag("data_dialog") - - << BSUtilities::xmlw::tag("processor") - - << BSUtilities::xmlw::attr("plain"); - - if( _plainButton->isChecked() ) - { - xml << 1; - } - else - { - xml << 0; - } - - xml << BSUtilities::xmlw::attr("storage"); - - if( _storageButton->isChecked() ) - { - xml << 1; - } - else - { - xml << 0; - } - - xml << BSUtilities::xmlw::attr("dynamic"); - - if( _dynamicButton->isChecked() ) - { - xml << 1; - } - else - { - xml << 0; - } - - xml << BSUtilities::xmlw::endtag("processor") - - << BSUtilities::xmlw::tag("visualization") - - << BSUtilities::xmlw::attr("response"); - - if( _responseCheckBox->isChecked() ) - { - xml << 1; - } - else - { - xml << 0; - } - - xml << BSUtilities::xmlw::attr("adsConc"); - - if( _adsConcCheckBox->isChecked() ) - { - xml << 1; - } - else - { - xml << 0; - } - - xml << BSUtilities::xmlw::attr("dissConc"); - - if( _dissConcCheckBox->isChecked() ) - { - xml << 1; - } - else - { - xml << 0; - } - - xml << BSUtilities::xmlw::attr("stepSizes"); - - if( _stepSizesCheckBox->isChecked() ) - { - xml << 1; - } - else - { - xml << 0; - } - - xml << BSUtilities::xmlw::attr("timeErrors"); - - if( _timeErrorsCheckBox->isChecked() ) - { - xml << 1; - } - else - { - xml << 0; - } - - xml << BSUtilities::xmlw::attr("dofs"); - - if( _dofsCheckBox->isChecked() ) - { - xml << 1; - } - else - { - xml << 0; - } - - xml << BSUtilities::xmlw::attr("spatialErrors"); - - if( _spatialErrorsCheckBox->isChecked() ) - { - xml << 1; - } - else - { - xml << 0; - } - - xml << BSUtilities::xmlw::attr("gridEvolution"); - - if( _gridCheckBox->isChecked() ) - { - xml << 1; - } - else - { - xml << 0; - } - - - xml << BSUtilities::xmlw::endtag("visualization"); - - xml << BSUtilities::xmlw::endtag("data_dialog"); - - } - void DataDialog::supply() { --- 406,409 ---- *************** *** 586,799 **** } - void - DataDialog::supply( const QDomElement& dialog ) - { - if( !(dialog.nodeName() == "data_dialog") ) - { - QMessageBox::critical( 0, - QObject::tr( "Critical Error" ), - QObject::tr( "No data_dialog node given to Mediator::supplyDataDialog()" ) ); - return; - } - - QDomNode node = dialog.firstChild(); - while( !node.isNull() ) - { - // analyse line <processor plain = "1/0" storage="1/0" ="1/0" ></processor> - if( node.isElement() && node.nodeName() == "processor" ) - { - QDomElement simulation = node.toElement(); - - QString plain = simulation.attribute("plain"); - QString storage = simulation.attribute("storage"); - QString dynamic = simulation.attribute("dynamic"); - - if( plain == "1" ) - { - if( !_plainButton->isChecked() ) - { - _plainButton->setChecked(true); - this->sltPlain(); - } - } - else if( storage == "1" ) - { - if( !_storageButton->isChecked() ) - { - _storageButton->setChecked(true); - this->sltStorage(); - } - } - else if( dynamic == "1" ) - { - if( !_dynamicButton->isChecked() ) - { - _dynamicButton->setChecked(true); - this->sltDynamic(); - } - } - } - else if( node.isElement() && node.nodeName() == "visualization" ) - { - //<visualization response="1" adsConc="0" dissConc="0" stepSizes="0" timeErrors="0" dofs="0" spatialErrors="0"/> - QDomElement simulation = node.toElement(); - - QString response = simulation.attribute("response"); - QString adsConc = simulation.attribute("adsConc"); - QString dissConc = simulation.attribute("dissConc"); - QString stepSizes = simulation.attribute("stepSizes"); - QString timeErrors = simulation.attribute("timeErrors"); - QString dofs = simulation.attribute("dofs"); - QString spatialErrors = simulation.attribute("spatialErrors"); - QString gridEvolution = simulation.attribute("gridEvolution"); - - if( response == "1" ) - { - if( !_responseCheckBox->isChecked() ) - { - _responseCheckBox->setChecked(true); - this->sltResponse(); - } - } - else if( response == "0" ) - { - if( _responseCheckBox->isChecked() ) - { - _responseCheckBox->setChecked(false); - this->sltResponse(); - } - } - - if( adsConc == "1" ) - { - if( !_adsConcCheckBox->isChecked() ) - { - _adsConcCheckBox->setChecked(true); - this->sltAdsConc(); - } - } - else if( adsConc == "0" ) - { - if( _adsConcCheckBox->isChecked() ) - { - _adsConcCheckBox->setChecked(false); - this->sltAdsConc(); - } - } - - - if( dissConc == "1" ) - { - if( !_dissConcCheckBox->isChecked() ) - { - _dissConcCheckBox->setChecked(true); - this->sltDissConc(); - } - } - else if( dissConc == "0" ) - { - if( _dissConcCheckBox->isChecked() ) - { - _dissConcCheckBox->setChecked(false); - this->sltDissConc(); - } - } - - - if( stepSizes == "1" ) - { - if( !_stepSizesCheckBox->isChecked() ) - { - _stepSizesCheckBox->setChecked(true); - this->sltStepSizes(); - } - } - else if( stepSizes == "0" ) - { - if( _stepSizesCheckBox->isChecked() ) - { - _stepSizesCheckBox->setChecked(false); - this->sltStepSizes(); - } - } - - - if( timeErrors == "1" ) - { - if( !_timeErrorsCheckBox->isChecked() ) - { - _timeErrorsCheckBox->setChecked(true); - this->sltTimeErrors(); - } - } - else if( timeErrors == "0" ) - { - if( _timeErrorsCheckBox->isChecked() ) - { - _timeErrorsCheckBox->setChecked(false); - this->sltTimeErrors(); - } - } - - - if( dofs == "1" ) - { - if( !_dofsCheckBox->isChecked() ) - { - _dofsCheckBox->setChecked(true); - this->sltDofs(); - } - } - else if( dofs == "0" ) - { - if( _dofsCheckBox->isChecked() ) - { - _dofsCheckBox->setChecked(false); - this->sltDofs(); - } - } - - - if( spatialErrors == "1" ) - { - if( !_spatialErrorsCheckBox->isChecked() ) - { - _spatialErrorsCheckBox->setChecked(true); - this->sltSpatialErrors(); - } - } - else if( spatialErrors == "0" ) - { - if( _spatialErrorsCheckBox->isChecked() ) - { - _spatialErrorsCheckBox->setChecked(false); - this->sltSpatialErrors(); - } - } - - if( gridEvolution == "1" ) - { - if( !_gridCheckBox->isChecked() ) - { - _gridCheckBox->setChecked(true); - this->sltGridEvolution(); - } - } - else if( gridEvolution == "0" ) - { - if( _gridCheckBox->isChecked() ) - { - _gridCheckBox->setChecked(false); - this->sltGridEvolution(); - } - } - - - } - - node = node.nextSibling(); - } - } - } } // namespace modelGUI --- 443,446 ---- Index: batchExperimentDialog.cpp =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model/batchExperimentDialog.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** batchExperimentDialog.cpp 22 Dec 2007 15:53:16 -0000 1.2 --- batchExperimentDialog.cpp 27 Dec 2007 19:19:56 -0000 1.3 *************** *** 279,285 **** return; } ! std::cout << "Calling mainWindow->readXML..." << std::endl; ! mainWindow->readXML(fileName.ascii()); ! std::cout << "done." << std::endl; experiment::Experiment* ep = mainWindow->getActiveExperiment(); experiment::ConditionDataModSim* cond_data = dynamic_cast<experiment::ConditionDataModSim*>(ep->get_cond_data()); --- 279,283 ---- return; } ! mainWindow->readProject(fileName.ascii()); experiment::Experiment* ep = mainWindow->getActiveExperiment(); experiment::ConditionDataModSim* cond_data = dynamic_cast<experiment::ConditionDataModSim*>(ep->get_cond_data()); Index: modelParametersDialog.cpp =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model/modelParametersDialog.cpp,v retrieving revision 1.85 retrieving revision 1.86 diff -C2 -d -r1.85 -r1.86 *** modelParametersDialog.cpp 22 Dec 2007 15:53:16 -0000 1.85 --- modelParametersDialog.cpp 27 Dec 2007 19:19:56 -0000 1.86 *************** *** 4222,4252 **** fd->setDir( "~/echempp/data" ); - QString fileName; if ( fd->exec() == QDialog::Accepted ) { ! experiment::ConditionDataModSim* _cond_data = _mainWindow->getActiveConditionData(); ! fileName = fd->selectedFile(); ! ! std::ifstream ifs_xml(fileName.ascii()); ! if(!ifs_xml) ! { ! QMessageBox::warning( 0, QObject::tr( "I/O Warning" ), ! QObject::tr( "Cannot open file %1" ).arg(fileName)); ! return; ! } ! boost::archive::xml_iarchive ia_xml(ifs_xml); ! try ! { ! ia_xml >> boost::serialization::make_nvp("mpc", _cond_data->mpc); ! } ! catch(std::exception& e) ! { ! QMessageBox::critical( 0, QObject::tr( "Critical Error" ), ! QObject::tr(e.what()) ); ! ifs_xml.close(); ! return; ! } ! ifs_xml.close(); ! this->supply(); } delete fd; --- 4222,4229 ---- fd->setDir( "~/echempp/data" ); if ( fd->exec() == QDialog::Accepted ) { ! if(_mainWindow->readModelParameters(fd->selectedFile().ascii())) ! this->supply(); } delete fd; *************** *** 4255,4259 **** void ModelParametersDialog::sltSaveData() { - if( this->settingsComplete() ) { --- 4232,4235 ---- *************** *** 4264,4296 **** fd->setViewMode( QFileDialog::List ); fd->setDir( "~/echempp/data" ); - - QString fileName; if ( fd->exec() == QDialog::Accepted ) ! { ! experiment::ConditionDataModSim* _cond_data = _mainWindow->getActiveConditionData(); ! fileName = fd->selectedFile(); ! ! std::ofstream ofs_xml(fileName.ascii()); ! if(!ofs_xml) ! { ! QMessageBox::warning( 0, QObject::tr( "I/O Warning" ), ! QObject::tr( "Cannot open file %1" ).arg( fileName.ascii() ) ); ! delete fd; ! return; ! } ! boost::archive::xml_oarchive oa_xml(ofs_xml); ! try{ ! oa_xml << boost::serialization::make_nvp("mpc", _cond_data->mpc); ! } ! catch(std::exception& e) ! { ! QMessageBox::critical( 0, QObject::tr( "Critical Error" ), ! QObject::tr(e.what()) ); ! ofs_xml.close(); ! delete fd; ! return; } - ofs_xml.close(); - } delete fd; } --- 4240,4247 ---- fd->setViewMode( QFileDialog::List ); fd->setDir( "~/echempp/data" ); if ( fd->exec() == QDialog::Accepted ) ! { ! _mainWindow->saveModelParameters(fd->selectedFile().ascii()); } delete fd; } Index: modelMainWindow.hpp =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model/modelMainWindow.hpp,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** modelMainWindow.hpp 22 Dec 2007 15:53:16 -0000 1.35 --- modelMainWindow.hpp 27 Dec 2007 19:19:56 -0000 1.36 *************** *** 70,82 **** void enableFileOpen(); ! experiment::Experiment* getActiveExperiment(); ! experiment::ConditionDataModSim* getActiveConditionData(); ! experiment::MeasurementDataModSim* getActiveMeasurementData(); unsigned int getNumberOfExperiments(); ! experiment::Experiment* getNextExperiment(); void clearExperiment(); ! void setExperiment(experiment::Experiment* ep); ! void readXML(const char* filename); bool isCompoundExperiment() const; --- 70,92 ---- void enableFileOpen(); ! ::experiment::Experiment* getActiveExperiment(); ! ::experiment::ConditionDataModSim* getActiveConditionData(); ! ::experiment::MeasurementDataModSim* getActiveMeasurementData(); unsigned int getNumberOfExperiments(); ! ::experiment::Experiment* getNextExperiment(); void clearExperiment(); ! void setExperiment(::experiment::Experiment* ep); ! bool readProject(const char* filename); ! bool saveProject(const char* filename); ! bool readMechanism(const char* filename); ! bool saveMechanism(const char* filename); ! bool readModelParameters(const char* filename); ! bool saveModelParameters(const char* filename); ! static ::ExcitationFunctions::EtExcitationFunction readEtExcitationFunction(const char* filename); ! static bool saveEtExcitationFunction(const char* filename, const ::ExcitationFunctions::EtExcitationFunction& ef); ! static ::ExcitationFunctions::itExcitationFunction readitExcitationFunction(const char* filename); ! static bool saveitExcitationFunction(const char* filename, const ::ExcitationFunctions::itExcitationFunction& ef); ! bool isCompoundExperiment() const; *************** *** 118,122 **** unsigned int ecount; // represents state of Application ! experiment::Experiment* ep; void loadIcons(); --- 128,132 ---- unsigned int ecount; // represents state of Application ! ::experiment::Experiment* ep; void loadIcons(); |
|
From: beeblbrox <bee...@us...> - 2007-12-27 19:17:29
|
Update of /cvsroot/echempp/Experiment/Experiment/test In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv13173/Experiment/Experiment/test Modified Files: ExperimentTest.cpp Log Message: Removed AutoRegistor. Index: ExperimentTest.cpp =================================================================== RCS file: /cvsroot/echempp/Experiment/Experiment/test/ExperimentTest.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ExperimentTest.cpp 19 Dec 2007 13:32:12 -0000 1.8 --- ExperimentTest.cpp 27 Dec 2007 19:17:21 -0000 1.9 *************** *** 1,8 **** #include <iostream> - // local includes - #include "../Experiment.hpp" - using namespace experiment; - // Boost includes #include <boost/test/unit_test.hpp> --- 1,4 ---- *************** *** 14,17 **** --- 10,17 ---- #include <boost/archive/xml_oarchive.hpp> + // local includes + #include "../Experiment.hpp" + using namespace experiment; + // Note: Compile and link with: // g++ -o ExperimentTest ExperimentTest.cpp -lboost_unit_test_framework |
Update of /cvsroot/echempp/Experiment/ExcitationFunction In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv13173/Experiment/ExcitationFunction Modified Files: ecExcitationFunctions.hpp ecSegments.hpp excitationFunction.cpp excitationFunction.hpp segment.cpp segment.hpp Log Message: Removed AutoRegistor. Index: segment.cpp =================================================================== RCS file: /cvsroot/echempp/Experiment/ExcitationFunction/segment.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** segment.cpp 19 Dec 2007 13:27:51 -0000 1.8 --- segment.cpp 27 Dec 2007 19:17:21 -0000 1.9 *************** *** 32,35 **** --- 32,38 ---- #define _segment_cpp + #include <boost/archive/xml_iarchive.hpp> + #include <boost/archive/xml_oarchive.hpp> + #include "ExcitationFunction/segment.hpp" Index: excitationFunction.cpp =================================================================== RCS file: /cvsroot/echempp/Experiment/ExcitationFunction/excitationFunction.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** excitationFunction.cpp 19 Dec 2007 13:27:51 -0000 1.7 --- excitationFunction.cpp 27 Dec 2007 19:17:21 -0000 1.8 *************** *** 31,34 **** --- 31,37 ---- #define _excitationFunction_cpp + #include <boost/archive/xml_iarchive.hpp> + #include <boost/archive/xml_oarchive.hpp> + #include "ExcitationFunction/excitationFunction.hpp" Index: ecExcitationFunctions.hpp =================================================================== RCS file: /cvsroot/echempp/Experiment/ExcitationFunction/ecExcitationFunctions.hpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ecExcitationFunctions.hpp 15 Sep 2005 09:59:47 -0000 1.5 --- ecExcitationFunctions.hpp 27 Dec 2007 19:17:21 -0000 1.6 *************** *** 146,148 **** --- 146,158 ---- } + BOOST_CLASS_EXPORT(ExcitationFunctions::EtExcitationFunction) + BOOST_CLASS_EXPORT(ExcitationFunctions::itExcitationFunction) + BOOST_CLASS_EXPORT(ExcitationFunctions::CVExcitationFunction) + BOOST_CLASS_EXPORT(ExcitationFunctions::CAExcitationFunction) + BOOST_CLASS_EXPORT(ExcitationFunctions::IMExcitationFunction) + BOOST_CLASS_EXPORT(ExcitationFunctions::PCExcitationFunction) + BOOST_CLASS_EXPORT(ExcitationFunctions::CCExcitationFunction) + BOOST_CLASS_EXPORT(ExcitationFunctions::ECExcitationFunction) + BOOST_CLASS_EXPORT(ExcitationFunctions::PECExcitationFunction) + #endif /* ECExcitationFunctions.hpp */ Index: segment.hpp =================================================================== RCS file: /cvsroot/echempp/Experiment/ExcitationFunction/segment.hpp,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** segment.hpp 22 Dec 2007 15:49:53 -0000 1.39 --- segment.hpp 27 Dec 2007 19:17:21 -0000 1.40 *************** *** 34,38 **** // BSUtilities includes #include "TemplateTools.h" ! #include "SerializationTools.h" // Local includes --- 34,38 ---- // BSUtilities includes #include "TemplateTools.h" ! //#include "SerializationTools.h" // Local includes *************** *** 145,150 **** } //! id needed by ExcitationFunction dialogs internally ! virtual const std::string id() const { return "Segment"; } ! BSUtilities::Serialization::AutoRegistor<Segment> reg; static const std::string GUID; private: --- 145,150 ---- } //! id needed by ExcitationFunction dialogs internally ! virtual const std::string id() const { return GUID; } ! //BSUtilities::Serialization::AutoRegistor<Segment> reg; static const std::string GUID; private: *************** *** 184,192 **** at a certain value of the independent variable */ ! // virtual D value (const I & independentValue) const = 0; ! virtual D value (const I & independentValue) const ! { ! return 0; ! } //! derivative function --- 184,192 ---- at a certain value of the independent variable */ ! virtual D value (const I & independentValue) const = 0; ! // virtual D value (const I & independentValue) const ! // { ! // return 0; ! // } //! derivative function *************** *** 194,204 **** dependent variable at a certain value of the independent variable */ - // virtual typename quantity::GenerateVariable<D,I>::Sub - // derivative( const I & independentValue) const = 0; virtual typename quantity::GenerateVariable<D,I>::Sub ! derivative( const I & independentValue) const ! { ! return 0; ! } //! give maximum value of independent variable for this segment. --- 194,204 ---- dependent variable at a certain value of the independent variable */ virtual typename quantity::GenerateVariable<D,I>::Sub ! derivative( const I & independentValue) const = 0; ! // virtual typename quantity::GenerateVariable<D,I>::Sub ! // derivative( const I & independentValue) const ! // { ! // return 0; ! // } //! give maximum value of independent variable for this segment. *************** *** 214,233 **** I maximum (void) const {return _Imax;} ! // virtual bool operator== (const DISegment<D, I> &) const = 0; ! virtual bool operator== (const DISegment<D, I> &) const ! { ! return false; ! } //! prototype pattern's pure virtual clone function. /*! All the segment subclasses clone themselves when calling that function. Take care to clean up your memory. */ ! // virtual DISegment<D,I>* clone (void) const = 0; ! virtual DISegment<D,I>* clone (void) const ! { ! return 0; ! } //! id needed by ExcitationFunction dialogs internally ! virtual const std::string id() const { return "DISegment"; } static const std::string create_guid() --- 214,233 ---- I maximum (void) const {return _Imax;} ! virtual bool operator== (const DISegment<D, I> &) const = 0; ! // virtual bool operator== (const DISegment<D, I> &) const ! // { ! // return false; ! // } //! prototype pattern's pure virtual clone function. /*! All the segment subclasses clone themselves when calling that function. Take care to clean up your memory. */ ! virtual DISegment<D,I>* clone (void) const = 0; ! // virtual DISegment<D,I>* clone (void) const ! // { ! // return 0; ! // } //! id needed by ExcitationFunction dialogs internally ! virtual const std::string id() const { return GUID; } static const std::string create_guid() *************** *** 235,239 **** return "Segment_" + D::create_guid() + "_" + I::create_guid(); } ! BSUtilities::Serialization::AutoRegistor<DISegment<D,I> > reg; static const std::string GUID; protected: --- 235,239 ---- return "Segment_" + D::create_guid() + "_" + I::create_guid(); } ! //BSUtilities::Serialization::AutoRegistor<DISegment<D,I> > reg; static const std::string GUID; protected: *************** *** 415,420 **** } //! id needed by ExcitationFunction dialogs internally ! const std::string id() const { return "Linear"; } ! BSUtilities::Serialization::AutoRegistor<LinearSegment<D,I> > reg; static const std::string GUID; private: --- 415,420 ---- } //! id needed by ExcitationFunction dialogs internally ! const std::string id() const { return GUID; } ! //BSUtilities::Serialization::AutoRegistor<LinearSegment<D,I> > reg; static const std::string GUID; private: *************** *** 569,577 **** static const std::string create_guid() { return "ConstantSegment_" + D::create_guid() + "_" + I::create_guid(); } //! id needed by ExcitationFunction dialogs internally ! const std::string id() const { return "Constant"; } ! BSUtilities::Serialization::AutoRegistor<ConstantSegment<D,I> > reg; static const std::string GUID; private: --- 569,578 ---- static const std::string create_guid() { + ConstantSegment<D,I> cs; return "ConstantSegment_" + D::create_guid() + "_" + I::create_guid(); } //! id needed by ExcitationFunction dialogs internally ! const std::string id() const { return GUID; } ! //BSUtilities::Serialization::AutoRegistor<ConstantSegment<D,I> > reg; static const std::string GUID; private: *************** *** 744,753 **** } //! id needed by ExcitationFunction dialogs internally ! const std::string id() const { return "Sine"; } static const std::string create_guid() { return "SineSegment_" + D::create_guid() + "_" + I::create_guid(); } ! BSUtilities::Serialization::AutoRegistor<SineSegment<D,I> > reg; static const std::string GUID; private: --- 745,754 ---- } //! id needed by ExcitationFunction dialogs internally ! const std::string id() const { return GUID; } static const std::string create_guid() { return "SineSegment_" + D::create_guid() + "_" + I::create_guid(); } ! //BSUtilities::Serialization::AutoRegistor<SineSegment<D,I> > reg; static const std::string GUID; private: *************** *** 937,946 **** catch (std::bad_cast) {return false;} } ! const std::string id() const { return "Power"; } static const std::string create_guid() { return "PowerSegment_" + D::create_guid() + "_" + I::create_guid(); } ! BSUtilities::Serialization::AutoRegistor<PowerSegment<D,I> > reg; static const std::string GUID; private: --- 938,947 ---- catch (std::bad_cast) {return false;} } ! const std::string id() const { return GUID; } static const std::string create_guid() { return "PowerSegment_" + D::create_guid() + "_" + I::create_guid(); } ! //BSUtilities::Serialization::AutoRegistor<PowerSegment<D,I> > reg; static const std::string GUID; private: *************** *** 1121,1130 **** catch (std::bad_cast) {return false;} } ! const std::string id() const { return "Exp"; } static const std::string create_guid() { return "ExponentialSegment_" + D::create_guid() + "_" + I::create_guid(); } ! BSUtilities::Serialization::AutoRegistor<ExponentialSegment<D,I> > reg; static const std::string GUID; private: --- 1122,1131 ---- catch (std::bad_cast) {return false;} } ! const std::string id() const { return GUID; } static const std::string create_guid() { return "ExponentialSegment_" + D::create_guid() + "_" + I::create_guid(); } ! //BSUtilities::Serialization::AutoRegistor<ExponentialSegment<D,I> > reg; static const std::string GUID; private: *************** *** 1324,1328 **** catch (std::bad_cast) {return false;} } ! const std::string id() const { return "PowerExp"; } static const std::string create_guid() { --- 1325,1329 ---- catch (std::bad_cast) {return false;} } ! const std::string id() const { return GUID; } static const std::string create_guid() { *************** *** 1330,1334 **** + "_" + I::create_guid() ; } ! BSUtilities::Serialization::AutoRegistor<PowerExponentialSegment<D,I> > reg; static const std::string GUID; private: --- 1331,1335 ---- + "_" + I::create_guid() ; } ! //BSUtilities::Serialization::AutoRegistor<PowerExponentialSegment<D,I> > reg; static const std::string GUID; private: *************** *** 1512,1521 **** */ DigitalSegment (void) {} ! const std::string id() const { return "Digital"; } static const std::string create_guid() { return "DigitalSegment_" + I::create_guid(); } ! BSUtilities::Serialization::AutoRegistor<DigitalSegment<I> > reg; static const std::string GUID; private: --- 1513,1522 ---- */ DigitalSegment (void) {} ! const std::string id() const { return GUID; } static const std::string create_guid() { return "DigitalSegment_" + I::create_guid(); } ! //BSUtilities::Serialization::AutoRegistor<DigitalSegment<I> > reg; static const std::string GUID; private: Index: excitationFunction.hpp =================================================================== RCS file: /cvsroot/echempp/Experiment/ExcitationFunction/excitationFunction.hpp,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** excitationFunction.hpp 19 Dec 2007 14:18:52 -0000 1.40 --- excitationFunction.hpp 27 Dec 2007 19:17:21 -0000 1.41 *************** *** 32,36 **** // BSUtilities includes ! #include "SerializationTools.h" // Local includes --- 32,36 ---- // BSUtilities includes ! //#include "SerializationTools.h" // Local includes *************** *** 226,230 **** return "ExcitationFunction_" + D::create_guid() + "_" + I::create_guid(); } ! BSUtilities::Serialization::AutoRegistor<DIExcitationFunction<D,I> > reg; static const std::string GUID; protected: --- 226,230 ---- return "ExcitationFunction_" + D::create_guid() + "_" + I::create_guid(); } ! //BSUtilities::Serialization::AutoRegistor<DIExcitationFunction<D,I> > reg; static const std::string GUID; protected: *************** *** 780,784 **** + I::create_guid() + "_" + S<D,I>::create_guid(); } ! BSUtilities::Serialization::AutoRegistor<SDIExcitationFunction<D,I,S> > reg; static const std::string GUID; private: --- 780,784 ---- + I::create_guid() + "_" + S<D,I>::create_guid(); } ! //BSUtilities::Serialization::AutoRegistor<SDIExcitationFunction<D,I,S> > reg; static const std::string GUID; private: Index: ecSegments.hpp =================================================================== RCS file: /cvsroot/echempp/Experiment/ExcitationFunction/ecSegments.hpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** ecSegments.hpp 23 Nov 2006 09:15:54 -0000 1.13 --- ecSegments.hpp 27 Dec 2007 19:17:21 -0000 1.14 *************** *** 75,79 **** typedef ConstantSegment<quantity::ElectricPotential,quantity::Time> ConstantEtSegment; - template class ConstantSegment<quantity::ElectricPotential,quantity::Time>; --- 75,78 ---- *************** *** 175,177 **** --- 174,189 ---- } + BOOST_CLASS_EXPORT(ExcitationFunctions::Segments::EtSegment) + BOOST_CLASS_EXPORT(ExcitationFunctions::Segments::LinearEtSegment) + BOOST_CLASS_EXPORT(ExcitationFunctions::Segments::LinearitSegment) + BOOST_CLASS_EXPORT(ExcitationFunctions::Segments::ConstantEtSegment) + BOOST_CLASS_EXPORT(ExcitationFunctions::Segments::ConstantitSegment) + BOOST_CLASS_EXPORT(ExcitationFunctions::Segments::SineEtSegment) + BOOST_CLASS_EXPORT(ExcitationFunctions::Segments::SineitSegment) + BOOST_CLASS_EXPORT(ExcitationFunctions::Segments::PowerEtSegment) + BOOST_CLASS_EXPORT(ExcitationFunctions::Segments::PoweritSegment) + BOOST_CLASS_EXPORT(ExcitationFunctions::Segments::ExponentialEtSegment) + BOOST_CLASS_EXPORT(ExcitationFunctions::Segments::ExponentialitSegment) + BOOST_CLASS_EXPORT(ExcitationFunctions::Segments::PowerExponentialitSegment) + #endif /* ecSegments.hpp */ |
|
From: beeblbrox <bee...@us...> - 2007-12-27 19:17:26
|
Update of /cvsroot/echempp/Experiment/Data In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv13173/Experiment/Data Modified Files: Data.cpp Data.hpp Makefile.am Log Message: Removed AutoRegistor. Index: Data.cpp =================================================================== RCS file: /cvsroot/echempp/Experiment/Data/Data.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Data.cpp 22 Dec 2007 15:47:38 -0000 1.2 --- Data.cpp 27 Dec 2007 19:17:20 -0000 1.3 *************** *** 1,2 **** --- 1,5 ---- + #include <boost/archive/xml_iarchive.hpp> + #include <boost/archive/xml_oarchive.hpp> + #include "Data.hpp" Index: Data.hpp =================================================================== RCS file: /cvsroot/echempp/Experiment/Data/Data.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Data.hpp 22 Dec 2007 15:47:38 -0000 1.2 --- Data.hpp 27 Dec 2007 19:17:20 -0000 1.3 *************** *** 36,46 **** #include <algorithm> - // BSUtilities includes - #include "SerializationTools.h" - - // local includes - #include "ExcitationFunction/ecExcitationFunctions.hpp" - #include "../../GUI/Windows/Qt/EChem++/Model/quantityTypes.hpp" - // Boost includes #include <boost/serialization/serialization.hpp> --- 36,39 ---- *************** *** 49,52 **** --- 42,49 ---- #include <boost/serialization/base_object.hpp> + // local includes + #include "ExcitationFunction/ecExcitationFunctions.hpp" + #include "../../GUI/Windows/Qt/EChem++/Model/quantityTypes.hpp" + namespace experiment{ *************** *** 114,119 **** { public: - BSUtilities::Serialization::AutoRegistor<MeasurementData> reg; - static const std::string GUID; //! Create a deep copy of MeasurementData virtual MeasurementData* clone() { return new MeasurementData(*this); } --- 111,114 ---- *************** *** 133,138 **** //! Create a deep copy of MeasurementDataModSim MeasurementDataModSim* clone() { return new MeasurementDataModSim(*this); } - BSUtilities::Serialization::AutoRegistor<MeasurementDataModSim> reg; - static const std::string GUID; // TODO: Replace later by Measurement //! Response curve produced by simulator --- 128,131 ---- *************** *** 160,165 **** { public: - BSUtilities::Serialization::AutoRegistor<ConditionData> reg; - static const std::string GUID; //! Create a deep copy of ConditionData. virtual ConditionData* clone() { return new ConditionData(*this); } --- 153,156 ---- *************** *** 175,180 **** { public: - BSUtilities::Serialization::AutoRegistor<ModelPlotWidgetData> reg; - static const std::string GUID; std::vector<std::string> ids; std::string x_unit; --- 166,169 ---- *************** *** 199,204 **** { public: - BSUtilities::Serialization::AutoRegistor<MechanismConditions> reg; - static const std::string GUID; bool chargeBalance; bool stoichiometricBalance; --- 188,191 ---- *************** *** 221,226 **** { public: - BSUtilities::Serialization::AutoRegistor<ModelParameterConditions> reg; - static const std::string GUID; //! temperature quantity::ThermodynamicTemperature temp; --- 208,211 ---- *************** *** 352,357 **** { public: - BSUtilities::Serialization::AutoRegistor<SolverConditions> reg; - static const std::string GUID; enum Processor { --- 337,340 ---- *************** *** 442,447 **** // Default copy ctor ok ConditionDataModSim* clone() { return new ConditionDataModSim(*this); } - BSUtilities::Serialization::AutoRegistor<ConditionDataModSim> reg; - static const std::string GUID; // data from experiment dialog double safety; --- 425,428 ---- *************** *** 543,545 **** --- 524,531 ---- } // end namespace experiment + BOOST_CLASS_EXPORT(experiment::MeasurementData) + BOOST_CLASS_EXPORT(experiment::MeasurementDataModSim) + BOOST_CLASS_EXPORT(experiment::ConditionData) + BOOST_CLASS_EXPORT(experiment::ConditionDataModSim) + #endif Index: Makefile.am =================================================================== RCS file: /cvsroot/echempp/Experiment/Data/Makefile.am,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Makefile.am 22 Dec 2007 15:47:38 -0000 1.12 --- Makefile.am 27 Dec 2007 19:17:20 -0000 1.13 *************** *** 13,18 **** -I$(BSUTILITIESSRC) ! libeppData_la_SOURCES = Data.hpp \ ! Data.cpp libeppData_la_CXXFLAGS = -Wall -Werror -pedantic-errors --- 13,17 ---- -I$(BSUTILITIESSRC) ! libeppData_la_SOURCES = Data.hpp libeppData_la_CXXFLAGS = -Wall -Werror -pedantic-errors |
|
From: beeblbrox <bee...@us...> - 2007-12-27 19:17:26
|
Update of /cvsroot/echempp/Experiment/Experiment In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv13173/Experiment/Experiment Modified Files: Experiment.cpp Experiment.hpp Log Message: Removed AutoRegistor. Index: Experiment.hpp =================================================================== RCS file: /cvsroot/echempp/Experiment/Experiment/Experiment.hpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Experiment.hpp 19 Dec 2007 13:31:29 -0000 1.7 --- Experiment.hpp 27 Dec 2007 19:17:21 -0000 1.8 *************** *** 30,34 **** // BSUtilities includes ! #include "SerializationTools.h" #include "TemplateTools.h" #include "TypeToName.h" --- 30,34 ---- // BSUtilities includes ! //#include "SerializationTools.h" #include "TemplateTools.h" #include "TypeToName.h" *************** *** 312,316 **** + type2name<D>() + "_" + type2name<R>(); } ! BSUtilities::Serialization::AutoRegistor<Action<Tech> > reg; static const std::string GUID; Action() {} --- 312,316 ---- + type2name<D>() + "_" + type2name<R>(); } ! // BSUtilities::Serialization::AutoRegistor<Action<Tech> > reg; static const std::string GUID; Action() {} *************** *** 451,455 **** + type2name<D>() + "_" + type2name<R>(); } ! BSUtilities::Serialization::AutoRegistor<Induced<Tech> > reg; static const std::string GUID; Induced() { cond_data = NULL; meas_data = NULL; }; --- 451,455 ---- + type2name<D>() + "_" + type2name<R>(); } ! //BSUtilities::Serialization::AutoRegistor<Induced<Tech> > reg; static const std::string GUID; Induced() { cond_data = NULL; meas_data = NULL; }; *************** *** 599,603 **** + type2name<I>() + "_" + type2name<R>(); } ! BSUtilities::Serialization::AutoRegistor<Observation<Tech> > reg; static const std::string GUID; Observation() { cond_data = NULL; }; --- 599,603 ---- + type2name<I>() + "_" + type2name<R>(); } ! //BSUtilities::Serialization::AutoRegistor<Observation<Tech> > reg; static const std::string GUID; Observation() { cond_data = NULL; }; *************** *** 726,730 **** + type2name<R>(); } ! BSUtilities::Serialization::AutoRegistor<Observation<Tech> > reg; static const std::string GUID; --- 726,730 ---- + type2name<R>(); } ! //BSUtilities::Serialization::AutoRegistor<Observation<Tech> > reg; static const std::string GUID; *************** *** 808,812 **** public: static const std::string GUID; ! BSUtilities::Serialization::AutoRegistor<Compound> reg; Compound() {} Compound(const Compound& c) --- 808,812 ---- public: static const std::string GUID; ! //BSUtilities::Serialization::AutoRegistor<Compound> reg; Compound() {} Compound(const Compound& c) *************** *** 979,983 **** // No restricton on add, just inherit the one from Compound static const std::string GUID; ! BSUtilities::Serialization::AutoRegistor<Collection> reg; private: friend class boost::serialization::access; --- 979,983 ---- // No restricton on add, just inherit the one from Compound static const std::string GUID; ! //BSUtilities::Serialization::AutoRegistor<Collection> reg; private: friend class boost::serialization::access; *************** *** 1001,1006 **** public: static const std::string GUID; ! BSUtilities::Serialization::AutoRegistor<Homogeneous> reg; ! virtual ~Homogeneous() {}; void add(Experiment* e) { --- 1001,1007 ---- public: static const std::string GUID; ! //BSUtilities::Serialization::AutoRegistor<Homogeneous> reg; ! Homogeneous(){} ! virtual ~Homogeneous(){} void add(Experiment* e) { *************** *** 1050,1054 **** public: static const std::string GUID; ! BSUtilities::Serialization::AutoRegistor<Sequential> reg; virtual ~Sequential() {}; void add(Experiment* e) --- 1051,1055 ---- public: static const std::string GUID; ! //BSUtilities::Serialization::AutoRegistor<Sequential> reg; virtual ~Sequential() {}; void add(Experiment* e) *************** *** 1081,1085 **** public: static const std::string GUID; ! BSUtilities::Serialization::AutoRegistor<Simultaneous> reg; virtual ~Simultaneous() {}; void add(Experiment* e) --- 1082,1086 ---- public: static const std::string GUID; ! //BSUtilities::Serialization::AutoRegistor<Simultaneous> reg; virtual ~Simultaneous() {}; void add(Experiment* e) *************** *** 1257,1259 **** --- 1258,1266 ---- } // end namespace experiment + BOOST_CLASS_EXPORT(experiment::Collection) + BOOST_CLASS_EXPORT(experiment::Homogeneous) + BOOST_CLASS_EXPORT(experiment::Sequential) + BOOST_CLASS_EXPORT(experiment::Simultaneous) + BOOST_CLASS_EXPORT(experiment::cv::SimInduced) + #endif Index: Experiment.cpp =================================================================== RCS file: /cvsroot/echempp/Experiment/Experiment/Experiment.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Experiment.cpp 19 Dec 2007 14:55:21 -0000 1.1 --- Experiment.cpp 27 Dec 2007 19:17:21 -0000 1.2 *************** *** 26,38 **** // $Id$ #include "Experiment.hpp" namespace experiment{ ! const std::string Compound::GUID = "Compound"; ! const std::string Collection::GUID = "Collection"; ! const std::string Homogeneous::GUID = "Homogeneous"; ! const std::string Sequential::GUID = "Sequential"; ! const std::string Simultaneous::GUID = "Simultaneous"; } /* end namespace experiment */ --- 26,39 ---- // $Id$ + #include "Experiment.hpp" namespace experiment{ ! // const std::string Compound::GUID = "Compound"; ! // const std::string Collection::GUID = "Collection"; ! // const std::string Homogeneous::GUID = "Homogeneous"; ! // const std::string Sequential::GUID = "Sequential"; ! // const std::string Simultaneous::GUID = "Simultaneous"; } /* end namespace experiment */ |
|
From: Bernd S. <ber...@us...> - 2007-12-23 22:15:27
|
Update of /cvsroot/echempp/Experiment/ExcitationFunction/documentation In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv2919/Experiment/ExcitationFunction/documentation Modified Files: Notes.log Log Message: Index: Notes.log =================================================================== RCS file: /cvsroot/echempp/Experiment/ExcitationFunction/documentation/Notes.log,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** Notes.log 19 May 2007 15:52:13 -0000 1.38 --- Notes.log 23 Dec 2007 22:15:18 -0000 1.39 *************** *** 540,544 **** Dominik Brugger reported a problem with loading the examples. Indeed, this could be reproduced on echem3 (but not on my notebook). In the meantime, I have ! substituted the olf TinyXml version (2.4.2) by version 2.5.3 and loading works again. However, the load functions had to be adapted to some changes in the TinyXml API. --- 540,544 ---- Dominik Brugger reported a problem with loading the examples. Indeed, this could be reproduced on echem3 (but not on my notebook). In the meantime, I have ! substituted the old TinyXml version (2.4.2) by version 2.5.3 and loading works again. However, the load functions had to be adapted to some changes in the TinyXml API. |
|
From: beeblbrox <bee...@us...> - 2007-12-23 11:35:38
|
Update of /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model/test In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv7639 Modified Files: main.cpp Log Message: Changed to use readXML. Index: main.cpp =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model/test/main.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** main.cpp 22 Dec 2007 15:54:06 -0000 1.18 --- main.cpp 23 Dec 2007 11:35:30 -0000 1.19 *************** *** 34,38 **** if( projectFile.size() != 0 ) { ! // w->loadProject(projectFile); } --- 34,38 ---- if( projectFile.size() != 0 ) { ! w->readXML(projectFile.c_str()); } |
|
From: beeblbrox <bee...@us...> - 2007-12-23 10:20:32
|
Update of /cvsroot/echempp/Experiment In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv9654 Modified Files: Makefile.am Log Message: Removed InputFilters from build system again, since it breaks builds at the moment. Reason: inputFilters.hpp includes obsoloete Experiment.h and this in turn tinyXML code. Please clean up inputFilters.hpp before including it in builds! Changing things here won't remove old files anyway. Index: Makefile.am =================================================================== RCS file: /cvsroot/echempp/Experiment/Makefile.am,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Makefile.am 22 Dec 2007 18:31:56 -0000 1.9 --- Makefile.am 23 Dec 2007 10:20:28 -0000 1.10 *************** *** 1,3 **** ! SUBDIRS = . ExcitationFunction Data Experiment InputFilters documentation EXTRA_DIST = documentation/mainpage.txt \ --- 1,8 ---- ! # Note: Do not include InputFilters before fixing inputFilters.hpp (it uses ! # obsolete Experiment.h and thus indirectly references TinyXML. ! # Otherwise this breaks EChem++ builds! ! #SUBDIRS = . ExcitationFunction Data Experiment InputFilters documentation ! SUBDIRS = . ExcitationFunction Data Experiment documentation ! EXTRA_DIST = documentation/mainpage.txt \ *************** *** 12,19 **** cd Experiment && $(MAKE) doc;\ cd ..;\ - cd InputFilters && $(MAKE) doc;\ - cd ..;\ cd ExcitationFunction && $(MAKE) doc;\ cd ..; doc-clean: --- 17,24 ---- cd Experiment && $(MAKE) doc;\ cd ..;\ cd ExcitationFunction && $(MAKE) doc;\ cd ..; + # cd InputFilters && $(MAKE) doc;\ + # cd ..; doc-clean: *************** *** 24,29 **** cd Experiment && $(MAKE) doc-clean;\ cd ..;\ - cd InputFilters && $(MAKE) doc-clean;\ - cd ..;\ cd ExcitationFunction && $(MAKE) doc-clean;\ cd ..; --- 29,34 ---- cd Experiment && $(MAKE) doc-clean;\ cd ..;\ cd ExcitationFunction && $(MAKE) doc-clean;\ cd ..; + # cd InputFilters && $(MAKE) doc-clean;\ + # cd ..; |
|
From: Bernd S. <ber...@us...> - 2007-12-22 18:32:16
|
Update of /cvsroot/echempp/Experiment In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv27276 Modified Files: Makefile.am Log Message: re-included InputFilters - and rather deleted the TinyXML reference from Makefile.am; directory InputFilters should not be removed in the moment Index: Makefile.am =================================================================== RCS file: /cvsroot/echempp/Experiment/Makefile.am,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Makefile.am 22 Dec 2007 15:46:15 -0000 1.8 --- Makefile.am 22 Dec 2007 18:31:56 -0000 1.9 *************** *** 1,3 **** ! SUBDIRS = . ExcitationFunction Data Experiment documentation EXTRA_DIST = documentation/mainpage.txt \ --- 1,3 ---- ! SUBDIRS = . ExcitationFunction Data Experiment InputFilters documentation EXTRA_DIST = documentation/mainpage.txt \ *************** *** 12,15 **** --- 12,17 ---- cd Experiment && $(MAKE) doc;\ cd ..;\ + cd InputFilters && $(MAKE) doc;\ + cd ..;\ cd ExcitationFunction && $(MAKE) doc;\ cd ..; *************** *** 22,25 **** --- 24,29 ---- cd Experiment && $(MAKE) doc-clean;\ cd ..;\ + cd InputFilters && $(MAKE) doc-clean;\ + cd ..;\ cd ExcitationFunction && $(MAKE) doc-clean;\ cd ..; |
|
From: beeblbrox <bee...@us...> - 2007-12-22 15:56:40
|
Update of /cvsroot/echempp/Model/Numerics In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv27836/Model/Numerics Modified Files: Makefile.am Log Message: Removed tiny xml flag. Index: Makefile.am =================================================================== RCS file: /cvsroot/echempp/Model/Numerics/Makefile.am,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Makefile.am 11 Dec 2007 09:19:12 -0000 1.8 --- Makefile.am 22 Dec 2007 15:56:34 -0000 1.9 *************** *** 13,18 **** lubichQr.cpp \ numericsError.hpp ! libeppNumerics_la_CXXFLAGS = -Wall -Werror -pedantic-errors\ ! -DTIXML_USE_STL -Wno-long-long libeppNumerics_la_LDFLAGS = $(MODEL_LDFLAGS) -version-info 0:0:0 --- 13,17 ---- lubichQr.cpp \ numericsError.hpp ! libeppNumerics_la_CXXFLAGS = -Wall -Werror -pedantic-errors -Wno-long-long libeppNumerics_la_LDFLAGS = $(MODEL_LDFLAGS) -version-info 0:0:0 |
|
From: beeblbrox <bee...@us...> - 2007-12-22 15:56:39
|
Update of /cvsroot/echempp/Model/Problem In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv27836/Model/Problem Modified Files: Makefile.am Log Message: Removed tiny xml flag. Index: Makefile.am =================================================================== RCS file: /cvsroot/echempp/Model/Problem/Makefile.am,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Makefile.am 11 Dec 2007 09:19:12 -0000 1.9 --- Makefile.am 22 Dec 2007 15:56:35 -0000 1.10 *************** *** 11,16 **** transport.hpp \ problemError.hpp ! libeppProblem_la_CXXFLAGS = -Wall -Werror -pedantic-errors \ ! -DTIXML_USE_STL -Wno-long-long libeppProblem_la_LDFLAGS = $(MODEL_LDFLAGS) -version-info 0:0:0 --- 11,15 ---- transport.hpp \ problemError.hpp ! libeppProblem_la_CXXFLAGS = -Wall -Werror -pedantic-errors -Wno-long-long libeppProblem_la_LDFLAGS = $(MODEL_LDFLAGS) -version-info 0:0:0 |
|
From: beeblbrox <bee...@us...> - 2007-12-22 15:54:59
|
Update of /cvsroot/echempp/Model/Ecco In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv27030/Model/Ecco Modified Files: Makefile.am Log Message: Removed flags concerning tiny xml. Index: Makefile.am =================================================================== RCS file: /cvsroot/echempp/Model/Ecco/Makefile.am,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** Makefile.am 11 Dec 2007 09:19:11 -0000 1.35 --- Makefile.am 22 Dec 2007 15:54:55 -0000 1.36 *************** *** 180,185 **** # options -Werror can not be used since spirit produces parentheses warnings # should be re-introduced later with a more recent spirit version ! libeppEcco_la_CXXFLAGS = -Wall -pedantic-errors \ ! -DTIXML_USE_STL -Wno-long-long libeppEcco_la_LDFLAGS = $(MODEL_LDFLAGS) -version-info 3:0:0 --- 180,184 ---- # options -Werror can not be used since spirit produces parentheses warnings # should be re-introduced later with a more recent spirit version ! libeppEcco_la_CXXFLAGS = -Wall -pedantic-errors -Wno-long-long libeppEcco_la_LDFLAGS = $(MODEL_LDFLAGS) -version-info 3:0:0 |
|
From: beeblbrox <bee...@us...> - 2007-12-22 15:54:59
|
Update of /cvsroot/echempp/Model/Adapters In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv27030/Model/Adapters Modified Files: Makefile.am Log Message: Removed flags concerning tiny xml. Index: Makefile.am =================================================================== RCS file: /cvsroot/echempp/Model/Adapters/Makefile.am,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** Makefile.am 11 May 2007 14:50:50 -0000 1.23 --- Makefile.am 22 Dec 2007 15:54:55 -0000 1.24 *************** *** 42,47 **** libeppAdapters_la_CXXFLAGS = -Wall -Werror -pedantic-errors\ -Wno-unused-parameter\ ! -Wno-parentheses\ ! -DTIXML_USE_STL libeppAdapters_la_LDFLAGS = $(MODEL_LDFLAGS) -version-info 0:0:0 --- 42,46 ---- libeppAdapters_la_CXXFLAGS = -Wall -Werror -pedantic-errors\ -Wno-unused-parameter\ ! -Wno-parentheses libeppAdapters_la_LDFLAGS = $(MODEL_LDFLAGS) -version-info 0:0:0 |
|
From: beeblbrox <bee...@us...> - 2007-12-22 15:54:09
|
Update of /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model/test In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv26975/GUI/Windows/Qt/EChem++/Model/test Modified Files: main.cpp Log Message: Removed call to non-existent function. Index: main.cpp =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model/test/main.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** main.cpp 10 Jan 2006 11:58:31 -0000 1.17 --- main.cpp 22 Dec 2007 15:54:06 -0000 1.18 *************** *** 34,38 **** if( projectFile.size() != 0 ) { ! w->loadProject(projectFile); } --- 34,38 ---- if( projectFile.size() != 0 ) { ! // w->loadProject(projectFile); } |
Update of /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv26240/GUI/Windows/Qt/EChem++/Model Modified Files: Makefile.am batchExperimentDialog.cpp equilibriumDialog.cpp equilibriumDialog.hpp experimentDialog.cpp experimentDialog.hpp mechanismDialog.cpp mechanismDialog.hpp mediator.cpp mediator.hpp modelMainWindow.cpp modelMainWindow.hpp modelParametersDialog.cpp modelParametersDialog.hpp modelPlotWidget.cpp modelPlotWidget.hpp scalingDialog.cpp scalingDialog.hpp solverDialog.cpp solverDialog.hpp svmDataDialog.cpp Log Message: Removed obsolete serialization code and old supply() functions. There should be no more ref. to TinyXML any more. Index: modelPlotWidget.hpp =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model/modelPlotWidget.hpp,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** modelPlotWidget.hpp 3 Mar 2007 19:34:59 -0000 1.36 --- modelPlotWidget.hpp 22 Dec 2007 15:53:16 -0000 1.37 *************** *** 249,253 **** const std::string& type ); ! void saveActiveData( BSUtilities::xmlw::XmlStream& xml ); void removePlot( uint_t pos ); --- 249,253 ---- const std::string& type ); ! void saveActiveData( const QString& fileName ); void removePlot( uint_t pos ); Index: equilibriumDialog.hpp =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model/equilibriumDialog.hpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** equilibriumDialog.hpp 19 Dec 2007 11:52:45 -0000 1.20 --- equilibriumDialog.hpp 22 Dec 2007 15:53:16 -0000 1.21 *************** *** 36,41 **** #include "Model/guiTypes.hpp" - #include "xmlwriter.h" - #include <qprogressdialog.h> #include <qlineedit.h> --- 36,39 ---- *************** *** 63,68 **** void supply(); - void supply( const QDomElement& dialog ); - void save( BSUtilities::xmlw::XmlStream& xml ); void setReactionNetwork( ecco::ReactionNetwork* const net ); --- 61,64 ---- Index: scalingDialog.hpp =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model/scalingDialog.hpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** scalingDialog.hpp 25 Mar 2006 10:40:32 -0000 1.14 --- scalingDialog.hpp 22 Dec 2007 15:53:16 -0000 1.15 *************** *** 37,43 **** #include "Ecco/reactionNetwork.hpp" - #include "xmlwriter.h" - #include <qdom.h> - #include <vector> --- 37,40 ---- *************** *** 55,64 **** ~ScalingDialog(); - //! - void supply( const QDomElement& dialog ); - - //! - void save( BSUtilities::xmlw::XmlStream& xml); - //! use "PC" for potential controlled or "CC" fo current controlled void setTechnique( const std::string& tech ); --- 52,55 ---- *************** *** 89,95 **** private: - //! - void setConcentrationTolerances( const QDomElement& root ); - //! index = row index QMemArray<int> _concRows; --- 80,83 ---- Index: mediator.hpp =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model/mediator.hpp,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** mediator.hpp 19 Dec 2007 11:52:48 -0000 1.41 --- mediator.hpp 22 Dec 2007 15:53:16 -0000 1.42 *************** *** 86,92 **** void supply(); - void readProjectFile( const QString& fileName ); - void writeProjectFile( const QString& fileName ); - void writeDataFile( const QString& fileName ); --- 86,89 ---- Index: Makefile.am =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model/Makefile.am,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** Makefile.am 19 Dec 2007 11:51:20 -0000 1.43 --- Makefile.am 22 Dec 2007 15:53:16 -0000 1.44 *************** *** 289,293 **** # in a similar way, -Werror should later be re-introduced here; it has to be deleted because # of `deprecated' warnings generated by vtk 5.0 ! ModSim_CXXFLAGS = -DTIXML_USE_STL $(CXXFLAGS) $(QT_CXXFLAGS) -Wall -pedantic-errors\ -Wno-non-virtual-dtor -Wno-deprecated -Wno-long-long -Wno-strict-aliasing --- 289,293 ---- # in a similar way, -Werror should later be re-introduced here; it has to be deleted because # of `deprecated' warnings generated by vtk 5.0 ! ModSim_CXXFLAGS = $(CXXFLAGS) $(QT_CXXFLAGS) -Wall -pedantic-errors\ -Wno-non-virtual-dtor -Wno-deprecated -Wno-long-long -Wno-strict-aliasing Index: scalingDialog.cpp =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model/scalingDialog.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** scalingDialog.cpp 26 Mar 2007 17:05:32 -0000 1.17 --- scalingDialog.cpp 22 Dec 2007 15:53:16 -0000 1.18 *************** *** 231,427 **** } - void - ScalingDialog::save( BSUtilities::xmlw::XmlStream& xml ) - { - // <scaling_dialog> - // <concentration rows="3"> - // <cd> - // <name>A</name> - // <ATOL>1.0</ATOL> - // <RTOL>1.0</RTOL> - // </cd> - // <cd> - // <name>B</name> - // <ATOL>1.0</ATOL> - // <RTOL>1.0</RTOL> - // </cd> - // <cd> - // <name>C</name> - // <ATOL>1.0</ATOL> - // <RTOL>1.0</RTOL> - // </cd> - // </concentration> - // <response type="Current" ATOL="..." RTOL="..."> - // </response> - // </scaling_dialog> - - xml << BSUtilities::xmlw::tag("scaling_dialog") - - << BSUtilities::xmlw::tag("concentration") - << BSUtilities::xmlw::attr("rows") << _concTable->numRows(); - - int i=0; - while( i < _concTable->numRows() ) - { - xml << BSUtilities::xmlw::tag("cd") - - << BSUtilities::xmlw::tag("name") - << BSUtilities::xmlw::chardata() << _concTable->verticalHeader()->label(i).ascii() - << BSUtilities::xmlw::endtag("name") - - << BSUtilities::xmlw::tag("ATOL") - << BSUtilities::xmlw::chardata() << _concTable->text(i,0).ascii() - << BSUtilities::xmlw::endtag("ATOL") - - << BSUtilities::xmlw::tag("RTOL") - << BSUtilities::xmlw::chardata() << _concTable->text(i,1).ascii() - << BSUtilities::xmlw::endtag("RTOL") - - << BSUtilities::xmlw::endtag("cd"); - - ++i; - } - xml << BSUtilities::xmlw::endtag("concentration"); - - xml << BSUtilities::xmlw::tag("response") - << BSUtilities::xmlw::attr("type") << _responseGroup->title().ascii() - << BSUtilities::xmlw::attr("ATOL") << _resATOLEdit->text().ascii() - << BSUtilities::xmlw::attr("RTOL") << _resRTOLEdit->text().ascii() - - << BSUtilities::xmlw::endtag("response"); - - xml << BSUtilities::xmlw::endtag("scaling_dialog"); - - } - - void - ScalingDialog::supply( const QDomElement& dialog ) - { - if( !(dialog.nodeName() == "scaling_dialog") ) - { - QMessageBox::critical( 0, - QObject::tr( "Critical Error" ), - QObject::tr( "No scaling_dialog node given to ScalingDialog::supply()" ) ); - return; - } - - QDomNode node = dialog.firstChild(); - while( !node.isNull() ) - { - if( node.isElement() & (node.nodeName() == "concentration") ) - { - QDomElement conc = node.toElement(); - QString rows = conc.attribute("rows"); - int N = rows.toInt(); - - _concTable->removeRows( _concRows ); - _concRows.resize(N); - _rowCounter = 0; - this->setConcentrationTolerances( conc ); - } - else if( node.isElement() & (node.nodeName() == "response") ) - { - QDomElement resp = node.toElement(); - - QString type = resp.attribute("type"); - QString ATOL = resp.attribute("ATOL"); - QString RTOL = resp.attribute("RTOL"); - - _responseGroup->setTitle( type ); - _resATOLEdit->setText( ATOL ); - _resRTOLEdit->setText( RTOL ); - - bool ok = false; - double value = _resATOLEdit->text().toDouble(&ok); - if( ok ) - { - _resATOL = value; - } - else - { - QMessageBox::critical( 0, "Critical Error", - "XML error in ScalingDialog::supply()!", - QMessageBox::Ok, - QMessageBox::NoButton, - QMessageBox::NoButton ); - } - - ok = false; - value = _resRTOLEdit->text().toDouble(&ok); - if( ok ) - { - _resRTOL = value; - } - else - { - QMessageBox::critical( 0, "Critical Error", - "XML error in ScalingDialog::supply()!", - QMessageBox::Ok, - QMessageBox::NoButton, - QMessageBox::NoButton ); - } - - - } - - node = node.nextSibling(); - } - } - - void - ScalingDialog::setConcentrationTolerances( const QDomElement& root ) - { - QDomNode node = root.firstChild(); - while( !node.isNull() ) - { - if( node.nodeName() == "cd" ) - { - // get name - QDomNodeList childs = node.childNodes(); - uint i = 0; - for(;i<childs.length();++i) - { - QDomNode entry = childs.item(i); - if( entry.isElement() & (entry.nodeName() == "name") ) - { - QDomElement name = entry.toElement(); - QString text = name.text(); - if( text.find("\n") != -1 ) - { - text.remove("\n"); - } - _concTable->insertRows(_rowCounter,1); - _concTable->verticalHeader()->setLabel(_rowCounter,text); - } - else if( entry.isElement() & (entry.nodeName() == "ATOL") ) - { - QDomElement ATOL = entry.toElement(); - QString text = ATOL.text(); - if( text.find("\n") != -1 ) - { - text.remove("\n"); - } - _concTable->setText(_rowCounter,0,text); - } - else if( entry.isElement() & (entry.nodeName() == "RTOL") ) - { - QDomElement RTOL = entry.toElement(); - QString text = RTOL.text(); - if( text.find("\n") != -1 ) - { - text.remove("\n"); - } - _concTable->setText(_rowCounter,1,text); - } - - } - ++_rowCounter; - } - node = node.nextSibling(); - } - } - - - } // namespace Model } // namespace GUI --- 231,234 ---- Index: svmDataDialog.cpp =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model/svmDataDialog.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** svmDataDialog.cpp 19 Dec 2007 11:56:24 -0000 1.1 --- svmDataDialog.cpp 22 Dec 2007 15:53:16 -0000 1.2 *************** *** 323,346 **** // define class labels experiment::ConditionDataModSim* cond_data = mainWindow->getActiveConditionData(); ! if(cond_data->khs[0] == 10000 && ! cond_data->homForwardRateConstants[1] == 0) // E { labels.push_back(1); std::cout << "label = 1 " << std::endl; } ! if(cond_data->khs[0] != 10000 && ! cond_data->homForwardRateConstants[1] == 0) // Eqr { labels.push_back(2); std::cout << "label = 2 " << std::endl; } ! if(cond_data->khs[0] == 10000 && ! cond_data->homForwardRateConstants[1] != 0) // EC { labels.push_back(3); std::cout << "label = 3 " << std::endl; } ! if(cond_data->khs[0] != 10000 && ! cond_data->homForwardRateConstants[1] != 0) // EqrC { labels.push_back(4); --- 323,346 ---- // define class labels experiment::ConditionDataModSim* cond_data = mainWindow->getActiveConditionData(); ! if(cond_data->mpc.khs[0] == 10000 && ! cond_data->mpc.homForwardRateConstants[1] == 0) // E { labels.push_back(1); std::cout << "label = 1 " << std::endl; } ! if(cond_data->mpc.khs[0] != 10000 && ! cond_data->mpc.homForwardRateConstants[1] == 0) // Eqr { labels.push_back(2); std::cout << "label = 2 " << std::endl; } ! if(cond_data->mpc.khs[0] == 10000 && ! cond_data->mpc.homForwardRateConstants[1] != 0) // EC { labels.push_back(3); std::cout << "label = 3 " << std::endl; } ! if(cond_data->mpc.khs[0] != 10000 && ! cond_data->mpc.homForwardRateConstants[1] != 0) // EqrC { labels.push_back(4); Index: modelPlotWidget.cpp =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model/modelPlotWidget.cpp,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** modelPlotWidget.cpp 25 Mar 2007 17:45:48 -0000 1.59 --- modelPlotWidget.cpp 22 Dec 2007 15:53:16 -0000 1.60 *************** *** 460,468 **** void ! ModelPlotWidget::saveActiveData( BSUtilities::xmlw::XmlStream& xml ) { ! // std::cout << "ModelPlotWidget::saveActiveData()" << std::endl; ! ! xml << BSUtilities::xmlw::tag("model_plot_widget"); try --- 460,466 ---- void ! ModelPlotWidget::saveActiveData( const QString& fileName ) { ! // std::cout << "ModelPlotWidget::saveActiveData()" << std::endl; try *************** *** 475,591 **** VtkGraphs* graph = _page->getGraph(_activeGraph->row,_activeGraph->col); int dim = graph->dimension(); if( dim == 2 ) - { - // QTextStream outStream( outFile ); - - VtkAxisSystem<2>* axisSystem = dynamic_cast<VtkGraph<2>* >(graph)->getAxisSystem(); - std::vector<VtkAxisGroup<2>* > axisGroups = axisSystem->getAxisGroups(); - std::vector<VtkCurve<2>* > curves = axisGroups[0]->getCurves(); - - std::vector<VtkAxis* > axes = axisGroups[0]->getAxes(); - std::string xAxisUnit = axes[0]->getUnit(); - std::string yAxisUnit = axes[1]->getUnit(); - - std::vector<VtkCurve<2>*>::const_iterator p = curves.begin(); - uint_t i=0; - uint_t j=0; - std::vector<std::vector<double> > data; - - xml << BSUtilities::xmlw::tag("data") - - << BSUtilities::xmlw::attr("x_unit") << xAxisUnit - - << BSUtilities::xmlw::attr("y_unit") << yAxisUnit; - - for(;p!=curves.end();++p) { ! (*p)->getValues(data); ! xml << BSUtilities::xmlw::tag("curve") ! ! << BSUtilities::xmlw::attr("ID") << (*p)->getIdentifier() ! ! << BSUtilities::xmlw::attr("size") << data.size() ! ! << BSUtilities::xmlw::chardata() << "<![CDATA[" << "\n"; ! for(i=0;i<data.size();++i) ! { ! for(j=0;j<data[i].size();++j) { ! xml << data[i][j] << " "; } - xml << "\n"; - } - xml << "]]>"; - - xml << BSUtilities::xmlw::endtag("curve"); - - } - - xml << BSUtilities::xmlw::endtag("data"); ! } else if( dim == 3 ) ! { ! // QTextStream outStream( outFile ); ! ! VtkAxisSystem<3>* axisSystem = dynamic_cast<VtkGraph<3>* >(graph)->getAxisSystem(); ! std::vector<VtkAxisGroup<3>* > axisGroups = axisSystem->getAxisGroups(); ! ! std::vector<VtkAxis* > axes = axisGroups[0]->getAxes(); ! std::string xAxisUnit = axes[0]->getUnit(); ! std::string yAxisUnit = axes[1]->getUnit(); ! std::string zAxisUnit = axes[2]->getUnit(); ! std::vector<VtkCurve<3>* > curves = axisGroups[0]->getCurves(); ! std::vector<VtkCurve<3>*>::const_iterator p = curves.begin(); ! uint_t i=0; ! uint_t j=0; ! std::vector<std::vector<double> > data; ! ! xml << BSUtilities::xmlw::tag("data") ! ! << BSUtilities::xmlw::attr("x_unit") << xAxisUnit ! ! << BSUtilities::xmlw::attr("y_unit") << yAxisUnit ! ! << BSUtilities::xmlw::attr("z_unit") << zAxisUnit ! ! << BSUtilities::xmlw::chardata() << "<![CDATA[" << "\n"; ! ! for(;p!=curves.end();++p) ! { ! (*p)->getValues(data); ! xml << "Curve Id:" << (*p)->getIdentifier() << "\n"; ! ! for(i=0;i<data.size();++i) ! { ! for(j=0;j<data[i].size();++j) { ! xml << data[i][j] << " "; } - xml << "\n"; - } } ! ! xml << "]]>" ! ! << BSUtilities::xmlw::endtag("data"); ! ! } } catch( VisualizationError& error ) ! { ! QMessageBox::warning( 0, "Visualization Error", ! error.message().c_str(), ! QMessageBox::Ok, ! QMessageBox::NoButton, ! QMessageBox::NoButton ); ! } ! ! ! xml << BSUtilities::xmlw::endtag("model_plot_widget"); } --- 473,544 ---- VtkGraphs* graph = _page->getGraph(_activeGraph->row,_activeGraph->col); int dim = graph->dimension(); + + experiment::ModelPlotWidgetData mpwd; if( dim == 2 ) { ! VtkAxisSystem<2>* axisSystem = dynamic_cast<VtkGraph<2>* >(graph)->getAxisSystem(); ! std::vector<VtkAxisGroup<2>* > axisGroups = axisSystem->getAxisGroups(); ! std::vector<VtkCurve<2>* > curves = axisGroups[0]->getCurves(); ! std::vector<VtkCurve<2>*>::const_iterator p = curves.begin(); ! std::vector<VtkAxis* > axes = axisGroups[0]->getAxes(); ! mpwd.x_unit = axes[0]->getUnit(); ! mpwd.x_unit = axes[1]->getUnit(); ! mpwd.z_unit = "none"; ! for(;p!=curves.end();++p) { ! (*p)->getValues(mpwd.data); ! mpwd.ids.push_back((*p)->getIdentifier()); } ! } else if( dim == 3 ) ! { ! VtkAxisSystem<3>* axisSystem = dynamic_cast<VtkGraph<3>* >(graph)->getAxisSystem(); ! std::vector<VtkAxisGroup<3>* > axisGroups = axisSystem->getAxisGroups(); ! std::vector<VtkCurve<3>* > curves = axisGroups[0]->getCurves(); ! std::vector<VtkCurve<3>*>::const_iterator p = curves.begin(); + std::vector<VtkAxis* > axes = axisGroups[0]->getAxes(); + mpwd.x_unit = axes[0]->getUnit(); + mpwd.y_unit = axes[1]->getUnit(); + mpwd.z_unit = axes[2]->getUnit(); ! for(;p!=curves.end();++p) { ! (*p)->getValues(mpwd.data); ! mpwd.ids.push_back((*p)->getIdentifier()); } } ! ! std::ofstream ofs_xml(fileName.ascii()); ! if(!ofs_xml) ! { ! QMessageBox::warning( 0, QObject::tr( "I/O Warning" ), ! QObject::tr( "Cannot open file %1" ).arg( fileName.ascii() ) ); ! return; ! } ! boost::archive::xml_oarchive oa_xml(ofs_xml); ! try{ ! oa_xml << BOOST_SERIALIZATION_NVP(mpwd); ! } ! catch(std::exception& e) ! { ! QMessageBox::critical( 0, QObject::tr( "Critical Error" ), ! QObject::tr(e.what()) ); ! ofs_xml.close(); ! return; ! } ! ofs_xml.close(); } catch( VisualizationError& error ) ! { ! QMessageBox::warning( 0, "Visualization Error", ! error.message().c_str(), ! QMessageBox::Ok, ! QMessageBox::NoButton, ! QMessageBox::NoButton ); ! } } Index: experimentDialog.cpp =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model/experimentDialog.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** experimentDialog.cpp 19 Dec 2007 11:52:45 -0000 1.15 --- experimentDialog.cpp 22 Dec 2007 15:53:16 -0000 1.16 *************** *** 37,42 **** #include "Model/modelError.hpp" - #include "xmlReader.h" - #include <qcombobox.h> #include <qradiobutton.h> --- 37,40 ---- *************** *** 835,958 **** } - void - ExperimentDialog::save( BSUtilities::xmlw::XmlStream& xml ) - { - // e.g. - // <experiment_dialog dim="1" transport="semi-infinite diffusion" safety="3" boundary1="0" boundary2="1"> - // <excitation boundary="0" control="potential" technique="CV" file="/home/kl/echempp/data/excitationEox.xml"/> - // </experiment_dialog> - - - // <experiment_dialog dim="1" transport="finite diffusion" distance="0.005" boundary1="0" boundary2="1"> - // <excitation boundary="0" control="potential" technique="CV" file="/home/kl/echempp/data/excitation3_1.xml"></excitation> - // <excitation boundary="1" control="potential" technique="CV" file="/home/kl/echempp/data/excitation3_2.xml"></excitation> - // </experiment_dialog> - ::experiment::ConditionDataModSim* _cond_data = _mainWindow->getActiveConditionData(); - - xml << BSUtilities::xmlw::tag("experiment_dialog") - - << BSUtilities::xmlw::attr("dim") << 1 - - << BSUtilities::xmlw::attr("transport"); - - if( _semiRadioButton->isChecked() ) - { - xml << "semi-infinite diffusion" - << BSUtilities::xmlw::attr("safety") << _cond_data->safety; - } - else if( _finiteRadioButton->isChecked() ) - { - xml << "finite diffusion" - << BSUtilities::xmlw::attr("distance") << _cond_data->finiteDistance - << BSUtilities::xmlw::attr("electrodes"); - - if( _electrodeCheckBox->isChecked() ) - { - xml << 2; - } - else - { - xml << 1; - } - - } - else - { - throw ModelError("Inconsistent transport settings in ExperimentDialog::save()!"); - } - - xml << BSUtilities::xmlw::attr("boundary1") << _cond_data->boundary0 - << BSUtilities::xmlw::attr("boundary2") << _cond_data->boundary1; - - xml << BSUtilities::xmlw::tag("excitation") - - << BSUtilities::xmlw::attr("boundary") << _cond_data->boundary0 - << BSUtilities::xmlw::attr("control") << _controlComboBox0->currentText().ascii() - << BSUtilities::xmlw::attr("technique") << _methodComboBox0->currentText().ascii(); - - if( _cond_data->potentialControlled ) - { - //_cond_data->etExcitation0.save(xml); - - xml << BSUtilities::xmlw::endtag("excitation"); - - if( _finiteRadioButton->isChecked() & _electrodeCheckBox->isChecked() ) - { - xml << BSUtilities::xmlw::tag("excitation") - - << BSUtilities::xmlw::attr("boundary") << _cond_data->boundary1 - << BSUtilities::xmlw::attr("control") << _controlComboBox1->currentText().ascii() - << BSUtilities::xmlw::attr("technique") << _methodComboBox1->currentText().ascii(); - - // _cond_data->etExcitation1.save(xml); - - xml << BSUtilities::xmlw::endtag("excitation"); - } - } - else if( _cond_data->currentControlled ) - { - // _cond_data->itExcitation0.save(xml); - - xml << BSUtilities::xmlw::endtag("excitation"); - - if( _finiteRadioButton->isChecked() & _electrodeCheckBox->isChecked() ) - { - xml << BSUtilities::xmlw::tag("excitation") - - << BSUtilities::xmlw::attr("boundary") << _cond_data->boundary1 - << BSUtilities::xmlw::attr("control") << _controlComboBox1->currentText().ascii() - << BSUtilities::xmlw::attr("technique") << _methodComboBox1->currentText().ascii(); - - // _cond_data->itExcitation1.save(xml); - - xml << BSUtilities::xmlw::endtag("excitation"); - } - } - - - xml << BSUtilities::xmlw::endtag("experiment_dialog"); - - - } - - void - ExperimentDialog::supply( const QDomElement& dialog ) - { - // std::cout << "ExperimentDialog::supply()" << std::endl; - if( !(dialog.nodeName() == "experiment_dialog") ) - { - QMessageBox::critical( 0, - QObject::tr( "Critical Error" ), - QObject::tr( "No experiment_dialog node given to ExperimentDialog::supply()" ) ); - return; - } - QString dimension = dialog.attribute("dim"); - if( dimension == "1" ) - { - this->createGeometry1D( dialog ); - } - // std::cout << "ExperimentDialog::supply() -- END" << std::endl; - } - void ExperimentDialog::supply() { --- 833,836 ---- Index: modelMainWindow.cpp =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model/modelMainWindow.cpp,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** modelMainWindow.cpp 19 Dec 2007 18:01:34 -0000 1.59 --- modelMainWindow.cpp 22 Dec 2007 15:53:16 -0000 1.60 *************** *** 380,401 **** } - void - ModelMainWindow::loadProject( const std::string& file ) - { - try - { - _mediator->readProjectFile( file ); - } - catch( const ModelError& error ) - { - QMessageBox::warning( 0, "Model Error", - error.message(), - QMessageBox::Ok, - QMessageBox::NoButton, - QMessageBox::NoButton ); - } - - } - void ModelMainWindow::readXML(const char* filename) { --- 380,383 ---- *************** *** 437,444 **** try { - // _mediator->readProjectFile( fileName ); readXML(fileName.ascii()); - - this->setCaption("EChem++ - ModSim " + temp ); --- 419,423 ---- *************** *** 485,490 **** ep->set_title(fileName.ascii()); std::ofstream ofs_xml(fileName.ascii()); boost::archive::xml_oarchive oa_xml(ofs_xml); ! oa_xml << BOOST_SERIALIZATION_NVP(ep); ofs_xml.close(); } --- 464,486 ---- ep->set_title(fileName.ascii()); std::ofstream ofs_xml(fileName.ascii()); + if(!ofs_xml) + { + QMessageBox::warning( 0, QObject::tr( "I/O Warning" ), + QObject::tr( "Cannot open file %1" ).arg( fileName.ascii() ) ); + delete fd; + return; + } boost::archive::xml_oarchive oa_xml(ofs_xml); ! try{ ! oa_xml << BOOST_SERIALIZATION_NVP(ep); ! } ! catch(std::exception& e) ! { ! QMessageBox::critical( 0, QObject::tr( "Critical Error" ), ! QObject::tr(e.what()) ); ! ofs_xml.close(); ! delete fd; ! return; ! } ofs_xml.close(); } *************** *** 784,789 **** { // see save project ! _mediator->writeDataFile( fileName ); ! // _plotWidget->exportActiveGraph(file,"txt"); } else --- 780,785 ---- { // see save project ! // TODO FIXME ! // _mediator->writeDataFile( fileName ); } else Index: solverDialog.cpp =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model/solverDialog.cpp,v retrieving revision 1.88 retrieving revision 1.89 diff -C2 -d -r1.88 -r1.89 *** solverDialog.cpp 19 Dec 2007 11:52:51 -0000 1.88 --- solverDialog.cpp 22 Dec 2007 15:53:16 -0000 1.89 *************** *** 284,381 **** } - void - SolverDialog::save( BSUtilities::xmlw::XmlStream& xml ) - { - // <solver_dialog> - // <solver time_scheme="ROS3P" time_controller="Lang" tolerance="1e-3" model_type="PDAE" auto_tols="1"/> - // <time_steps k1="" k2="" tau_init="" tau_max=""/> - // <grid_adaption coarsening="" max_level="" gamma="" alpha="" mue=""/> - // <init_mesh no_elements="" no_refinements="" fixed=""/> - // </solver_dialog> - - experiment::ConditionDataModSim* _cond_data = _mainWindow->getActiveConditionData(); - - xml << BSUtilities::xmlw::tag("solver_dialog"); - - xml << BSUtilities::xmlw::tag("solver") - << BSUtilities::xmlw::attr("time_scheme") << _cond_data->sc.timeScheme - << BSUtilities::xmlw::attr("time_controller") << _cond_data->sc.timeController - << BSUtilities::xmlw::attr("tolerance") << _cond_data->sc.TOL - << BSUtilities::xmlw::attr("model_type"); - - if( _residuumRB->isOn() ) - { - xml << "PDAE"; - } - else if( _gradientRB->isOn() ) - { - xml << "postProcessing"; - } - - xml << BSUtilities::xmlw::attr("auto_tols"); - - if(_tolCheckBox->isChecked()) - { - xml << 1; - } - else - { - xml << 0; - } - - xml << BSUtilities::xmlw::attr("step_policy"); - - if( _stepCheckBox->isChecked() ) - { - xml << 1; - } - else - { - xml << 0; - } - - xml << BSUtilities::xmlw::endtag("solver"); - - xml << BSUtilities::xmlw::tag("time_steps") - << BSUtilities::xmlw::attr("k1") << _cond_data->sc.k1 - << BSUtilities::xmlw::attr("k2") << _cond_data->sc.k2 - << BSUtilities::xmlw::attr("t_init") << _cond_data->sc.initTime - << BSUtilities::xmlw::attr("conc_init") << _cond_data->sc.initConcTol - << BSUtilities::xmlw::attr("tau_init") << _cond_data->sc.initStepSize - << BSUtilities::xmlw::attr("tau_max") << _cond_data->sc.maxStepSize - << BSUtilities::xmlw::attr("max_rej") << _cond_data->sc.maxRej - << BSUtilities::xmlw::attr("shrink") << _cond_data->sc.shrink - << BSUtilities::xmlw::attr("growth") << _cond_data->sc.growth - << BSUtilities::xmlw::attr("safety") << _cond_data->sc.safety - << BSUtilities::xmlw::endtag("time_steps"); - - xml << BSUtilities::xmlw::tag("grid_adaption") - << BSUtilities::xmlw::attr("coarsening") << _cond_data->sc.theta - << BSUtilities::xmlw::attr("max_level") << _cond_data->sc.maxLevel - << BSUtilities::xmlw::attr("gamma") << _cond_data->sc.gamma - << BSUtilities::xmlw::attr("alpha") << _cond_data->sc.alpha - << BSUtilities::xmlw::attr("mue") << _cond_data->sc.mue - << BSUtilities::xmlw::endtag("grid_adaption"); - - xml << BSUtilities::xmlw::tag("init_mesh") - << BSUtilities::xmlw::attr("no_elements") << _cond_data->sc.noElements - << BSUtilities::xmlw::attr("no_refinements") << _cond_data->sc.noRefinements - << BSUtilities::xmlw::attr("fixed"); - - if(_fixCheckBox->isChecked()) - { - xml << 1; - } - else - { - xml << 0; - } - - xml << BSUtilities::xmlw::endtag("init_mesh"); - - xml << BSUtilities::xmlw::endtag("solver_dialog"); - - } - void SolverDialog::supply() { --- 284,287 ---- *************** *** 419,567 **** void - SolverDialog::supply( const QDomElement& dialog ) - { - if( !(dialog.nodeName() == "solver_dialog") ) - { - QMessageBox::critical( 0, - QObject::tr( "Critical Error" ), - QObject::tr( "No solver_dialog node given to SolverDialog::supply()" ) ); - return; - } - - experiment::ConditionDataModSim* _cond_data = _mainWindow->getActiveConditionData(); - - QDomNode node = dialog.firstChild(); - while( !node.isNull() ) - { - if( node.isElement() && node.nodeName() == "solver" ) - { - // <solver time_scheme="ROS3P" time_controller="Lang" tolerance="1e-3" model_type="PDAE" auto_tols="1"/> - QDomElement solver = node.toElement(); - - QString time_scheme = solver.attribute("time_scheme"); - QString time_controller = solver.attribute("time_controller"); - QString tolerance = solver.attribute("tolerance"); - QString model_type = solver.attribute("model_type"); - QString auto_tols = solver.attribute("auto_tols"); - QString step_policy = solver.attribute("step_policy"); - - _timeSchemesListBox->setCurrentItem( _timeSchemesListBox->findItem(time_scheme) ); - _timeControllerListBox->setCurrentItem( _timeControllerListBox->findItem(time_controller) ); - _tolLineEdit->setText(tolerance); - - if( model_type == "PDAE" ) - { - // throw ModelError("Unknown solver!"); - _residuumRB->setChecked(true); - _cond_data->sc.residuum = true; - _gradientRB->setChecked(false); - _cond_data->sc.gradient = false; - this->sltResiduumRB(); - } - else if( model_type == "postProcessing" ) - { - _residuumRB->setChecked(false); - _cond_data->sc.residuum = false; - _gradientRB->setChecked(true); - _cond_data->sc.residuum = true; - this->sltGradientRB(); - } - - if( auto_tols == "1" ) - { - _tolCheckBox->setChecked(true); - } - else if( auto_tols == "0" ) - { - _tolCheckBox->setChecked(false); - } - - if( step_policy == "1" ) - { - _stepCheckBox->setChecked(true); - _cond_data->sc.stepPolicy = true; - } - else if( step_policy == "0" ) - { - _stepCheckBox->setChecked(false); - _cond_data->sc.stepPolicy = false; - } - - - - } - else if( node.isElement() && node.nodeName() == "time_steps" ) - { - // <time_steps k1="" k2="" tau_init="" tau_max=""/> - QDomElement timeStep = node.toElement(); - - QString k1 = timeStep.attribute("k1"); - QString k2 = timeStep.attribute("k2"); - QString t_init = timeStep.attribute("t_init"); - QString conc_init = timeStep.attribute("conc_init"); - QString tau_init = timeStep.attribute("tau_init"); - QString tau_max = timeStep.attribute("tau_max"); - QString max_rej = timeStep.attribute("max_rej"); - QString shrink = timeStep.attribute("shrink"); - QString growth = timeStep.attribute("growth"); - QString safety = timeStep.attribute("safety"); - _k1LineEdit->setText(k1); - _k2LineEdit->setText(k2); - _initTimeLineEdit->setText(t_init); - _initConcTolLineEdit->setText(conc_init); - _initStepSizeLineEdit->setText(tau_init); - _maxStepSizeLineEdit->setText(tau_max); - _maxRejLineEdit->setText(max_rej); - _shrinkLineEdit->setText(shrink); - _growthLineEdit->setText(growth); - _safetyLineEdit->setText(safety); - - } - else if( node.isElement() && node.nodeName() == "grid_adaption" ) - { - // <grid_adaption coarsening="" max_level="" gamma="" alpha="" mue=""/> - - QDomElement grid = node.toElement(); - - QString coarsening = grid.attribute("coarsening"); - QString max_level = grid.attribute("max_level"); - QString gamma = grid.attribute("gamma"); - QString alpha = grid.attribute("alpha"); - QString mue = grid.attribute("mue"); - - _thetaLineEdit->setText(coarsening); - _maxLevelLineEdit->setText(max_level); - _gammaLineEdit->setText(gamma); - _alphaLineEdit->setText(alpha); - _mueLineEdit->setText(mue); - - } - else if( node.isElement() && node.nodeName() == "init_mesh" ) - { - // <init_mesh no_elements="" no_refinements="" fixed=""/> - QDomElement mesh = node.toElement(); - - QString no_elements = mesh.attribute("no_elements"); - QString no_refinements = mesh.attribute("no_refinements"); - QString fixed = mesh.attribute("fixed"); - - _elementsLineEdit->setText(no_elements); - _refinementsLineEdit->setText(no_refinements); - if( fixed == "1" ) - { - _fixCheckBox->setChecked(true); - } - else - { - _fixCheckBox->setChecked(false); - } - } - - node = node.nextSibling(); - } - - } - - void SolverDialog::setGeometry( ecco::Geometry1D* const geometry ) { --- 325,328 ---- Index: equilibriumDialog.cpp =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model/equilibriumDialog.cpp,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** equilibriumDialog.cpp 19 Dec 2007 11:52:45 -0000 1.32 --- equilibriumDialog.cpp 22 Dec 2007 15:53:16 -0000 1.33 *************** *** 498,612 **** } - void - EquilibriumDialog::save( BSUtilities::xmlw::XmlStream& xml ) - { - // e.g. - // <equilibrium_dialog> - // <reactions hom="1" ads="1" hom_surf="1" het_surf="1"/> - // <vis hom="0" surf="0"/> - // <solver type="kin" tmax="100.0" accuracy="1e-3" hinit="1e-2"/> - // </equilibrium_dialog> - experiment::ConditionDataModSim* _cond_data = _mainWindow->getActiveConditionData(); - - xml << BSUtilities::xmlw::tag("equilibrium_dialog"); - - xml << BSUtilities::xmlw::tag("reactions") - - << BSUtilities::xmlw::attr("hom"); - - if( _homCheckBox->isChecked() ) - { - xml << "1"; - } - else - { - xml << "0"; - } - - xml << BSUtilities::xmlw::attr("ads"); - - if( _adsCheckBox->isChecked() ) - { - xml << "1"; - } - else - { - xml << "0"; - } - - xml << BSUtilities::xmlw::attr("hom_surf"); - - if( _homSurfCheckBox->isChecked() ) - { - xml << "1"; - } - else - { - xml << "0"; - } - - xml << BSUtilities::xmlw::attr("het_surf"); - - if( _hetSurfCheckBox->isChecked() ) - { - xml << "1"; - } - else - { - xml << "0"; - } - - - xml << BSUtilities::xmlw::endtag("reactions"); - - xml << BSUtilities::xmlw::tag("vis") - - << BSUtilities::xmlw::attr("hom"); - - if( _plotDissCheckBox->isChecked() ) - { - xml << "1"; - } - else - { - xml << "0"; - } - - xml << BSUtilities::xmlw::attr("surf"); - - if( _plotAdsCheckBox->isChecked() ) - { - xml << "1"; - } - else - { - xml << "0"; - } - - xml << BSUtilities::xmlw::endtag("vis"); - - xml << BSUtilities::xmlw::tag("solver") - - << BSUtilities::xmlw::attr("type"); - - if( _kinCheckBox->isChecked() ) - { - xml << "kin" - << BSUtilities::xmlw::attr("tmax") << _cond_data->maxTime - << BSUtilities::xmlw::attr("accuracy") << _cond_data->accuracy - << BSUtilities::xmlw::attr("hinit") << _cond_data->initStepSize; - } - else - { - xml << "equ"; - throw ModelError("Only kinetic calculations available!"); - } - - xml << BSUtilities::xmlw::endtag("solver"); - - xml << BSUtilities::xmlw::endtag("equilibrium_dialog"); - - } - void EquilibriumDialog::supply() { --- 498,501 ---- *************** *** 623,764 **** } - void - EquilibriumDialog::supply( const QDomElement& dialog ) - { - // std::cout << "EquilibriumDialog::supply()" << std::endl; - - if( !(dialog.nodeName() == "equilibrium_dialog") ) - { - QMessageBox::critical( 0, - QObject::tr( "Critical Error" ), - QObject::tr( "No equilibrium_dialog node given to Mediator::supplyEquilibriumDialog()" ) ); - return; - } - - QDomNode node = dialog.firstChild(); - while( !node.isNull() ) - { - if( node.isElement() && node.nodeName() == "reactions" ) - { - QDomElement reactions = node.toElement(); - - QString hom = reactions.attribute("hom"); - QString ads = reactions.attribute("ads"); - QString homSurf = reactions.attribute("hom_surf"); - QString hetSurf = reactions.attribute("het_surf"); - - if( (hom == QString::null) | - (ads == QString::null) | - (homSurf == QString::null) | - (hetSurf == QString::null) ) - { - QMessageBox::critical( 0, - QObject::tr( "Critical Error" ), - QObject::tr( "Not enough attributes specified!" ) ); - return; - } - if( hom == "1" ) - { - _homCheckBox->setChecked(true); - } - else if( hom == "0" ) - { - _homCheckBox->setChecked(false); - } - if( ads == "1" ) - { - _adsCheckBox->setChecked(true); - } - else if( ads == "0" ) - { - _adsCheckBox->setChecked(false); - } - if( homSurf == "1" ) - { - _homSurfCheckBox->setChecked(true); - } - else if( hetSurf == "0" ) - { - _hetSurfCheckBox->setChecked(false); - } - } - else if( node.isElement() && node.nodeName() == "vis" ) - { - QDomElement vis = node.toElement(); - - QString hom = vis.attribute("hom"); - QString surf = vis.attribute("surf"); - - if( (hom == QString::null) | - (surf == QString::null) ) - { - QMessageBox::critical( 0, - QObject::tr( "Critical Error" ), - QObject::tr( "Not enough attributes specified!" ) ); - return; - } - - if(hom == "1" ) - { - _plotDissCheckBox->setChecked(true); - } - else if(hom == "0" ) - { - _plotDissCheckBox->setChecked(false); - } - if(surf == "1" ) - { - _plotAdsCheckBox->setChecked(true); - } - else if(surf == "0" ) - { - _plotAdsCheckBox->setChecked(false); - } - } - else if( node.isElement() && node.nodeName() == "solver" ) - { - - QDomElement solver = node.toElement(); - - QString type = solver.attribute("type"); - QString tmax = solver.attribute("tmax"); - QString accuracy = solver.attribute("accuracy"); - QString hinit = solver.attribute("hinit"); - - if( (type == QString::null) | - (tmax == QString::null) | - (accuracy == QString::null) | - (hinit == QString::null) ) - { - QMessageBox::critical( 0, - QObject::tr( "Critical Error" ), - QObject::tr( "Not enough attributes specified!" ) ); - return; - } - - if( type == "kin" ) - { - _kinCheckBox->setChecked(true); - _thermCheckBox->setChecked(false); - } - else if( type == "equ" ) - { - _kinCheckBox->setChecked(false); - _thermCheckBox->setChecked(true); - } - - _maxTimeLineEdit->setText(tmax); - _accuracyLineEdit->setText(accuracy); - _initStepLineEdit->setText(hinit); - - } - node = node.nextSibling(); - } - - // std::cout << "EquilibriumDialog::supply() --END" << std::endl; - } - - - } } // namespace modelGUI --- 512,515 ---- Index: solverDialog.hpp =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model/solverDialog.hpp,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** solverDialog.hpp 19 Dec 2007 11:52:52 -0000 1.45 --- solverDialog.hpp 22 Dec 2007 15:53:16 -0000 1.46 *************** *** 45,51 **** #include "Ecco/ecco.hpp" - #include "xmlwriter.h" - #include <qdom.h> - #include <qprogressdialog.h> --- 45,48 ---- *************** *** 73,78 **** void supply(); - void supply( const QDomElement& dialog ); - void save( BSUtilities::xmlw::XmlStream& xml ); //! "PC" for potential controlled, "CC" for current controlled --- 70,73 ---- Index: mechanismDialog.cpp =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model/mechanismDialog.cpp,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** mechanismDialog.cpp 19 Dec 2007 11:52:46 -0000 1.28 --- mechanismDialog.cpp 22 Dec 2007 15:53:16 -0000 1.29 *************** *** 32,36 **** #include "Ecco/ecco.hpp" - #include <string> #include <iostream> --- 32,35 ---- *************** *** 84,90 **** std::cout << "~/echempp/.internals not found!" << std::endl; } ! _cond_data->mechanism = _currentTextEdit->text().ascii(); ! _cond_data->stoichiometricBalance = _cbStoichiometricBalance->isChecked(); ! _cond_data->chargeBalance = _cbChargeBalance->isChecked(); } --- 83,89 ---- std::cout << "~/echempp/.internals not found!" << std::endl; } ! _cond_data->mc.mechanism = _currentTextEdit->text().ascii(); ! _cond_data->mc.stoichiometricBalance = _cbStoichiometricBalance->isChecked(); ! _cond_data->mc.chargeBalance = _cbChargeBalance->isChecked(); } *************** *** 98,102 **** } - void MechanismDialog::sltOpenMechanism() --- 97,100 ---- *************** *** 114,154 **** if ( fd->exec() == QDialog::Accepted ) { fileName = fd->selectedFile(); - - QFile xmlFile( fileName ); - if( !xmlFile.open( IO_ReadOnly ) ) - { - QMessageBox::warning( 0, - QObject::tr( "I/O Warning" ), - QObject::tr( "Cannot open file %1" ).arg( fileName ) ); - return; - } - - QDomDocument domTree; - if( !domTree.setContent( &xmlFile ) ) - { - QMessageBox::warning( 0, - QObject::tr( "I/O Warning" ), - QObject::tr( "Parsing error for file %1" ).arg( fileName ) ); - xmlFile.close(); - return; - } - xmlFile.close(); - - // get information from the Tree - QDomElement root = domTree.documentElement(); - if( root.nodeName() == "mechanism_dialog" ) - { - this->supply(root); - } - else - { - QMessageBox::warning( 0, - QObject::tr( "I/O Warning" ), - QObject::tr( "Root is no mechanism_dialog tag in %1" ).arg( fileName ) ); - } ! QString s = _currentTextEdit->text(); ! QDir dir; QString home = dir.homeDirPath(); --- 112,144 ---- if ( fd->exec() == QDialog::Accepted ) { + experiment::ConditionDataModSim* _cond_data = _mainWindow->getActiveConditionData(); fileName = fd->selectedFile(); ! std::ifstream ifs_xml(fileName.ascii()); ! if(!ifs_xml) ! { ! QMessageBox::warning( 0, QObject::tr( "I/O Warning" ), ! QObject::tr( "Cannot open file %1" ).arg(fileName)); ! delete fd; ! return; ! } ! boost::archive::xml_iarchive ia_xml(ifs_xml); ! try ! { ! ia_xml >> boost::serialization::make_nvp("mc", _cond_data->mc); ! } ! catch(std::exception& e) ! { ! QMessageBox::critical( 0, QObject::tr( "Critical Error" ), ! QObject::tr(e.what()) ); ! ! ifs_xml.close(); ! delete fd; ! return; ! } ! ifs_xml.close(); ! this->supply(); ! ! QString s = _currentTextEdit->text(); QDir dir; QString home = dir.homeDirPath(); *************** *** 190,216 **** if ( fd->exec() == QDialog::Accepted ) { fileName = fd->selectedFile(); ! std::string file(fileName.ascii()); ! std::ofstream fileStream( file.c_str() ); ! if(!fileStream) ! { ! QMessageBox::warning( 0, ! QObject::tr( "I/O Warning" ), ! QObject::tr( "Cannot open file %1" ).arg( file.c_str() ) ); ! return; } ! ! BSUtilities::xmlw::XmlStream xml( fileStream ); ! ! xml << BSUtilities::xmlw::prolog(); ! ! this->save(xml); ! ! _fileTextLabel->setText(fileName); ! ! fileStream.close(); } - delete fd; } --- 180,208 ---- if ( fd->exec() == QDialog::Accepted ) { + experiment::ConditionDataModSim* _cond_data = _mainWindow->getActiveConditionData(); fileName = fd->selectedFile(); ! std::ofstream ofs_xml(fileName.ascii()); ! if(!ofs_xml) ! { ! QMessageBox::warning( 0, QObject::tr( "I/O Warning" ), ! QObject::tr( "Cannot open file %1" ).arg( fileName.ascii() ) ); ! delete fd; ! return; ! } ! boost::archive::xml_oarchive oa_xml(ofs_xml); ! try{ ! oa_xml << boost::serialization::make_nvp("mc", _cond_data->mc); } ! catch(std::exception& e) ! { ! QMessageBox::critical( 0, QObject::tr( "Critical Error" ), ! QObject::tr(e.what()) ); ! ofs_xml.close(); ! delete fd; ! return; ! } ! ofs_xml.close(); } delete fd; } *************** *** 289,293 **** try { ! _net = compiler.compile( inFileName, _cond_data->activeBoundaries ); } catch( ecco::EccoError& error ) --- 281,285 ---- try { ! _net = compiler.compile( inFileName, _cond_data->mc.activeBoundaries ); } catch( ecco::EccoError& error ) *************** *** 472,478 **** this->inform(DialogAspect("MechanismDialog","Compile")); ! _cond_data->mechanism = _currentTextEdit->text().ascii(); ! _cond_data->stoichiometricBalance = _cbStoichiometricBalance->isChecked(); ! _cond_data->chargeBalance = _cbChargeBalance->isChecked(); } --- 464,470 ---- this->inform(DialogAspect("MechanismDialog","Compile")); ! _cond_data->mc.mechanism = _currentTextEdit->text().ascii(); ! _cond_data->mc.stoichiometricBalance = _cbStoichiometricBalance->isChecked(); ! _cond_data->mc.chargeBalance = _cbChargeBalance->isChecked(); } *************** *** 481,485 **** { experiment::ConditionDataModSim* _cond_data = _mainWindow->getActiveConditionData(); ! _cond_data->mechanism = ""; _currentTextEdit->clear(); _processTextEdit->clear(); --- 473,477 ---- { experiment::ConditionDataModSim* _cond_data = _mainWindow->getActiveConditionData(); ! _cond_data->mc.mechanism = ""; _currentTextEdit->clear(); _processTextEdit->clear(); *************** *** 498,603 **** } - - void - MechanismDialog::save( BSUtilities::xmlw::XmlStream& xml ) - { - - //<mechanism_dialog charge_balance="1/0" stoichiometric_balance="1/0"> - //<text> - //..... text ..... - //</text> - //</mechanism_dialog> - xml << BSUtilities::xmlw::tag("mechanism_dialog") - - << BSUtilities::xmlw::attr("charge_balance"); - - if( _cbChargeBalance->isChecked() ) - { - xml << 1; - } - else - { - xml << 0; - } - - xml << BSUtilities::xmlw::attr("stoichiometric_balance"); - - if( _cbStoichiometricBalance->isChecked() ) - { - xml << 1; - } - else - { - xml << 0; - } - - xml << BSUtilities::xmlw::tag("text") - - << BSUtilities::xmlw::chardata() - - << "<![CDATA[" << _currentTextEdit->text().ascii() << "]]>" - - << BSUtilities::xmlw::endtag("text") - - << BSUtilities::xmlw::endtag("mechanism_dialog"); - - } - void MechanismDialog::supply() { experiment::ConditionDataModSim* _cond_data = _mainWindow->getActiveConditionData(); ! _cbChargeBalance->setChecked( _cond_data->chargeBalance ); ! _cbStoichiometricBalance->setChecked( _cond_data->stoichiometricBalance ); ! _currentTextEdit->setText( _cond_data->mechanism ); ! } ! ! void ! MechanismDialog::supply( const QDomElement& dialog ) ! { ! // std::cout << "MechanismDialog::supply()" << std::endl; ! if( !(dialog.nodeName() == "mechanism_dialog") ) ! { ! QMessageBox::critical( 0, ! QObject::tr( "Critical Error" ), ! QObject::tr( "No mechanism_dialog node given to MechanismDialog::supply()" ) ); ! return; ! } ! ! int chargeBalance = dialog.attribute("charge_balance").toInt(); ! int stoichiometricBalance = dialog.attribute("stoichiometric_balance").toInt(); ! ! if( chargeBalance == 1 ) ! { ! _cbChargeBalance->setChecked(true); ! } ! else ! { ! _cbChargeBalance->setChecked(false); ! } ! ! if( stoichiometricBalance == 1 ) ! { ! _cbStoichiometricBalance->setChecked(true); ! } ! else ! { ! _cbStoichiometricBalance->setChecked(false); ! } ! ! ! QDomNode node = dialog.firstChild(); ! ! while( !node.isNull() ) ! { ! if( node.isElement() & (node.nodeName() == "text") ) ! { ! QDomElement text = node.toElement(); ! QString mechanism = text.text(); ! _currentTextEdit->setText( mechanism ); ! } ! node = node.nextSibling(); ! } ! // std::cout << "MechanismDialog::supply() -- END" << std::endl; } --- 490,500 ---- } void MechanismDialog::supply() { experiment::ConditionDataModSim* _cond_data = _mainWindow->getActiveConditionData(); ! _cbChargeBalance->setChecked( _cond_data->mc.chargeBalance ); ! _cbStoichiometricBalance->setChecked( _cond_data->mc.stoichiometricBalance ); ! _currentTextEdit->setText( _cond_data->mc.mechanism ); } Index: mediator.cpp =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model/mediator.cpp,v retrieving revision 1.137 retrieving revision 1.138 diff -C2 -d -r1.137 -r1.138 *** mediator.cpp 19 Dec 2007 11:52:48 -0000 1.137 --- mediator.cpp 22 Dec 2007 15:53:16 -0000 1.138 *************** *** 284,354 **** void - Mediator::writeProjectFile( const QString& fileName ) - { - std::string file(fileName.ascii()); - std::ofstream fileStream( file.c_str() ); - if(!fileStream) - { - QMessageBox::warning( 0, - QObject::tr( "I/O Warning" ), - QObject::tr( "Cannot open file %1" ).arg( file.c_str() ) ); - return; - } - BSUtilities::xmlw::XmlStream xml( fileStream ); - - xml << BSUtilities::xmlw::prolog(); - - xml << BSUtilities::xmlw::tag("echempp_project") - << BSUtilities::xmlw::attr("file") << file.c_str(); - - xml << BSUtilities::xmlw::tag("model"); - - _equilibriumDialog->save( xml ); - _experimentDialog->save( xml ); - _mechanismDialog->save( xml ); - _modelParameters->save( xml ); - _dataDialog->save( xml ); - _solverDialog->save( xml ); - _scalingDialog->save( xml ); - - xml << BSUtilities::xmlw::endtag("model"); - - xml << BSUtilities::xmlw::endtag("echempp_project"); - - fileStream.close(); - } - - void Mediator::writeDataFile( const QString& fileName ) { ! std::string file(fileName.ascii()); ! std::ofstream fileStream( file.c_str() ); ! if(!fileStream) ! { ! QMessageBox::warning( 0, ! QObject::tr( "I/O Warning" ), ! QObject::tr( "Cannot open file %1" ).arg( file.c_str() ) ); ! return; ! } ! ! BSUtilities::xmlw::XmlStream xml( fileStream ); ! ! xml << BSUtilities::xmlw::prolog(); ! ! xml << BSUtilities::xmlw::tag("echempp_data_file") ! << BSUtilities::xmlw::attr("file") << file.c_str(); ! ! xml << BSUtilities::xmlw::tag("model"); ! ! _experimentDialog->save( xml ); ! _mechanismDialog->save( xml ); ! _modelParameters->save( xml ); ! _plotWidget->saveActiveData( xml ); ! ! xml << BSUtilities::xmlw::endtag("model"); ! ! xml << BSUtilities::xmlw::endtag("echempp_data_file"); ! ! fileStream.close(); } --- 284,293 ---- void Mediator::writeDataFile( const QString& fileName ) { ! // _experimentDialog->save( xml ); ! // _mechanismDialog->save( xml ); ! // _modelParameters->save( xml ); ! _plotWidget->saveActiveData( fileName ); } *************** *** 385,440 **** void - Mediator::readProjectFile( const QString& fileName ) - { - // std::cout << "Mediator::readProjectFile()" << std::endl; - - // read the XML file and create DOM tree - QFile xmlFile( fileName ); - if( !xmlFile.open( IO_ReadOnly ) ) - { - QMessageBox::warning( 0, - QObject::tr( "I/O Warning" ), - QObject::tr( "Cannot open file %1" ).arg( fileName ) ); - return; - } - - QDomDocument domTree; - if( !domTree.setContent( &xmlFile ) ) - { - QMessageBox::warning( 0, - QObject::tr( "I/O Warning" ), - QObject::tr( "Parsing error for file %1" ).arg( fileName ) ); - xmlFile.close(); - return; - } - xmlFile.close(); - - // get information from the Tree - QDomElement root = domTree.documentElement(); - QDomNode node = root.firstChild(); - - while( !node.isNull() ) - { - if( node.isElement() && node.nodeName() == "model" ) - { - QDomElement model = node.toElement(); - try - { - this->createModel( model ); - } - catch( ModelError& error ) - { - QMessageBox::warning( 0, - QObject::tr( "I/O Error" ), - QObject::tr( "Error while rebuilding settings of %1" ).arg( fileName ) ); - return; - } - } - node = node.nextSibling(); - } - // std::cout << "Mediator::readProjectFile() -- END" << std::endl; - } - - void Mediator::importData( const QString& fileName ) { --- 324,327 ---- *************** *** 542,598 **** { // std::cout << "Mediator::createModel()" << std::endl; ! _solverDialog->clear(); ! QDomNode node = model.firstChild(); ! while( !node.isNull() ) ! { ! if( node.isElement() && node.nodeName() == "equilibrium_dialog" ) ! { ! QDomElement dialog = node.toElement(); ! _equilibriumDialog->supply( dialog ); ! _equilibriumDialog->sltApply(); ! } ! else if( node.isElement() && node.nodeName() == "experiment_dialog" ) ! { ! QDomElement dialog = node.toElement(); ! _experimentDialog->supply( dialog ); ! _experimentDialog->sltApply(); ! } ! else if( node.isElement() && node.nodeName() == "mechanism_dialog" ) ! { ! QDomElement dialog = node.toElement(); ! _mechanismDialog->supply( dialog ); ! _mechanismDialog->sltCompile(); ! if( _mechanismDialog->aborted() ) ! { ! throw ModelError( "compilation aborted!" ); ! } ! } ! else if( node.isElement() && node.nodeName() == "model_parameters_dialog" ) ! { ! QDomElement dialog = node.toElement(); ! _modelParameters->supply( dialog ); ! _modelParameters->sltEquilibriumCalculation(); ! } ! else if( node.isElement() && node.nodeName() == "data_dialog" ) ! { ! QDomElement dialog = node.toElement(); ! _dataDialog->supply( dialog ); ! _dataDialog->sltApply(); ! } ! else if( node.isElement() && node.nodeName() == "solver_dialog" ) ! { ! QDomElement dialog = node.toElement(); ! _solverDialog->supply( dialog ); ! _solverDialog->sltApply(); ! } ! else if( node.isElement() && node.nodeName() == "scaling_dialog" ) ! { ! QDomElement dialog = node.toElement(); ! _scalingDialog->supply( dialog ); ! _scalingDialog->sltApply(); ! } ! node = node.nextSibling(); ! } // std::cout << "Mediator::createModel() -- END" << std::endl; } --- 429,485 ---- { // std::cout << "Mediator::createModel()" << std::endl; ! // _solverDialog->clear(); ! // QDomNode node = model.firstChild(); ! // while( !node.isNull() ) ! // { ! // if( node.isElement() && node.nodeName() == "equilibrium_dialog" ) ! // { ! // QDomElement dialog = node.toElement(); ! // _equilibriumDialog->supply( dialog ); ! // _equilibriumDialog->sltApply(); ! // } ! // else if( node.isElement() && node.nodeName() == "experiment_dialog" ) ! // { ! // QDomElement dialog = node.toElement(); ! // _experimentDialog->supply( dialog ); ! // _experimentDialog->sltApply(); ! // } ! // else if( node.isElement() && node.nodeName() == "mechanism_dialog" ) ! // { ! // QDomElement dialog = node.toElement(); ! // _mechanismDialog->supply( dialog ); ! // _mechanismDialog->sltCompile(); ! // if( _mechanismDialog->aborted() ) ! // { ! // throw ModelError( "compilation aborted!" ); ! // } ! // } ! // else if( node.isElement() && node.nodeName() == "model_parameters_dialog" ) ! // { ! // QDomElement dialog = node.toElement(); ! // _modelParameters->supply( dialog ); ! // _modelParameters->sltEquilibriumCalculation(); ! // } ! // else if( node.isElement() && node.nodeName() == "data_dialog" ) ! // { ! // QDomElement dialog = node.toElement(); ! // _dataDialog->supply( dialog ); ! // _dataDialog->sltApply(); ! // } ! // else if( node.isElement() && node.nodeName() == "solver_dialog" ) ! // { ! // QDomElement dialog = node.toElement(); ! // _solverDialog->supply( dialog ); ! // _solverDialog->sltApply(); ! // } ! // else if( node.isElement() && node.nodeName() == "scaling_dialog" ) ! // { ! // QDomElement dialog = node.toElement(); ! // _scalingDialog->supply( dialog ); ! // _scalingDialog->sltApply(); ! // } ! // node = node.nextSibling(); ! // } // std::cout << "Mediator::createModel() -- END" << std::endl; } Index: batchExperimentDialog.cpp =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model/batchExperimentDialog.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** batchExperimentDialog.cpp 19 Dec 2007 11:56:24 -0000 1.1 --- batchExperimentDialog.cpp 22 Dec 2007 15:53:16 -0000 1.2 *************** *** 169,173 **** int i = getIndexFromName(name, "kh"); if(i != -1) ! return cond_data->khs[i].value(); } else if(name.contains("kf")) --- 169,173 ---- int i = getIndexFromName(name, "kh"); if(i != -1) ! return cond_data->mpc.khs[i].value(); } else if(name.contains("kf")) *************** *** 175,179 **** int i = getIndexFromName(name, "kf"); if(i != -1) ! return cond_data->homForwardRateConstants[i]; } else if(name.contains("D")) --- 175,179 ---- int i = getIndexFromName(name, "kf"); if(i != -1) ! return cond_data->mpc.homForwardRateConstants[i]; } else if(name.contains("D")) *************** *** 181,185 **** int i = getIndexFromName(name, "D"); if(i != -1) ! return cond_data->diffCoeffs[i].value(); } else if(name.contains("c")) --- 181,185 ---- int i = getIndexFromName(name, "D"); if(i != -1) ! return cond_data->mpc.diffCoeffs[i].value(); } else if(name.contains("c")) *************** *** 187,191 **** int i = getIndexFromName(name, "c"); if(i != -1); ! return cond_data->dissConcs[i].value(); } else if(name == "v") --- 187,191 ---- int i = getIndexFromName(name, "c"); if(i != -1); ! return cond_data->mpc.dissConcs[i].value(); } else if(name == "v") *************** *** 217,221 **** int i = getIndexFromName(name, "kh");... [truncated message content] |
|
From: beeblbrox <bee...@us...> - 2007-12-22 15:51:37
|
Update of /cvsroot/echempp/GUI/Windows/Qt/EChem++/Experiment In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv25843/GUI/Windows/Qt/EChem++/Experiment Modified Files: Makefile.am caExcitationFunctionDialog.cpp cvExcitationFunctionDialog.cpp userDefinedEtExcitationFunctionDialog.cpp userDefinedItExcitationFunctionDialog.cpp Log Message: Switch to boost::serialization. Index: cvExcitationFunctionDialog.cpp =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Experiment/cvExcitationFunctionDialog.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** cvExcitationFunctionDialog.cpp 19 Dec 2007 13:11:34 -0000 1.26 --- cvExcitationFunctionDialog.cpp 22 Dec 2007 15:51:24 -0000 1.27 *************** *** 61,68 **** - //BSUtilities includes - #include "xmlReader.h" - #include "xmlwriter.h" - //namespaces --- 61,64 ---- *************** *** 262,269 **** } - // catch( ExcitationFunctions::LoadError& error ) - // { - // QMessageBox::warning( this, "Load button", error.message().c_str() ); - // } catch( const ExperimentError& error ) { --- 258,261 ---- *************** *** 1023,1027 **** } - try { --- 1015,1018 ---- *************** *** 1038,1042 **** EtExcitationFunction temp; ! // BSUtilities::xmlr::xmlLoad (fileName.ascii(), temp); _EtFunction = temp; --- 1029,1054 ---- EtExcitationFunction temp; ! ExcitationFunctions::Segments::LinearEtSegment temp_seg(1,2,3); ! std::ifstream ifs_xml(fileName.ascii()); ! if(!ifs_xml) ! { ! QMessageBox::warning( 0, QObject::tr( "I/O Warning" ), ! QObject::tr( "Cannot open file %1" ).arg(fileName)); ! return; ! } ! boost::archive::xml_iarchive ia_xml(ifs_xml); ! try ! { ! ia_xml >> BOOST_SERIALIZATION_NVP(temp); ! } ! catch(std::exception& e) ! { ! QMessageBox::critical( 0, QObject::tr( "Critical Error" ), ! QObject::tr(e.what()) ); ! ! ifs_xml.close(); ! return; ! } ! ifs_xml.close(); _EtFunction = temp; *************** *** 1056,1065 **** } - } - // catch( ExcitationFunctions::LoadError& error ) - // { - // QMessageBox::warning( this, "Load button", error.message().c_str() ); - // } catch( const ExperimentError& error ) { --- 1068,1072 ---- *************** *** 1085,1089 **** fileName.append(".xml"); } ! // BSUtilities::xmlw::save(fileName.ascii(), _EtFunction); } --- 1092,1114 ---- fileName.append(".xml"); } ! std::ofstream ofs_xml(fileName.ascii()); ! if(!ofs_xml) ! { ! QMessageBox::warning( 0, QObject::tr( "I/O Warning" ), ! QObject::tr( "Cannot open file %1" ).arg( fileName.ascii() ) ); ! return; ! } ! boost::archive::xml_oarchive oa_xml(ofs_xml); ! try{ ! oa_xml << BOOST_SERIALIZATION_NVP(_EtFunction); ! } ! catch(std::exception& e) ! { ! QMessageBox::critical( 0, QObject::tr( "Critical Error" ), ! QObject::tr(e.what()) ); ! ofs_xml.close(); ! return; ! } ! ofs_xml.close(); } Index: userDefinedItExcitationFunctionDialog.cpp =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Experiment/userDefinedItExcitationFunctionDialog.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** userDefinedItExcitationFunctionDialog.cpp 19 Dec 2007 13:11:34 -0000 1.4 --- userDefinedItExcitationFunctionDialog.cpp 22 Dec 2007 15:51:24 -0000 1.5 *************** *** 61,68 **** #include <qpushbutton.h> - //BSUtilities includes - #include "xmlReader.h" - #include "xmlwriter.h" - //namespaces --- 61,64 ---- *************** *** 324,333 **** unsigned int i = 0; - std::string id; for(;i<_itFunction.size();++i) { ! // id = _itFunction.segment(i)->id(); ! // TODO FIXME ! id = ""; if( id == "Constant" ) --- 320,326 ---- unsigned int i = 0; for(;i<_itFunction.size();++i) { ! const std::string id = _itFunction.segment(i)->id(); if( id == "Constant" ) *************** *** 1432,1436 **** { itExcitationFunction temp; ! // BSUtilities::xmlr::xmlLoad(fileName.ascii(), temp); std::vector<int> efType; --- 1425,1450 ---- { itExcitationFunction temp; ! ExcitationFunctions::Segments::LinearitSegment temp_seg(1,2,3); ! std::ifstream ifs_xml(fileName.ascii()); ! if(!ifs_xml) ! { ! QMessageBox::warning( 0, QObject::tr( "I/O Warning" ), ! QObject::tr( "Cannot open file %1" ).arg(fileName)); ! return; ! } ! boost::archive::xml_iarchive ia_xml(ifs_xml); ! try ! { ! ia_xml >> BOOST_SERIALIZATION_NVP(temp); ! } ! catch(std::exception& e) ! { ! QMessageBox::critical( 0, QObject::tr( "Critical Error" ), ! QObject::tr(e.what()) ); ! ! ifs_xml.close(); ! return; ! } ! ifs_xml.close(); std::vector<int> efType; *************** *** 1440,1446 **** for(;i<temp.size();++i) { ! // id = temp.segment(i)->id(); ! // TODO FIXME ! id = ""; if( id == "Constant" ) --- 1454,1458 ---- for(;i<temp.size();++i) { ! id = temp.segment(i)->id(); if( id == "Constant" ) *************** *** 1497,1504 **** } - // catch( ExcitationFunctions::LoadError& error ) - // { - // QMessageBox::warning( this, "Load button", error.message().c_str() ); - // } catch( const ExperimentError& error ) { --- 1509,1512 ---- *************** *** 1525,1529 **** fileName.append(".xml"); } ! // BSUtilities::xmlw::save(fileName.ascii(), _itFunction); } --- 1533,1555 ---- fileName.append(".xml"); } ! std::ofstream ofs_xml(fileName.ascii()); ! if(!ofs_xml) ! { ! QMessageBox::warning( 0, QObject::tr( "I/O Warning" ), ! QObject::tr( "Cannot open file %1" ).arg( fileName.ascii() ) ); ! return; ! } ! boost::archive::xml_oarchive oa_xml(ofs_xml); ! try{ ! oa_xml << BOOST_SERIALIZATION_NVP(_itFunction); ! } ! catch(std::exception& e) ! { ! QMessageBox::critical( 0, QObject::tr( "Critical Error" ), ! QObject::tr(e.what()) ); ! ofs_xml.close(); ! return; ! } ! ofs_xml.close(); } Index: caExcitationFunctionDialog.cpp =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Experiment/caExcitationFunctionDialog.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** caExcitationFunctionDialog.cpp 19 Dec 2007 13:11:34 -0000 1.20 --- caExcitationFunctionDialog.cpp 22 Dec 2007 15:51:24 -0000 1.21 *************** *** 56,63 **** #include <qpushbutton.h> - //BSUtilities includes - #include "xmlReader.h" - #include "xmlwriter.h" - using namespace ExcitationFunctions; using namespace quantity; --- 56,59 ---- *************** *** 233,240 **** } - // catch( ExcitationFunctions::LoadError& error ) - // { - // QMessageBox::warning( this, "Load button", error.message().c_str() ); - // } catch( const ExperimentError& error ) { --- 229,232 ---- *************** *** 956,964 **** return; } - try { - // else delete drawings and load function. if( _segmentNumber > -1 ) --- 948,954 ---- *************** *** 972,976 **** EtExcitationFunction temp; ! // BSUtilities::xmlr::xmlLoad (fileName.ascii(), temp); _EtFunction = temp; --- 962,987 ---- EtExcitationFunction temp; ! ExcitationFunctions::Segments::LinearEtSegment temp_seg(1,2,3); ! std::ifstream ifs_xml(fileName.ascii()); ! if(!ifs_xml) ! { ! QMessageBox::warning( 0, QObject::tr( "I/O Warning" ), ! QObject::tr( "Cannot open file %1" ).arg(fileName)); ! return; ! } ! boost::archive::xml_iarchive ia_xml(ifs_xml); ! try ! { ! ia_xml >> BOOST_SERIALIZATION_NVP(temp); ! } ! catch(std::exception& e) ! { ! QMessageBox::critical( 0, QObject::tr( "Critical Error" ), ! QObject::tr(e.what()) ); ! ! ifs_xml.close(); ! return; ! } ! ifs_xml.close(); _EtFunction = temp; *************** *** 992,999 **** } - // catch( ExcitationFunctions::LoadError& error ) - // { - // QMessageBox::warning( this, "Load button", error.message().c_str() ); - // } catch( const ExperimentError& error ) { --- 1003,1006 ---- *************** *** 1019,1023 **** fileName.append(".xml"); } ! // BSUtilities::xmlw::save(fileName.ascii(), _EtFunction); } --- 1026,1049 ---- fileName.append(".xml"); } ! std::ofstream ofs_xml(fileName.ascii()); ! if(!ofs_xml) ! { ! QMessageBox::warning( 0, QObject::tr( "I/O Warning" ), ! QObject::tr( "Cannot open file %1" ).arg( fileName.ascii() ) ); ! return; ! } ! boost::archive::xml_oarchive oa_xml(ofs_xml); ! try ! { ! oa_xml << BOOST_SERIALIZATION_NVP(_EtFunction); ! } ! catch(std::exception& e) ! { ! QMessageBox::critical( 0, QObject::tr( "Critical Error" ), ! QObject::tr(e.what()) ); ! ofs_xml.close(); ! return; ! } ! ofs_xml.close(); } Index: Makefile.am =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Experiment/Makefile.am,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Makefile.am 26 Feb 2007 17:33:55 -0000 1.13 --- Makefile.am 22 Dec 2007 15:51:23 -0000 1.14 *************** *** 90,94 **** experiment_LDFLAGS = $(GUI_LDFLAGS) ! experiment_CXXFLAGS = -DTIXML_USE_STL=YES $(CXXFLAGS) $(QT_CXXFLAGS) experiment_LDADD = ../../../../../Utilities/Algorithms/libeppAlgorithms.la ../../../../../Experiment/ExcitationFunction/libeppExcitationFunction.la -L$(QUANTITIESLIB) -lPhysicalQuantities -lQuantity -L$(BSUTILITIESLIB) -lBSUtilities -L$(LOKILIB) -lloki $(QT_LDADD) --- 90,94 ---- experiment_LDFLAGS = $(GUI_LDFLAGS) ! experiment_CXXFLAGS = $(CXXFLAGS) $(QT_CXXFLAGS) experiment_LDADD = ../../../../../Utilities/Algorithms/libeppAlgorithms.la ../../../../../Experiment/ExcitationFunction/libeppExcitationFunction.la -L$(QUANTITIESLIB) -lPhysicalQuantities -lQuantity -L$(BSUTILITIESLIB) -lBSUtilities -L$(LOKILIB) -lloki $(QT_LDADD) Index: userDefinedEtExcitationFunctionDialog.cpp =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Experiment/userDefinedEtExcitationFunctionDialog.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** userDefinedEtExcitationFunctionDialog.cpp 19 Dec 2007 13:11:34 -0000 1.4 --- userDefinedEtExcitationFunctionDialog.cpp 22 Dec 2007 15:51:24 -0000 1.5 *************** *** 60,67 **** #include <qpushbutton.h> - //BSUtilities includes - #include "xmlReader.h" - #include "xmlwriter.h" - //namespaces --- 60,63 ---- *************** *** 302,311 **** unsigned int i = 0; - std::string id; for(;i<_EtFunction.size();++i) { ! // id = _EtFunction.segment(i)->id(); ! // TODO FIXME ! id = ""; if( id == "Constant" ) --- 298,304 ---- unsigned int i = 0; for(;i<_EtFunction.size();++i) { ! const std::string id = _EtFunction.segment(i)->id(); if( id == "Constant" ) *************** *** 345,352 **** } - // catch( ExcitationFunctions::LoadError& error ) - // { - // QMessageBox::warning( this, "Load button", error.message().c_str() ); - // } catch( const ExperimentError& error ) { --- 338,341 ---- *************** *** 1362,1366 **** { EtExcitationFunction temp; ! // BSUtilities::xmlr::xmlLoad (fileName.ascii(), temp); std::vector<int> efType; --- 1351,1376 ---- { EtExcitationFunction temp; ! ExcitationFunctions::Segments::LinearEtSegment temp_seg(1,2,3); ! std::ifstream ifs_xml(fileName.ascii()); ! if(!ifs_xml) ! { ! QMessageBox::warning( 0, QObject::tr( "I/O Warning" ), ! QObject::tr( "Cannot open file %1" ).arg(fileName)); ! return; ! } ! boost::archive::xml_iarchive ia_xml(ifs_xml); ! try ! { ! ia_xml >> BOOST_SERIALIZATION_NVP(temp); ! } ! catch(std::exception& e) ! { ! QMessageBox::critical( 0, QObject::tr( "Critical Error" ), ! QObject::tr(e.what()) ); ! ! ifs_xml.close(); ! return; ! } ! ifs_xml.close(); std::vector<int> efType; *************** *** 1370,1376 **** for(;i<temp.size();++i) { ! // id = temp.segment(i)->id(); ! // TODO FIXME ! id = ""; if( id == "Constant" ) --- 1380,1384 ---- for(;i<temp.size();++i) { ! id = temp.segment(i)->id(); if( id == "Constant" ) *************** *** 1419,1426 **** } - // catch( ExcitationFunctions::LoadError& error ) - // { - // QMessageBox::warning( this, "Load button", error.message().c_str() ); - // } catch( const ExperimentError& error ) { --- 1427,1430 ---- *************** *** 1447,1451 **** fileName.append(".xml"); } ! // BSUtilities::xmlw::save(fileName.ascii(), _EtFunction); } --- 1451,1473 ---- fileName.append(".xml"); } ! std::ofstream ofs_xml(fileName.ascii()); ! if(!ofs_xml) ! { ! QMessageBox::warning( 0, QObject::tr( "I/O Warning" ), ! QObject::tr( "Cannot open file %1" ).arg( fileName.ascii() ) ); ! return; ! } ! boost::archive::xml_oarchive oa_xml(ofs_xml); ! try{ ! oa_xml << BOOST_SERIALIZATION_NVP(_EtFunction); ! } ! catch(std::exception& e) ! { ! QMessageBox::critical( 0, QObject::tr( "Critical Error" ), ! QObject::tr(e.what()) ); ! ofs_xml.close(); ! return; ! } ! ofs_xml.close(); } |
|
From: beeblbrox <bee...@us...> - 2007-12-22 15:50:29
|
Update of /cvsroot/echempp/Experiment/Experiment In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv25457/Experiment/Experiment Modified Files: Makefile.am Log Message: Excluded old sources. Remove files later. Index: Makefile.am =================================================================== RCS file: /cvsroot/echempp/Experiment/Experiment/Makefile.am,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Makefile.am 19 Dec 2007 13:31:29 -0000 1.14 --- Makefile.am 22 Dec 2007 15:50:26 -0000 1.15 *************** *** 10,20 **** libeppExperiment_la_SOURCES = Experiment.hpp \ Experiment.cpp \ - ExperimentError.h \ - TechniqueType.h \ - Technique.h \ - GeneralTechniques.h \ - GeneralExperiments.h \ - ElectrochemicalTechniques.h \ - ElectrochemicalExperiments.h \ Doxyfile \ documentation/mainpage.txt \ --- 10,13 ---- |
|
From: beeblbrox <bee...@us...> - 2007-12-22 15:49:59
|
Update of /cvsroot/echempp/Experiment/ExcitationFunction In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv25043/Experiment/ExcitationFunction Modified Files: segment.hpp Log Message: Reintroduced id() needed internally by excitation func. dialogs. Index: segment.hpp =================================================================== RCS file: /cvsroot/echempp/Experiment/ExcitationFunction/segment.hpp,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** segment.hpp 19 Dec 2007 14:18:52 -0000 1.38 --- segment.hpp 22 Dec 2007 15:49:53 -0000 1.39 *************** *** 135,138 **** --- 135,139 ---- { public: + virtual ~Segment(){} //! the version of all Segment classes /*! The version is returned by a static function as a std::string; *************** *** 143,146 **** --- 144,149 ---- + ::quantity::Quantities::Version (); } + //! id needed by ExcitationFunction dialogs internally + virtual const std::string id() const { return "Segment"; } BSUtilities::Serialization::AutoRegistor<Segment> reg; static const std::string GUID; *************** *** 225,228 **** --- 228,233 ---- return 0; } + //! id needed by ExcitationFunction dialogs internally + virtual const std::string id() const { return "DISegment"; } static const std::string create_guid() *************** *** 409,412 **** --- 414,419 ---- return "LinearSegment_" + D::create_guid() + "_" + I::create_guid(); } + //! id needed by ExcitationFunction dialogs internally + const std::string id() const { return "Linear"; } BSUtilities::Serialization::AutoRegistor<LinearSegment<D,I> > reg; static const std::string GUID; *************** *** 564,567 **** --- 571,576 ---- return "ConstantSegment_" + D::create_guid() + "_" + I::create_guid(); } + //! id needed by ExcitationFunction dialogs internally + const std::string id() const { return "Constant"; } BSUtilities::Serialization::AutoRegistor<ConstantSegment<D,I> > reg; static const std::string GUID; *************** *** 734,737 **** --- 743,748 ---- catch (std::bad_cast) {return false;} } + //! id needed by ExcitationFunction dialogs internally + const std::string id() const { return "Sine"; } static const std::string create_guid() { *************** *** 926,929 **** --- 937,941 ---- catch (std::bad_cast) {return false;} } + const std::string id() const { return "Power"; } static const std::string create_guid() { *************** *** 1109,1112 **** --- 1121,1125 ---- catch (std::bad_cast) {return false;} } + const std::string id() const { return "Exp"; } static const std::string create_guid() { *************** *** 1311,1314 **** --- 1324,1328 ---- catch (std::bad_cast) {return false;} } + const std::string id() const { return "PowerExp"; } static const std::string create_guid() { *************** *** 1498,1501 **** --- 1512,1516 ---- */ DigitalSegment (void) {} + const std::string id() const { return "Digital"; } static const std::string create_guid() { |
|
From: beeblbrox <bee...@us...> - 2007-12-22 15:47:51
|
Update of /cvsroot/echempp/Experiment/Data In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv24265/Experiment/Data Modified Files: Data.cpp Data.hpp Makefile.am Log Message: Excluded all files except Data.{hpp,cpp} remove obsolete files later. Index: Data.cpp =================================================================== RCS file: /cvsroot/echempp/Experiment/Data/Data.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Data.cpp 19 Dec 2007 13:24:54 -0000 1.1 --- Data.cpp 22 Dec 2007 15:47:38 -0000 1.2 *************** *** 5,9 **** --- 5,12 ---- const std::string MeasurementData::GUID = "MeasurementData"; const std::string MeasurementDataModSim::GUID = "MeasurementDataModSim"; + const std::string ModelPlotWidgetData::GUID = "ModelPlotWidgetData"; const std::string ConditionData::GUID = "ConditionData"; + const std::string MechanismConditions::GUID = "MechanismConditions"; + const std::string ModelParameterConditions::GUID = "ModelParameterConditions"; const std::string SolverConditions::GUID = "SolverConditions"; const std::string ConditionDataModSim::GUID = "ConditionDataModSim"; Index: Data.hpp =================================================================== RCS file: /cvsroot/echempp/Experiment/Data/Data.hpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Data.hpp 19 Dec 2007 13:24:54 -0000 1.1 --- Data.hpp 22 Dec 2007 15:47:38 -0000 1.2 *************** *** 171,174 **** --- 171,351 ---- }; + // data written by modelPlotWidget + class ModelPlotWidgetData + { + public: + BSUtilities::Serialization::AutoRegistor<ModelPlotWidgetData> reg; + static const std::string GUID; + std::vector<std::string> ids; + std::string x_unit; + std::string y_unit; + std::string z_unit; + std::vector<std::vector<double> > data; + private: + friend class boost::serialization::access; + template<class Archive> + void serialize(Archive & ar, const unsigned int version) + { + ar & BOOST_SERIALIZATION_NVP(ids) + & BOOST_SERIALIZATION_NVP(x_unit) + & BOOST_SERIALIZATION_NVP(y_unit) + & BOOST_SERIALIZATION_NVP(z_unit) + & BOOST_SERIALIZATION_NVP(data); + } + }; + + // data from mechanism dialog + class MechanismConditions + { + public: + BSUtilities::Serialization::AutoRegistor<MechanismConditions> reg; + static const std::string GUID; + bool chargeBalance; + bool stoichiometricBalance; + std::string mechanism; + std::set<int> activeBoundaries; + private: + friend class boost::serialization::access; + template<class Archive> + void serialize(Archive & ar, const unsigned int version) + { + ar & BOOST_SERIALIZATION_NVP(chargeBalance) + & BOOST_SERIALIZATION_NVP(stoichiometricBalance) + & BOOST_SERIALIZATION_NVP(mechanism) + & BOOST_SERIALIZATION_NVP(activeBoundaries); + } + }; + + // data from model parameters dialog + class ModelParameterConditions + { + public: + BSUtilities::Serialization::AutoRegistor<ModelParameterConditions> reg; + static const std::string GUID; + //! temperature + quantity::ThermodynamicTemperature temp; + //! electrode area + quantity::Area area; + //! map of concentrations + //! key = species index + GUI::model::ConcentrationMap dissConcs; + quantity::Concentration refDissConc; + int refConcIndex; + //! map of surface concentrations + //! key = species index + GUI::model::SurfaceConcentrationMap adsConcs; + //! map of surface concentrations + //! key = boundary index + GUI::model::SaturationConcentrationMap saturationConcs; + //! map of diffusion coefficients + //! key = species index + GUI::model::DiffusionCoefficientMap diffCoeffs; + quantity::DiffusionCoefficient refDiffCoeff; + int maxDiffCoeff; + //! map of formal potentials. + //! key = reactions index + GUI::model::ElectricPotentialMap formalPotentials; + //! map of ET coefficients (Butler Volmer law) + //! key = reaction index + std::map<GUI::model::uint_t,double> alphas; + //! map of heterogeneous rate constants. + //! key = reaction index + GUI::model::HeterogeneousRateConstantMap khs; + //! map of Langmuir equilibrium constants. + //! key = reaction index + GUI::model::LangmuirEquilibriumConstantMap langEquilConstants; + //! map of Langmuir adsorption rate constants + //! key = reaction index + GUI::model::LangmuirAdsorptionRateConstantMap langAdsRateConstants; + //! map of first order rate constants + //! key = reaction index + GUI::model::FirstOrderRateConstantMap firstOrderRateConstants; + //! key = reaction index + std::map<GUI::model::uint_t,double> homEquilibriumConstants; + std::map<GUI::model::uint_t,double> homForwardRateConstants; + std::map<GUI::model::uint_t,double> homBackwardRateConstants; + std::map<GUI::model::uint_t,double> homSurfEquilibriumConstants; + std::map<GUI::model::uint_t,double> homSurfForwardRateConstants; + std::map<GUI::model::uint_t,double> homSurfBackwardRateConstants; + std::map<GUI::model::uint_t,double> hetSurfEquilibriumConstants; + std::map<GUI::model::uint_t,double> hetSurfForwardRateConstants; + std::map<GUI::model::uint_t,double> hetSurfBackwardRateConstants; + //! indices of fixed thermodynamic paramters + std::set<GUI::model::uint_t> fixed; + unsigned int numRowsDissSpecies; + unsigned int numRowsAdsSpecies; + unsigned int numRowsSaturation; + unsigned int numRowsBvDiss; + unsigned int numRowsBvAds; + unsigned int numRowsLangmuir; + unsigned int numRowsHomPower; + unsigned int numRowsHomGen; + unsigned int numColsHomGen; + unsigned int numRowsHomSurfPower; + unsigned int numRowsHomSurfGen; + unsigned int numColsHomSurfGen; + unsigned int numRowsHetSurfPower; + unsigned int numRowsHetSurfGen; + unsigned int numColsHetSurfGen; + std::map<std::string, std::map<GUI::model::uint_t,std::vector<GUI::model::uint_t> > > genParams; + //! Key = col in homGenericTable and surfGenericTable (shifted by -1), + //! value = name of parameter + std::map<int,std::string> genColsParams; + //! Key = name of parameter, value = col in homGenericTable and surfGenericTable (shifted by -1) + std::map<std::string,int> genParamsCols; + std::map<std::string,double> genParamsValues; + private: + friend class boost::serialization::access; + template<class Archive> + void serialize(Archive & ar, const unsigned int version) + { + ar & BOOST_SERIALIZATION_NVP(temp) + & BOOST_SERIALIZATION_NVP(area) + & BOOST_SERIALIZATION_NVP(dissConcs) + & BOOST_SERIALIZATION_NVP(refDissConc) + & BOOST_SERIALIZATION_NVP(refConcIndex) + & BOOST_SERIALIZATION_NVP(adsConcs) + & BOOST_SERIALIZATION_NVP(saturationConcs) + & BOOST_SERIALIZATION_NVP(diffCoeffs) + & BOOST_SERIALIZATION_NVP(refDiffCoeff) + & BOOST_SERIALIZATION_NVP(maxDiffCoeff) + & BOOST_SERIALIZATION_NVP(formalPotentials) + & BOOST_SERIALIZATION_NVP(alphas) + & BOOST_SERIALIZATION_NVP(khs) + & BOOST_SERIALIZATION_NVP(langEquilConstants) + & BOOST_SERIALIZATION_NVP(langAdsRateConstants) + & BOOST_SERIALIZATION_NVP(firstOrderRateConstants) + & BOOST_SERIALIZATION_NVP(homEquilibriumConstants) + & BOOST_SERIALIZATION_NVP(homForwardRateConstants) + & BOOST_SERIALIZATION_NVP(homBackwardRateConstants) + & BOOST_SERIALIZATION_NVP(homSurfEquilibriumConstants) + & BOOST_SERIALIZATION_NVP(homSurfForwardRateConstants) + & BOOST_SERIALIZATION_NVP(homSurfBackwardRateConstants) + & BOOST_SERIALIZATION_NVP(hetSurfEquilibriumConstants) + & BOOST_SERIALIZATION_NVP(hetSurfForwardRateConstants) + & BOOST_SERIALIZATION_NVP(hetSurfBackwardRateConstants) + & BOOST_SERIALIZATION_NVP(fixed) + & BOOST_SERIALIZATION_NVP(numRowsDissSpecies) + & BOOST_SERIALIZATION_NVP(numRowsAdsSpecies) + & BOOST_SERIALIZATION_NVP(numRowsSaturation) + & BOOST_SERIALIZATION_NVP(numRowsBvDiss) + & BOOST_SERIALIZATION_NVP(numRowsBvAds) + & BOOST_SERIALIZATION_NVP(numRowsLangmuir) + & BOOST_SERIALIZATION_NVP(numRowsHomPower) + & BOOST_SERIALIZATION_NVP(numRowsHomGen) + & BOOST_SERIALIZATION_NVP(numColsHomGen) + & BOOST_SERIALIZATION_NVP(numRowsHomSurfPower) + & BOOST_SERIALIZATION_NVP(numRowsHomSurfGen) + & BOOST_SERIALIZATION_NVP(numColsHomSurfGen) + & BOOST_SERIALIZATION_NVP(numRowsHetSurfPower) + & BOOST_SERIALIZATION_NVP(numRowsHetSurfGen) + & BOOST_SERIALIZATION_NVP(numColsHetSurfGen) + & BOOST_SERIALIZATION_NVP(genParams) + & BOOST_SERIALIZATION_NVP(genColsParams) + & BOOST_SERIALIZATION_NVP(genParamsCols) + & BOOST_SERIALIZATION_NVP(genParamsValues); + } + }; + // data from solver dialog class SolverConditions *************** *** 283,366 **** ExcitationFunctions::itExcitationFunction itExcitation0; ExcitationFunctions::itExcitationFunction itExcitation1; ! // data from mechanism dialog ! bool chargeBalance; ! bool stoichiometricBalance; ! std::string mechanism; ! std::set<int> activeBoundaries; ! // data from model parameters dialog ! //! temperature ! quantity::ThermodynamicTemperature temp; ! //! electrode area ! quantity::Area area; ! //! map of concentrations ! //! key = species index ! GUI::model::ConcentrationMap dissConcs; ! quantity::Concentration refDissConc; ! int refConcIndex; ! //! map of surface concentrations ! //! key = species index ! GUI::model::SurfaceConcentrationMap adsConcs; ! //! map of surface concentrations ! //! key = boundary index ! GUI::model::SaturationConcentrationMap saturationConcs; ! //! map of diffusion coefficients ! //! key = species index ! GUI::model::DiffusionCoefficientMap diffCoeffs; ! quantity::DiffusionCoefficient refDiffCoeff; ! int maxDiffCoeff; ! //! map of formal potentials. ! //! key = reactions index ! GUI::model::ElectricPotentialMap formalPotentials; ! //! map of ET coefficients (Butler Volmer law) ! //! key = reaction index ! std::map<GUI::model::uint_t,double> alphas; ! //! map of heterogeneous rate constants. ! //! key = reaction index ! GUI::model::HeterogeneousRateConstantMap khs; ! //! map of Langmuir equilibrium constants. ! //! key = reaction index ! GUI::model::LangmuirEquilibriumConstantMap langEquilConstants; ! //! map of Langmuir adsorption rate constants ! //! key = reaction index ! GUI::model::LangmuirAdsorptionRateConstantMap langAdsRateConstants; ! //! map of first order rate constants ! //! key = reaction index ! GUI::model::FirstOrderRateConstantMap firstOrderRateConstants; ! //! key = reaction index ! std::map<GUI::model::uint_t,double> homEquilibriumConstants; ! std::map<GUI::model::uint_t,double> homForwardRateConstants; ! std::map<GUI::model::uint_t,double> homBackwardRateConstants; ! std::map<GUI::model::uint_t,double> homSurfEquilibriumConstants; ! std::map<GUI::model::uint_t,double> homSurfForwardRateConstants; ! std::map<GUI::model::uint_t,double> homSurfBackwardRateConstants; ! std::map<GUI::model::uint_t,double> hetSurfEquilibriumConstants; ! std::map<GUI::model::uint_t,double> hetSurfForwardRateConstants; ! std::map<GUI::model::uint_t,double> hetSurfBackwardRateConstants; ! //! indices of fixed thermodynamic paramters ! std::set<GUI::model::uint_t> fixed; ! unsigned int numRowsDissSpecies; ! unsigned int numRowsAdsSpecies; ! unsigned int numRowsSaturation; ! unsigned int numRowsBvDiss; ! unsigned int numRowsBvAds; ! unsigned int numRowsLangmuir; ! unsigned int numRowsHomPower; ! unsigned int numRowsHomGen; ! unsigned int numColsHomGen; ! unsigned int numRowsHomSurfPower; ! unsigned int numRowsHomSurfGen; ! unsigned int numColsHomSurfGen; ! unsigned int numRowsHetSurfPower; ! unsigned int numRowsHetSurfGen; ! unsigned int numColsHetSurfGen; ! std::map<std::string, std::map<GUI::model::uint_t,std::vector<GUI::model::uint_t> > > genParams; ! //! Key = col in homGenericTable and surfGenericTable (shifted by -1), ! //! value = name of parameter ! std::map<int,std::string> genColsParams; ! //! Key = name of parameter, value = col in homGenericTable and surfGenericTable (shifted by -1) ! std::map<std::string,int> genParamsCols; ! std::map<std::string,double> genParamsValues; ! ! // data from equilibrium dialog double maxTime; --- 460,465 ---- ExcitationFunctions::itExcitationFunction itExcitation0; ExcitationFunctions::itExcitationFunction itExcitation1; ! MechanismConditions mc; ! ModelParameterConditions mpc; // data from equilibrium dialog double maxTime; *************** *** 413,465 **** & BOOST_SERIALIZATION_NVP(itExcitation0) & BOOST_SERIALIZATION_NVP(itExcitation1) ! & BOOST_SERIALIZATION_NVP(chargeBalance) ! & BOOST_SERIALIZATION_NVP(stoichiometricBalance) ! & BOOST_SERIALIZATION_NVP(mechanism) ! & BOOST_SERIALIZATION_NVP(activeBoundaries) ! & BOOST_SERIALIZATION_NVP(temp) ! & BOOST_SERIALIZATION_NVP(area) ! & BOOST_SERIALIZATION_NVP(dissConcs) ! & BOOST_SERIALIZATION_NVP(refDissConc) ! & BOOST_SERIALIZATION_NVP(refConcIndex) ! & BOOST_SERIALIZATION_NVP(adsConcs) ! & BOOST_SERIALIZATION_NVP(saturationConcs) ! & BOOST_SERIALIZATION_NVP(diffCoeffs) ! & BOOST_SERIALIZATION_NVP(refDiffCoeff) ! & BOOST_SERIALIZATION_NVP(maxDiffCoeff) ! & BOOST_SERIALIZATION_NVP(formalPotentials) ! & BOOST_SERIALIZATION_NVP(alphas) ! & BOOST_SERIALIZATION_NVP(khs) ! & BOOST_SERIALIZATION_NVP(langEquilConstants) ! & BOOST_SERIALIZATION_NVP(langAdsRateConstants) ! & BOOST_SERIALIZATION_NVP(firstOrderRateConstants) ! & BOOST_SERIALIZATION_NVP(homEquilibriumConstants) ! & BOOST_SERIALIZATION_NVP(homForwardRateConstants) ! & BOOST_SERIALIZATION_NVP(homBackwardRateConstants) ! & BOOST_SERIALIZATION_NVP(homSurfEquilibriumConstants) ! & BOOST_SERIALIZATION_NVP(homSurfForwardRateConstants) ! & BOOST_SERIALIZATION_NVP(homSurfBackwardRateConstants) ! & BOOST_SERIALIZATION_NVP(hetSurfEquilibriumConstants) ! & BOOST_SERIALIZATION_NVP(hetSurfForwardRateConstants) ! & BOOST_SERIALIZATION_NVP(hetSurfBackwardRateConstants) ! & BOOST_SERIALIZATION_NVP(fixed) ! & BOOST_SERIALIZATION_NVP(numRowsDissSpecies) ! & BOOST_SERIALIZATION_NVP(numRowsAdsSpecies) ! & BOOST_SERIALIZATION_NVP(numRowsSaturation) ! & BOOST_SERIALIZATION_NVP(numRowsBvDiss) ! & BOOST_SERIALIZATION_NVP(numRowsBvAds) ! & BOOST_SERIALIZATION_NVP(numRowsLangmuir) ! & BOOST_SERIALIZATION_NVP(numRowsHomPower) ! & BOOST_SERIALIZATION_NVP(numRowsHomGen) ! & BOOST_SERIALIZATION_NVP(numColsHomGen) ! & BOOST_SERIALIZATION_NVP(numRowsHomSurfPower) ! & BOOST_SERIALIZATION_NVP(numRowsHomSurfGen) ! & BOOST_SERIALIZATION_NVP(numColsHomSurfGen) ! & BOOST_SERIALIZATION_NVP(numRowsHetSurfPower) ! & BOOST_SERIALIZATION_NVP(numRowsHetSurfGen) ! & BOOST_SERIALIZATION_NVP(numColsHetSurfGen) ! & BOOST_SERIALIZATION_NVP(genParams) ! & BOOST_SERIALIZATION_NVP(genColsParams) ! & BOOST_SERIALIZATION_NVP(genParamsCols) ! & BOOST_SERIALIZATION_NVP(genParamsValues) & BOOST_SERIALIZATION_NVP(maxTime) & BOOST_SERIALIZATION_NVP(accuracy) --- 512,517 ---- & BOOST_SERIALIZATION_NVP(itExcitation0) & BOOST_SERIALIZATION_NVP(itExcitation1) ! & BOOST_SERIALIZATION_NVP(mc) ! & BOOST_SERIALIZATION_NVP(mpc) & BOOST_SERIALIZATION_NVP(maxTime) & BOOST_SERIALIZATION_NVP(accuracy) Index: Makefile.am =================================================================== RCS file: /cvsroot/echempp/Experiment/Data/Makefile.am,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Makefile.am 19 Dec 2007 13:24:54 -0000 1.11 --- Makefile.am 22 Dec 2007 15:47:38 -0000 1.12 *************** *** 13,27 **** -I$(BSUTILITIESSRC) ! libeppData_la_SOURCES = data.hpp \ ! data.cpp \ ! Data.hpp \ ! Data.cpp \ ! dataError.hpp\ ! generalData.hpp\ ! electrochemicalData.hpp\ ! stateData.hpp ! libeppData_la_CXXFLAGS = -Wall -Werror -pedantic-errors\ ! -DTIXML_USE_STL=YES libeppData_la_LDFLAGS = -version-info 0:0:0 --- 13,20 ---- -I$(BSUTILITIESSRC) ! libeppData_la_SOURCES = Data.hpp \ ! Data.cpp ! libeppData_la_CXXFLAGS = -Wall -Werror -pedantic-errors libeppData_la_LDFLAGS = -version-info 0:0:0 |