Changeset 4272


Ignore:
Timestamp:
06/28/10 14:09:19 (15 years ago)
Author:
seroussi
Message:

create stiffness matrix and load vector only for current analysis type

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

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/modules/PenaltySystemMatricesx/PenaltySystemMatricesx.cpp

    r4218 r4272  
    1616        Load* load=NULL;
    1717       
     18        int analysis_type;
     19
    1820        /*First, get elements and loads configured: */
    1921        elements->  Configure(elements,loads, nodes,vertices, materials,parameters);
     
    2123        loads->     Configure(elements, loads, nodes,vertices, materials,parameters);
    2224        parameters->Configure(elements,loads, nodes,vertices, materials,parameters);
     25
     26        /*retrive parameters: */
     27        parameters->FindParam(&analysis_type,AnalysisTypeEnum);
    2328
    2429        /*Now, figure out maximum value of K_gg, so that we can penalize it correctly: */
     
    3136                for (i=0;i<loads->Size();i++){
    3237                        load=(Load*)loads->GetObjectByOffset(i);
    33                         load->PenaltyCreateKMatrix(Kgg,kmax);
     38                        if (load->InAnalysis(analysis_type)) load->PenaltyCreateKMatrix(Kgg,kmax);
    3439                }
    3540
     
    4651                for (i=0;i<loads->Size();i++){
    4752                        load=(Load*)loads->GetObjectByOffset(i);
    48                         load->PenaltyCreatePVector(pg,kmax);
     53                        if (load->InAnalysis(analysis_type)) load->PenaltyCreatePVector(pg,kmax);
    4954                }
    5055
  • issm/trunk/src/c/modules/SystemMatricesx/SystemMatricesx.cpp

    r4218 r4272  
    5454                }
    5555
    56                 /*Fill stiffness matrix from loads: */
     56                /*Fill stiffness matrix from loads if loads have the current analysis_type: */
    5757                for (i=0;i<loads->Size();i++){
    5858                        load=(Load*)loads->GetObjectByOffset(i);
    59                         load->CreateKMatrix(Kgg);
     59                        if (load->InAnalysis(analysis_type)) load->CreateKMatrix(Kgg);
    6060                }
    6161
     
    7878                }
    7979
    80                 /*Fill right hand side vector, from loads: */
     80                /*Fill right hand side from loads if loads have the current analysis_type: */
    8181                for (i=0;i<loads->Size();i++){
    8282                        load=(Load*)loads->GetObjectByOffset(i);
    83                         load->CreatePVector(pg);
     83                        if (load->InAnalysis(analysis_type)) load->CreatePVector(pg);
    8484                }
    8585
Note: See TracChangeset for help on using the changeset viewer.