Changeset 4433


Ignore:
Timestamp:
07/07/10 14:53:43 (15 years ago)
Author:
Mathieu Morlighem
Message:

Fixed Prognostic2 parallel

Location:
issm/trunk/src/c/objects
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/objects/Elements/Tria.cpp

    r4424 r4433  
    51685168}
    51695169/*}}}*/
    5170 /*FUNCTION Tria::GetParameterValue( {{{1*/
     5170/*FUNCTION Tria::GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_seg,int enumtype) {{{1*/
    51715171void Tria::GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_seg,int enumtype){
    51725172
     
    51825182
    51835183        /*go through 3 nodes (all nodes for tria) and identify 1st and 2nd nodes: */
     5184        ISSMASSERT(nodes);
    51845185        for(i=0;i<numnodes;i++){
    51855186                if (node1==nodes[i]) grid1=i;
  • issm/trunk/src/c/objects/Loads/Numericalflux.cpp

    r4426 r4433  
    2323        this->inputs=NULL;
    2424        this->parameters=NULL;
    25         this->helements=NULL;
     25        this->helement=NULL;
    2626        this->hnodes=NULL;
    2727}
     
    111111
    112112        /*Hooks: */
    113         this->hnodes=new Hook(numericalflux_node_ids,num_nodes);
    114         this->helements=new Hook(numericalflux_elem_ids,num_elems);
     113        this->hnodes  =new Hook(numericalflux_node_ids,num_nodes);
     114        this->helement=new Hook(numericalflux_elem_ids,1); // take only the first element for now
    115115
    116116        //intialize  and add as many inputs per element as requested:
     
    126126        delete inputs;
    127127        this->parameters=NULL;
    128         delete helements;
     128        delete helement;
    129129        delete hnodes;
    130130}
     
    144144        printf("   analysis_type: %s\n",EnumAsString(analysis_type));
    145145        hnodes->DeepEcho();
    146         helements->DeepEcho();
     146        helement->DeepEcho();
    147147        printf("   parameters\n");
    148148        parameters->DeepEcho();
     
    186186        /*Marshall hooks: */
    187187        hnodes->Marshall(&marshalled_dataset);
    188         helements->Marshall(&marshalled_dataset);
     188        helement->Marshall(&marshalled_dataset);
    189189
    190190        /*Marshall inputs: */
     
    208208                +sizeof(analysis_type)
    209209                +hnodes->MarshallSize()
    210                 +helements->MarshallSize()
     210                +helement->MarshallSize()
    211211                +inputs->MarshallSize()
    212212                +sizeof(int); //sizeof(int) for enum type
     
    229229        /*demarshall hooks: */
    230230        hnodes=new Hook(); hnodes->Demarshall(&marshalled_dataset);
    231         helements=new Hook(); helements->Demarshall(&marshalled_dataset);
     231        helement=new Hook(); helement->Demarshall(&marshalled_dataset);
    232232       
    233233        /*demarshall inputs: */
     
    270270        /*now deal with hooks and objects: */
    271271        numericalflux->hnodes=(Hook*)this->hnodes->copy();
    272         numericalflux->helements=(Hook*)this->helements->copy();
     272        numericalflux->helement=(Hook*)this->helement->copy();
    273273
    274274        return numericalflux;
     
    284284         * datasets, using internal ids and offsets hidden in hooks: */
    285285        hnodes->configure(nodesin);
    286         helements->configure(elementsin);
     286        helement->configure(elementsin);
    287287
    288288        /*point parameters to real dataset: */
     
    845845
    846846        /*recover objects from hooks: */
    847         tria=(Tria*)helements[0].deliverp();
     847        tria=(Tria*)helement->delivers();
    848848        nodes=(Node**)hnodes->deliverp();
    849849
  • issm/trunk/src/c/objects/Loads/Numericalflux.h

    r4422 r4433  
    2222                int analysis_type;
    2323
    24                 Hook*       helements;
     24                Hook*       helement;
    2525                Hook*       hnodes;
    2626                Parameters *parameters;
Note: See TracChangeset for help on using the changeset viewer.