Differences From Artifact [10ac19653f]:

To Artifact [2a19c749fd]:


1
2
3
4
5
6
7
8
9
10
11




12
13
14
15
16
17
18
#! /bin/sh

     ###################################### 
     ##### Model Transformation Tools #####
    ######################################

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$




## Revision 1.64  2001/08/08 02:15:00  geraint
## Rationalisation of solver code, beginning with algebraic solvers.
##
## Revision 1.63  2001/08/07 04:39:24  geraint
## Consolidated dassl and residual functions.
##
## Revision 1.62  2001/08/01 22:14:32  geraint











>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#! /bin/sh

     ###################################### 
     ##### Model Transformation Tools #####
    ######################################

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.65  2001/11/15 06:24:11  geraint
## Updated (-i dassl) residual function to use new DAEFunc (octave-2.1.35).
## YZ residual dependency on Ui still requires some work.
##
## Revision 1.64  2001/08/08 02:15:00  geraint
## Rationalisation of solver code, beginning with algebraic solvers.
##
## Revision 1.63  2001/08/07 04:39:24  geraint
## Consolidated dassl and residual functions.
##
## Revision 1.62  2001/08/01 22:14:32  geraint
925
926
927
928
929
930
931









932
933
934
935
936
937
938
939
940

941
942
943
944
945
946
947
    data.elem (row, ++col) = y.elem (i);
  data.elem (row, ++col) = t;
  for (register int i = 0; i < nx; i++)
    data.elem (row, ++col) = x.elem (i);

  row++;










  if (nrows == row)
    {
#ifdef STANDALONE
      $save_ascii_data_function (file, data, "mtt_data");
//    std::cout << data << std::endl;
#else // ! STANDALONE
  set_global_value ("MTT_data", data);
#endif
    row = 0;

    }
}

#ifdef STANDALONE
void dump_data (std::ostream &file)
{
  ColumnVector null (0);







>
>
>
>
>
>
>
>
>









>







929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
    data.elem (row, ++col) = y.elem (i);
  data.elem (row, ++col) = t;
  for (register int i = 0; i < nx; i++)
    data.elem (row, ++col) = x.elem (i);

  row++;

  static std::fstream fcputime ("MTT.cputime", ios::out | ios::trunc | ios::app);
  static clock_t cputime0 = clock();
  static clock_t cputime1 = cputime0;
  clock_t cputime = clock();
  fcputime << t << '\t'
	   << static_cast <double> (cputime - cputime0) / CLOCKS_PER_SEC << '\t'
	   << static_cast <double> (cputime - cputime1) / CLOCKS_PER_SEC << std::endl;
  cputime1 = cputime;

  if (nrows == row)
    {
#ifdef STANDALONE
      $save_ascii_data_function (file, data, "mtt_data");
//    std::cout << data << std::endl;
#else // ! STANDALONE
  set_global_value ("MTT_data", data);
#endif
    row = 0;
    fcputime.close();
    }
}

#ifdef STANDALONE
void dump_data (std::ostream &file)
{
  ColumnVector null (0);

MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]