Changeset 24433


Ignore:
Timestamp:
12/04/19 21:35:47 (5 years ago)
Author:
Mathieu Morlighem
Message:

CHG: more flexible test

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

Legend:

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

    r24432 r24433  
    8282}/*}}}*/
    8383ElementMatrix* ExtrapolationAnalysis::CreateKMatrix(Element* element){/*{{{*/
    84 
    85         if(!element->AnyFSet()) return NULL;
    8684
    8785        /*Intermediaries */
  • issm/trunk-jpl/src/c/analyses/MasstransportAnalysis.cpp

    r24431 r24433  
    789789        return pe;
    790790}/*}}}*/
    791 void           MasstransportAnalysis::GetB(IssmDouble* B,Element* element,int dim,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/
    792         /*Compute B  matrix. B=[B1 B2 B3] where Bi is of size 3*NDOF2.
    793          * For node i, Bi can be expressed in the actual coordinate system
    794          * by:
    795          *       Bi=[ N ]
    796          *          [ N ]
    797          * where N is the finiteelement function for node i.
    798          *
    799          * We assume B_prog has been allocated already, of size: 2x(NDOF1*numnodes)
    800          */
    801 
    802         /*Fetch number of nodes for this finite element*/
    803         int numnodes = element->GetNumberOfNodes();
    804 
    805         /*Get nodal functions*/
    806         IssmDouble* basis=xNew<IssmDouble>(numnodes);
    807         element->NodalFunctions(basis,gauss);
    808 
    809         /*Build B: */
    810         for(int i=0;i<numnodes;i++){
    811                 for(int j=0;j<dim;j++){
    812                         B[numnodes*j+i] = basis[i];
    813                 }
    814         }
    815 
    816         /*Clean-up*/
    817         xDelete<IssmDouble>(basis);
    818 }/*}}}*/
    819 void           MasstransportAnalysis::GetBprime(IssmDouble* Bprime,Element* element,int dim,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/
    820         /*Compute B'  matrix. B'=[B1' B2' B3'] where Bi' is of size 3*NDOF2.
    821          * For node i, Bi' can be expressed in the actual coordinate system
    822          * by:
    823          *       Bi_prime=[ dN/dx ]
    824          *                [ dN/dy ]
    825          * where N is the finiteelement function for node i.
    826          *
    827          * We assume B' has been allocated already, of size: 3x(NDOF2*numnodes)
    828          */
    829 
    830         /*Fetch number of nodes for this finite element*/
    831         int numnodes = element->GetNumberOfNodes();
    832 
    833         /*Get nodal functions derivatives*/
    834         IssmDouble* dbasis=xNew<IssmDouble>(dim*numnodes);
    835         element->NodalFunctionsDerivatives(dbasis,xyz_list,gauss);
    836 
    837         /*Build B': */
    838         for(int i=0;i<numnodes;i++){
    839                 for(int j=0;j<dim;j++){
    840                         Bprime[numnodes*j+i] = dbasis[j*numnodes+i];
    841                 }
    842         }
    843 
    844         /*Clean-up*/
    845         xDelete<IssmDouble>(dbasis);
    846 
    847 }/*}}}*/
    848791void           MasstransportAnalysis::GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element){/*{{{*/
    849792        element->GetSolutionFromInputsOneDof(solution,ThicknessEnum);
  • issm/trunk-jpl/src/c/analyses/MasstransportAnalysis.h

    r24335 r24433  
    3030                ElementVector* CreatePVectorCG(Element* element);
    3131                ElementVector* CreatePVectorDG(Element* element);
    32                 void           GetB(IssmDouble* B,Element* element,int dim,IssmDouble* xyz_list,Gauss* gauss);
    33                 void           GetBprime(IssmDouble* B,Element* element,int dim,IssmDouble* xyz_list,Gauss* gauss);
    3432                void           GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element);
    3533                void           GradientJ(Vector<IssmDouble>* gradient,Element* element,int control_type,int control_index);
  • issm/trunk-jpl/src/c/modules/SystemMatricesx/SystemMatricesx.cpp

    r24432 r24433  
    4343                for (i=0;i<femmodel->elements->Size();i++){
    4444                        element=xDynamicCast<Element*>(femmodel->elements->GetObjectByOffset(i));
    45                         //if(!element->AnyFSet()) continue;
     45                        if(!element->AnyFSet() && analysisenum!=StressbalanceAnalysisEnum) continue;
    4646                        ElementMatrix* Ke = analysis->CreateKMatrix(element);
    4747                        ElementVector* pe = analysis->CreatePVector(element);
     
    7777        for (i=0;i<femmodel->elements->Size();i++){
    7878                element=xDynamicCast<Element*>(femmodel->elements->GetObjectByOffset(i));
    79                 //if(!element->AnyFSet()) continue;
     79                if(!element->AnyFSet() && analysisenum!=StressbalanceAnalysisEnum) continue;
    8080                ElementMatrix* Ke = analysis->CreateKMatrix(element);
    8181                ElementVector* pe = analysis->CreatePVector(element);
Note: See TracChangeset for help on using the changeset viewer.