Changeset 17288


Ignore:
Timestamp:
02/15/14 20:33:24 (11 years ago)
Author:
seroussi
Message:

BUG: fixing analytical 2d

Location:
issm/trunk-jpl/src/c
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/analyses/StressbalanceAnalysis.cpp

    r17287 r17288  
    66#include "../solutionsequences/solutionsequences.h"
    77
    8 #define FSANALYTICAL 3
     8//#define FSANALYTICAL 3
    99
    1010/*Model processing*/
     
    409409                                        if(nodeonbed[i]>0. && groundedice_ls[i]>0. && nodeonFS[i]>0.){
    410410                                                if(vertices_type[i] == FSApproximationEnum){
    411                                                 //      for(j=0;j<Nz;j++) spcvz[i*Nz+j] = 0.;
     411                                                        for(j=0;j<Nz;j++) spcvz[i*Nz+j] = 0.;
    412412                                                }
    413413                                                else{
  • issm/trunk-jpl/src/c/classes/Elements/Tria.cpp

    r17281 r17288  
    11911191        /*We found the enum.  Use its values to fill into the vector, using the vertices ids: */
    11921192        input->GetVectorFromInputs(vector,&vertexpidlist[0]);
     1193}
     1194/*}}}*/
     1195/*FUNCTION Tria::GetXcoord {{{*/
     1196IssmDouble Tria::GetXcoord(Gauss* gauss){
     1197
     1198        IssmDouble x;
     1199        IssmDouble xyz_list[NUMVERTICES][3];
     1200        IssmDouble x_list[NUMVERTICES];
     1201
     1202        ::GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES);
     1203        for(int i=0;i<NUMVERTICES;i++) x_list[i]=xyz_list[i][0];
     1204        TriaRef::GetInputValue(&x,x_list,gauss,P1Enum);
     1205
     1206        return x;
    11931207}
    11941208/*}}}*/
  • issm/trunk-jpl/src/c/classes/Elements/Tria.h

    r17275 r17288  
    209209
    210210                void             GetVertexPidList(int* doflist);
    211                 IssmDouble     GetXcoord(Gauss* gauss){_error_("not implemented");};
     211                IssmDouble     GetXcoord(Gauss* gauss);
    212212                IssmDouble     GetYcoord(Gauss* gauss);
    213213                IssmDouble     GetZcoord(Gauss* gauss){_error_("not implemented");};
  • issm/trunk-jpl/src/c/shared/FSanalyticals/FSanalytical3.cpp

    r17286 r17288  
    88#include "../Numerics/constants.h"
    99
    10 IssmDouble fx2(IssmDouble x,IssmDouble y{   
    11         IssmDouble p = 2.0; 
    12         IssmDouble q = 2.0;   
     10IssmDouble fx3(IssmDouble x,IssmDouble y){   
    1311        IssmDouble functionx;
     12        IssmDouble z=y;
    1413
    15         functionx =  -2*(y-1)*(y-1)*(x-1)*(2*x-1)*y-4*(y-1)*(y-1)*(x-1)*x*y-2*(y-1)*(y-1)*(2*x-1)*x*y +4*(y-1)*(2*y-1)*(x-1)*(x-1)*y+16*(y-1)*(2*y-1)*(x-1)*x*y+4*(y-1)*(2*y-1)*x*x*y +4*(y-1)*(x-1)*(x-1)*x*x-2*(y-1)*(x-1)*(2*x-1)*y*y-4*(y-1)*(x-1)*x*y*y -2*(y-1)*(2*x-1)*x*y*y+2*(2*y-1)*(x-1)*(x-1)*x*x+4*(x-1)*(x-1)*x*x*y+y-1/2;
     14        functionx =  4*pow(x, 2)*z*pow(x - 1, 2) + 4*pow(x, 2)*z*(z - 1)*(2*z - 1) + 4*pow(x, 2)*pow(x - 1, 2)*(z - 1) + 2*pow(x, 2)*pow(x - 1, 2)*(2*z - 1) + 16*x*z*(x - 1)*(z - 1)*(2*z - 1) - 4*pow(z, 3)*(6*pow(x, 2) - 6*x + 1) + 6*pow(z, 2)*(6*pow(x, 2) - 6*x + 1) + 4*z*pow(x - 1, 2)*(z - 1)*(2*z - 1) - 2*z*(6*pow(x, 2) - 6*x + 1) + z - 1.0L/2.0L;
    1615        return functionx;
    1716}
    18 IssmDouble fy2(IssmDouble x,IssmDouble y){   
    19         IssmDouble p = 2.0; 
    20         IssmDouble q = 2.0;   
     17IssmDouble fy3(IssmDouble x,IssmDouble y){   
    2118        IssmDouble functiony;
     19        IssmDouble z=y;
    2220
    23         functiony = -4*(y-1)*(y-1)*(x-1)*(2*x-1)*x-4*(y-1)*(y-1)*(x-1)*y*y-2*(y-1)*(y-1)*(2*x-1)*y*y -4*(y-1)*(y-1)*x*y*y+2*(y-1)*(2*y-1)*(x-1)*(x-1)*x+2*(y-1)*(2*y-1)*(x-1)*x*x +4*(y-1)*(x-1)*(x-1)*x*y-16*(y-1)*(x-1)*(2*x-1)*x*y+4*(y-1)*(x-1)*x*x*y +2*(2*y-1)*(x-1)*(x-1)*x*y+2*(2*y-1)*(x-1)*x*x*y -4*(x-1)*(2*x-1)*x*y*y+x-1/2;
     21        functiony = -8*pow(x, 3) + 4*pow(x, 2)*z*(x - 1)*(z - 1) + 2*pow(x, 2)*z*(x - 1)*(2*z - 1) + 2*pow(x, 2)*(x - 1)*(z - 1)*(2*z - 1) + 12*pow(x, 2) + 4*x*z*pow(x - 1, 2)*(z - 1) + 2*x*z*pow(x - 1, 2)*(2*z - 1) + 2*x*pow(x - 1, 2)*(z - 1)*(2*z - 1) - 3*x - 6*pow(z, 4)*(2*x - 1) + 12*pow(z, 3)*(2*x - 1) - 6*pow(z, 2)*(2*x - 1) - 24*pow(z, 2)*(2*pow(x, 3) - 3*pow(x, 2) + x) + 24*z*(2*pow(x, 3) - 3*pow(x, 2) + x) - 1.0L/2.0L;
    2422
    2523        return functiony;
Note: See TracChangeset for help on using the changeset viewer.