Changeset 3476


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

Bug fix

Location:
issm/trunk/src/c
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/DataSet/DataSet.cpp

    r3475 r3476  
    965965
    966966        /*Check that dofcount is positive*/
    967         ISSMASSERT(dofcount>0);
     967        if (Size()) ISSMASSERT(dofcount>0);
    968968
    969969        /*Ok, now every object has distributed dofs, but locally, and with a dof count starting from
  • issm/trunk/src/c/Dofx/Dofx.cpp

    r3464 r3476  
    2727        DofVec* partition=NULL;
    2828        DofVec* tpartition=NULL;
     29
     30        /*Check that vertices and nodes are not empty*/
     31        ISSMASSERT(nodes && vertices);
    2932
    3033        /*Initialize dofvecs: */
  • issm/trunk/src/c/ModelProcessorx/Balancedthickness/CreateElementsNodesAndMaterialsBalancedthickness.cpp

    r3434 r3476  
    1212#include "../IoModel.h"
    1313
    14 
    1514void    CreateElementsNodesAndMaterialsBalancedthickness(DataSet** pelements,DataSet** pnodes, DataSet** pvertices, DataSet** pmaterials, IoModel* iomodel,ConstDataHandle iomodel_handle){
    16 
    1715
    1816        /*Intermediary*/
  • issm/trunk/src/c/ModelProcessorx/DiagnosticHoriz/CreateElementsNodesAndMaterialsDiagnosticHoriz.cpp

    r3439 r3476  
    2222        DataSet*    vertices = NULL;
    2323        DataSet*    materials = NULL;
    24        
    25         /*Now, is the flag macayaealpattyn on? otherwise, do nothing: */
    26         if (!iomodel->ismacayealpattyn)goto cleanup_and_return;
    2724
    2825        /*First create the elements, nodes and material properties: */
     
    3128        vertices  = new DataSet(VerticesEnum());
    3229        materials = new DataSet(MaterialsEnum());
     30       
     31        /*Now, is the flag macayaealpattyn on? otherwise, do nothing: */
     32        if (!iomodel->ismacayealpattyn)goto cleanup_and_return;
    3333
    3434        /*Partition elements and vertices and nodes: */
  • issm/trunk/src/c/ModelProcessorx/DiagnosticHutter/CreateElementsNodesAndMaterialsDiagnosticHutter.cpp

    r3439 r3476  
    2222        DataSet*    vertices = NULL;
    2323        DataSet*    materials = NULL;
     24
     25        /*First create the elements, nodes and material properties: */
     26        elements  = new DataSet(ElementsEnum());
     27        nodes     = new DataSet(NodesEnum());
     28        vertices  = new DataSet(VerticesEnum());
     29        materials = new DataSet(MaterialsEnum());
    2430
    2531        /*Now, is the flag ishutter on? otherwise, do nothing: */
  • issm/trunk/src/c/ModelProcessorx/DiagnosticStokes/CreateElementsNodesAndMaterialsDiagnosticStokes.cpp

    r3422 r3476  
    2323        DataSet*    vertices = NULL;
    2424        DataSet*    materials = NULL;
    25        
    26         /*Objects: */
    27         Node*       node   = NULL;
    28         Vertex*     vertex = NULL;
    29         Penta*      penta = NULL;
    30         Matice*     matice  = NULL;
    31         Matpar*     matpar  = NULL;
    32 
    33         /*Now, do we have Stokes elements?*/
    34         if (strcmp(iomodel->meshtype,"2d")==0) ISSMERROR("Stokes elements only supported in 3d!");
    35         if (!iomodel->isstokes)goto cleanup_and_return;
    3625
    3726        /*First create the elements, nodes and material properties: */
     
    4029        vertices  = new DataSet(VerticesEnum());
    4130        materials = new DataSet(MaterialsEnum());
     31
     32        /*Now, do we have Stokes elements?*/
     33        if (strcmp(iomodel->meshtype,"2d")==0) goto cleanup_and_return;
     34        if (!iomodel->isstokes)                goto cleanup_and_return;
     35
    4236
    4337        /*Partition elements and vertices and nodes: */
  • issm/trunk/src/c/ModelProcessorx/DiagnosticVert/CreateElementsNodesAndMaterialsDiagnosticVert.cpp

    r3423 r3476  
    2323        DataSet*    materials = NULL;
    2424
    25         /*Now, is the flag macayaealpattyn on? otherwise, do nothing: */
    26         if (strcmp(iomodel->meshtype,"2d")==0)goto cleanup_and_return;
    27 
    2825        /*First create the elements, nodes and material properties: */
    2926        elements  = new DataSet(ElementsEnum());
     
    3128        vertices  = new DataSet(VerticesEnum());
    3229        materials = new DataSet(MaterialsEnum());
     30
     31        /*Now, is the flag macayaealpattyn on? otherwise, do nothing: */
     32        if (strcmp(iomodel->meshtype,"2d")==0)goto cleanup_and_return;
    3333
    3434        /*Partition elements and vertices and nodes: */
  • issm/trunk/src/c/ModelProcessorx/Melting/CreateElementsNodesAndMaterialsMelting.cpp

    r3426 r3476  
    1414void    CreateElementsNodesAndMaterialsMelting(DataSet** pelements,DataSet** pnodes, DataSet** pvertices,DataSet** pmaterials, IoModel* iomodel,ConstDataHandle iomodel_handle){
    1515
    16         /*output: int* epart, int* my_grids, double* my_bordergrids*/
     16        /*Intermediary*/
    1717        int i,j,k,n;
    1818
  • issm/trunk/src/c/ModelProcessorx/Thermal/CreateElementsNodesAndMaterialsThermal.cpp

    r3428 r3476  
    1414void    CreateElementsNodesAndMaterialsThermal(DataSet** pelements,DataSet** pnodes, DataSet** pvertices,DataSet** pmaterials, IoModel* iomodel,ConstDataHandle iomodel_handle){
    1515
    16         /*output: int* epart, int* my_grids, double* my_bordergrids*/
     16        /*Intermediary*/
    1717        int i,j,k,n;
    1818
Note: See TracChangeset for help on using the changeset viewer.