Ignore:
Timestamp:
08/31/12 17:23:24 (13 years ago)
Author:
Eric.Larour
Message:

NEW: large change to the code, to adapt to ADOLC requirements.

This change relates to the introduction of template classes and functions for the
Option.h abstract class. This is needed, because we want to make the Matlab
API independent from the libCore objects, which are dependent on the IssmDouble*
ADOLC type (adouble), when the Matlab API is dependent on the IssmPDouble* type (double).

To make them independent, we need to be able to specify at run time Options, Matrix and
Vector objects that hold either IssmDouble or IssmPDouble objects. The only way to do
that is through the use of templated classes for Option.h, Matrix and Vector.

The change gets rid of a lot of useless code (especially in the classes/objects/Options
directory), by introducing template versions of the same code.

The bulk of the changes to src/modules and src/mex modules is to adapt to this
new runtime declaration of templated Matrix, Vector and Option objects.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/Container/Parameters.cpp

    r13056 r13216  
    244244}
    245245/*}}}*/
    246 /*FUNCTION Parameters::FindParam(Vector** pvec,int enum_type){{{*/
    247 void Parameters::FindParam(Vector** pvec,int enum_type){ _assert_(this);
     246/*FUNCTION Parameters::FindParam(Vector<IssmDouble>** pvec,int enum_type){{{*/
     247void Parameters::FindParam(Vector<IssmDouble>** pvec,int enum_type){ _assert_(this);
    248248       
    249249        vector<Object*>::iterator object;
     
    262262}
    263263/*}}}*/
    264 /*FUNCTION Parameters::FindParam(Matrix** pmat,int enum_type){{{*/
    265 void Parameters::FindParam(Matrix** pmat,int enum_type){ _assert_(this);
     264/*FUNCTION Parameters::FindParam(Matrix<IssmDouble>** pmat,int enum_type){{{*/
     265void Parameters::FindParam(Matrix<IssmDouble>** pmat,int enum_type){ _assert_(this);
    266266       
    267267        vector<Object*>::iterator object;
     
    406406}
    407407/*}}}*/
    408 /*FUNCTION Parameters::SetParam(Vector* vector,int enum_type);{{{*/
    409 void   Parameters::SetParam(Vector* vector,int enum_type){
     408/*FUNCTION Parameters::SetParam(Vector<IssmDouble>* vector,int enum_type);{{{*/
     409void   Parameters::SetParam(Vector<IssmDouble>* vector,int enum_type){
    410410
    411411        Param* param=NULL;
     
    418418}
    419419/*}}}*/
    420 /*FUNCTION Parameters::SetParam(Matrix* matrix,int enum_type);{{{*/
    421 void   Parameters::SetParam(Matrix* matrix,int enum_type){
     420/*FUNCTION Parameters::SetParam(Matrix<IssmDouble>* matrix,int enum_type);{{{*/
     421void   Parameters::SetParam(Matrix<IssmDouble>* matrix,int enum_type){
    422422
    423423        Param* param=NULL;
Note: See TracChangeset for help on using the changeset viewer.