Changeset 17536


Ignore:
Timestamp:
03/25/14 11:07:20 (11 years ago)
Author:
Mathieu Morlighem
Message:

CHG: adding Tensor basis functions'

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

Legend:

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

    r17535 r17536  
    34183418
    34193419        /*Initialize vectors*/
    3420         ElementVector* pe    = element->NewElementVector(FSvelocityEnum);
    3421         IssmDouble*    Dstar = xNew<IssmDouble>((dim*vnumnodes)*(tausize*tnumnodes));
    3422         IssmDouble*    tau   = xNew<IssmDouble>(tausize*tnumnodes);
    3423         IssmDouble*    d     = xNew<IssmDouble>(tausize*tnumnodes);
     3420        ElementVector* pe      = element->NewElementVector(FSvelocityEnum);
     3421        IssmDouble*    Dstar   = xNew<IssmDouble>((dim*vnumnodes)*(tausize*tnumnodes));
     3422        IssmDouble*    tau     = xNew<IssmDouble>(tausize*tnumnodes);
     3423        IssmDouble*    d       = xNew<IssmDouble>(tausize*tnumnodes);
     3424        IssmDouble*    vdbasis = xNew<IssmDouble>(dim*vnumnodes);
     3425        IssmDouble*    tbasis  = xNew<IssmDouble>(tnumnodes);
    34243426
    34253427        /*Retrieve all inputs and parameters*/
     
    34763478
    34773479                /*Create Dstar*/
     3480                element->NodalFunctionsDerivativesVelocity(vdbasis,xyz_list,gauss);
     3481                element->NodalFunctionsTensor(tbasis,gauss);
     3482
    34783483                _error_("STOP");
    34793484        }
  • issm/trunk-jpl/src/c/classes/Elements/Element.h

    r17516 r17536  
    158158                virtual void   NodalFunctionsVelocity(IssmDouble* basis, Gauss* gauss)=0;
    159159                virtual void   NodalFunctionsPressure(IssmDouble* basis, Gauss* gauss)=0;
     160                virtual void   NodalFunctionsTensor(IssmDouble* basis, Gauss* gauss)=0;
    160161                virtual void   NodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss)=0;
    161162                virtual void   NodalFunctionsP1Derivatives(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss)=0;
  • issm/trunk-jpl/src/c/classes/Elements/Penta.cpp

    r17532 r17536  
    17251725        _assert_(gauss->Enum()==GaussPentaEnum);
    17261726        this->GetNodalFunctionsPressure(basis,(GaussPenta*)gauss);
     1727
     1728}
     1729/*}}}*/
     1730/*FUNCTION Penta::NodalFunctionsTensor{{{*/
     1731void Penta::NodalFunctionsTensor(IssmDouble* basis, Gauss* gauss){
     1732
     1733        _assert_(gauss->Enum()==GaussPentaEnum);
     1734        this->GetNodalFunctionsTensor(basis,(GaussPenta*)gauss);
    17271735
    17281736}
  • issm/trunk-jpl/src/c/classes/Elements/Penta.h

    r17516 r17536  
    209209                void           NodalFunctionsVelocity(IssmDouble* basis,Gauss* gauss);
    210210                void           NodalFunctionsPressure(IssmDouble* basis,Gauss* gauss);
     211                void           NodalFunctionsTensor(IssmDouble* basis,Gauss* gauss);
    211212                IssmDouble     MinEdgeLength(IssmDouble* xyz_list);
    212213                void             SetClone(int* minranks);
  • issm/trunk-jpl/src/c/classes/Elements/PentaRef.cpp

    r17504 r17536  
    349349        int save = this->element_type;
    350350        this->element_type = PressureInterpolation();
     351        this->GetNodalFunctions(basis,gauss);
     352        this->element_type = save;
     353
     354}
     355/*}}}*/
     356/*FUNCTION PentaRef::GetNodalFunctionsTensor{{{*/
     357void PentaRef::GetNodalFunctionsTensor(IssmDouble* basis,Gauss* gauss){
     358        /*This routine returns the values of the nodal functions  at the gaussian point.*/
     359
     360        int save = this->element_type;
     361        this->element_type = TensorInterpolation();
    351362        this->GetNodalFunctions(basis,gauss);
    352363        this->element_type = save;
     
    11921203}
    11931204/*}}}*/
     1205/*FUNCTION PentaRef::TensorInterpolation{{{*/
     1206int PentaRef::TensorInterpolation(void){
     1207
     1208        switch(this->element_type){
     1209                case XTaylorHoodEnum:    return P1DGEnum;
     1210                default: _error_("Element type "<<EnumToStringx(this->element_type)<<" not supported yet");
     1211        }
     1212
     1213        return -1;
     1214}
     1215/*}}}*/
    11941216/*FUNCTION PentaRef::BasalNodeIndices{{{*/
    11951217void PentaRef::BasalNodeIndices(int* pnumindices,int** pindices,int finiteelement){
  • issm/trunk-jpl/src/c/classes/Elements/PentaRef.h

    r17225 r17536  
    2626                void GetNodalFunctionsVelocity(IssmDouble* basis, Gauss* gauss);
    2727                void GetNodalFunctionsPressure(IssmDouble* basis, Gauss* gauss);
     28                void GetNodalFunctionsTensor(IssmDouble* basis, Gauss* gauss);
    2829                void GetNodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss);
    2930                void GetNodalFunctionsDerivativesVelocity(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss);
     
    5556                int  VelocityInterpolation(void);
    5657                int  PressureInterpolation(void);
     58                int  TensorInterpolation(void);
    5759};
    5860#endif
  • issm/trunk-jpl/src/c/classes/Elements/Seg.h

    r17516 r17536  
    8484                void        NodalFunctionsVelocity(IssmDouble* basis,Gauss* gauss){_error_("not implemented yet");};
    8585                void        NodalFunctionsPressure(IssmDouble* basis,Gauss* gauss){_error_("not implemented yet");};
     86                void        NodalFunctionsTensor(IssmDouble* basis,Gauss* gauss){_error_("not implemented yet");};
    8687                void        NodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss);
    8788                void        NodalFunctionsP1Derivatives(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss){_error_("not implemented yet");};
  • issm/trunk-jpl/src/c/classes/Elements/Tetra.cpp

    r17516 r17536  
    512512}
    513513/*}}}*/
     514/*FUNCTION Tetra::NodalFunctionsTensor{{{*/
     515void Tetra::NodalFunctionsTensor(IssmDouble* basis, Gauss* gauss){
     516
     517        _assert_(gauss->Enum()==GaussTetraEnum);
     518        this->GetNodalFunctionsTensor(basis,(GaussTetra*)gauss);
     519
     520}
     521/*}}}*/
    514522/*FUNCTION Tetra::NodalFunctionsDerivatives{{{*/
    515523void Tetra::NodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss){
  • issm/trunk-jpl/src/c/classes/Elements/Tetra.h

    r17516 r17536  
    8888                void        NodalFunctionsVelocity(IssmDouble* basis,Gauss* gauss);
    8989                void        NodalFunctionsPressure(IssmDouble* basis,Gauss* gauss);
     90                void        NodalFunctionsTensor(IssmDouble* basis,Gauss* gauss);
    9091                void        NodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss);
    9192                void        NodalFunctionsP1Derivatives(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss){_error_("not implemented yet");};
  • issm/trunk-jpl/src/c/classes/Elements/TetraRef.cpp

    r17515 r17536  
    172172}
    173173/*}}}*/
     174/*FUNCTION TetraRef::GetNodalFunctionsTensor{{{*/
     175void TetraRef::GetNodalFunctionsTensor(IssmDouble* basis,GaussTetra* gauss){
     176        /*This routine returns the values of the nodal functions  at the gaussian point.*/
     177
     178        switch(this->element_type){
     179                case XTaylorHoodEnum:
     180                        this->element_type = P1DGEnum;
     181                        this->GetNodalFunctions(basis,gauss);
     182                        this->element_type = XTaylorHoodEnum;
     183                        return;
     184                default:
     185                        _error_("Element type "<<EnumToStringx(this->element_type)<<" not supported yet");
     186        }
     187}
     188/*}}}*/
    174189/*FUNCTION TetraRef::GetNodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list, GaussTetra* gauss){{{*/
    175190void TetraRef::GetNodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list, GaussTetra* gauss){
  • issm/trunk-jpl/src/c/classes/Elements/TetraRef.h

    r17493 r17536  
    3131                void GetNodalFunctionsVelocity(IssmDouble* basis, GaussTetra* gauss);
    3232                void GetNodalFunctionsPressure(IssmDouble* basis, GaussTetra* gauss);
     33                void GetNodalFunctionsTensor(IssmDouble* basis, GaussTetra* gauss);
    3334                void GetNodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list, GaussTetra* gauss);
    3435                void GetNodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list, GaussTetra* gauss,int finiteelement);
  • issm/trunk-jpl/src/c/classes/Elements/Tria.cpp

    r17532 r17536  
    14191419}
    14201420/*}}}*/
     1421/*FUNCTION Tria::NodalFunctionsTensor{{{*/
     1422void Tria::NodalFunctionsTensor(IssmDouble* basis, Gauss* gauss){
     1423
     1424        _assert_(gauss->Enum()==GaussTriaEnum);
     1425        this->GetNodalFunctionsTensor(basis,(GaussTria*)gauss);
     1426
     1427}
     1428/*}}}*/
    14211429/*FUNCTION Tria::NodalValue {{{*/
    14221430int    Tria::NodalValue(IssmDouble* pvalue, int index, int natureofdataenum){
  • issm/trunk-jpl/src/c/classes/Elements/Tria.h

    r17516 r17536  
    214214                void           NodalFunctionsVelocity(IssmDouble* basis,Gauss* gauss);
    215215                void           NodalFunctionsPressure(IssmDouble* basis,Gauss* gauss);
     216                void           NodalFunctionsTensor(IssmDouble* basis,Gauss* gauss);
    216217                void             SetClone(int* minranks);
    217218                void           SetTemporaryElementType(int element_type_in){_error_("not implemented yet");};
  • issm/trunk-jpl/src/c/classes/Elements/TriaRef.cpp

    r17525 r17536  
    280280                        this->GetNodalFunctions(basis,gauss);
    281281                        this->element_type = TaylorHoodEnum;
     282                        return;
     283                default:
     284                        _error_("Element type "<<EnumToStringx(this->element_type)<<" not supported yet");
     285        }
     286}
     287/*}}}*/
     288/*FUNCTION TriaRef::GetNodalFunctionsTensor{{{*/
     289void TriaRef::GetNodalFunctionsTensor(IssmDouble* basis,Gauss* gauss){
     290        /*This routine returns the values of the nodal functions  at the gaussian point.*/
     291
     292        switch(this->element_type){
     293                case XTaylorHoodEnum:
     294                        this->element_type = P1DGEnum;
     295                        this->GetNodalFunctions(basis,gauss);
     296                        this->element_type = XTaylorHoodEnum;
    282297                        return;
    283298                default:
  • issm/trunk-jpl/src/c/classes/Elements/TriaRef.h

    r17095 r17536  
    3131                void GetNodalFunctionsVelocity(IssmDouble* basis, Gauss* gauss);
    3232                void GetNodalFunctionsPressure(IssmDouble* basis, Gauss* gauss);
     33                void GetNodalFunctionsTensor(IssmDouble* basis, Gauss* gauss);
    3334                void GetSegmentNodalFunctions(IssmDouble* basis,Gauss* gauss, int index1,int index2);
    3435                void GetSegmentBFlux(IssmDouble* B,Gauss* gauss, int index1,int index2);
Note: See TracChangeset for help on using the changeset viewer.