Changeset 13909


Ignore:
Timestamp:
11/08/12 10:20:46 (12 years ago)
Author:
Mathieu Morlighem
Message:

CHG: debugged matrix allocation for BedSlopes: confused between configuration_type and analysis_type

Location:
issm/trunk-jpl/src/c/classes
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/classes/FemModel.cpp

    r13902 r13909  
    342342        int  fsize,ssize,flocalsize,slocalsize;
    343343        int  connectivity, numberofdofspernode;
    344         int  analysis_type,configuration_type;
     344        int  configuration_type;
    345345        int  m,n,M,N;
    346346        int *d_nnz = NULL;
     
    357357
    358358        /*retrieve parameters: */
    359         this->parameters->FindParam(&analysis_type,AnalysisTypeEnum);
    360359        this->parameters->FindParam(&configuration_type,ConfigurationTypeEnum);
    361360        this->parameters->FindParam(&connectivity,MeshAverageVertexConnectivityEnum);
     
    364363        fsize      = this->nodes->NumberOfDofs(configuration_type,FsetEnum);
    365364        ssize      = this->nodes->NumberOfDofs(configuration_type,SsetEnum);
    366         flocalsize = this->nodes->NumberOfDofsLocal(analysis_type,FsetEnum);
    367         slocalsize = this->nodes->NumberOfDofsLocal(analysis_type,SsetEnum);
     365        flocalsize = this->nodes->NumberOfDofsLocal(configuration_type,FsetEnum);
     366        slocalsize = this->nodes->NumberOfDofsLocal(configuration_type,SsetEnum);
    368367
    369368        numberofdofspernode=this->nodes->MaxNumDofs(configuration_type,GsetEnum);
     
    408407        /*Intermediary*/
    409408        int      i,j,k,index,offset,count;
    410         int      analysis_type,configuration_type;
     409        int      configuration_type;
    411410        int      d_nz,o_nz;
    412411        Element *element      = NULL;
     
    421420
    422421        /*retrive parameters: */
    423         this->parameters->FindParam(&analysis_type,AnalysisTypeEnum);
    424422        this->parameters->FindParam(&configuration_type,ConfigurationTypeEnum);
    425423
    426424        /*Get vector size and number of nodes*/
    427         int numnodes            = nodes->NumberOfNodes(analysis_type);
     425        int numnodes            = nodes->NumberOfNodes(configuration_type);
    428426        int numberofdofspernode = nodes->MaxNumDofs(configuration_type,GsetEnum);
    429         int M                   = nodes->NumberOfDofs(analysis_type,set1enum);
    430         int N                   = nodes->NumberOfDofs(analysis_type,set2enum);
    431         int m                   = nodes->NumberOfDofsLocal(analysis_type,set1enum);
    432         int n                   = nodes->NumberOfDofsLocal(analysis_type,set2enum);
     427        int M                   = nodes->NumberOfDofs(configuration_type,set1enum);
     428        int N                   = nodes->NumberOfDofs(configuration_type,set2enum);
     429        int m                   = nodes->NumberOfDofsLocal(configuration_type,set1enum);
     430        int n                   = nodes->NumberOfDofsLocal(configuration_type,set2enum);
    433431        int numnodesperobject   = elements->MaxNumNodes();
    434432
     
    471469        for(i=0;i<nodes->Size();i++){
    472470                Node* node=dynamic_cast<Node*>(nodes->GetObjectByOffset(i));
    473                 if(node->InAnalysis(analysis_type)){
     471                if(node->InAnalysis(configuration_type)){
    474472
    475473                        /*Reinitialize flags to 0*/
     
    509507                for(i=0;i<nodes->Size();i++){
    510508                        Node* node=dynamic_cast<Node*>(nodes->GetObjectByOffset(i));
    511                         if(node->InAnalysis(analysis_type) && !node->IsClone()){
     509                        if(node->InAnalysis(configuration_type) && !node->IsClone()){
    512510                                for(j=0;j<node->indexing.fsize;j++){
    513511                                        _assert_(count<m);
  • issm/trunk-jpl/src/c/classes/objects/Elements/Penta.cpp

    r13904 r13909  
    904904/*FUNCTION Penta::GetNumberOfNodes{{{*/
    905905int Penta::GetNumberOfNodes(void){
     906
     907        if(this->nodes==NULL) return 0;
    906908
    907909        switch(this->element_type){
  • issm/trunk-jpl/src/c/classes/objects/Elements/PentaHook.cpp

    r13622 r13909  
    7070void PentaHook::SetHookNodes(int* node_ids,int analysis_counter){
    7171        this->hnodes[analysis_counter]= new Hook(node_ids,6);
    72 
    7372}
    7473/*}}}*/
  • issm/trunk-jpl/src/c/classes/objects/Elements/PentaHook.h

    r13623 r13909  
    1313
    1414        public:
    15                 int   numanalyses; //number of analysis types
    16                 Hook** hnodes; // 6 nodes for each analysis type
    17                 Hook*  hmaterial; // 1 ice material
    18                 Hook*  hmatpar; // 1 material parameter
    19                 Hook*  hneighbors; // 2 elements, first down, second up
     15                int    numanalyses;  //number of analysis types
     16                Hook **hnodes;        // 6 nodes for each analysis type
     17                Hook  *hmaterial;    // 1 ice material
     18                Hook  *hmatpar;      // 1 material parameter
     19                Hook  *hneighbors;    // 2 elements, first down, second up
    2020
    21                 /*FUNCTION constructors, destructors {{{*/
     21                /*constructors, destructors*/
    2222                PentaHook();
    2323                PentaHook(int in_numanalyses,int material_id, IoModel* iomodel);
    2424                ~PentaHook();
     25
    2526                void SetHookNodes(int* node_ids,int analysis_counter);
    2627                void SpawnTriaHook(TriaHook* triahook,int* indices);
    2728                void InitHookNeighbors(int* element_ids);
    28                 /*}}}*/
    2929};
    3030
  • issm/trunk-jpl/src/c/classes/objects/Elements/Tria.cpp

    r13904 r13909  
    11391139/*FUNCTION Tria::GetNumberOfNodes{{{*/
    11401140int Tria::GetNumberOfNodes(void){
     1141
     1142        if(this->nodes==NULL) return 0;
    11411143
    11421144        switch(this->element_type){
Note: See TracChangeset for help on using the changeset viewer.