Changeset 4459


Ignore:
Timestamp:
07/08/10 10:41:19 (15 years ago)
Author:
seroussi
Message:

added GetParametersValue for Pengrid

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

Legend:

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

    r4440 r4459  
    55285528}
    55295529/*}}}*/
    5530 /*FUNCTION Penta::GetParameterValue {{{1*/
     5530/*FUNCTION Penta::GetParameterValue(double* pvalue, double* v_list,double* gauss_coord) {{{1*/
    55315531void Penta::GetParameterValue(double* pvalue, double* v_list,double* gauss_coord){
    55325532
     
    55375537
    55385538        *pvalue=l1l6[0]*v_list[0]+l1l6[1]*v_list[1]+l1l6[2]*v_list[2]+l1l6[3]*v_list[3]+l1l6[4]*v_list[4]+l1l6[5]*v_list[5];
     5539}
     5540/*}}}*/
     5541/*FUNCTION Penta::GetParameterValue(double* pvalue,Node* node1,Node* node2,double gauss_seg,int enumtype) {{{1*/
     5542void Penta::GetParameterValue(double* pvalue,Node* node,int enumtype){
     5543
     5544        /*Output*/
     5545        double value;
     5546
     5547        /*Intermediaries*/
     5548        const int numnodes=6;
     5549        int       grid=-1;
     5550        int       i;
     5551        double gauss[numnodes][numnodes]={{1,0,0,0},{0,1,0,0},{0,0,1,0},{1,0,0,1},{0,1,0,1},{0,0,1,1}};
     5552
     5553        /*go through 3 nodes (all nodes for tria) and identify 1st and 2nd nodes: */
     5554        ISSMASSERT(nodes);
     5555        for(i=0;i<numnodes;i++){
     5556                if (node==nodes[i]){
     5557                        grid=i;
     5558                        break;
     5559                }
     5560        }
     5561
     5562        /*Check that the node has been found*/
     5563        if (grid==-1) ISSMERROR("Node pointer not found in Penta's nodes");
     5564
     5565        /*Get Parameter value on node*/
     5566        inputs->GetParameterValue(pvalue,&gauss[grid][0],enumtype);
     5567        return;
     5568
    55395569}
    55405570/*}}}*/
  • issm/trunk/src/c/objects/Elements/Penta.h

    r4434 r4459  
    159159                void      GetParameterDerivativeValue(double* p, double* p_list,double* xyz_list, double* gauss_coord);
    160160                void      GetParameterValue(double* pvalue, double* v_list,double* gauss_coord);
     161                void    GetParameterValue(double* pvalue,Node* node,int enumtype);
    161162                void      GetPhi(double* phi, double*  epsilon, double viscosity);
    162163                void      GetSolutionFromInputsDiagnosticHoriz(Vec solutiong);
  • issm/trunk/src/c/objects/Loads/Pengrid.cpp

    r4456 r4459  
    399399}
    400400/*}}}*/
     401/*FUNCTION Pengrid::GetParameterValue {{{1*/
     402void Pengrid::GetParameterValue(double* pvalue,int enumtype){
     403
     404        /*output: */
     405        double value;
     406
     407        /*dynamic objects pointed to by hooks: */
     408        Penta* penta=NULL;
     409        Node*  node=NULL;
     410
     411        /*recover objects from hooks: */
     412        penta=(Penta*)helement->delivers();
     413        node =(Node*)hnode->delivers();
     414
     415        /*Get value on Element 1*/
     416        penta->GetParameterValue(&value,node,enumtype);
     417
     418        /*Assign output pointers:*/
     419        *pvalue=value;
     420}
     421/*}}}*/
    401422/*FUNCTION Pengrid::PenaltyConstrain {{{1*/
    402423void  Pengrid::PenaltyConstrain(int* punstable){
     
    536557
    537558        //recover slope: */
    538         penta->inputs->GetParameterValue(&slope[0],node,BedSlopeXEnum);
    539         penta->inputs->GetParameterValue(&slope[1],node,BedSlopeYEnum);
     559        this->GetParameterValue(&slope[0],BedSlopeXEnum);
     560        this->GetParameterValue(&slope[1],BedSlopeYEnum);
    540561       
    541562        /*recover parameters: */
  • issm/trunk/src/c/objects/Loads/Pengrid.h

    r4396 r4459  
    7070                void  PenaltyCreateKMatrixDiagnosticStokes(Mat Kgg,double kmax);
    7171                void  GetDofList(int* doflist,int* pnumberofdofspernode);
     72                void  GetParameterValue(double* pvalue,int enumtype);
    7273                void  PenaltyCreateKMatrixThermal(Mat Kgg,double kmax);
    7374                void  PenaltyCreateKMatrixMelting(Mat Kgg,double kmax);
Note: See TracChangeset for help on using the changeset viewer.