Changeset 5780


Ignore:
Timestamp:
09/13/10 15:21:12 (15 years ago)
Author:
Eric.Larour
Message:

Missing CreatePVector with new Kgg,Kff and Kfs logic

Location:
issm/trunk/src/c/objects/Elements
Files:
2 edited

Legend:

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

    r5772 r5780  
    753753        /*Just branch to the correct load generator, according to the type of analysis we are carrying out: */
    754754        if (analysis_type==DiagnosticHorizAnalysisEnum){
    755                 CreatePVectorDiagnosticMacAyeal( pg);
     755                CreatePVectorDiagnosticMacAyeal( pg,pf);
    756756        }
    757757        else if (analysis_type==AdjointHorizAnalysisEnum){
     
    41964196/*}}}*/
    41974197/*FUNCTION Tria::CreatePVectorDiagnosticMacAyeal {{{1*/
    4198 void Tria::CreatePVectorDiagnosticMacAyeal( Vec pg){
     4198void Tria::CreatePVectorDiagnosticMacAyeal( Vec pg, Vec pf){
    41994199
    42004200        int             i,j,ig;
     
    42034203        const int    numdof=NDOF2*NUMVERTICES;
    42044204        double       xyz_list[NUMVERTICES][3];
    4205         int*         doflist=NULL;
    42064205       
    42074206        /* parameters: */
     
    42184217        int  drag_type;
    42194218
     4219        /*intermediary: */
     4220        ElementVector* pe=NULL;
     4221
    42204222        /*retrieve inputs :*/
    42214223        inputs->GetParameterValue(&drag_type,DragTypeEnum);
     
    42294231        /* Get node coordinates and dof list: */
    42304232        GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
    4231         GetDofList(&doflist,MacAyealApproximationEnum,GsetEnum);
    42324233
    42334234        /* Start  looping on the number of gaussian points: */
     
    42764277        }
    42774278
    4278         /*Add pe_g to global vector pg: */
    4279         VecSetValues(pg,numdof,doflist,(const double*)pe_g,ADD_VALUES);
     4279        /*Initialize element vector: */
     4280        pe=this->NewElementVector(MacAyealApproximationEnum);
     4281
     4282        /*Add pe_g values to pe element stifness load: */
     4283        pe->AddValues(&pe_g[0]);
     4284
     4285        /*Add pe element load vector to global load vector: */
     4286        pe->AddToGlobal(pg,pf);
     4287
     4288        /*Free ressources:*/
     4289        delete pe;
    42804290
    42814291        /*Free ressources:*/
    42824292        delete gauss;
    4283         xfree((void**)&doflist);
     4293
     4294
    42844295}
    42854296/*}}}*/
  • issm/trunk/src/c/objects/Elements/Tria.h

    r5772 r5780  
    141141                void      CreatePVectorBalancedvelocities(Vec pg);
    142142                void      CreatePVectorDiagnosticBaseVert(Vec pg);
    143                 void      CreatePVectorDiagnosticMacAyeal(Vec pg);
     143                void      CreatePVectorDiagnosticMacAyeal(Vec pg,Vec pf);
    144144                void      CreatePVectorAdjointHoriz(Vec pg);
    145145                void      CreatePVectorAdjointStokes(Vec pg);
Note: See TracChangeset for help on using the changeset viewer.