Changeset 15387


Ignore:
Timestamp:
07/02/13 08:01:44 (12 years ago)
Author:
Mathieu Morlighem
Message:

BUG: fixing compilation: AverageOntoPartitionx should be if HAVE_RESPONSE

Location:
issm/trunk-jpl/src/c/classes/Elements
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified issm/trunk-jpl/src/c/classes/Elements/Element.h

    r15386 r15387  
    8484
    8585                #ifdef _HAVE_RESPONSES_
     86                virtual void   AverageOntoPartition(Vector<IssmDouble>* partition_contributions,Vector<IssmDouble>* partition_areas,IssmDouble* vertex_response,IssmDouble* qmu_part)=0;
    8687                virtual void   MinVel(IssmDouble* pminvel)=0;
    8788                virtual void   MaxVel(IssmDouble* pmaxvel)=0;
     
    140141                #endif
    141142
    142                 #ifdef _HAVE_WRAPPERS_
    143                 virtual void   AverageOntoPartition(Vector<IssmDouble>* partition_contributions,Vector<IssmDouble>* partition_areas,IssmDouble* vertex_response,IssmDouble* qmu_part)=0;
    144                 #endif
    145 
    146143};
    147144#endif
  • TabularUnified issm/trunk-jpl/src/c/classes/Elements/Penta.cpp

    r15386 r15387  
    31213121
    31223122#ifdef _HAVE_RESPONSES_
     3123/*FUNCTION Penta::AverageOntoPartition {{{*/
     3124void  Penta::AverageOntoPartition(Vector<IssmDouble>* partition_contributions,Vector<IssmDouble>* partition_areas,IssmDouble* vertex_response,IssmDouble* qmu_part){
     3125        _error_("Not supported yet!");
     3126}
     3127/*}}}*/
    31233128/*FUNCTION Penta::IceVolume {{{*/
    31243129IssmDouble Penta::IceVolume(void){
     
    91109115/*}}}*/
    91119116#endif
     9117
    91129118#ifdef _HAVE_BALANCED_
    91139119/*FUNCTION Penta::CreateKMatrixBalancethickness {{{*/
     
    91599165/*}}}*/
    91609166#endif
     9167
    91619168#ifdef _HAVE_HYDROLOGY_
    9162 
    91639169/*FUNCTION Penta::CreateKMatrixHydrologyDCInefficient {{{*/
    91649170ElementMatrix* Penta::CreateKMatrixHydrologyDCInefficient(void){
     
    94659471}
    94669472/*}}}*/
    9467 #endif
    9468 
    9469 #ifdef _HAVE_WRAPPERS_
    94709473/*FUNCTION Penta::PotentialUngrounding{{{*/
    94719474void  Penta::PotentialUngrounding(Vector<IssmDouble>* potential_ungrounding){
     
    94969499}
    94979500/*}}}*/
    9498 /*FUNCTION Penta::AverageOntoPartition {{{*/
    9499 void  Penta::AverageOntoPartition(Vector<IssmDouble>* partition_contributions,Vector<IssmDouble>* partition_areas,IssmDouble* vertex_response,IssmDouble* qmu_part){
    9500         _error_("Not supported yet!");
    9501 }
    9502 /*}}}*/
    95039501/*FUNCTION Penta::UpdatePotentialUngrounding{{{*/
    95049502int Penta::UpdatePotentialUngrounding(IssmDouble* vertices_potentially_ungrounding,Vector<IssmDouble>* vec_nodes_on_iceshelf,IssmDouble* nodes_on_iceshelf){
  • TabularUnified issm/trunk-jpl/src/c/classes/Elements/Penta.h

    r15386 r15387  
    120120
    121121                 #ifdef _HAVE_RESPONSES_
     122                void   AverageOntoPartition(Vector<IssmDouble>* partition_contributions,Vector<IssmDouble>* partition_areas,IssmDouble* vertex_response,IssmDouble* qmu_part);
    122123                IssmDouble IceVolume(void);
    123124                IssmDouble TotalSmb(void);
     
    174175                void   PotentialUngrounding(Vector<IssmDouble>* potential_sheet_ungrounding);
    175176                int    UpdatePotentialUngrounding(IssmDouble* potential_sheet_ungrounding,Vector<IssmDouble>* vec_nodes_on_iceshelf,IssmDouble* nodes_on_iceshelf);
    176                 #endif
    177 
    178                 #ifdef _HAVE_WRAPPERS_
    179                 void   AverageOntoPartition(Vector<IssmDouble>* partition_contributions,Vector<IssmDouble>* partition_areas,IssmDouble* vertex_response,IssmDouble* qmu_part);
    180177                #endif
    181178
  • TabularUnified issm/trunk-jpl/src/c/classes/Elements/Tria.cpp

    r15386 r15387  
    23162316
    23172317#ifdef _HAVE_RESPONSES_
     2318/*FUNCTION Tria::AverageOntoPartition {{{*/
     2319void  Tria::AverageOntoPartition(Vector<IssmDouble>* partition_contributions,Vector<IssmDouble>* partition_areas,IssmDouble* vertex_response,IssmDouble* qmu_part){
     2320
     2321        bool       already = false;
     2322        int        i,j;
     2323        int        partition[NUMVERTICES];
     2324        int        offsetsid[NUMVERTICES];
     2325        int        offsetdof[NUMVERTICES];
     2326        IssmDouble area;
     2327        IssmDouble mean;
     2328
     2329        /*First, get the area: */
     2330        area=this->GetArea();
     2331
     2332        /*Figure out the average for this element: */
     2333        this->GetVertexSidList(&offsetsid[0]);
     2334        this->GetVertexPidList(&offsetdof[0]);
     2335        mean=0;
     2336        for(i=0;i<NUMVERTICES;i++){
     2337                partition[i]=reCast<int>(qmu_part[offsetsid[i]]);
     2338                mean=mean+1.0/NUMVERTICES*vertex_response[offsetdof[i]];
     2339        }
     2340
     2341        /*Add contribution: */
     2342        for(i=0;i<NUMVERTICES;i++){
     2343                already=false;
     2344                for(j=0;j<i;j++){
     2345                        if (partition[i]==partition[j]){
     2346                                already=true;
     2347                                break;
     2348                        }
     2349                }
     2350                if(!already){
     2351                        partition_contributions->SetValue(partition[i],mean*area,ADD_VAL);
     2352                        partition_areas->SetValue(partition[i],area,ADD_VAL);
     2353                };
     2354        }
     2355}
     2356/*}}}*/
    23182357/*FUNCTION Tria::IceVolume {{{*/
    23192358IssmDouble Tria::IceVolume(void){
     
    70287067/*}}}*/
    70297068#endif
    7030 
    7031 #ifdef _HAVE_WRAPPERS_
    7032 /*FUNCTION Tria::AverageOntoPartition {{{*/
    7033 void  Tria::AverageOntoPartition(Vector<IssmDouble>* partition_contributions,Vector<IssmDouble>* partition_areas,IssmDouble* vertex_response,IssmDouble* qmu_part){
    7034 
    7035         bool       already = false;
    7036         int        i,j;
    7037         int        partition[NUMVERTICES];
    7038         int        offsetsid[NUMVERTICES];
    7039         int        offsetdof[NUMVERTICES];
    7040         IssmDouble area;
    7041         IssmDouble mean;
    7042 
    7043         /*First, get the area: */
    7044         area=this->GetArea();
    7045 
    7046         /*Figure out the average for this element: */
    7047         this->GetVertexSidList(&offsetsid[0]);
    7048         this->GetVertexPidList(&offsetdof[0]);
    7049         mean=0;
    7050         for(i=0;i<NUMVERTICES;i++){
    7051                 partition[i]=reCast<int>(qmu_part[offsetsid[i]]);
    7052                 mean=mean+1.0/NUMVERTICES*vertex_response[offsetdof[i]];
    7053         }
    7054 
    7055         /*Add contribution: */
    7056         for(i=0;i<NUMVERTICES;i++){
    7057                 already=false;
    7058                 for(j=0;j<i;j++){
    7059                         if (partition[i]==partition[j]){
    7060                                 already=true;
    7061                                 break;
    7062                         }
    7063                 }
    7064                 if(!already){
    7065                         partition_contributions->SetValue(partition[i],mean*area,ADD_VAL);
    7066                         partition_areas->SetValue(partition[i],area,ADD_VAL);
    7067                 };
    7068         }
    7069 }
    7070 /*}}}*/
    7071 #endif
  • TabularUnified issm/trunk-jpl/src/c/classes/Elements/Tria.h

    r15386 r15387  
    118118
    119119                #ifdef _HAVE_RESPONSES_
     120                void   AverageOntoPartition(Vector<IssmDouble>* partition_contributions,Vector<IssmDouble>* partition_areas,IssmDouble* vertex_response,IssmDouble* qmu_part);
    120121                IssmDouble IceVolume(void);
    121122                IssmDouble TotalSmb(void);
     
    176177                void   MigrateGroundingLine(IssmDouble* oldfloating,IssmDouble* sheet_ungrounding);
    177178                int    UpdatePotentialUngrounding(IssmDouble* vertices_potentially_ungrounding,Vector<IssmDouble>* vec_nodes_on_iceshelf,IssmDouble* nodes_on_iceshelf);
    178                 #endif
    179 
    180                 #ifdef _HAVE_WRAPPERS_
    181                 void   AverageOntoPartition(Vector<IssmDouble>* partition_contributions,Vector<IssmDouble>* partition_areas,IssmDouble* vertex_response,IssmDouble* qmu_part);
    182179                #endif
    183180
Note: See TracChangeset for help on using the changeset viewer.