Changeset 3613


Ignore:
Timestamp:
04/23/10 13:08:53 (15 years ago)
Author:
Mathieu Morlighem
Message:

readded Balanced... for 3d meshes

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

Legend:

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

    r3612 r3613  
    529529                CreateKMatrixPrognostic( Kgg,inputs,analysis_type,sub_analysis_type);
    530530        }
     531        else if (analysis_type==BalancedthicknessAnalysisEnum){
     532
     533                CreateKMatrixBalancedthickness( Kgg,inputs,analysis_type,sub_analysis_type);
     534        }
     535        else if (analysis_type==BalancedvelocitiesAnalysisEnum){
     536
     537                CreateKMatrixBalancedvelocities( Kgg,inputs,analysis_type,sub_analysis_type);
     538        }
    531539        else if (analysis_type==ThermalAnalysisEnum){
    532540
     
    540548                ISSMERROR("%s%i%s\n","analysis: ",analysis_type," not supported yet");
    541549        }
     550
     551}
     552/*}}}*/
     553/*FUNCTION CreateKMatrixBalancedthickness {{{1*/
     554
     555void  Penta::CreateKMatrixBalancedthickness(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type){
     556
     557        /*Collapsed formulation: */
     558        Tria*  tria=NULL;
     559
     560        /*If on water, skip: */
     561        if(this->properties.onwater)return;
     562
     563        /*Is this element on the bed? :*/
     564        if(!this->properties.onbed)return;
     565
     566        /*Spawn Tria element from the base of the Penta: */
     567        tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria.
     568        tria->CreateKMatrix(Kgg,inputs, analysis_type,sub_analysis_type);
     569        delete tria;
     570        return;
     571
     572}
     573/*}}}*/
     574/*FUNCTION CreateKMatrixBalancedvelocities {{{1*/
     575
     576void  Penta::CreateKMatrixBalancedvelocities(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type){
     577
     578        /*Collapsed formulation: */
     579        Tria*  tria=NULL;
     580
     581        /*If on water, skip: */
     582        if(this->properties.onwater)return;
     583
     584        /*Is this element on the bed? :*/
     585        if(!this->properties.onbed)return;
     586
     587        /*Spawn Tria element from the base of the Penta: */
     588        tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria.
     589        tria->CreateKMatrix(Kgg,inputs, analysis_type,sub_analysis_type);
     590        delete tria;
     591        return;
    542592
    543593}
     
    15671617                CreatePVectorPrognostic( pg,inputs,analysis_type,sub_analysis_type);
    15681618        }
     1619        else if (analysis_type==BalancedthicknessAnalysisEnum){
     1620
     1621                CreatePVectorPrognostic( pg,inputs,analysis_type,sub_analysis_type);
     1622        }
     1623        else if (analysis_type==BalancedvelocitiesAnalysisEnum){
     1624
     1625                CreatePVectorPrognostic( pg,inputs,analysis_type,sub_analysis_type);
     1626        }
    15691627        else if (analysis_type==ThermalAnalysisEnum){
    15701628
     
    15791637        }       
    15801638
     1639}
     1640/*}}}*/
     1641/*FUNCTION CreatePVectorBalancedthickness {{{1*/
     1642
     1643void Penta::CreatePVectorBalancedthickness( Vec pg, void* inputs, int analysis_type,int sub_analysis_type){
     1644
     1645        /*Collapsed formulation: */
     1646        Tria*  tria=NULL;
     1647
     1648        /*If on water, skip: */
     1649        if(this->properties.onwater)return;
     1650
     1651        /*Is this element on the bed? :*/
     1652        if(!this->properties.onbed)return;
     1653
     1654        /*Spawn Tria element from the base of the Penta: */
     1655        tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria.
     1656        tria->CreatePVector(pg,inputs, analysis_type,sub_analysis_type);
     1657        delete tria;
     1658        return;
     1659}
     1660/*}}}*/
     1661/*FUNCTION CreatePVectorBalancedvelocities {{{1*/
     1662
     1663void Penta::CreatePVectorBalancedvelocities( Vec pg, void* inputs, int analysis_type,int sub_analysis_type){
     1664
     1665        /*Collapsed formulation: */
     1666        Tria*  tria=NULL;
     1667
     1668        /*If on water, skip: */
     1669        if(this->properties.onwater)return;
     1670
     1671        /*Is this element on the bed? :*/
     1672        if(!this->properties.onbed)return;
     1673
     1674        /*Spawn Tria element from the base of the Penta: */
     1675        tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria.
     1676        tria->CreatePVector(pg,inputs, analysis_type,sub_analysis_type);
     1677        delete tria;
     1678        return;
    15811679}
    15821680/*}}}*/
  • issm/trunk/src/c/objects/Penta.h

    r3612 r3613  
    107107                void  CreateKMatrixPrognostic(Mat Kgg,int analysis_type,int sub_analysis_type);
    108108                void  CreatePVectorPrognostic( Vec pg,  int analysis_type,int sub_analysis_type);
     109                void  CreateKMatrixBalancedthickness(Mat Kgg,void* vinputs,int analysis_type,int sub_analysis_type);
     110                void  CreatePVectorBalancedthickness( Vec pg, void* vinputs, int analysis_type,int sub_analysis_type);
     111                void  CreateKMatrixBalancedvelocities(Mat Kgg,void* vinputs,int analysis_type,int sub_analysis_type);
     112                void  CreatePVectorBalancedvelocities( Vec pg, void* vinputs, int analysis_type,int sub_analysis_type);
    109113
    110114                void  CreateKMatrixDiagnosticStokes( Mat Kgg,  int analysis_type,int sub_analysis_type);
Note: See TracChangeset for help on using the changeset viewer.