echempp-devel Mailing List for EChem++ (Page 3)
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-03-27 13:24:46
|
Update of /cvsroot/echempp/Experiment/Data In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv16598/Experiment/Data Removed Files: data.cpp data.hpp dataError.hpp electrochemicalData.hpp generalData.hpp stateData.hpp Log Message: Removed old files in Experiment/Data. --- data.hpp DELETED --- --- data.cpp DELETED --- --- dataError.hpp DELETED --- --- electrochemicalData.hpp DELETED --- --- stateData.hpp DELETED --- --- generalData.hpp DELETED --- |
|
From: beeblbrox <bee...@us...> - 2008-03-27 13:23:06
|
Update of /cvsroot/echempp/Experiment/InputFilters/test In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv15775/Experiment/InputFilters/test Modified Files: inputFiltersTest.cpp Removed Files: BAS100B_CV.txt Log Message: Input filters test files. Index: inputFiltersTest.cpp =================================================================== RCS file: /cvsroot/echempp/Experiment/InputFilters/test/inputFiltersTest.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** inputFiltersTest.cpp 8 Jun 2006 21:44:37 -0000 1.8 --- inputFiltersTest.cpp 27 Mar 2008 13:22:58 -0000 1.9 *************** *** 1,118 **** ! /*! \file inputFiltersTest.cpp ! \brief a test file for InputFilter classes ! ! inputFiltersTest.cpp is part of InputFilters in Experiment ! */ ! ! /* Copyright (C) 2006, Bernd Speiser */ ! /* 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 "InputFilters/inputFilters.hpp" ! #include "InputFilters/BAS100BinputFilters.hpp" ! #include "Data/data.hpp" ! #include "Data/electrochemicalData.hpp" ! #include <iostream> ! using namespace BSUtilities; ! using namespace inputFilters; ! int main(int argc, const char* argv[]) { ! if (argc > 1) ! { ! if (!strcmp (argv[1], "--version")) { ! std::cout << "InputFilters Test program, " ! << Filter::version () << std::endl; ! exit (0); } ! else { ! std::cout << " usage: InputFiltersTest [--version] " ! << std::endl << " --version: print the InputFilters " ! "version number" ! << std::endl; ! exit (1); } ! } ! ! std::cout << "InputFilter Test program" << std::endl; ! ! std::cout << "=========================================" << std::endl; ! ! std::cout << " testing input from a BAS100B CV data file" ! << std::endl; ! std::string filename ("BAS100B_CV.txt"); ! ! std::cout << " test file name: `" << filename << "'" << std::endl; ! inputFilters::BAS100B<Experiments::CV::RealTT> BAS_CVData; ! std::vector<data::CV::Real> BAS100B_CV_data = ! BAS_CVData.read (filename); ! std::cout << " read " << BAS100B_CV_data.size () << " data sets" ! << std::endl; ! for (unsigned int i = 0; i < BAS100B_CV_data.size (); i++) ! { ! std::cout << " size of set " << i << ": " ! << BAS100B_CV_data[i].size() << std::endl; ! if (BAS100B_CV_data[i].size() >= 10) { ! std::cout << " print first 10 data points:" << std::endl; ! ! for (unsigned int j = 0; j < 10; j++) ! { ! std::cout << " datapoint " << j ! << ": time = " << BAS100B_CV_data[i].getIndependentValue (j) ! << " potential = " ! << BAS100B_CV_data[i].getDependentValue (j) ! << " current = " << BAS100B_CV_data[i].getResponseValue (j) ! << std::endl; ! } } ! } ! ! std::cout << std::endl; ! ! try { ! filename = "unknown.txt"; ! std::cout << " testing incorrect file name: `" ! << filename << "'" << std::endl; ! inputFilters::BAS100B<Experiments::CV::RealTT> BAS_CVDatatest; ! std::vector<data::CV::Real> BAS100B_CV_datatest = ! BAS_CVData.read (filename); ! } ! catch (FileError error) ! { ! std::cout << " caught expected " ! "InputFilters::FileError" ! " exception!!" << std::endl << ! " " << error.message () << std::endl;; - } ! std::cout << std::endl; ! std::cout << "=========================================" << std::endl; ! std::cout << "end of test program for InputFilter classes" ! << std::endl; ! exit (0); } --- 1,92 ---- ! #include <iostream> ! #include <fstream> ! // Boost includes ! #include <boost/test/unit_test.hpp> ! using namespace boost::unit_test; ! #include <boost/archive/tmpdir.hpp> ! #include <boost/tuple/tuple.hpp> ! // Local includes ! #include "../InputFilters.hpp" ! void dump_bas_cond_data(experiment::Experiment* ep) ! { ! experiment::ConditionDataBAS* cd = ! dynamic_cast<experiment::ConditionDataBAS*>(ep->get_cond_data()); ! std::cout << "cd->date = " << cd->date << std::endl; ! std::cout << "cd->time = " << cd->time << std::endl; ! std::cout << "cd->label = " << cd->label << std::endl; ! std::cout << "cd->initE = " << cd->initE << std::endl; ! std::cout << "cd->highE = " << cd->highE << std::endl; ! std::cout << "cd->lowE = " << cd->lowE << std::endl; ! std::cout << "cd->finalE = " << cd->finalE << std::endl; ! std::cout << "cd->pn = " << cd->pn << std::endl; ! std::cout << "cd->v = " << cd->v << std::endl; ! std::cout << "cd->num_segments = " << cd->num_segments << std::endl; ! std::cout << "cd->sample_interval = " << cd->sample_interval << std::endl; ! std::cout << "cd->num_steps = " << cd->num_steps << std::endl; ! std::cout << "cd->R = " << cd->R << std::endl; ! std::cout << "cd->pulse_width = " << cd->pulse_width << std::endl; ! std::cout << "cd->quiet_time = " << cd->quiet_time << std::endl; ! std::cout << "cd->sensitivity = " << cd->sensitivity << std::endl; ! } ! void test_read_bas() { ! experiment::InputFilters ipf; ! experiment::Experiment* ep = ipf.read("examples/m03v01c.txt"); ! std::cout << "ep = " << ep << std::endl; ! experiment::MeasurementDataBase* md = ! dynamic_cast<experiment::MeasurementDataBase*>(ep->get_meas_data()); ! for(unsigned int i=0; i<md->size_i(); ++i) { ! boost::tuple<double,double,double> p = md->get_values(i); ! std::cout << p.get<0>() << " " << p.get<1>() << " " << p.get<2>() << std::endl; } + dump_bas_cond_data(ep); ! ep = ipf.read("examples/bas_ca.txt"); ! std::cout << "ep = " << ep << std::endl; ! md = dynamic_cast<experiment::MeasurementDataBase*>(ep->get_meas_data()); ! for(unsigned int i=0; i<md->size_i(); ++i) { ! boost::tuple<double,double,double> p = md->get_values(i); ! std::cout << p.get<0>() << " " << p.get<1>() << " " << p.get<2>() << std::endl; } ! dump_bas_cond_data(ep); ! ep = ipf.read("examples/dif003.txt"); ! std::cout << "ep = " << ep << std::endl; ! md = dynamic_cast<experiment::MeasurementDataBase*>(ep->get_meas_data()); ! for(unsigned int i=0; i<md->size_i(); ++i) { ! boost::tuple<double,double,double> p = md->get_values(i); ! std::cout << p.get<0>() << " " << p.get<1>() << " " << p.get<2>() << std::endl; } ! dump_bas_cond_data(ep); ! ! } ! void test_read_ascii() ! { ! experiment::InputFilters ipf; ! experiment::Experiment* ep = ipf.read("examples/ascii.txt"); ! std::cout << "ep = " << ep << std::endl; ! experiment::MeasurementDataBase* md = dynamic_cast<experiment::MeasurementDataBase*>(ep->get_meas_data()); ! for(unsigned int i=0; i<md->size_i(); ++i) ! { ! boost::tuple<double,double,double> p = md->get_values(i); ! std::cout << p.get<0>() << " " << p.get<1>() << " " << p.get<2>() << std::endl; ! } ! } + test_suite* + init_unit_test_suite( int argc, char * argv[] ) { + test_suite* test= BOOST_TEST_SUITE( "Input filters unit test" ); + test->add(BOOST_TEST_CASE( &test_read_bas ) ); + test->add(BOOST_TEST_CASE( &test_read_ascii ) ); + return test; } --- BAS100B_CV.txt DELETED --- |
|
From: beeblbrox <bee...@us...> - 2008-03-27 13:23:06
|
Update of /cvsroot/echempp/Experiment/InputFilters/test/examples In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv15775/Experiment/InputFilters/test/examples Added Files: ascii.txt bas_ca.txt dif003.txt m02v005c.txt m03v01c.txt m04v02c.txt Log Message: Input filters test files. --- NEW FILE: bas_ca.txt --- Date: 13-Jun-95 Time: 17:28:33 Label: Chronoamperometry Exp. Conditions: Init E (mV) = -1000 High E (mV) = 300 Low E (mV) = -1000 Init P/N = P Pulse Width (msec) = 100 Number of Steps = 2 Quiet Time (sec) = 20 Sensitivity (A/V) = 1E-4 2 Sets of Data Number of Data Points for Each Set = 1000 ## Time (msec), Current (A) [...1988 lines suppressed...] 198.30, +4.534e-006 198.40, +4.604e-006 198.50, +4.604e-006 198.60, +4.604e-006 198.70, +4.953e-006 198.80, +5.232e-006 198.90, +4.883e-006 199.00, +4.953e-006 199.10, +4.953e-006 199.20, +4.674e-006 199.30, +4.674e-006 199.40, +4.743e-006 199.50, +4.464e-006 199.60, +4.534e-006 199.70, +4.185e-006 199.80, +3.906e-006 199.90, +3.292e-006 200.00, +1.423e-006 * ** --- NEW FILE: m02v005c.txt --- Date: 06-Feb-98 Time: 20:49:52 Label: a4/py/GCE Cyclic Voltammetry Exp. Conditions: Init E (mV) = -1950 High E (mV) = -1950 Low E (mV) = -2500 Init P/N = N V (mV/sec) = 50 Number of Segments = 2 Sample Interval (mV) = 1 Quiet Time (sec) = 10 R (ohm) = 2310 Sensitivity (A/V) = 1E-6 2 Sets of Data Total Number of Data Points = 1100 [...1094 lines suppressed...] -2143.0, -1.481e-006 -2142.0, -1.473e-006 -2141.0, -1.465e-006 -2140.0, -1.456e-006 -2139.0, -1.447e-006 -2138.0, -1.438e-006 -2137.0, -1.428e-006 -2136.0, -1.418e-006 -2135.0, -1.409e-006 -2134.0, -1.399e-006 -2133.0, -1.390e-006 -2132.0, -1.382e-006 -2131.0, -1.374e-006 -2130.0, -1.368e-006 -2129.0, -1.363e-006 -2128.0, -1.359e-006 -2127.0, -1.357e-006 -2126.0, -1.357e-006 * ** --- NEW FILE: ascii.txt --- ModSim ASCII export s V A 0, 0, 2.91532e-10 1e-10, 1e-10, 2.91195e-10 2.5e-10, 2.5e-10, 2.90691e-10 4.75e-10, 4.75e-10, 2.89936e-10 8.125e-10, 8.125e-10, 2.88807e-10 1.31875e-09, 1.31875e-09, 2.87122e-10 2.07812e-09, 2.07812e-09, 2.84613e-10 3.21719e-09, 3.21719e-09, 2.8089e-10 4.92578e-09, 4.92578e-09, 2.75397e-10 7.48867e-09, 7.48867e-09, 2.67359e-10 1.1333e-08, 1.1333e-08, 2.5574e-10 1.70995e-08, 1.70995e-08, 2.39252e-10 2.57493e-08, 2.57493e-08, 2.16493e-10 3.87239e-08, 3.87239e-08, 1.8635e-10 5.81859e-08, 5.81859e-08, 1.4881e-10 8.73788e-08, 8.73788e-08, 1.06153e-10 1.31168e-07, 1.31168e-07, 6.38356e-11 1.96852e-07, 1.96852e-07, 2.95139e-11 2.95378e-07, 2.95378e-07, 8.95186e-12 4.43168e-07, 4.43168e-07, 1.34442e-12 6.64851e-07, 6.64851e-07, 2.59013e-13 9.97377e-07, 9.97377e-07, 3.29001e-13 1.49617e-06, 1.49617e-06, 3.11089e-13 2.24435e-06, 2.24435e-06, 3.16134e-13 3.36662e-06, 3.36662e-06, 3.10929e-13 5.05003e-06, 5.05003e-06, 3.09607e-13 7.57515e-06, 7.57515e-06, 3.04027e-13 1.13628e-05, 1.13628e-05, 2.98222e-13 1.70443e-05, 1.70443e-05, 2.88502e-13 2.55666e-05, 2.55666e-05, 2.76056e-13 3.835e-05, 3.835e-05, 2.58827e-13 5.75251e-05, 5.75251e-05, 2.37612e-13 8.62878e-05, 8.62878e-05, 2.12557e-13 0.000129432, 0.000129432, 1.86277e-13 0.000194148, 0.000194148, 1.61151e-13 0.000291222, 0.000291222, 1.39152e-13 0.000436833, 0.000436833, 1.19751e-13 0.000655249, 0.000655249, 1.02176e-13 0.000982874, 0.000982874, 8.69531e-14 0.00147431, 0.00147431, 7.4991e-14 0.00221147, 0.00221147, 6.56727e-14 0.0033172, 0.0033172, 5.85573e-14 0.0049758, 0.0049758, 5.41574e-14 0.0074637, 0.0074637, 5.29447e-14 0.0111955, 0.0111955, 5.52824e-14 0.0167933, 0.0167933, 6.3165e-14 0.02519, 0.02519, 8.16437e-14 0.037785, 0.037785, 1.23845e-13 0.0566775, 0.0566775, 2.32989e-13 0.0850162, 0.0850162, 5.91887e-13 0.127524, 0.127524, 2.30818e-12 0.191286, 0.191286, 1.69178e-11 0.28693, 0.28693, 3.24563e-10 0.314767, 0.314767, 8.47253e-09 0.318565, 0.318565, 9.95501e-09 0.319577, 0.319577, 8.82364e-09 0.32044, 0.32044, 1.05099e-08 0.321736, 0.321736, 9.63243e-09 0.323679, 0.323679, 1.12483e-08 0.326593, 0.326593, 1.15878e-08 0.330477, 0.330477, 1.38753e-08 0.335018, 0.335018, 1.59004e-08 0.339862, 0.339862, 1.93649e-08 0.34471, 0.34471, 2.29449e-08 0.349175, 0.349175, 2.73558e-08 0.353048, 0.353048, 3.14614e-08 0.356355, 0.356355, 3.56457e-08 0.359262, 0.359262, 3.95361e-08 0.361949, 0.361949, 4.36283e-08 0.364559, 0.364559, 4.78852e-08 0.36717, 0.36717, 5.26421e-08 0.3698, 0.3698, 5.78489e-08 0.372424, 0.372424, 6.35965e-08 0.375002, 0.375002, 6.97479e-08 0.377506, 0.377506, 7.62841e-08 0.379928, 0.379928, 8.31332e-08 0.382279, 0.382279, 9.03469e-08 0.384582, 0.384582, 9.79697e-08 0.386857, 0.386857, 1.06101e-07 0.389118, 0.389118, 1.1481e-07 0.391371, 0.391371, 1.24164e-07 0.393619, 0.393619, 1.342e-07 0.395857, 0.395857, 1.44953e-07 0.398087, 0.398087, 1.56455e-07 0.400309, 0.400309, 1.68752e-07 0.402525, 0.402525, 1.81905e-07 0.40474, 0.40474, 1.95992e-07 0.406958, 0.406958, 2.11096e-07 0.40918, 0.40918, 2.27288e-07 0.411406, 0.411406, 2.44638e-07 0.413638, 0.413638, 2.63233e-07 0.415877, 0.415877, 2.83119e-07 0.418127, 0.418127, 3.04058e-07 0.420388, 0.420388, 3.2644e-07 0.422663, 0.422663, 3.50827e-07 0.424955, 0.424955, 3.7707e-07 0.427265, 0.427265, 4.05266e-07 0.429595, 0.429595, 4.34877e-07 0.431947, 0.431947, 4.65911e-07 0.434324, 0.434324, 5.007e-07 0.436727, 0.436727, 5.38231e-07 0.43916, 0.43916, 5.76283e-07 0.441624, 0.441624, 6.16647e-07 0.444123, 0.444123, 6.62079e-07 0.44666, 0.44666, 7.12786e-07 0.449235, 0.449235, 7.67281e-07 0.451851, 0.451851, 8.26147e-07 0.45451, 0.45451, 8.89828e-07 0.457215, 0.457215, 9.58521e-07 0.459967, 0.459967, 1.03235e-06 0.46277, 0.46277, 1.11156e-06 0.465626, 0.465626, 1.1965e-06 0.46854, 0.46854, 1.28754e-06 0.471514, 0.471514, 1.38517e-06 0.474551, 0.474551, 1.48855e-06 0.477656, 0.477656, 1.60094e-06 0.480831, 0.480831, 1.72001e-06 0.484083, 0.484083, 1.84676e-06 0.487416, 0.487416, 1.98084e-06 0.490836, 0.490836, 2.12318e-06 0.49435, 0.49435, 2.27401e-06 0.497964, 0.497964, 2.43211e-06 0.501686, 0.498314, 2.28803e-06 0.5065, 0.4935, 1.71827e-06 0.508838, 0.491162, 1.50774e-06 0.510898, 0.489102, 1.33364e-06 0.513541, 0.486459, 1.13017e-06 0.516763, 0.483237, 9.03838e-07 0.520332, 0.479668, 6.79902e-07 0.52408, 0.47592, 4.69117e-07 0.5279, 0.4721, 2.78212e-07 0.531726, 0.468274, 1.08241e-07 0.535485, 0.464515, -3.8928e-08 0.539133, 0.460867, -1.6454e-07 0.54266, 0.45734, -2.70566e-07 0.546082, 0.453918, -3.59995e-07 0.549419, 0.450581, -4.35049e-07 0.552688, 0.447312, -4.97707e-07 0.555896, 0.444104, -5.49285e-07 0.559043, 0.440957, -5.89656e-07 0.562123, 0.437877, -6.20972e-07 0.565137, 0.434863, -6.47357e-07 0.568089, 0.431911, -6.65617e-07 0.570985, 0.429015, -6.78699e-07 0.573828, 0.426172, -6.86951e-07 0.576624, 0.423376, -6.90713e-07 0.579375, 0.420625, -6.91177e-07 0.582083, 0.417917, -6.88368e-07 0.58475, 0.41525, -6.83207e-07 0.58738, 0.41262, -6.75815e-07 0.589975, 0.410025, -6.66785e-07 0.592538, 0.407462, -6.56196e-07 0.595075, 0.404925, -6.44433e-07 0.597588, 0.402412, -6.31605e-07 0.600077, 0.399923, -6.18153e-07 0.602546, 0.397454, -6.02094e-07 0.604994, 0.395006, -5.8289e-07 0.607425, 0.392575, -5.63691e-07 0.609841, 0.390159, -5.45115e-07 0.612246, 0.387754, -5.26944e-07 0.614645, 0.385355, -5.09424e-07 0.617042, 0.382958, -4.95051e-07 0.61944, 0.38056, -4.82115e-07 0.621843, 0.378157, -4.66112e-07 0.624249, 0.375751, -4.52397e-07 0.626663, 0.373337, -4.40253e-07 0.629085, 0.370915, -4.25123e-07 0.63152, 0.36848, -4.10192e-07 0.633972, 0.366028, -3.98046e-07 0.636444, 0.363556, -3.87632e-07 0.638942, 0.361058, -3.76769e-07 0.641471, 0.358529, -3.66257e-07 0.644037, 0.355963, -3.55846e-07 0.646646, 0.353354, -3.45463e-07 0.649305, 0.350695, -3.35279e-07 0.652021, 0.347979, -3.25118e-07 0.654804, 0.345196, -3.1513e-07 0.657663, 0.342337, -3.05193e-07 0.66061, 0.33939, -2.95386e-07 0.663658, 0.336342, -2.85603e-07 0.666823, 0.333177, -2.75871e-07 0.670122, 0.329878, -2.6619e-07 0.673578, 0.326422, -2.56545e-07 0.677215, 0.322785, -2.46884e-07 0.681065, 0.318935, -2.3721e-07 0.685166, 0.314834, -2.27505e-07 0.689564, 0.310436, -2.17752e-07 0.694321, 0.305679, -2.07917e-07 0.699512, 0.300488, -1.97969e-07 0.705237, 0.294763, -1.87862e-07 0.71163, 0.28837, -1.77546e-07 0.718874, 0.281126, -1.66956e-07 0.727223, 0.272777, -1.56016e-07 0.73705, 0.26295, -1.4463e-07 0.748913, 0.251087, -1.32677e-07 0.763692, 0.236308, -1.1995e-07 0.782849, 0.217151, -1.06173e-07 0.808967, 0.191033, -9.13938e-08 0.846919, 0.153081, -7.56129e-08 0.903847, 0.0961525, -5.92965e-08 0.98924, 0.0107603, -4.36705e-08 1, 0, -4.21013e-08 --- NEW FILE: m04v02c.txt --- Date: 06-Feb-98 Time: 21:00:39 Label: a4/py/GCE Cyclic Voltammetry Exp. Conditions: Init E (mV) = -1950 High E (mV) = -1950 Low E (mV) = -2500 Init P/N = N V (mV/sec) = 200 Number of Segments = 2 Sample Interval (mV) = 1 Quiet Time (sec) = 10 R (ohm) = 2310 Sensitivity (A/V) = 1E-5 2 Sets of Data Total Number of Data Points = 1100 [...1094 lines suppressed...] -2143.0, -3.096e-006 -2142.0, -3.079e-006 -2141.0, -3.061e-006 -2140.0, -3.042e-006 -2139.0, -3.022e-006 -2138.0, -3.002e-006 -2137.0, -2.981e-006 -2136.0, -2.960e-006 -2135.0, -2.939e-006 -2134.0, -2.918e-006 -2133.0, -2.898e-006 -2132.0, -2.879e-006 -2131.0, -2.862e-006 -2130.0, -2.848e-006 -2129.0, -2.836e-006 -2128.0, -2.827e-006 -2127.0, -2.822e-006 -2126.0, -2.821e-006 * ** --- NEW FILE: dif003.txt --- Date: 09-Nov-95 Time: 17:37:00 Label: Chronocoulometry Exp. Conditions: Init E (mV) = -1200 Final E (mV) = 1100 Pulse Width (msec) = 1000 Number of Steps = 2 Quiet Time (sec) = 10 Sensitivity (C/V) = 1E-5 2 Sets of Data Number of Data Points for Each Set = 1000 ## Time (msec), Charge(C) Forward Step [...1986 lines suppressed...] 1983, +2.713e-006 1984, +2.706e-006 1985, +2.706e-006 1986, +2.706e-006 1987, +2.713e-006 1988, +2.713e-006 1989, +2.720e-006 1990, +2.720e-006 1991, +2.727e-006 1992, +2.720e-006 1993, +2.713e-006 1994, +2.713e-006 1995, +2.713e-006 1996, +2.706e-006 1997, +2.699e-006 1998, +2.705e-006 1999, +2.711e-006 2000, +2.674e-006 * ** --- NEW FILE: m03v01c.txt --- Date: 06-Feb-98 Time: 20:55:18 Label: a4/py/GCE Cyclic Voltammetry Exp. Conditions: Init E (mV) = -1950 High E (mV) = -1950 Low E (mV) = -2500 Init P/N = N V (mV/sec) = 100 Number of Segments = 2 Sample Interval (mV) = 1 Quiet Time (sec) = 10 R (ohm) = 2310 Sensitivity (A/V) = 1E-6 2 Sets of Data Total Number of Data Points = 1100 [...1094 lines suppressed...] -2143.0, -2.160e-006 -2142.0, -2.148e-006 -2141.0, -2.136e-006 -2140.0, -2.123e-006 -2139.0, -2.110e-006 -2138.0, -2.097e-006 -2137.0, -2.084e-006 -2136.0, -2.071e-006 -2135.0, -2.057e-006 -2134.0, -2.044e-006 -2133.0, -2.032e-006 -2132.0, -2.020e-006 -2131.0, -2.010e-006 -2130.0, -2.001e-006 -2129.0, -1.994e-006 -2128.0, -1.989e-006 -2127.0, -1.986e-006 -2126.0, -1.985e-006 * ** |
|
From: beeblbrox <bee...@us...> - 2008-03-27 13:21:34
|
Update of /cvsroot/echempp/Experiment/InputFilters/test/examples In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv15344/Experiment/InputFilters/test/examples Log Message: Directory /cvsroot/echempp/Experiment/InputFilters/test/examples added to the repository |
|
From: beeblbrox <bee...@us...> - 2008-03-27 13:20:57
|
Update of /cvsroot/echempp/Experiment/InputFilters/documentation In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv14930/Experiment/InputFilters/documentation Modified Files: Notes.log mainpage.txt Log Message: Updated docs for input filters. Index: mainpage.txt =================================================================== RCS file: /cvsroot/echempp/Experiment/InputFilters/documentation/mainpage.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mainpage.txt 5 Jun 2006 10:05:12 -0000 1.1 --- mainpage.txt 27 Mar 2008 13:20:47 -0000 1.2 *************** *** 1,5 **** /*! \mainpage Documentation of InputFilters - InputFilter Object Library ! \author Bernd Speiser \section Introduction --- 1,5 ---- /*! \mainpage Documentation of InputFilters - InputFilter Object Library ! \author Bernd Speiser, Dominik Brugger \section Introduction *************** *** 11,13 **** --- 11,45 ---- electrochemistry. + InputFilters are intended for importing data written by other devices or programs + into ModSim. So far the imported data will be used for visualization only. + + The InputFilter framework is structured as follows: there is the abstract + base class InputFilter with two functions "is_valid_file" and "read" which + have to be implemented by all Filters. The "is_valid_file" function is used + to determine whether a given text file can be read by the corresponding filter, + where the actual reading is to be implemented in "read". + + To ease the use of different filters there is the class InputFilters which manages + all input filters for the user. Developers of new filters should "register" their + filters by changing InputFilters constructor. + + The input filter framework can be used as indicated by the following code snippet: + + <pre> + //// Create InputFilters object + experiment::InputFilters ipf; + //// Read from a text file, with the matching filter determined automatically + try + { + experiment::Experiment* ep = ipf->read("myfile.txt") + } + catch(std::exception& e) + { + //// InputFilters will throw an exception when no matching filter + //// is found or other errors occurr. + std::cerr << "Error: " << e.what() << std::endl; + } + </pre> + + */ Index: Notes.log =================================================================== RCS file: /cvsroot/echempp/Experiment/InputFilters/documentation/Notes.log,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Notes.log 7 Jun 2006 13:43:20 -0000 1.3 --- Notes.log 27 Mar 2008 13:20:47 -0000 1.4 *************** *** 1,2 **** --- 1,6 ---- + 27.03.2008 + New framework for InputFilters with example implementations for reading BAS + files with CV, CA, CC measurements and ASCII export files as written by ModSim. + 05.06.2006 |
|
From: beeblbrox <bee...@us...> - 2008-03-27 13:19:10
|
Update of /cvsroot/echempp/Experiment/InputFilters In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv14055/Experiment/InputFilters Added Files: InputFilters.cpp InputFilters.hpp util.hpp Log Message: New input filter framework. --- NEW FILE: InputFilters.cpp --- /*! \file InputFilters.hpp \brief implementation file input filters. InputFilters.cpp is part of the Experiment package. */ /* Copyright (C) 2008, 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 "InputFilters.hpp" namespace experiment{ // InputFilter implementation void InputFilter::remove_whitespace(std::istream& is) { char c; do { is.get(c); } while(isspace(c)); is.unget(); } std::string InputFilter::get_between(const std::string& s, const std::string& s1, const std::string& s2) { size_t idx1 = s.find_first_of(s1); size_t idx2 = s.find_first_of(s2); return s.substr(idx1+1, idx2-idx1-1); } // InputFilterBAS implementation bool InputFilterBAS::is_valid_file(std::istream& is) { std::string date, time, label, type; read_header(is, date, time, label, type); if(date.find("Date:") == std::string::npos || time.find("Time:") == std::string::npos || label.find("Label:") == std::string::npos) return false; if(type.find("Cyclic Voltammetry") == std::string::npos && type.find("Chronocoulometry") == std::string::npos && type.find("Chronoamperometry") == std::string::npos) return false; return true; } Experiment* InputFilterBAS::read(std::istream& is) { std::string date, time, label, type; read_header(is, date, time, label, type); if(type.find("Cyclic Voltammetry") != std::string::npos) return read_cv(is, date, time, label); if(type.find("Chronoamperometry") != std::string::npos) return read_ca(is, date, time, label); if(type.find("Chronocoulometry") != std::string::npos) return read_cc(is, date, time, label); return NULL; } Experiment* InputFilterBAS::read_cv(std::istream& is, const std::string& date, const std::string& time, const std::string& label) { experiment::Experiment* ep = new experiment::cv::RealInduced(new experiment::ConditionDataBAS(), new experiment::MeasurementDataCV()); experiment::MeasurementDataCV* md = dynamic_cast<experiment::MeasurementDataCV*>(ep->get_meas_data()); experiment::ConditionDataBAS* cd = dynamic_cast<experiment::ConditionDataBAS*>(ep->get_cond_data()); cd->date = date; cd->time = time; cd->label = label; cd->initE = read_init_potential(is); cd->highE = read_high_potential(is); cd->lowE = read_low_potential(is); cd->pn = read_pn(is); cd->v = read_scan_rate(is); cd->num_segments = read_num_segments(is); cd->sample_interval = read_sample_interval(is); cd->quiet_time = read_quiet_time(is); cd->R = read_resistance(is); cd->sensitivity = read_sensitivity(is); quantity::Time tstep = cd->sample_interval / cd->v; unsigned int num_datasets = read_num_datasets(is); std::string unit1, unit2; read_units(is, unit1, unit2); unsigned int num_datapoints = 0; std::vector<double> x, y; quantity::Time t; t = "0 s"; for(unsigned int i=0; i < num_datasets; ++i) { num_datapoints = read_num_datapoints(is); read_dataset(is, num_datapoints, x, y); for(unsigned int j=0; j < num_datapoints; ++j) { md->push_back(t, value2potential(x[j],unit1), value2current(y[j],unit2)); t += tstep; } } return ep; } Experiment* InputFilterBAS::read_ca(std::istream& is, const std::string& date, const std::string& time, const std::string& label) { experiment::Experiment* ep = new experiment::ca::RealInduced(new experiment::ConditionDataBAS(), new experiment::MeasurementDataCA()); experiment::MeasurementDataCA* md = dynamic_cast<experiment::MeasurementDataCA*>(ep->get_meas_data()); experiment::ConditionDataBAS* cd = dynamic_cast<experiment::ConditionDataBAS*>(ep->get_cond_data()); cd->date = date; cd->time = time; cd->label = label; cd->initE = read_init_potential(is); cd->highE = read_high_potential(is); cd->lowE = read_low_potential(is); cd->pn = read_pn(is); cd->pulse_width = read_pulse_width(is); cd->num_steps = read_num_steps(is); cd->quiet_time = read_quiet_time(is); cd->sensitivity = read_sensitivity(is); std::string unit1, unit2; unsigned int num_datasets = read_num_datasets(is); unsigned int num_datapoints = read_num_datapoints(is); read_units(is, unit1, unit2); std::vector<double> x, y; for(unsigned int i=0; i < num_datasets; ++i) { read_dataset(is, num_datapoints, x, y); for(unsigned int j=0; j < num_datapoints; ++j) { if(i % 2 == 0) md->push_back(value2time(x[j],unit1), cd->initE, value2current(y[j],unit2)); else md->push_back(value2time(x[j],unit1), cd->highE, value2current(y[j],unit2)); } } return ep; } //! Read content of CC measurement file. Experiment* InputFilterBAS::read_cc(std::istream& is, const std::string& date, const std::string& time, const std::string& label) { experiment::Experiment* ep = new experiment::cc::RealInduced(new experiment::ConditionDataBAS(), new experiment::MeasurementDataCC()); experiment::MeasurementDataCC* md = dynamic_cast<experiment::MeasurementDataCC*>(ep->get_meas_data()); experiment::ConditionDataBAS* cd = dynamic_cast<experiment::ConditionDataBAS*>(ep->get_cond_data()); cd->date = date; cd->time = time; cd->label = label; cd->initE = read_init_potential(is); cd->finalE = read_final_potential(is); cd->pulse_width = read_pulse_width(is); cd->num_steps = read_num_steps(is); cd->quiet_time = read_quiet_time(is); cd->sensitivity = read_sensitivity(is); std::string unit1, unit2; unsigned int num_datasets = read_num_datasets(is); unsigned int num_datapoints = read_num_datapoints(is); read_units(is, unit1, unit2); std::vector<double> x, y; quantity::Time xj; quantity::ElectricPotential pot; quantity::ElectricCharge yj; for(unsigned int i=0; i < num_datasets; ++i) { read_dataset(is, num_datapoints, x, y); for(unsigned int j=0; j < num_datapoints; ++j) { if(i % 2 == 0) md->push_back(value2time(x[j], unit1), cd->initE, value2charge(y[j], unit2)); else md->push_back(value2time(x[j], unit1), cd->finalE, value2charge(y[j], unit2)); } } return ep; } //! Read one dataset, e.g. two columns of data placed in x, y with num_datapoints //! each. void InputFilterBAS::read_dataset(std::istream& is, const unsigned int num_datapoints, std::vector<double>& x, std::vector<double>& y) { std::string line; x.resize(num_datapoints); y.resize(num_datapoints); std::string xi, yi; while(std::getline(is,line)) { // find start of next dataset if(line.find("#") != std::string::npos) { for(unsigned int i=0; i<num_datapoints; ++i) { std::getline(is,line); split_at(line, ",", xi, yi); str2value(xi, x[i]); str2value(yi, y[i]); } break; } } } //! Read unit and value from the line designated by string key void InputFilterBAS::read_unit_value(std::istream& is, const std::string& key, std::string& unit, std::string& value) { std::string line; while(std::getline(is,line)) { if(line.find(key) != std::string::npos) { std::string name; split_at(line, "=", name, value); unit = get_between(name, "(", ")"); break; } } } quantity::ElectricPotential InputFilterBAS::read_init_potential(std::istream& is) { std::string key = "Init E"; std::string unit, value; read_unit_value(is, key, unit, value); return str2potential(value, unit); } quantity::ElectricPotential InputFilterBAS::read_high_potential(std::istream& is) { std::string key = "High E"; std::string unit, value; read_unit_value(is, key, unit, value); return str2potential(value, unit); } quantity::ElectricPotential InputFilterBAS::read_low_potential(std::istream& is) { std::string key = "Low E"; std::string unit, value; read_unit_value(is, key, unit, value); return str2potential(value, unit); } quantity::ElectricPotential InputFilterBAS::read_final_potential(std::istream& is) { std::string key = "Final E"; std::string unit, value; read_unit_value(is, key, unit, value); return str2potential(value, unit); } quantity::ElectricPotential InputFilterBAS::read_sample_interval(std::istream& is) { std::string key = "Sample Interval"; std::string unit, value; read_unit_value(is, key, unit, value); return str2potential(value, unit); } quantity::Time InputFilterBAS::read_pulse_width(std::istream& is) { std::string key = "Pulse Width"; std::string unit, value; read_unit_value(is, key, unit, value); return str2time(value, unit); } quantity::VoltageScanRate InputFilterBAS::read_scan_rate(std::istream& is) { std::string key = "V ("; std::string unit, value; read_unit_value(is, key, unit, value); std::string unit1, unit2; split_at(unit, "/", unit1, unit2); return str2voltagescanrate(value, unit1, unit2); } quantity::Time InputFilterBAS::read_quiet_time(std::istream& is) { std::string key = "Quiet Time"; std::string unit, value; read_unit_value(is, key, unit, value); return str2time(value, unit); } bool InputFilterBAS::read_pn(std::istream& is) { bool r = true; std::string line, name, value; getline(is,line); split_at(line, "=", name, value); if(value.find("N") != std::string::npos) r = false; return r; } unsigned int InputFilterBAS::read_num_segments(std::istream& is) { unsigned int r = 0; read_name_value(is, "Number of Segments", "=", r); return r; } unsigned int InputFilterBAS::read_num_steps(std::istream& is) { unsigned int r = 0; read_name_value(is, "Number of Steps", "=", r); return r; } double InputFilterBAS::read_resistance(std::istream& is) { double r = 0; read_name_value(is, "R", "=", r); return r; } double InputFilterBAS::read_sensitivity(std::istream& is) { double r = 0; read_name_value(is, "Sensitivity", "=", r); return r; } unsigned int InputFilterBAS::read_total_num_points(std::istream& is) { unsigned int r = 0; read_name_value(is, "Total Number of Data Points", "=", r); return r; } unsigned int InputFilterBAS::read_num_datapoints(std::istream& is) { unsigned int r = 0; read_name_value(is, "Number of Data Points", "=", r); return r; } unsigned int InputFilterBAS::read_num_datasets(std::istream& is) { std::string line; while(std::getline(is,line)) { if(line.find("Sets of Data") != std::string::npos) { std::string value, rest; split_at(line, " ", value, rest); unsigned int r = 0; str2value(value, r); return r; } } return 0; } void InputFilterBAS::read_units(std::istream& is, std::string& unit1, std::string& unit2) { std::string line; while(std::getline(is,line)) { if(line.find("##") != std::string::npos) break; } std::getline(is,line); std::string u1, u2; split_at(line, ",", u1, u2); unit1 = get_between(u1, "(", ")"); unit2 = get_between(u2, "(", ")"); } void InputFilterBAS::read_header(std::istream& is, std::string& date, std::string& time, std::string& label, std::string& type) { remove_whitespace(is); std::getline(is, date); remove_whitespace(is); std::getline(is, time); remove_whitespace(is); std::getline(is, label); remove_whitespace(is); std::getline(is, type); } // InputFilterASCII implementation bool InputFilterASCII::is_valid_file(std::istream& is) { std::string line; std::getline(is,line); if(line.find("ModSim ASCII export") != std::string::npos) return true; return false; } Experiment* InputFilterASCII::read(std::istream& is) { experiment::Experiment* ep = new experiment::cv::SimInduced(new experiment::ConditionDataModSim(), new experiment::MeasurementDataCV()); experiment::MeasurementDataCV* md = dynamic_cast<experiment::MeasurementDataCV*>(ep->get_meas_data()); std::string header; std::getline(is, header); std::string units; std::getline(is, units); std::string rest, unit1, unit2, unit3; split_at(units, " ", unit1, rest); split_at(rest, " ", unit2, unit3); std::string line, v1, v2, v3; while(std::getline(is,line)) { split_at(line, ",", v1, rest); split_at(rest, ",", v2, v3); md->push_back(str2time(v1, unit1), str2potential(v2, unit2), str2current(v3, unit3)); } return ep; } // InputFilters implementation InputFilters::InputFilters() { filters.push_back(new InputFilterBAS()); filters.push_back(new InputFilterASCII()); // Add your filter here // filters.push_back(new InputFilterMyFormat()); } InputFilters::~InputFilters() { for(unsigned int i=0; i < filters.size(); ++i) delete filters[i]; } Experiment* InputFilters::read(const std::string filename) { std::ifstream ifs(filename.c_str()); if(ifs) { for(unsigned int i=0; i<filters.size(); ++i) { if(filters[i]->is_valid_file(ifs)) { ifs.close(); ifs.open(filename.c_str()); return filters[i]->read(ifs); } ifs.close(); ifs.open(filename.c_str()); } throw InputFilterException("No matching filter found"); } return NULL; } }// end namespace experiment --- NEW FILE: InputFilters.hpp --- /*! \file InputFilters.hpp \brief header file input filters. InputFilters.hpp is part of the Experiment package. */ /* Copyright (C) 2008, 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. */ // $Id: InputFilters.hpp,v 1.1 2008/03/27 13:19:01 beeblbrox Exp $ #ifndef __INPUT_FILTERS #define __INPUT_FILTERS #include <string> #include <vector> #include <fstream> #include <sstream> #include "Experiment/Experiment.hpp" #include "util.hpp" namespace experiment{ //! This is the base class for all input filters. Each input filter should //! implement the functions is_valid_file and read, where the latter is used //! for reading the file and constructing an Experiment and the former is used //! to determine whether the text file to be read is compliant with the filter. class InputFilter { public: //! Return true if the file given by stream is can be read by the filter. virtual bool is_valid_file(std::istream& is) = 0; //! Read data from text file and construct Experiment. virtual Experiment* read(std::istream& is) = 0; virtual ~InputFilter() {}; protected: //! Remove superfluous whitespace from stream void remove_whitespace(std::istream& is); //! Extract string between string s1 and s2, e.g. between "(" and ")" std::string get_between(const std::string& s, const std::string& s1, const std::string& s2); }; //! Input filter class for reading BAS files from CV, CA and CC //! measurements. class InputFilterBAS : public InputFilter { public: //! Return true if the file given by stream is can be read by the filter. //! Overridden from base class InputFilter. bool is_valid_file(std::istream& is); //! Read data from text file and construct Experiment. //! Overridden from base class InputFilter. Experiment* read(std::istream& is); private: //! Read content of CV measurement file. Experiment* read_cv(std::istream& is, const std::string& date, const std::string& time, const std::string& label); //! Read content of CA measurement file. Experiment* read_ca(std::istream& is, const std::string& date, const std::string& time, const std::string& label); //! Read content of CC measurement file. Experiment* read_cc(std::istream& is, const std::string& date, const std::string& time, const std::string& label); //! Read one dataset, e.g. two columns of data placed in x, y with num_datapoints //! each. void read_dataset(std::istream& is, const unsigned int num_datapoints, std::vector<double>& x, std::vector<double>& y); //! Read unit and value from the line designated by string key void read_unit_value(std::istream& is, const std::string& key, std::string& unit, std::string& value); quantity::ElectricPotential read_init_potential(std::istream& is); quantity::ElectricPotential read_high_potential(std::istream& is); quantity::ElectricPotential read_low_potential(std::istream& is); quantity::ElectricPotential read_final_potential(std::istream& is); quantity::ElectricPotential read_sample_interval(std::istream& is); quantity::Time read_pulse_width(std::istream& is); quantity::VoltageScanRate read_scan_rate(std::istream& is); quantity::Time read_quiet_time(std::istream& is); bool read_pn(std::istream& is); unsigned int read_num_segments(std::istream& is); unsigned int read_num_steps(std::istream& is); double read_resistance(std::istream& is); double read_sensitivity(std::istream& is); unsigned int read_total_num_points(std::istream& is); unsigned int read_num_datapoints(std::istream& is); unsigned int read_num_datasets(std::istream& is); void read_units(std::istream& is, std::string& unit1, std::string& unit2); void read_header(std::istream& is, std::string& date, std::string& time, std::string& label, std::string& type); }; // InputFilterBAS //! Input filter class for reading ASCII files exported by ModSim. class InputFilterASCII : public InputFilter { bool is_valid_file(std::istream& is); Experiment* read(std::istream& is); }; // InputFilterASCII //! Input filters exception. Standard compliant. class InputFilterException : public std::exception { public: InputFilterException(const std::string msg) : _msg(msg) {} ~InputFilterException() throw() {} const char* what() const throw() { return _msg.c_str(); } private: std::string _msg; }; //! Convenience class for using input filters. After adding a new input //! filter class add them in the constructor of InputFilters for easy //! access by the user. //! Usage: //! InputFilters ipf; //! Experiment* ep = ipf.read("myfile.txt"); class InputFilters { public: InputFilters(); ~InputFilters(); Experiment* read(const std::string filename); private: std::vector<InputFilter*> filters; }; // InputFilters } // end namespace experiment #endif --- NEW FILE: util.hpp --- /*! \file util.hpp \brief header file for simple utility functions InputFilters.hpp is part of the Experiment package. */ /* Copyright (C) 2008, 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. */ #ifndef __INPUT_FILTERS_UTIL #define __INPUT_FILTERS_UTIL #include "PhysicalQuantities/ElectricCurrent.h" #include "PhysicalQuantities/ElectricPotential.h" #include "PhysicalQuantities/ElectricCharge.h" #include "PhysicalQuantities/Time.h" #include "PhysicalQuantities/VoltageScanRate.h" namespace experiment{ //! Split input string s at seperator string sep returning //! results of split in s1 and s2. void split_at(const std::string& s, const std::string& sep, std::string& s1, std::string& s2) { size_t idx = s.find_first_of(sep); s1 = s.substr(0,idx); s2 = s.substr(idx+1); } //! Convert string to numeric value. template<class T> void str2value(const std::string& value, T& v) { v = 0; std::istringstream iss(value); iss >> v; } //! Read name/value pair seperated by string sep, //! where the keyword string is used to scan the file and //! result is returned in r. template<class T> void read_name_value(std::istream& is, const std::string& keyword, const std::string& sep, T& r) { std::string line; while(std::getline(is,line)) { if(line.find(keyword) != std::string::npos) { std::string name, value; split_at(line, sep, name, value); str2value(value, r); break; } } } //! Convert numeric value to voltage scan rate having units unit1 and unit2, //! e.g. unit1 = "V" and unit2 = "sec". template<class T> quantity::VoltageScanRate value2voltagescanrate(const T v, const std::string& unit1, const std::string& unit2) { if(unit1 == "V" && (unit2 == "s" || unit2 == "sec")) return quantity::VoltageScanRate(v, quantity::voltageScanRate::VoltPerSecond()); // Note the following does not work due to a bug in the Quantities library // if(unit1 == "V" && (unit2 == "ms" || unit2 == "msec")) // return quantity::VoltageScanRate(v, quantity::voltageScanRate::VoltPerMilliSecond()); // if(unit1 == "V" && (unit2 == "us" || unit2 == "usec")) // return quantity::VoltageScanRate(v, quantity::voltageScanRate::VoltPerMicroSecond()); if(unit1 == "mV" && (unit2 == "s" || unit2 == "sec")) return quantity::VoltageScanRate(v, quantity::voltageScanRate::MilliVoltPerSecond()); if(unit1 == "kV" && (unit2 == "s" || unit2 == "sec")) return quantity::VoltageScanRate(v, quantity::voltageScanRate::KiloVoltPerSecond()); return quantity::VoltageScanRate(v, quantity::voltageScanRate::VoltPerSecond()); } //! Convert string value to voltage scan rate having units unit1 and unit2. quantity::VoltageScanRate str2voltagescanrate(const std::string& value, const std::string& unit1, const std::string& unit2) { double v = 0; str2value(value,v); return value2voltagescanrate(v, unit1, unit2); } //! Convert numeric value to current having unit designated by string unit. template<class T> quantity::ElectricCurrent value2current(const T v, const std::string& unit) { if(unit == "uA") return quantity::ElectricCurrent(v, quantity::electricCurrent::MicroAmpere()); if(unit == "mA") return quantity::ElectricCurrent(v, quantity::electricCurrent::MilliAmpere()); if(unit == "A") return quantity::ElectricCurrent(v, quantity::electricCurrent::Ampere()); return quantity::ElectricCurrent(v, quantity::electricCurrent::Ampere()); } //! Convert string value to current having unit designated by string unit. quantity::ElectricCurrent str2current(const std::string& value, const std::string& unit) { double v = 0; str2value(value, v); return value2current(v, unit); } //! Convert numeric value to potential having unit designated by string unit. template<class T> quantity::ElectricPotential value2potential(const T v, const std::string& unit) { if(unit == "uV") return quantity::ElectricPotential(v, quantity::electricPotential::MicroVolt()); if(unit == "mV") return quantity::ElectricPotential(v, quantity::electricPotential::MilliVolt()); if(unit == "V") return quantity::ElectricPotential(v, quantity::electricPotential::Volt()); return quantity::ElectricPotential(v, quantity::electricPotential::Volt()); } //! Convert string value to potential having unit designated by string unit. quantity::ElectricPotential str2potential(const std::string& value, const std::string& unit) { double v = 0; str2value(value, v); return value2potential(v, unit); } //! Convert numeric value to time having unit designated by string unit. template<class T> quantity::Time value2time(const T v, const std::string& unit) { if(unit == "msec" || unit == "ms") return quantity::Time(v, quantity::time::MilliSecond()); if(unit == "msec" || unit == "ms") return quantity::Time(v, quantity::time::MilliSecond()); if(unit == "sec" || unit == "s") return quantity::Time(v, quantity::time::Second()); if(unit == "min" || unit == "m") return quantity::Time(v, quantity::time::Minute()); return quantity::Time(v, quantity::time::Minute()); } //! Convert string value to time having unit designated by string unit. quantity::Time str2time(const std::string& value, const std::string& unit) { double v = 0; str2value(value, v); return value2time(v, unit); } //! Convert numeric value to charge having unit designated by string unit. template<class T> quantity::ElectricCharge value2charge(const T v, const std::string& unit) { if(unit == "mC") return quantity::ElectricCharge(v, quantity::electricCharge::MilliCoulomb()); if(unit == "C") return quantity::ElectricCharge(v, quantity::electricCharge::Coulomb()); return quantity::ElectricCharge(v, quantity::electricCharge::Coulomb()); } //! Convert string value to charge having unit designated by string unit. quantity::ElectricCharge str2charge(const std::string& value, const std::string& unit) { double v = 0; str2value(value, v); return value2charge(v, unit); } } // end namespace experiment #endif |
|
From: beeblbrox <bee...@us...> - 2008-03-27 13:18:06
|
Update of /cvsroot/echempp/Experiment/InputFilters In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv13622/Experiment/InputFilters Removed Files: BAS100BinputFilters.hpp inputFilterErrors.hpp inputFilters.cpp inputFilters.hpp Log Message: Removed old input filters files. --- inputFilters.cpp DELETED --- --- inputFilterErrors.hpp DELETED --- --- inputFilters.hpp DELETED --- --- BAS100BinputFilters.hpp DELETED --- |
|
From: beeblbrox <bee...@us...> - 2008-03-27 13:15:53
|
Update of /cvsroot/echempp/GUI/Visualization In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv12746/GUI/Visualization Modified Files: vtkGraph.hpp Log Message: Removed debug output. Index: vtkGraph.hpp =================================================================== RCS file: /cvsroot/echempp/GUI/Visualization/vtkGraph.hpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** vtkGraph.hpp 19 Dec 2007 16:14:40 -0000 1.15 --- vtkGraph.hpp 27 Mar 2008 13:15:43 -0000 1.16 *************** *** 190,194 **** VtkGraph<D>::drawAxisSystem (void) { ! std::cout << "VtkGraph<D>::drawAxisSystem()" << std::endl; if( _axisSystem == NULL ) { --- 190,194 ---- VtkGraph<D>::drawAxisSystem (void) { ! // std::cout << "VtkGraph<D>::drawAxisSystem()" << std::endl; if( _axisSystem == NULL ) { *************** *** 205,209 **** #endif } ! std::cout << "VtkGraph<D>::drawAxisSystem()" << std::endl; } --- 205,209 ---- #endif } ! // std::cout << "VtkGraph<D>::drawAxisSystem()" << std::endl; } |
|
From: beeblbrox <bee...@us...> - 2008-03-27 13:14:58
|
Update of /cvsroot/echempp/GUI/Windows/Qt/EChem++/Experiment In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv12318/GUI/Windows/Qt/EChem++/Experiment Modified Files: cvExcitationFunctionDialog.cpp Log Message: Minor change on includes. Index: cvExcitationFunctionDialog.cpp =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Experiment/cvExcitationFunctionDialog.cpp,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** cvExcitationFunctionDialog.cpp 20 Jan 2008 23:57:16 -0000 1.29 --- cvExcitationFunctionDialog.cpp 27 Mar 2008 13:14:52 -0000 1.30 *************** *** 246,250 **** this->coordDrawer(); - if( _EtFunction.size() > 0 ) { --- 246,249 ---- |
Update of /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv11071/GUI/Windows/Qt/EChem++/Model Modified Files: batchExperimentDialog.cpp dataDialog.cpp equilibriumDialog.cpp equilibriumDialog.hpp equilibriumDialogBase.ui experimentDialog.cpp experimentDialog.hpp experimentDialogBase.ui mediator.cpp mediator.hpp modelMainWindow.cpp modelMainWindow.hpp modelPlotWidget.cpp modelPlotWidget.hpp solverDialog.cpp solverDialog.hpp solverDialogBase.ui svmDataDialog.cpp svmDataDialogBase.ui svmParametersDialogBase.ui Log Message: Changed to use InputFilters and separate load/save for all dialogs. Index: modelPlotWidget.hpp =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model/modelPlotWidget.hpp,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** modelPlotWidget.hpp 22 Dec 2007 15:53:16 -0000 1.37 --- modelPlotWidget.hpp 27 Mar 2008 13:11:54 -0000 1.38 *************** *** 153,159 **** //! create new plot void newPlot( const std::vector<double>& x, ! const std::vector<std::vector<double> >& y, const std::vector<std::string>& styles, ! const std::vector<std::string>& colors ); //! create new i-E-plot --- 153,161 ---- //! create new plot void newPlot( const std::vector<double>& x, ! const std::vector<std::vector<double> >& y, const std::vector<std::string>& styles, ! const std::vector<std::string>& colors, ! const std::string xunit = "", ! const std::string yunit = ""); //! create new i-E-plot Index: equilibriumDialog.hpp =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model/equilibriumDialog.hpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** equilibriumDialog.hpp 22 Dec 2007 15:53:16 -0000 1.21 --- equilibriumDialog.hpp 27 Mar 2008 13:11:51 -0000 1.22 *************** *** 82,85 **** --- 82,87 ---- public slots: + void sltLoad(); + void sltSave(); void sltApply(); void sltOk(); *************** *** 113,117 **** { experiment::ConditionDataModSim* _cond_data = _mainWindow->getActiveConditionData(); ! equConcs = _cond_data->equConcs; } --- 115,119 ---- { experiment::ConditionDataModSim* _cond_data = _mainWindow->getActiveConditionData(); ! equConcs = _cond_data->eqc.equConcs; } *************** *** 121,125 **** { experiment::ConditionDataModSim* _cond_data = _mainWindow->getActiveConditionData(); ! return _cond_data->indices; } --- 123,127 ---- { experiment::ConditionDataModSim* _cond_data = _mainWindow->getActiveConditionData(); ! return _cond_data->eqc.indices; } *************** *** 129,133 **** { experiment::ConditionDataModSim* _cond_data = _mainWindow->getActiveConditionData(); ! return _cond_data->timeSteps; } --- 131,135 ---- { experiment::ConditionDataModSim* _cond_data = _mainWindow->getActiveConditionData(); ! return _cond_data->eqc.timeSteps; } *************** *** 137,141 **** { experiment::ConditionDataModSim* _cond_data = _mainWindow->getActiveConditionData(); ! profiles = _cond_data->profiles; } --- 139,143 ---- { experiment::ConditionDataModSim* _cond_data = _mainWindow->getActiveConditionData(); ! profiles = _cond_data->eqc.profiles; } *************** *** 145,149 **** { experiment::ConditionDataModSim* _cond_data = _mainWindow->getActiveConditionData(); ! _cond_data->dataStorage = false; } --- 147,151 ---- { experiment::ConditionDataModSim* _cond_data = _mainWindow->getActiveConditionData(); ! _cond_data->eqc.dataStorage = false; } *************** *** 153,157 **** { experiment::ConditionDataModSim* _cond_data = _mainWindow->getActiveConditionData(); ! _cond_data->dataStorage = true; } --- 155,159 ---- { experiment::ConditionDataModSim* _cond_data = _mainWindow->getActiveConditionData(); ! _cond_data->eqc.dataStorage = true; } Index: mediator.hpp =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model/mediator.hpp,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** mediator.hpp 22 Dec 2007 15:53:16 -0000 1.42 --- mediator.hpp 27 Mar 2008 13:11:54 -0000 1.43 *************** *** 86,91 **** void supply(); - void writeDataFile( const QString& fileName ); - void importData( const QString& fileName ); --- 86,89 ---- *************** *** 99,103 **** void checkDataType( QFile* inFile, std::string& type ); - void createModel( const QDomElement& model ); void positionPlots(); --- 97,100 ---- Index: batchExperimentDialog.cpp =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model/batchExperimentDialog.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** batchExperimentDialog.cpp 16 Mar 2008 10:43:36 -0000 1.4 --- batchExperimentDialog.cpp 27 Mar 2008 13:11:51 -0000 1.5 *************** *** 97,104 **** QStringList::split (',', parameterValuesLineEdit3->text()); - std::cout << "pvals1.size()=" << pvals1.size() << std::endl; - std::cout << "pvals2.size()=" << pvals2.size() << std::endl; - std::cout << "pvals3.size()=" << pvals3.size() << std::endl; - if(pvals1.size() == 0) { --- 97,100 ---- *************** *** 199,203 **** else if(name == "v") { ! return cond_data->etExcitation0.derivative(0).value(); } else --- 195,199 ---- else if(name == "v") { ! return cond_data->ec.etExcitation0.derivative(0).value(); } else *************** *** 256,262 **** { // v is in V/s ! cond_data->etExcitation0.clear(); ! cond_data->etExcitation0.add(ExcitationFunctions::Segments::LinearEtSegment(-0.25, 0.25, 0.5*(1/d))); ! cond_data->etExcitation0.add(ExcitationFunctions::Segments::LinearEtSegment(0.25, -0.25, 0.5*(1/d))); } else --- 252,258 ---- { // v is in V/s ! cond_data->ec.etExcitation0.clear(); ! cond_data->ec.etExcitation0.add(ExcitationFunctions::Segments::LinearEtSegment(-0.25, 0.25, 0.5*(1/d))); ! cond_data->ec.etExcitation0.add(ExcitationFunctions::Segments::LinearEtSegment(0.25, -0.25, 0.5*(1/d))); } else *************** *** 413,417 **** experiment::Experiment* ep = mainWindow->getActiveExperiment(); experiment::ConditionDataModSim* cond_data = NULL; ! experiment::MeasurementDataModSim* meas_data = NULL; const QString pname1 = parameterNameComboBox1->currentText(); const QString pname2 = parameterNameComboBox2->currentText(); --- 409,413 ---- experiment::Experiment* ep = mainWindow->getActiveExperiment(); experiment::ConditionDataModSim* cond_data = NULL; ! experiment::MeasurementDataBase* meas_data = NULL; const QString pname1 = parameterNameComboBox1->currentText(); const QString pname2 = parameterNameComboBox2->currentText(); *************** *** 419,435 **** while(ep != NULL) { ! cond_data = dynamic_cast<experiment::ConditionDataModSim*>(ep->get_cond_data()); ! meas_data = dynamic_cast<experiment::MeasurementDataModSim*>(ep->get_meas_data()); ! ofs << pname1 << "=" << getValueName(cond_data, pname1) << "\n"; ! ofs << pname2 << "=" << getValueName(cond_data, pname2) << "\n"; ! ofs << pname3 << "=" << getValueName(cond_data, pname3) << "\n"; ! ofs << meas_data->conversionFactor << "\n"; ! std::copy(meas_data->timeSteps.begin(), ! meas_data->timeSteps.end(), ! std::ostream_iterator<double>(ofs, " ")); ofs << std::endl; ! std::copy(meas_data->responseCurves[0].begin(), ! meas_data->responseCurves[0].end(), ! std::ostream_iterator<double>(ofs, " ")); ofs << std::endl; ep = mainWindow->getNextExperiment(); --- 415,454 ---- while(ep != NULL) { ! cond_data = dynamic_cast<experiment::ConditionDataModSim*>(ep->get_cond_data()); ! meas_data = dynamic_cast<experiment::MeasurementDataBase*>(ep->get_meas_data()); ! ofs << pname1 << "=" << getValueName(cond_data, pname1) << "\n"; ! ofs << pname2 << "=" << getValueName(cond_data, pname2) << "\n"; ! ofs << pname3 << "=" << getValueName(cond_data, pname3) << "\n"; ! ofs << "time_unit=" << meas_data->unitsymbol_i() << "\n"; ! if(cond_data->ec.potentialControlled) ! { ! ofs << "current_unit=" << meas_data->unitsymbol_r() << "\n"; ! } ! if(cond_data->ec.currentControlled) ! { ! ofs << "potential_unit=" << meas_data->unitsymbol_d() << "\n"; ! } ! std::vector<double> vi = meas_data->get_i(); ! for(unsigned int i=0; i<vi.size(); ++i) ! ofs << vi[i] << " "; ofs << std::endl; ! if(cond_data->ec.potentialControlled) ! { ! for(unsigned int i=0; i<cond_data->sc.activeBoundaries; ++i) ! { ! std::vector<double> vr = meas_data[i].get_r(); ! for(unsigned int j=0; j<vr.size(); ++j) ! ofs << vr[j] << " "; ! } ! } ! if(cond_data->ec.currentControlled) ! { ! for(unsigned int i=0; i<cond_data->sc.activeBoundaries; ++i) ! { ! std::vector<double> vd = meas_data[i].get_d(); ! for(unsigned int j=0; j<vd.size(); ++j) ! ofs << vd[j] << " "; ! } ! } ofs << std::endl; ep = mainWindow->getNextExperiment(); *************** *** 438,442 **** ofs.close(); } - } } --- 457,460 ---- Index: svmDataDialog.cpp =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model/svmDataDialog.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** svmDataDialog.cpp 22 Dec 2007 15:53:16 -0000 1.2 --- svmDataDialog.cpp 27 Mar 2008 13:11:55 -0000 1.3 *************** *** 314,323 **** // prepare data experiment::Experiment* ep = mainWindow->getActiveExperiment(); raw_data.clear(); labels.clear(); while(ep != NULL) { ! // assume that we have one active boundary so far ! raw_data.push_back(mainWindow->getActiveMeasurementData()->responseCurves[0]); // define class labels --- 314,338 ---- // prepare data experiment::Experiment* ep = mainWindow->getActiveExperiment(); + experiment::ConditionDataModSim* cond_data = NULL; + experiment::MeasurementDataBase* meas_data = NULL; raw_data.clear(); labels.clear(); + std::vector<double> tv; while(ep != NULL) { ! cond_data = dynamic_cast<experiment::ConditionDataModSim*>(ep->get_cond_data()); ! meas_data = dynamic_cast<experiment::MeasurementDataBase*>(ep->get_meas_data()); ! for(unsigned int i=0; i<cond_data->sc.activeBoundaries; ++i) ! { ! std::vector<double> v; ! if(cond_data->ec.potentialControlled) ! v = meas_data[i].get_r(); ! if(cond_data->ec.currentControlled) ! v = meas_data[i].get_d(); ! for(unsigned int j=0; j<v.size(); ++j) ! tv.push_back(v[j]); ! } ! raw_data.push_back(tv); ! tv.clear(); // define class labels Index: svmDataDialogBase.ui =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model/svmDataDialogBase.ui,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** svmDataDialogBase.ui 19 Dec 2007 11:56:25 -0000 1.1 --- svmDataDialogBase.ui 27 Mar 2008 13:11:55 -0000 1.2 *************** *** 9,216 **** <x>0</x> <y>0</y> ! <width>335</width> ! <height>288</height> </rect> </property> <property name="caption"> <string>SVM Data</string> </property> <property name="sizeGripEnabled"> ! <bool>true</bool> </property> <widget class="QLayoutWidget"> <property name="name"> ! <cstring>Layout1</cstring> </property> <property name="geometry"> <rect> <x>20</x> ! <y>240</y> ! <width>300</width> ! <height>33</height> </rect> </property> ! <hbox> <property name="name"> <cstring>unnamed</cstring> </property> ! <property name="margin"> ! <number>0</number> ! </property> ! <property name="spacing"> ! <number>6</number> ! </property> ! <widget class="QPushButton"> <property name="name"> ! <cstring>buttonHelp</cstring> ! </property> ! <property name="text"> ! <string>&Help</string> ! </property> ! <property name="accel"> ! <string>F1</string> </property> ! <property name="autoDefault"> ! <bool>true</bool> </property> </widget> ! <spacer> ! <property name="name"> ! <cstring>Horizontal Spacing2</cstring> ! </property> ! <property name="orientation"> ! <enum>Horizontal</enum> ! </property> ! <property name="sizeType"> ! <enum>Expanding</enum> ! </property> ! <property name="sizeHint"> ! <size> ! <width>20</width> ! <height>20</height> ! </size> ! </property> ! </spacer> ! <widget class="QPushButton"> <property name="name"> ! <cstring>buttonOk</cstring> ! </property> ! <property name="text"> ! <string>&OK</string> ! </property> ! <property name="accel"> ! <string></string> ! </property> ! <property name="autoDefault"> ! <bool>true</bool> </property> ! <property name="default"> ! <bool>true</bool> </property> </widget> ! <widget class="QPushButton"> <property name="name"> ! <cstring>buttonCancel</cstring> ! </property> ! <property name="text"> ! <string>&Cancel</string> ! </property> ! <property name="accel"> ! <string></string> ! </property> ! <property name="autoDefault"> ! <bool>true</bool> </property> </widget> ! </hbox> ! </widget> ! <widget class="QButtonGroup"> ! <property name="name"> ! <cstring>buttonGroup7</cstring> ! </property> ! <property name="geometry"> ! <rect> ! <x>20</x> ! <y>10</y> ! <width>301</width> ! <height>100</height> ! </rect> ! </property> ! <property name="title"> ! <string>Training set</string> ! </property> ! <widget class="QCheckBox"> ! <property name="name"> ! <cstring>stratifiedCheckBox</cstring> ! </property> ! <property name="geometry"> ! <rect> ! <x>160</x> ! <y>40</y> ! <width>131</width> ! <height>31</height> ! </rect> ! </property> ! <property name="text"> ! <string>Stratified samples</string> ! </property> ! </widget> ! <widget class="QLabel"> ! <property name="name"> ! <cstring>textLabel12</cstring> ! </property> ! <property name="geometry"> ! <rect> ! <x>20</x> ! <y>30</y> ! <width>120</width> ! <height>21</height> ! </rect> ! </property> ! <property name="text"> ! <string>Number of patterns</string> ! </property> ! </widget> ! <widget class="QSpinBox"> ! <property name="name"> ! <cstring>numTrainSpinBox</cstring> ! </property> ! <property name="geometry"> ! <rect> ! <x>20</x> ! <y>50</y> ! <width>91</width> ! <height>21</height> ! </rect> ! </property> ! <property name="maxValue"> ! <number>100000</number> ! </property> ! </widget> ! </widget> ! <widget class="QButtonGroup"> ! <property name="name"> ! <cstring>buttonGroup8</cstring> ! </property> ! <property name="geometry"> ! <rect> ! <x>20</x> ! <y>130</y> ! <width>300</width> ! <height>80</height> ! </rect> ! </property> ! <property name="title"> ! <string>Test set</string> ! </property> ! <widget class="QLabel"> ! <property name="name"> ! <cstring>textLabel12_2</cstring> ! </property> ! <property name="geometry"> ! <rect> ! <x>20</x> ! <y>20</y> ! <width>120</width> ! <height>21</height> ! </rect> ! </property> ! <property name="text"> ! <string>Number of patterns</string> ! </property> ! </widget> ! <widget class="QSpinBox"> ! <property name="name"> ! <cstring>numTestSpinBox</cstring> ! </property> ! <property name="geometry"> ! <rect> ! <x>20</x> ! <y>40</y> ! <width>91</width> ! <height>21</height> ! </rect> ! </property> ! </widget> </widget> </widget> --- 9,216 ---- <x>0</x> <y>0</y> ! <width>350</width> ! <height>250</height> </rect> </property> + <property name="minimumSize"> + <size> + <width>350</width> + <height>250</height> + </size> + </property> <property name="caption"> <string>SVM Data</string> </property> <property name="sizeGripEnabled"> ! <bool>false</bool> </property> <widget class="QLayoutWidget"> <property name="name"> ! <cstring>layout87</cstring> </property> <property name="geometry"> <rect> <x>20</x> ! <y>10</y> ! <width>313</width> ! <height>224</height> </rect> </property> ! <vbox> <property name="name"> <cstring>unnamed</cstring> </property> ! <widget class="QButtonGroup"> <property name="name"> ! <cstring>buttonGroup7</cstring> </property> ! <property name="title"> ! <string>Training set</string> </property> + <widget class="QCheckBox"> + <property name="name"> + <cstring>stratifiedCheckBox</cstring> + </property> + <property name="geometry"> + <rect> + <x>160</x> + <y>40</y> + <width>131</width> + <height>31</height> + </rect> + </property> + <property name="text"> + <string>Stratified samples</string> + </property> + </widget> + <widget class="QLabel"> + <property name="name"> + <cstring>textLabel12</cstring> + </property> + <property name="geometry"> + <rect> + <x>20</x> + <y>30</y> + <width>120</width> + <height>21</height> + </rect> + </property> + <property name="text"> + <string>Number of patterns</string> + </property> + </widget> + <widget class="QSpinBox"> + <property name="name"> + <cstring>numTrainSpinBox</cstring> + </property> + <property name="geometry"> + <rect> + <x>20</x> + <y>50</y> + <width>91</width> + <height>21</height> + </rect> + </property> + <property name="maxValue"> + <number>100000</number> + </property> + </widget> </widget> ! <widget class="QButtonGroup"> <property name="name"> ! <cstring>buttonGroup8</cstring> </property> ! <property name="title"> ! <string>Test set</string> </property> + <widget class="QLabel"> + <property name="name"> + <cstring>textLabel12_2</cstring> + </property> + <property name="geometry"> + <rect> + <x>20</x> + <y>20</y> + <width>120</width> + <height>21</height> + </rect> + </property> + <property name="text"> + <string>Number of patterns</string> + </property> + </widget> + <widget class="QSpinBox"> + <property name="name"> + <cstring>numTestSpinBox</cstring> + </property> + <property name="geometry"> + <rect> + <x>20</x> + <y>40</y> + <width>91</width> + <height>21</height> + </rect> + </property> + </widget> </widget> ! <widget class="QLayoutWidget"> <property name="name"> ! <cstring>Layout1</cstring> </property> + <hbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <property name="margin"> + <number>0</number> + </property> + <property name="spacing"> + <number>6</number> + </property> + <widget class="QPushButton"> + <property name="name"> + <cstring>buttonHelp</cstring> + </property> + <property name="text"> + <string>&Help</string> + </property> + <property name="accel"> + <string>F1</string> + </property> + <property name="autoDefault"> + <bool>true</bool> + </property> + </widget> + <spacer> + <property name="name"> + <cstring>Horizontal Spacing2</cstring> + </property> + <property name="orientation"> + <enum>Horizontal</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + </spacer> + <widget class="QPushButton"> + <property name="name"> + <cstring>buttonOk</cstring> + </property> + <property name="text"> + <string>&OK</string> + </property> + <property name="accel"> + <string></string> + </property> + <property name="autoDefault"> + <bool>true</bool> + </property> + <property name="default"> + <bool>true</bool> + </property> + </widget> + <widget class="QPushButton"> + <property name="name"> + <cstring>buttonCancel</cstring> + </property> + <property name="text"> + <string>&Cancel</string> + </property> + <property name="accel"> + <string></string> + </property> + <property name="autoDefault"> + <bool>true</bool> + </property> + </widget> + </hbox> </widget> ! </vbox> </widget> </widget> Index: equilibriumDialog.cpp =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model/equilibriumDialog.cpp,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** equilibriumDialog.cpp 22 Dec 2007 15:53:16 -0000 1.33 --- equilibriumDialog.cpp 27 Mar 2008 13:11:51 -0000 1.34 *************** *** 39,42 **** --- 39,43 ---- #include <qmessagebox.h> #include <qapplication.h> + #include <qfiledialog.h> #include <iostream> *************** *** 54,61 **** experiment::ConditionDataModSim* _cond_data = _mainWindow->getActiveConditionData(); ! _cond_data->maxTime = 100.0; ! _cond_data->accuracy = 1.0e-3; ! _cond_data->initStepSize = 1e-2; ! _cond_data->dataStorage = true; _progress = new QProgressDialog(this,"ProgressDialog"); --- 55,62 ---- experiment::ConditionDataModSim* _cond_data = _mainWindow->getActiveConditionData(); ! _cond_data->eqc.maxTime = 100.0; ! _cond_data->eqc.accuracy = 1.0e-3; ! _cond_data->eqc.initStepSize = 1e-2; ! _cond_data->eqc.dataStorage = true; _progress = new QProgressDialog(this,"ProgressDialog"); *************** *** 63,74 **** _progress->setCancelButtonText("Stop Simulation"); ! _maxTimeLineEdit->setText( QString::number(_cond_data->maxTime) ); ! _accuracyLineEdit->setText( QString::number(_cond_data->accuracy) ); ! _initStepLineEdit->setText( QString::number(_cond_data->initStepSize) ); _homCheckBox->setChecked(true); _adsCheckBox->setChecked(true); _homSurfCheckBox->setChecked(true); _hetSurfCheckBox->setChecked(true); } --- 64,82 ---- _progress->setCancelButtonText("Stop Simulation"); ! _maxTimeLineEdit->setText( QString::number(_cond_data->eqc.maxTime) ); ! _accuracyLineEdit->setText( QString::number(_cond_data->eqc.accuracy) ); ! _initStepLineEdit->setText( QString::number(_cond_data->eqc.initStepSize) ); _homCheckBox->setChecked(true); + _cond_data->eqc.homReactions = true; _adsCheckBox->setChecked(true); + _cond_data->eqc.ads = true; _homSurfCheckBox->setChecked(true); + _cond_data->eqc.homSurfReactions = true; _hetSurfCheckBox->setChecked(true); + _cond_data->eqc.hetSurfReactions = true; + + _cond_data->eqc.plotDiss = false; + _cond_data->eqc.plotAds = false; } *************** *** 85,89 **** // std::cout << "EquilibriumDialog::setInitialConcentrations()" << std::endl; experiment::ConditionDataModSim* _cond_data = _mainWindow->getActiveConditionData(); ! _cond_data->cinit = cinit; // std::map<uint_t,double>::const_iterator p = cinit.begin(); --- 93,97 ---- // std::cout << "EquilibriumDialog::setInitialConcentrations()" << std::endl; experiment::ConditionDataModSim* _cond_data = _mainWindow->getActiveConditionData(); ! _cond_data->eqc.cinit = cinit; // std::map<uint_t,double>::const_iterator p = cinit.begin(); *************** *** 102,107 **** qApp->processEvents(); _progress-> ! setProgress((int)( (-(int)_cond_data->maxTime/_initProgress) ! * equ + (int)_cond_data->maxTime)); } --- 110,115 ---- qApp->processEvents(); _progress-> ! setProgress((int)( (-(int)_cond_data->eqc.maxTime/_initProgress) ! * equ + (int)_cond_data->eqc.maxTime)); } *************** *** 111,114 **** --- 119,154 ---- } + void EquilibriumDialog::sltLoad() + { + QFileDialog* fd = new QFileDialog( this, "file dialog", TRUE ); + fd->setCaption( tr("Open File") ); + fd->setMode( QFileDialog::ExistingFile ); + fd->setFilter( "Equilibrium conditions (*.eqc)" ); + fd->setViewMode( QFileDialog::List ); + fd->setDir( "~/echempp/data" ); + + if ( fd->exec() == QDialog::Accepted ) + { + if(_mainWindow->readEquilibriumConditions(fd->selectedFile().ascii())) + this->supply(); + } + delete fd; + } + + void EquilibriumDialog::sltSave() + { + QFileDialog* fd = new QFileDialog( this, "file dialog", TRUE ); + fd->setCaption( tr("Save File") ); + fd->setMode( QFileDialog::AnyFile ); + fd->setFilter( "Equilibrium conditions (*.eqc)" ); + fd->setViewMode( QFileDialog::List ); + fd->setDir( "~/echempp/data" ); + if ( fd->exec() == QDialog::Accepted ) + { + _mainWindow->saveEquilibriumConditions(fd->selectedFile().ascii()); + } + delete fd; + } + void EquilibriumDialog::sltApply() *************** *** 129,133 **** else { ! _cond_data->maxTime = value; } } --- 169,173 ---- else { ! _cond_data->eqc.maxTime = value; } } *************** *** 156,160 **** else { ! _cond_data->accuracy = value; } } --- 196,200 ---- else { ! _cond_data->eqc.accuracy = value; } } *************** *** 183,187 **** else { ! _cond_data->initStepSize = value; } } --- 223,227 ---- else { ! _cond_data->eqc.initStepSize = value; } } *************** *** 196,205 **** } ! _cond_data->homReactions = _homCheckBox->isChecked(); ! _cond_data->ads = _adsCheckBox->isChecked(); ! _cond_data->homSurfReactions = _homSurfCheckBox->isChecked(); ! _cond_data->hetSurfReactions = _hetSurfCheckBox->isChecked(); ! _cond_data->plotDiss = _plotDissCheckBox->isChecked(); ! _cond_data->plotAds = _plotAdsCheckBox->isChecked(); } --- 236,245 ---- } ! _cond_data->eqc.homReactions = _homCheckBox->isChecked(); ! _cond_data->eqc.ads = _adsCheckBox->isChecked(); ! _cond_data->eqc.homSurfReactions = _homSurfCheckBox->isChecked(); ! _cond_data->eqc.hetSurfReactions = _hetSurfCheckBox->isChecked(); ! _cond_data->eqc.plotDiss = _plotDissCheckBox->isChecked(); ! _cond_data->eqc.plotAds = _plotAdsCheckBox->isChecked(); } *************** *** 217,224 **** experiment::ConditionDataModSim* _cond_data = _mainWindow->getActiveConditionData(); ! _cond_data->timeSteps.clear(); ! _cond_data->profiles.clear(); ! _cond_data->timeSteps.clear(); ! _cond_data->indices.clear(); if( _thermCheckBox->isChecked() ) --- 257,264 ---- experiment::ConditionDataModSim* _cond_data = _mainWindow->getActiveConditionData(); ! _cond_data->eqc.timeSteps.clear(); ! _cond_data->eqc.profiles.clear(); ! _cond_data->eqc.timeSteps.clear(); ! _cond_data->eqc.indices.clear(); if( _thermCheckBox->isChecked() ) *************** *** 265,273 **** solver->setReactionNetwork( _net ); ! solver->setInitialConcentrations( _cond_data->cinit ); ! if( solver->getInitialResidual() <= _cond_data->accuracy ) { ! _cond_data->equConcs = _cond_data->cinit; log << Message << "Equilibrium state reached!" << Flush; if(! _mainWindow->isCompoundExperiment()) --- 305,313 ---- solver->setReactionNetwork( _net ); ! solver->setInitialConcentrations( _cond_data->eqc.cinit ); ! if( solver->getInitialResidual() <= _cond_data->eqc.accuracy ) { ! _cond_data->eqc.equConcs = _cond_data->eqc.cinit; log << Message << "Equilibrium state reached!" << Flush; if(! _mainWindow->isCompoundExperiment()) *************** *** 283,287 **** { solver->solve(); ! solver->getEquilibriumConcentrations( _cond_data->equConcs ); } } --- 323,327 ---- { solver->solve(); ! solver->getEquilibriumConcentrations( _cond_data->eqc.equConcs ); } } *************** *** 293,297 **** QMessageBox::NoButton, QMessageBox::NoButton ); ! _cond_data->equConcs = _cond_data->cinit; } catch( const ecco::EccoError& error ) --- 333,337 ---- QMessageBox::NoButton, QMessageBox::NoButton ); ! _cond_data->eqc.equConcs = _cond_data->eqc.cinit; } catch( const ecco::EccoError& error ) *************** *** 302,311 **** QMessageBox::NoButton, QMessageBox::NoButton ); ! _cond_data->equConcs = _cond_data->cinit; } ! _cond_data->indices = solver->getSpeciesIndices(); delete solver; --- 342,351 ---- QMessageBox::NoButton, QMessageBox::NoButton ); ! _cond_data->eqc.equConcs = _cond_data->eqc.cinit; } ! _cond_data->eqc.indices = solver->getSpeciesIndices(); delete solver; *************** *** 317,323 **** solvers::KineticEquSolver<EquilibriumDialog>* solver = new solvers::KineticEquSolver<EquilibriumDialog>(this); ! solver->setMaxTime(_cond_data->maxTime); ! solver->setAccuracy(_cond_data->accuracy); ! solver->setInitialStepSize(_cond_data->initStepSize); if( _homCheckBox->isChecked() ) --- 357,363 ---- solvers::KineticEquSolver<EquilibriumDialog>* solver = new solvers::KineticEquSolver<EquilibriumDialog>(this); ! solver->setMaxTime(_cond_data->eqc.maxTime); ! solver->setAccuracy(_cond_data->eqc.accuracy); ! solver->setInitialStepSize(_cond_data->eqc.initStepSize); if( _homCheckBox->isChecked() ) *************** *** 356,360 **** ! if( _cond_data->dataStorage ) { solver->enableDataStorage(); --- 396,400 ---- ! if( _cond_data->eqc.dataStorage ) { solver->enableDataStorage(); *************** *** 369,378 **** solver->setReactionNetwork( _net ); ! solver->setInitialConcentrations( _cond_data->cinit ); _initProgress = solver->getInitialResidual(); ! if( _initProgress <= _cond_data->accuracy ) { ! _cond_data->equConcs = _cond_data->cinit; log << Message << "Equilibrium state reached!" << Flush; if(! _mainWindow->isCompoundExperiment()) --- 409,418 ---- solver->setReactionNetwork( _net ); ! solver->setInitialConcentrations( _cond_data->eqc.cinit ); _initProgress = solver->getInitialResidual(); ! if( _initProgress <= _cond_data->eqc.accuracy ) { ! _cond_data->eqc.equConcs = _cond_data->eqc.cinit; log << Message << "Equilibrium state reached!" << Flush; if(! _mainWindow->isCompoundExperiment()) *************** *** 389,400 **** _break = solver->breaker(); _progress->show(); ! _progress->setTotalSteps( int(_cond_data->maxTime) ); solver->solve(); ! solver->getEquilibriumConcentrations( _cond_data->equConcs ); ! if( _cond_data->dataStorage ) { ! _cond_data->timeSteps = solver->getTimeSteps(); ! solver->getProfiles(_cond_data->profiles); } --- 429,440 ---- _break = solver->breaker(); _progress->show(); ! _progress->setTotalSteps( int(_cond_data->eqc.maxTime) ); solver->solve(); ! solver->getEquilibriumConcentrations( _cond_data->eqc.equConcs ); ! if( _cond_data->eqc.dataStorage ) { ! _cond_data->eqc.timeSteps = solver->getTimeSteps(); ! solver->getProfiles(_cond_data->eqc.profiles); } *************** *** 409,413 **** QMessageBox::NoButton, QMessageBox::NoButton ); ! _cond_data->equConcs = _cond_data->cinit; } catch( const ecco::EccoError& error ) --- 449,453 ---- QMessageBox::NoButton, QMessageBox::NoButton ); ! _cond_data->eqc.equConcs = _cond_data->eqc.cinit; } catch( const ecco::EccoError& error ) *************** *** 418,428 **** QMessageBox::NoButton, QMessageBox::NoButton ); ! _cond_data->equConcs = _cond_data->cinit; } ! _cond_data->indices = solver->getSpeciesIndices(); ! _progress->setProgress( int(_cond_data->maxTime) ); _progress->cancel(); delete solver; --- 458,468 ---- QMessageBox::NoButton, QMessageBox::NoButton ); ! _cond_data->eqc.equConcs = _cond_data->eqc.cinit; } ! _cond_data->eqc.indices = solver->getSpeciesIndices(); ! _progress->setProgress( int(_cond_data->eqc.maxTime) ); _progress->cancel(); delete solver; *************** *** 495,499 **** { experiment::ConditionDataModSim* _cond_data = _mainWindow->getActiveConditionData(); ! return _cond_data->profiles.find(species)->second; } --- 535,539 ---- { experiment::ConditionDataModSim* _cond_data = _mainWindow->getActiveConditionData(); ! return _cond_data->eqc.profiles.find(species)->second; } *************** *** 501,513 **** { experiment::ConditionDataModSim* _cond_data = _mainWindow->getActiveConditionData(); ! _homCheckBox->setChecked(_cond_data->homReactions); ! _adsCheckBox->setChecked(_cond_data->ads); ! _homSurfCheckBox->setChecked(_cond_data->homSurfReactions); ! _hetSurfCheckBox->setChecked(_cond_data->hetSurfReactions); ! _plotDissCheckBox->setChecked(_cond_data->plotDiss); ! _plotAdsCheckBox->setChecked(_cond_data->plotDiss); ! _maxTimeLineEdit->setText(QString::number(_cond_data->maxTime)); ! _accuracyLineEdit->setText(QString::number(_cond_data->accuracy)); ! _initStepLineEdit->setText(QString::number(_cond_data->initStepSize)); } --- 541,553 ---- { experiment::ConditionDataModSim* _cond_data = _mainWindow->getActiveConditionData(); ! _homCheckBox->setChecked(_cond_data->eqc.homReactions); ! _adsCheckBox->setChecked(_cond_data->eqc.ads); ! _homSurfCheckBox->setChecked(_cond_data->eqc.homSurfReactions); ! _hetSurfCheckBox->setChecked(_cond_data->eqc.hetSurfReactions); ! _plotDissCheckBox->setChecked(_cond_data->eqc.plotDiss); ! _plotAdsCheckBox->setChecked(_cond_data->eqc.plotDiss); ! _maxTimeLineEdit->setText(QString::number(_cond_data->eqc.maxTime)); ! _accuracyLineEdit->setText(QString::number(_cond_data->eqc.accuracy)); ! _initStepLineEdit->setText(QString::number(_cond_data->eqc.initStepSize)); } Index: experimentDialog.cpp =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model/experimentDialog.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** experimentDialog.cpp 22 Dec 2007 15:53:16 -0000 1.16 --- experimentDialog.cpp 27 Mar 2008 13:11:52 -0000 1.17 *************** *** 49,52 **** --- 49,53 ---- #include <qdir.h> #include <qcheckbox.h> + #include <qfiledialog.h> #include <iostream> *************** *** 66,80 **** ::experiment::ConditionDataModSim* _cond_data = _mainWindow->getActiveConditionData(); [...1108 lines suppressed...] --- 833,851 ---- { this->setSemiInfiniteDiffusion(); ! this->setSafetyFactor( _cond_data->ec.safety ); } ! if( _cond_data->ec.potentialControlled ) { _controlComboBox0->setCurrentText("Potential"); _controlComboBox1->setCurrentText("Potential"); } ! else if( _cond_data->ec.currentControlled ) { _controlComboBox0->setCurrentText("Current"); _controlComboBox1->setCurrentText("Current"); } ! _methodComboBox0->setCurrentText( _cond_data->ec.technique0 ); ! _methodComboBox1->setCurrentText( _cond_data->ec.technique1 ); } } Index: modelMainWindow.cpp =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model/modelMainWindow.cpp,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** modelMainWindow.cpp 16 Mar 2008 10:42:17 -0000 1.63 --- modelMainWindow.cpp 27 Mar 2008 13:11:54 -0000 1.64 *************** *** 204,208 **** #endif ! this->ep = new experiment::cv::SimInduced(new experiment::ConditionDataModSim(), new experiment::MeasurementDataModSim()); this->ep->set_title("New Experiment"); --- 204,208 ---- #endif ! this->ep = new experiment::cv::SimInduced(new experiment::ConditionDataModSim(), new experiment::MeasurementDataCV()); this->ep->set_title("New Experiment"); *************** *** 243,249 **** } ! experiment::MeasurementDataModSim* ModelMainWindow::getActiveMeasurementData() { ! return dynamic_cast<experiment::MeasurementDataModSim*>(getActiveExperiment()->get_meas_data()); } --- 243,249 ---- } ! experiment::MeasurementDataBase* ModelMainWindow::getActiveMeasurementData() { ! return getActiveExperiment()->get_meas_data(); } *************** *** 253,257 **** { ep = new experiment::cv::SimInduced(new experiment::ConditionDataModSim(), ! new experiment::MeasurementDataModSim()); } if(ep->is_compound()) --- 253,257 ---- { ep = new experiment::cv::SimInduced(new experiment::ConditionDataModSim(), ! new experiment::MeasurementDataCV()); } if(ep->is_compound()) *************** *** 397,400 **** --- 397,402 ---- { ia_xml >> BOOST_SERIALIZATION_NVP(ep); + // needed since measurement data is not serialized anymore + ep->set_meas_data(new experiment::MeasurementDataCV()); } catch(std::exception& e) *************** *** 402,407 **** 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; --- 404,407 ---- *************** *** 541,546 **** return true; } ! ! bool ModelMainWindow::readMechanism(const char* filename) { std::ifstream ifs_xml(filename); --- 541,546 ---- return true; } ! ! bool ModelMainWindow::readCondition(const char* filename, ConditionType t) { std::ifstream ifs_xml(filename); *************** *** 560,564 **** try { ! ia_xml >> boost::serialization::make_nvp("mc", _cond_data->mc); } catch(std::exception& e) --- 560,584 ---- try { ! switch(t) ! { ! case environment_conditions: ! ia_xml >> boost::serialization::make_nvp("ec", _cond_data->ec); ! break; ! case mechanism_conditions: ! ia_xml >> boost::serialization::make_nvp("mc", _cond_data->mc); ! break; ! case model_parameter_conditions: ! ia_xml >> boost::serialization::make_nvp("mpc", _cond_data->mpc); ! break; ! case equilibrium_conditions: ! ia_xml >> boost::serialization::make_nvp("eqc", _cond_data->eqc); ! break; ! case solver_conditions: ! ia_xml >> boost::serialization::make_nvp("sc", _cond_data->sc); ! break; ! case visualization_conditions: ! ia_xml >> boost::serialization::make_nvp("vic", _cond_data->vic); ! break; ! } } catch(std::exception& e) *************** *** 574,578 **** } ! bool ModelMainWindow::saveMechanism(const char* filename) { std::ofstream ofs_xml(filename); --- 594,598 ---- } ! bool ModelMainWindow::saveCondition(const char* filename, ConditionType t) { std::ofstream ofs_xml(filename); *************** *** 586,590 **** experiment::ConditionDataModSim* _cond_data = getActiveConditionData(); try{ ! oa_xml << boost::serialization::make_nvp("mc", _cond_data->mc); } catch(std::exception& e) --- 606,630 ---- experiment::ConditionDataModSim* _cond_data = getActiveConditionData(); try{ ! switch(t) ! { ! case environment_conditions: ! oa_xml << boost::serialization::make_nvp("ec", _cond_data->ec); ! break; ! case mechanism_conditions: ! oa_xml << boost::serialization::make_nvp("mc", _cond_data->mc); ! break; ! case model_parameter_conditions: ! oa_xml << boost::serialization::make_nvp("mpc", _cond_data->mpc); ! break; ! case equilibrium_conditions: ! oa_xml << boost::serialization::make_nvp("eqc", _cond_data->eqc); ! break; ! case solver_conditions: ! oa_xml << boost::serialization::make_nvp("sc", _cond_data->sc); ! break; ! case visualization_conditions: ! oa_xml << boost::serialization::make_nvp("vic", _cond_data->vic); ! break; ! } } catch(std::exception& e) *************** *** 598,656 **** 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; } --- 638,700 ---- return true; } ! ! bool ModelMainWindow::readEnvironmentConditions(const char* filename) ! { ! return readCondition(filename, environment_conditions); ! } ! ! bool ModelMainWindow::saveEnvironmentConditions(const char* filename) ! { ! return saveCondition(filename, environment_conditions); ! } ! ! bool ModelMainWindow::readMechanism(const char* filename) ! { ! return readCondition(filename, mechanism_conditions); ! } ! ! bool ModelMainWindow::saveMechanism(const char* filename) ! { ! return saveCondition(filename, mechanism_conditions); ! } ! bool ModelMainWindow::readModelParameters(const char* filename) { ! return readCondition(filename, model_parameter_conditions); } bool ModelMainWindow::saveModelParameters(const char* filename) { ! return saveCondition(filename, model_parameter_conditions); ! } ! ! bool ModelMainWindow::readEquilibriumConditions(const char* filename) ! { ! return readCondition(filename, equilibrium_conditions); ! } ! ! bool ModelMainWindow::saveEquilibriumConditions(const char* filename) ! { ! return saveCondition(filename, equilibrium_conditions); ! } ! ! bool ModelMainWindow::readSolverConditions(const char* filename) ! { ! return readCondition(filename, solver_conditions); ! } ! ! bool ModelMainWindow::saveSolverConditions(const char* filename) ! { ! return saveCondition(filename, solver_conditions); ! } ! ! bool ModelMainWindow::readVisualizationConditions(const char* filename) ! { ! return readCondition(filename, solver_conditions); ! } ! ! bool ModelMainWindow::saveVisualizationConditions(const char* filename) ! { ! return saveCondition(filename, solver_conditions); } *************** *** 733,741 **** ModelMainWindow::sltFilePrint() { ! QMessageBox::information( 0, "Model", ! "Printing not yet implemented: Use export data instead.", ! QMessageBox::Ok, ! QMessageBox::NoButton, ! QMessageBox::NoButton ); } --- 777,886 ---- ModelMainWindow::sltFilePrint() { ! QFileDialog* fd = new QFileDialog( this, "file dialog", TRUE ); ! fd->setCaption( tr("Export Data") ); ! fd->setMode( QFileDialog::AnyFile ); ! ! fd->addFilter("Encapsulated Postscript (*.eps)"); ! fd->addFilter("Postscript (*.ps)"); ! fd->addFilter("Adobe PDF files (*.pdf)"); ! fd->addFilter("Text files (*.txt)"); ! fd->addFilter("LaTeX/TeX (*.tex)"); ! ! fd->setViewMode( QFileDialog::List ); ! fd->setDir( "~/echempp/data" ); ! ! QString fileName; ! if ( fd->exec() == QDialog::Accepted ) ! { ! fileName = fd->selectedFile(); ! QString filter = fd->selectedFilter(); ! ! if( filter == "Postscript (*.ps)" ) ! { ! if( fileName.find(".ps") != -1 ) fileName.remove(".ps"); ! ! std::string file = fileName.ascii(); ! if( _plotWidget->isActive() ) ! { ! _plotWidget->exportActiveGraph(file,"ps"); ! } ! else ! { ! _plotWidget->exportPage(file,"ps"); ! } ! ! } ! else if( filter == "Encapsulated Postscript (*.eps)" ) ! { ! if( fileName.find(".eps") != -1 ) fileName.remove(".eps"); ! ! ! std::string file = fileName.ascii(); ! if( _plotWidget->isActive() ) ! { ! _plotWidget->exportActiveGraph(file,"eps"); ! } ! else ! { ! _plotWidget->exportPage(file,"eps"); ! } ! ! } ! else if( filter == "Adobe PDF files (*.pdf)" ) ! { ! if( fileName.find(".pdf") != -1 ) fileName.remove(".pdf"); ! ! ! std::string file = fileName.ascii(); ! if( _plotWidget->isActive() ) ! { ! _plotWidget->exportActiveGraph(file,"pdf"); ! } ! else ! { ! _plotWidget->exportPage(file,"pdf"); ! } ! ! } ! else if( filter == "LaTeX/TeX (*.tex)" ) ! { ! if( fileName.find(".tex") != -1 ) fileName.remove(".tex"); ! ! ! std::string file = fileName.ascii(); ! if( _plotWidget->isActive() ) ! { ! _plotWidget->exportActiveGraph(file,"tex"); ! } ! else ! { ! _plotWidget->exportPage(file,"tex"); ! } ! ! } ! else if( filter == "Text Files (*.txt *.TXT)" ) ! { ! if( fileName.find(".txt") != -1 ) fileName.remove(".txt"); ! if( fileName.find(".TXT") != -1 ) fileName.remove(".TXT"); ! ! std::string file = fileName.ascii(); ! if( _plotWidget->isActive() ) ! { ! // see save project ! _plotWidget->exportActiveGraph(file,"txt"); ! } ! else ! { ! QMessageBox::warning( 0, "Model Error", ! "No graph activated: Click on the graph!", ! QMessageBox::Ok, ! QMessageBox::NoButton, ! QMessageBox::NoButton ); ! } ! } ! } ! std::cout << "Before delete fd" << std::endl; ! delete fd; ! std::cout << "After delete fd" << std::endl; } *************** *** 862,866 **** ep = NULL; } ! this->ep = new experiment::cv::SimInduced(new experiment::ConditionDataModSim(), new experiment::MeasurementDataModSim()); this->ep->set_title("New single Experiment"); } --- 1007,1011 ---- ep = NULL; } ! this->ep = new experiment::cv::SimInduced(new experiment::ConditionDataModSim(), new experiment::MeasurementDataCV()); this->ep->set_title("New single Experiment"); } *************** *** 919,1047 **** fd->setCaption( tr("Export Data") ); fd->setMode( QFileDialog::AnyFile ); ! ! fd->addFilter("Encapsulated Postscript (*.eps)"); ! fd->addFilter("Postscript (*.ps)"); ! fd->addFilter("Adobe PDF files (*.pdf)"); ! fd->addFilter("LaTeX/TeX (*.tex)"); ! fd->addFilter("Text Files (*.txt *.TXT)"); ! fd->addFilter("XML Data Files (*.xml)"); ! fd->setViewMode( QFileDialog::List ); fd->setDir( "~/echempp/data" ); - QString fileName; if ( fd->exec() == QDialog::Accepted ) { ! fileName = fd->selectedFile(); ! QString filter = fd->selectedFilter(); ! ! if( filter == "Postscript (*.ps)" ) ! { ! if( fileName.find(".ps") != -1 ) fileName.remove(".ps"); ! ! std::string file = fileName.ascii(); ! if( _plotWidget->isActive() ) ! { ! _plotWidget->exportActiveGraph(file,"ps"); ! } ! else ! { ! _plotWidget->exportPage(file,"ps"); ! } ! ! } ! else if( filter == "Encapsulated Postscript (*.eps)" ) ! { ! if( fileName.find(".eps") != -1 ) fileName.remove(".eps"); ! ! ! std::string file = fileName.ascii(); ! if( _plotWidget->isActive() ) ! { ! _plotWidget->exportActiveGraph(file,"eps"); ! } ! else ! { ! _plotWidget->exportPage(file,"eps"); ! } ! ! } ! else if( filter == "Adobe PDF files (*.pdf)" ) ! { ! if( fileName.find(".pdf") != -1 ) fileName.remove(".pdf"); ! ! ! std::string file = fileName.ascii(); ! if( _plotWidget->isActive() ) ! { ! _plotWidget->exportActiveGraph(file,"pdf"); ! } ! else ! { ! _plotWidget->exportPage(file,"pdf"); ! } ! ! } ! else if( filter == "LaTeX/TeX (*.tex)" ) ! { ! if( fileName.find(".tex") != -1 ) fileName.remove(".tex"); ! ! ! std::string file = fileName.ascii(); ! if( _plotWidget->isActive() ) ! { ! _plotWidget->exportActiveGraph(file,"tex"); ! } ! else ! { ! _plotWidget->exportPage(file,"tex"); ! } ! ! } ! else if( filter == "XML Data Files (*.xml)" ) ! { ! if( fileName.find(".xml") != -1 ) ! { ! fileName.remove(".xml"); ! } ! ! fileName.append(".xml"); ! std::string file = fileName.ascii(); ! if( _plotWidget->isActive() ) { ! // see save project ! // TODO FIXME ! // _mediator->writeDataFile( fileName ); } ! else { ! QMessageBox::warning( 0, "Model Error", ! "No graph activated: Click on the graph!", QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton ); - } - } - else if( filter == "Text Files (*.txt *.TXT)" ) - { - if( fileName.find(".txt") != -1 ) fileName.remove(".txt"); - if( fileName.find(".TXT") != -1 ) fileName.remove(".TXT"); - - std::string file = fileName.ascii(); - if( _plotWidget->isActive() ) - { - // see save project - _plotWidget->exportActiveGraph(file,"txt"); } - else - { - QMessageBox::warning( 0, "Model Error", - "No graph activated: Click on the graph!", - QMessageBox::Ok, - QMessageBox::NoButton, - QMessageBox::NoButton ); - } - } } delete fd; --- 1064,1111 ---- fd->setCaption( tr("Export Data") ); fd->setMode( QFileDialog::AnyFile ); ! fd->setFilter( "Text files (*.txt *.TXT)" ); fd->setViewMode( QFileDialog::List ); fd->setDir( "~/echempp/data" ); QString fileName; if ( fd->exec() == QDialog::Accepted ) { ! fileName = fd->selectedFile(); ! std::ofstream ofs(fileName.ascii()); ! if(ofs) { ! // header ! ofs << "ModSim ASCII export\n"; ! try{ ! // units ! ofs << ep->get_meas_data()->unitsymbol_i() << " " ! << ep->get_meas_data()->unitsymbol_d() << " " ! << ep->get_meas_data()->unitsymbol_r() << "\n"; ! // data in three colums seperated by colons ! boost::tuple<double,double,double> tp; ! for(unsigned int i=0; i < ep->get_meas_data()->size_i(); ++i) ! { ! tp = ep->get_meas_data()->get_values(i); ! ofs << tp.get<0>() << ", " << tp.get<1>() << ", " << tp.get<2>() << "\n"; ! } ! ofs.close(); ! } ! catch(std::exception& e) ! { ! QMessageBox::warning( 0, "Export data error", ! e.what(), ! QMessageBox::Ok, ! QMessageBox::NoButton, ! QMessageBox::NoButton ); ! } } ! else { ! QMessageBox::warning( 0, "File not found error", ! "Could not open file for writing", QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton ); } } delete fd; *************** *** 1091,1120 **** } - - - - // void - // ModelMainWindow::writeOutData( QFile* outFile, const std::vector<std::vector<double> >& data ) - // { - - // QTextStream outStream( outFile ); - - // uint_t i=0; - // uint_t j; - // for(;i<data.size();++i) - // { - // for(j=0;j<data[i].size();++j) - // { - // outStream << data[i][j] << "\t"; - // } - // outStream << "\n"; - // } - - // } - - - - - } } --- 1155,1158 ---- Index: solverDialog.cpp =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model/solverDialog.cpp,v retrieving revision 1.89 retrieving revision 1.90 diff -C2 -d -r1.89 -r1.90 *** solverDialog.cpp 22 Dec 2007 15:53:16 -0000 1.89 --- solverDialog.cpp 27 Mar 2008 13:11:55 -0000 1.90 *************** *** 89,92 **** --- 89,93 ---- #include <qradiobutton.h> #include <qpushbutton.h> + #include <qfiledialog.h> #include <ctime> *************** *** 161,166 **** _mainWindow->getActiveConditionData(); ! _cond_data->potentialControlled = true; ! _cond_data->currentControlled = false; _cond_data->sc.TOL = 2.0e-2; _cond_data->sc.resATOL = 1.0e-3; --- 162,167 ---- _mainWindow->getActiveConditionData(); ! _cond_data->ec.potentialControlled = true; ! _cond_data->ec.currentControlled = false; _cond_da... [truncated message content] |
|
From: beeblbrox <bee...@us...> - 2008-03-27 13:07:34
|
Update of /cvsroot/echempp/Model In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv9413/Model Modified Files: configure.in Log Message: build system change. Index: configure.in =================================================================== RCS file: /cvsroot/echempp/Model/configure.in,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** configure.in 11 Mar 2008 12:32:26 -0000 1.14 --- configure.in 27 Mar 2008 13:07:31 -0000 1.15 *************** *** 12,29 **** dnl Check for Spirit ! AC_MSG_CHECKING([for \$SPIRITSRC]) ! if test "x$SPIRITSRC" = x; then AC_MSG_ERROR([You must install Boost-1.31 or later (includes Spirit-1.8.0). ! Set the SPIRITSRC environment variable to the path from which "boost/spirit.hpp" can be found]) else ! AC_MSG_RESULT([$SPIRITSRC]) fi ! AC_MSG_CHECKING([for \$SPIRITSRC/boost/spirit.hpp]) ! if test -f $SPIRITSRC/boost/spirit.hpp then AC_MSG_RESULT([available]) else ! AC_MSG_ERROR([spirit.hpp not found in $SPIRITSRC/boost]) fi --- 12,29 ---- dnl Check for Spirit ! AC_MSG_CHECKING([for \$BOOSTSRC]) ! if test "x$BOOSTSRC" = x; then AC_MSG_ERROR([You must install Boost-1.31 or later (includes Spirit-1.8.0). ! Set the BOOSTSRC environment variable to the path from which "boost/spirit.hpp" can be found]) else ! AC_MSG_RESULT([$BOOSTSRC]) fi ! AC_MSG_CHECKING([for \$BOOSTSRC/boost/spirit.hpp]) ! if test -f $BOOSTSRC/boost/spirit.hpp then AC_MSG_RESULT([available]) else ! AC_MSG_ERROR([spirit.hpp not found in $BOOSTSRC/boost]) fi |
|
From: beeblbrox <bee...@us...> - 2008-03-27 13:04:35
|
Update of /cvsroot/echempp/Experiment/Experiment In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv8117/Experiment/Experiment Modified Files: Makefile.am Log Message: Build system changes due to BOOSTXXX. Index: Makefile.am =================================================================== RCS file: /cvsroot/echempp/Experiment/Experiment/Makefile.am,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** Makefile.am 22 Dec 2007 15:50:26 -0000 1.15 --- Makefile.am 27 Mar 2008 13:04:27 -0000 1.16 *************** *** 6,10 **** -I$(LOKISRC) \ -I$(QUANTITIESSRC) \ ! -I$(BSUTILITIESSRC) libeppExperiment_la_SOURCES = Experiment.hpp \ --- 6,11 ---- -I$(LOKISRC) \ -I$(QUANTITIESSRC) \ ! -I$(BSUTILITIESSRC) \ ! -I$(BOOSTSRC) libeppExperiment_la_SOURCES = Experiment.hpp \ *************** *** 14,19 **** documentation/Notes.log ! libeppExperiment_la_CXXFLAGS = -Wall -Werror -pedantic-errors \ ! -DTIXML_USE_STL=YES libeppExperiment_la_LDFLAGS = $(EXPERIMENT_LDFLAGS) -version-info 0:5:0 --- 15,19 ---- documentation/Notes.log ! libeppExperiment_la_CXXFLAGS = -Wall -Werror -pedantic-errors libeppExperiment_la_LDFLAGS = $(EXPERIMENT_LDFLAGS) -version-info 0:5:0 |
|
From: beeblbrox <bee...@us...> - 2008-03-27 13:04:35
|
Update of /cvsroot/echempp/Experiment/InputFilters In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv8117/Experiment/InputFilters Modified Files: Makefile.am Log Message: Build system changes due to BOOSTXXX. Index: Makefile.am =================================================================== RCS file: /cvsroot/echempp/Experiment/InputFilters/Makefile.am,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Makefile.am 23 Feb 2007 12:10:26 -0000 1.5 --- Makefile.am 27 Mar 2008 13:04:28 -0000 1.6 *************** *** 10,25 **** -I$(BSUTILITIESSRC) ! libeppInputFilters_la_SOURCES = inputFilters.hpp \ ! inputFilterErrors.hpp \ ! inputFilters.cpp \ ! BAS100BinputFilters.hpp ! libeppInputFilters_la_CXXFLAGS = -Wall -Werror -pedantic-errors \ ! -DTIXML_USE_STL=YES libeppInputFilters_la_LDFLAGS = -version-info 0:0:0 EXTRA_DIST = documentation/mainpage.txt \ ! documentation/Notes.log doc: --- 10,23 ---- -I$(BSUTILITIESSRC) ! libeppInputFilters_la_SOURCES = InputFilters.hpp \ ! InputFilters.cpp ! libeppInputFilters_la_CXXFLAGS = -Wall -Werror -pedantic-errors libeppInputFilters_la_LDFLAGS = -version-info 0:0:0 EXTRA_DIST = documentation/mainpage.txt \ ! documentation/Notes.log \ ! Doxyfile doc: |
|
From: beeblbrox <bee...@us...> - 2008-03-27 13:04:35
|
Update of /cvsroot/echempp/Experiment/InputFilters/test In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv8117/Experiment/InputFilters/test Modified Files: Makefile.am Log Message: Build system changes due to BOOSTXXX. Index: Makefile.am =================================================================== RCS file: /cvsroot/echempp/Experiment/InputFilters/test/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile.am 8 Jun 2006 11:11:04 -0000 1.3 --- Makefile.am 27 Mar 2008 13:04:28 -0000 1.4 *************** *** 3,21 **** inputFiltersTest_SOURCES = inputFiltersTest.cpp ! inputFiltersTest_LDADD = ../libeppInputFilters.la \ ! -leppData \ -leppExperiment \ -L$(PHYSICALQUANTITIESLIB) -lPhysicalQuantities \ -L$(QUANTITIESLIB) -lQuantity \ -L$(BSUTILITIESLIB) -lBSUtilities \ ! -lloki INCLUDES = -I$(top_srcdir) \ ! -I$(top_srcdir)/Data \ ! -I$(top_srcdir)/Experiment \ ! -I$(LOKISRC) \ ! -I$(QUANTITIESSRC) \ ! -I$(BSUTILITIESSRC) - inputFiltersTest_CXXFLAGS = -Wall -Werror -pedantic-errors -DTIXML_USE_STL=YES --- 3,25 ---- inputFiltersTest_SOURCES = inputFiltersTest.cpp ! inputFiltersTest_LDADD = ../libeppInputFilters.la \ -leppExperiment \ + -leppExcitationFunction \ -L$(PHYSICALQUANTITIESLIB) -lPhysicalQuantities \ -L$(QUANTITIESLIB) -lQuantity \ -L$(BSUTILITIESLIB) -lBSUtilities \ ! -L$(LOKILIB) -lloki \ ! -L$(BOOSTLIB) \ ! -lboost_serialization$(BOOSTTAGS) \ ! -lboost_unit_test_framework$(BOOSTTAGS) INCLUDES = -I$(top_srcdir) \ ! -I$(top_srcdir)/Experiment \ ! -I$(LOKISRC) \ ! -I$(QUANTITIESSRC) \ ! -I$(BSUTILITIESSRC) \ ! -I$(BOOSTSRC) ! ! inputFiltersTest_CXXFLAGS = -Wall -Werror -pedantic-errors |
|
From: beeblbrox <bee...@us...> - 2008-03-27 13:04:35
|
Update of /cvsroot/echempp/Experiment In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv8117/Experiment Modified Files: Makefile.am Log Message: Build system changes due to BOOSTXXX. Index: Makefile.am =================================================================== RCS file: /cvsroot/echempp/Experiment/Makefile.am,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Makefile.am 23 Dec 2007 10:20:28 -0000 1.10 --- Makefile.am 27 Mar 2008 13:04:27 -0000 1.11 *************** *** 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 \ --- 1,3 ---- ! SUBDIRS = . ExcitationFunction Data Experiment InputFilters documentation EXTRA_DIST = documentation/mainpage.txt \ *************** *** 19,24 **** cd ExcitationFunction && $(MAKE) doc;\ cd ..; ! # cd InputFilters && $(MAKE) doc;\ ! # cd ..; doc-clean: --- 14,19 ---- cd ExcitationFunction && $(MAKE) doc;\ cd ..; ! cd InputFilters && $(MAKE) doc;\ ! cd ..; doc-clean: *************** *** 31,34 **** cd ExcitationFunction && $(MAKE) doc-clean;\ cd ..; ! # cd InputFilters && $(MAKE) doc-clean;\ ! # cd ..; --- 26,29 ---- cd ExcitationFunction && $(MAKE) doc-clean;\ cd ..; ! cd InputFilters && $(MAKE) doc-clean;\ ! cd ..; |
|
From: beeblbrox <bee...@us...> - 2008-03-27 13:04:35
|
Update of /cvsroot/echempp/Model/Ecco/test In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv8117/Model/Ecco/test Modified Files: Makefile.am Log Message: Build system changes due to BOOSTXXX. Index: Makefile.am =================================================================== RCS file: /cvsroot/echempp/Model/Ecco/test/Makefile.am,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Makefile.am 14 Jun 2006 15:20:24 -0000 1.10 --- Makefile.am 27 Mar 2008 13:04:28 -0000 1.11 *************** *** 4,19 **** $(top_srcdir)/Numerics/libeppNumerics.la \ -L$(GINACLIB) -lginac ! eccoTest1_CXXFLAGS = -Wall -Wno-deprecated \ ! -DTIXML_USE_STL eccoTest2_SOURCES = eccoTest2.cpp eccoTest2_LDADD = ../libeppEcco.la \ $(top_srcdir)/Numerics/libeppNumerics.la \ -L$(GINACLIB) -lginac ! eccoTest2_CXXFLAGS = -Wall -Wno-deprecated \ ! -DTIXML_USE_STL INCLUDES = -I$(top_srcdir) \ -I$(top_srcdir)/../Utilities \ ! -I$(SPIRITSRC) \ ! -I$(SPIRITSRC)/boost \ -I$(GINACSRC) \ -I$(GMMSRC) --- 4,19 ---- $(top_srcdir)/Numerics/libeppNumerics.la \ -L$(GINACLIB) -lginac ! eccoTest1_CXXFLAGS = -Wall -Wno-deprecated ! eccoTest2_SOURCES = eccoTest2.cpp eccoTest2_LDADD = ../libeppEcco.la \ $(top_srcdir)/Numerics/libeppNumerics.la \ -L$(GINACLIB) -lginac ! eccoTest2_CXXFLAGS = -Wall -Wno-deprecated ! INCLUDES = -I$(top_srcdir) \ -I$(top_srcdir)/../Utilities \ ! -I$(BOOSTSRC) \ ! -I$(BOOSTSRC)/boost \ -I$(GINACSRC) \ -I$(GMMSRC) |
|
From: beeblbrox <bee...@us...> - 2008-03-27 13:04:35
|
Update of /cvsroot/echempp/Experiment/Experiment/test In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv8117/Experiment/Experiment/test Modified Files: Makefile.am Log Message: Build system changes due to BOOSTXXX. Index: Makefile.am =================================================================== RCS file: /cvsroot/echempp/Experiment/Experiment/test/Makefile.am,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** Makefile.am 19 Dec 2007 13:32:12 -0000 1.15 --- Makefile.am 27 Mar 2008 13:04:27 -0000 1.16 *************** *** 4,10 **** ExperimentTest_LDADD = ../libeppExperiment.la \ ! -lboost_unit_test_framework \ ! -lboost_serialization \ ! -lboost_date_time \ -leppExcitationFunction \ -leppData \ --- 4,11 ---- ExperimentTest_LDADD = ../libeppExperiment.la \ ! -L$(BOOSTLIB) \ ! -lboost_unit_test_framework$(BOOSTTAGS) \ ! -lboost_serialization$(BOOSTTAGS) \ ! -lboost_date_time$(BOOSTTAGS) \ -leppExcitationFunction \ -leppData \ *************** *** 18,22 **** -I$(LOKISRC) \ -I$(BSUTILITIESSRC) \ ! -I$(QUANTITIESSRC) ExperimentTest_CXXFLAGS = -Wall -Werror -pedantic-errors -DTIXML_USE_STL=YES --- 19,24 ---- -I$(LOKISRC) \ -I$(BSUTILITIESSRC) \ ! -I$(QUANTITIESSRC) \ ! -I$(BOOSTSRC) ExperimentTest_CXXFLAGS = -Wall -Werror -pedantic-errors -DTIXML_USE_STL=YES |
|
From: beeblbrox <bee...@us...> - 2008-03-27 13:04:34
|
Update of /cvsroot/echempp/Experiment/Data/test In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv8117/Experiment/Data/test Modified Files: Makefile.am Log Message: Build system changes due to BOOSTXXX. Index: Makefile.am =================================================================== RCS file: /cvsroot/echempp/Experiment/Data/test/Makefile.am,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Makefile.am 19 Dec 2007 13:26:08 -0000 1.6 --- Makefile.am 27 Mar 2008 13:04:27 -0000 1.7 *************** *** 1,17 **** ! check_PROGRAMS = dataTest DataTest ! ! DataTest_SOURCES = DataTest.cpp ! ! DataTest_LDADD = -lboost_serialization \ ! -lboost_unit_test_framework ! dataTest_SOURCES = dataTest.cpp dataTest_LDADD = ../libeppData.la \ -leppExperiment \ -L$(PHYSICALQUANTITIESLIB) -lPhysicalQuantities \ -L$(QUANTITIESLIB) -lQuantity \ -L$(BSUTILITIESLIB) -lBSUtilities \ ! -lloki INCLUDES = -I$(top_srcdir) \ --- 1,16 ---- ! check_PROGRAMS = dataTest ! dataTest_SOURCES = dataTest.cpp dataTest_LDADD = ../libeppData.la \ -leppExperiment \ + -leppExcitationFunction \ -L$(PHYSICALQUANTITIESLIB) -lPhysicalQuantities \ -L$(QUANTITIESLIB) -lQuantity \ -L$(BSUTILITIESLIB) -lBSUtilities \ ! -L$(LOKILIB) -lloki \ ! -L$(BOOSTLIB) \ ! -lboost_serialization$(BOOSTTAGS) \ ! -lboost_unit_test_framework$(BOOSTTAGS) INCLUDES = -I$(top_srcdir) \ *************** *** 19,26 **** -I$(LOKISRC) \ -I$(QUANTITIESSRC) \ ! -I$(BSUTILITIESSRC) ! dataTest_CXXFLAGS = -Wall -Werror -pedantic-errors -DTIXML_USE_STL=YES - DataTest_CXXFLAGS = -Wall -Werror -pedantic-errors --- 18,25 ---- -I$(LOKISRC) \ -I$(QUANTITIESSRC) \ ! -I$(BSUTILITIESSRC) \ ! -I$(BOOSTSRC) ! dataTest_CXXFLAGS = -Wall -Werror -pedantic-errors |
|
From: beeblbrox <bee...@us...> - 2008-03-27 13:04:34
|
Update of /cvsroot/echempp/Experiment/Data In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv8117/Experiment/Data Modified Files: Makefile.am Log Message: Build system changes due to BOOSTXXX. Index: Makefile.am =================================================================== RCS file: /cvsroot/echempp/Experiment/Data/Makefile.am,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Makefile.am 27 Dec 2007 19:17:20 -0000 1.13 --- Makefile.am 27 Mar 2008 13:04:27 -0000 1.14 *************** *** 11,15 **** -I$(LOKISRC) \ -I$(QUANTITIESSRC) \ ! -I$(BSUTILITIESSRC) libeppData_la_SOURCES = Data.hpp --- 11,16 ---- -I$(LOKISRC) \ -I$(QUANTITIESSRC) \ ! -I$(BSUTILITIESSRC) \ ! -I$(BOOSTSRC) libeppData_la_SOURCES = Data.hpp |
|
From: beeblbrox <bee...@us...> - 2008-03-27 13:04:34
|
Update of /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv8117/GUI/Windows/Qt/EChem++/Model Modified Files: Makefile.am Log Message: Build system changes due to BOOSTXXX. Index: Makefile.am =================================================================== RCS file: /cvsroot/echempp/GUI/Windows/Qt/EChem++/Model/Makefile.am,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** Makefile.am 10 Mar 2008 16:18:51 -0000 1.46 --- Makefile.am 27 Mar 2008 13:04:28 -0000 1.47 *************** *** 294,298 **** -Wno-parentheses ! ModSim_LDADD = ../../../../../Analysis/Classification/libeppClassification.la ../../../../../Analysis/Data/libeppDataold.la ../../../../../Model/Problem/libeppProblem.la ../../../../../Model/Adapters/libeppAdapters.la ../../../../../Model/Ecco/libeppEcco.la ../../../../../Model/Solvers/libeppSolvers.la ../../../../../Model/Numerics/libeppNumerics.la ../../../../../Experiment/ExcitationFunction/libeppExcitationFunction.la ../../../../../Experiment/Data/libeppData.la ../../../../../Experiment/Experiment/libeppExperiment.la ../../../../Visualization/libeppVisualization.la -L$(QUANTITIESLIB) -lPhysicalQuantities -lQuantity -L$(BSUTILITIESLIB) -lBSUtilities -L$(LOKILIB) -lloki -L$(GINACLIB) -lginac $(LDADD) $(QT_LDADD) $(VTK_LDADD) $(MODEL_LDADD) -lboost_serialization -lboost_date_time --- 294,298 ---- -Wno-parentheses ! ModSim_LDADD = ../../../../../Analysis/Classification/libeppClassification.la ../../../../../Analysis/Data/libeppDataold.la ../../../../../Model/Problem/libeppProblem.la ../../../../../Model/Adapters/libeppAdapters.la ../../../../../Model/Ecco/libeppEcco.la ../../../../../Model/Solvers/libeppSolvers.la ../../../../../Model/Numerics/libeppNumerics.la ../../../../../Experiment/ExcitationFunction/libeppExcitationFunction.la ../../../../../Experiment/Data/libeppData.la ../../../../../Experiment/InputFilters/libeppInputFilters.la ../../../../../Experiment/Experiment/libeppExperiment.la ../../../../Visualization/libeppVisualization.la -L$(QUANTITIESLIB) -lPhysicalQuantities -lQuantity -L$(BSUTILITIESLIB) -lBSUtilities -L$(LOKILIB) -lloki -L$(GINACLIB) -lginac $(LDADD) $(QT_LDADD) $(VTK_LDADD) $(MODEL_LDADD) -L$(BOOSTLIB) -lboost_serialization$(BOOSTTAGS) -lboost_date_time$(BOOSTTAGS) |
|
From: beeblbrox <bee...@us...> - 2008-03-27 13:04:34
|
Update of /cvsroot/echempp/Experiment/ExcitationFunction In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv8117/Experiment/ExcitationFunction Modified Files: Makefile.am Log Message: Build system changes due to BOOSTXXX. Index: Makefile.am =================================================================== RCS file: /cvsroot/echempp/Experiment/ExcitationFunction/Makefile.am,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Makefile.am 19 Dec 2007 13:27:51 -0000 1.20 --- Makefile.am 27 Mar 2008 13:04:27 -0000 1.21 *************** *** 5,9 **** -I$(LOKISRC) \ -I$(QUANTITIESSRC) \ ! -I$(BSUTILITIESSRC) libeppExcitationFunction_la_SOURCES = segment.hpp \ --- 5,10 ---- -I$(LOKISRC) \ -I$(QUANTITIESSRC) \ ! -I$(BSUTILITIESSRC) \ ! -I$(BOOSTSRC) libeppExcitationFunction_la_SOURCES = segment.hpp \ *************** *** 15,20 **** documentation/mainpage.txt ! libeppExcitationFunction_la_CXXFLAGS = -Wall -Werror -pedantic-errors \ ! -DTIXML_USE_STL=YES libeppExcitationFunction_la_LDFLAGS = -Wl,--allow-multiple-definition $(EXPERIMENT_LDFLAGS) -version-info 0:5:0 --- 16,20 ---- documentation/mainpage.txt ! libeppExcitationFunction_la_CXXFLAGS = -Wall -Werror -pedantic-errors libeppExcitationFunction_la_LDFLAGS = -Wl,--allow-multiple-definition $(EXPERIMENT_LDFLAGS) -version-info 0:5:0 |
|
From: beeblbrox <bee...@us...> - 2008-03-27 13:04:34
|
Update of /cvsroot/echempp/Model/Ecco In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv8117/Model/Ecco Modified Files: Makefile.am Log Message: Build system changes due to BOOSTXXX. Index: Makefile.am =================================================================== RCS file: /cvsroot/echempp/Model/Ecco/Makefile.am,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** Makefile.am 22 Dec 2007 15:54:55 -0000 1.36 --- Makefile.am 27 Mar 2008 13:04:28 -0000 1.37 *************** *** 24,29 **** INCLUDES = -I$(top_srcdir) \ -I$(top_srcdir)/../Utilities \ ! -I$(SPIRITSRC) \ ! -I$(SPIRITSRC)/boost \ -I$(GINACSRC) \ -I$(GMMSRC) --- 24,29 ---- INCLUDES = -I$(top_srcdir) \ -I$(top_srcdir)/../Utilities \ ! -I$(BOOSTSRC) \ ! -I$(BOOSTSRC)/boost \ -I$(GINACSRC) \ -I$(GMMSRC) |
|
From: beeblbrox <bee...@us...> - 2008-03-27 13:04:33
|
Update of /cvsroot/echempp/Analysis/Data In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv8117/Analysis/Data Modified Files: Makefile.am Log Message: Build system changes due to BOOSTXXX. Index: Makefile.am =================================================================== RCS file: /cvsroot/echempp/Analysis/Data/Makefile.am,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Makefile.am 11 Dec 2007 09:19:11 -0000 1.17 --- Makefile.am 27 Mar 2008 13:04:27 -0000 1.18 *************** *** 6,10 **** -I$(GMMSRC) \ -I$(QUANTITIESSRC) \ ! -I$(BSUTILITIESSRC) libeppDataold_la_SOURCES = dataTypesOld.hpp \ --- 6,10 ---- -I$(GMMSRC) \ -I$(QUANTITIESSRC) \ ! -I$(BSUTILITIESSRC) libeppDataold_la_SOURCES = dataTypesOld.hpp \ *************** *** 34,39 **** -Wno-unused-parameter\ -Wno-parentheses\ ! -Wno-long-long\ ! -DTIXML_USE_STL --- 34,38 ---- -Wno-unused-parameter\ -Wno-parentheses\ ! -Wno-long-long |
|
From: beeblbrox <bee...@us...> - 2008-03-27 13:02:04
|
Update of /cvsroot/echempp In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv6918 Modified Files: build.sh configure.in Log Message: Build system change due to BOOSTXXX. Index: build.sh =================================================================== RCS file: /cvsroot/echempp/build.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** build.sh 17 Mar 2008 07:29:09 -0000 1.1 --- build.sh 27 Mar 2008 13:01:38 -0000 1.2 *************** *** 31,35 **** # Set this to 1 if you are behind a firewall and want to use cvsgrab # for anonymous cvs acess ! USE_CVSGRAB=1 # Proxy host to use for http access PROXY_HOST=www-cache --- 31,35 ---- # Set this to 1 if you are behind a firewall and want to use cvsgrab # for anonymous cvs acess ! USE_CVSGRAB=0 # Proxy host to use for http access PROXY_HOST=www-cache *************** *** 56,60 **** BOOSTLIB=/usr/lib BOOSTSRC=/usr/include - SPIRITSRC=/usr/include GINACSRC=/usr/include/ginac GINACLIB=/usr/lib --- 56,59 ---- *************** *** 90,94 **** echo "export BOOSTLIB=${BOOSTLIB}" >> ${BUILDDIR}/sourceme echo "export BOOSTSRC=${BOOSTSRC}" >> ${BUILDDIR}/sourceme - echo "export SPIRITSRC=${SPIRITSRC}" >> ${BUILDDIR}/sourceme echo "export GINACSRC=${GINACSRC}" >> ${BUILDDIR}/sourceme echo "export GINACLIB=${GINACLIB}" >> ${BUILDDIR}/sourceme --- 89,92 ---- Index: configure.in =================================================================== RCS file: /cvsroot/echempp/configure.in,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** configure.in 30 Nov 2006 12:35:18 -0000 1.22 --- configure.in 27 Mar 2008 13:01:38 -0000 1.23 *************** *** 102,106 **** dnl turn on optimization per default ! CXXFLAGS="-O2 -Wuninitialized -funroll-loops -funroll-all-loops -fstrict-aliasing $CXXFLAGS" dnl The user can choose wether he wants to compile the package without --- 102,106 ---- dnl turn on optimization per default ! CXXFLAGS="-O2 -Wuninitialized -fstrict-aliasing $CXXFLAGS" dnl The user can choose wether he wants to compile the package without *************** *** 165,168 **** --- 165,184 ---- esac],[static=true]) + dnl Note: In future it might be better to remove all the environment variables + dnl and let the user specify it to the configure script via --with-xxx. + dnl db + dnl AC_ARG_WITH(boost, + dnl [ --with-boost=<path> prefix of boost installation. e.g. /usr or /usr/local], + dnl [BOOST_PREFIX=$with_boost], + dnl AC_MSG_ERROR([You must call configure with the --with-boost option. + dnl This tells configure where to find the boost library and headers. + dnl e.g. --with-boost=/usr/local or --with-boost=/usr]) + dnl ) + dnl AC_SUBST(BOOST_PREFIX) + dnl BOOST_LIBS="-L${BOOST_PREFIX}/lib" + dnl BOOST_CFLAGS="-I${BOOST_PREFIX}/include -I${BOOST_PREFIX}/include/boost" + dnl AC_SUBST(BOOST_LIBS) + dnl AC_SUBST(BOOST_CFLAGS) + AC_MSG_CHECKING([staticexe]) AC_MSG_RESULT([$staticexe]) |
|
From: Bernd S. <ber...@us...> - 2008-03-17 20:30:51
|
Update of /cvsroot/echempp/documentation In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv2631/documentation Modified Files: Notes.log Log Message: adapted to gcc 4.3.0 Index: Notes.log =================================================================== RCS file: /cvsroot/echempp/documentation/Notes.log,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Notes.log 18 Dec 2007 17:47:45 -0000 1.13 --- Notes.log 17 Mar 2008 20:30:39 -0000 1.14 *************** *** 218,219 **** --- 218,229 ---- The patch file for x86_64 architectures on sourceforge.net has been renamed to reflect the fact that it is a gzipped tar archive (although it contains only a single file). + + 17.03.2008 bs + + In order to compile with gcc 4.3.0 the following changed have to be introduced to third party + software: + (1) boost 1.34.0: in boost/date_time/date_facet.hpp, line 432 + add qualification boost::date_time:: to typedef: + typedef boost::date_time::special_values_parser<date_type,CharT> special_values_parser_type; + (2) gmm 1.7: in dal_std.h: + add #include <climits> after line 99 (#include <limits>) |