Changeset 3816


Ignore:
Timestamp:
05/18/10 13:40:19 (15 years ago)
Author:
Mathieu Morlighem
Message:

Some bug fix

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

Legend:

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

    r3775 r3816  
    418418
    419419        VecToMPISerial(&serial_vector,vector);
    420 
    421420        elements->UpdateInputsFromSolution(serial_vector,name,type);
    422         nodes->UpdateInputsFromSolution(serial_vector,name,type);
    423         vertices->UpdateInputsFromSolution(serial_vector,name,type);
    424         loads->UpdateInputsFromSolution(serial_vector,name,type);
    425         materials->UpdateInputsFromSolution(serial_vector,name,type);
    426         parameters->UpdateInputsFromSolution(serial_vector,name,type);
    427421
    428422        /*Free ressources:*/
  • issm/trunk/src/c/objects/Inputs/TriaVertexInput.cpp

    r3810 r3816  
    167167/*}}}*/
    168168/*FUNCTION TriaVertexInput::GetParameterValues(double* values,double* gauss_pointers, int numgauss){{{1*/
    169 void TriaVertexInput::GetParameterValues(double* values,double* gauss_pointers, int numgauss){ISSMERROR(" not supported yet!");}
     169void TriaVertexInput::GetParameterValues(double* values,double* gauss_pointers, int numgauss){
     170        /*It is assume that output values has been correctly allocated*/
     171
     172        int i,j;
     173        double gauss[3];
     174
     175        for (i=0;i<numgauss;i++){
     176
     177                /*Get current Gauss point coordinates*/
     178                for (j=0;j<3;j++) gauss[j]=gauss_pointers[i*3+j];
     179
     180                /*Assign parameter value*/
     181                GetParameterValue(&values[i],&gauss[0]);
     182        }
     183
     184}
    170185/*}}}*/
    171186/*FUNCTION TriaVertexInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, double* gauss){{{1*/
    172 void TriaVertexInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, double* gauss){ISSMERROR(" not supported yet!");}
     187void TriaVertexInput::GetParameterDerivativeValue(double* p, double* xyz_list, double* gauss){
     188        /*From node values of parameter p (plist[0],plist[1],plist[2]), return parameter derivative value at gaussian
     189         * point specified by gauss_l1l2l3:
     190         *   dp/dx=plist[0]*dh1/dx+plist[1]*dh2/dx+plist[2]*dh3/dx
     191         *   dp/dx=plist[0]*dh1/dx+plist[1]*dh2/dx+plist[2]*dh3/dx
     192         *
     193         * p is a vector of size 2x1 already allocated.
     194         */
     195
     196        const int NDOF2=2;
     197        const int numgrids=3;
     198        double dh1dh3[NDOF2][numgrids]; //nodal derivative functions in actual coordinate system.
     199
     200        /*Get nodal funnctions derivatives in actual coordinate system: */
     201        GetNodalFunctionsDerivatives(&dh1dh3[0][0],xyz_list,gauss);
     202
     203        p[0]=this->values[0]*dh1dh3[0][0]+this->values[1]*dh1dh3[0][1]+this->values[2]*dh1dh3[0][2];
     204        p[1]=this->values[0]*dh1dh3[1][0]+this->values[1]*dh1dh3[1][1]+this->values[2]*dh1dh3[1][2];
     205
     206}
    173207/*}}}*/
    174208/*FUNCTION TriaVertexInput::GetVxStrainRate2d(double* epsilonvx,double* xyz_list, double* gauss,int formulation_enum) {{{1*/
     
    282316        /*This routine returns the values of the nodal functions derivatives  (with respect to the
    283317         * actual coordinate system: */
    284 
    285318        int i;
    286319        const int NDOF2=2;
    287320        const int numgrids=3;
    288 
    289321        double dh1dh3_ref[NDOF2][numgrids];
    290322        double Jinv[NDOF2][NDOF2];
    291 
    292323
    293324        /*Get derivative values with respect to parametric coordinate system: */
     
    302333         * [dhi/dy]       [dhi/ds]
    303334         */
    304 
    305335        for (i=0;i<numgrids;i++){
    306                 *(dh1dh3+numgrids*0+i)=Jinv[0][0]*dh1dh3_ref[0][i]+Jinv[0][1]*dh1dh3_ref[1][i];
    307                 *(dh1dh3+numgrids*1+i)=Jinv[1][0]*dh1dh3_ref[0][i]+Jinv[1][1]*dh1dh3_ref[1][i];
     336                dh1dh3[numgrids*0+i]=Jinv[0][0]*dh1dh3_ref[0][i]+Jinv[0][1]*dh1dh3_ref[1][i];
     337                dh1dh3[numgrids*1+i]=Jinv[1][0]*dh1dh3_ref[0][i]+Jinv[1][1]*dh1dh3_ref[1][i];
    308338        }
    309339
Note: See TracChangeset for help on using the changeset viewer.