Changeset 9081 for issm/trunk


Ignore:
Timestamp:
07/20/11 07:30:25 (14 years ago)
Author:
Mathieu Morlighem
Message:

Extended new spcthickness format to balancethickness

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

Legend:

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

    r9075 r9081  
    6060                }
    6161        }
    62         else{
     62        else if (M==iomodel->numberofvertices+1){
    6363                /*transient: create transient Spct objects. Same logic, except we need to retrieve
    6464                 * various times and values to initialize an Spct object: */
     
    9595                }
    9696        }
     97        else{
     98                _error_("Size of field %s not supported",EnumToStringx(vector_enum));
     99        }
    97100
    98101        /*Free ressources:*/
     
    100103        xfree((void**)&times);
    101104        xfree((void**)&values);
    102 
    103105}
  • issm/trunk/src/c/modules/ModelProcessorx/Balancethickness/CreateConstraintsBalancethickness.cpp

    r8926 r9081  
    1 /*
    2  * CreateConstraintsBalancethickness.c:
    3  */
    4 
    51#include "../../../Container/Container.h"
     2#include "../../../modules/modules.h"
    63#include "../../../io/io.h"
    74#include "../../../toolkits/toolkits.h"
     
    129
    1310void    CreateConstraintsBalancethickness(Constraints** pconstraints, IoModel* iomodel,FILE* iomodel_handle){
    14 
    15         /*Intermediary*/
    16         int i;
    17         int count;
    1811
    1912        /*Output*/
     
    2821        /*Do not add constraints in DG*/
    2922        if(!iomodel->prognostic_DG){
    30 
    31                 /*Fetch data: */
    32                 IoModelFetchData(&iomodel->spcthickness,NULL,NULL,iomodel_handle,SpcthicknessEnum);
    33 
    34                 /*Initialize counter*/
    35                 count=0;
    36 
    37                 /*Create spcs from x,y,z, as well as the spc values on those spcs: */
    38                 for (i=0;i<iomodel->numberofvertices;i++){
    39                         if(iomodel->my_vertices[i]){
    40 
    41                                 if ((int)iomodel->spcthickness[2*i]){
    42 
    43                                         constraints->AddObject(new Spc(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,
    44                                                                         *(iomodel->spcthickness+2*i+1),BalancethicknessAnalysisEnum));//we enforce first translation degree of freedom, for temperature
    45                                         count++;
    46                                 }
    47                         }
    48                 }
    49 
    50                 /*Free data: */
    51                 xfree((void**)&iomodel->spcthickness);
     23                IoModelToConstraintsx(constraints,iomodel,iomodel_handle,SpcthicknessEnum,BalancethicknessAnalysisEnum);
    5224        }
    5325
  • issm/trunk/src/c/modules/ModelProcessorx/Prognostic/CreateConstraintsPrognostic.cpp

    r9075 r9081  
    1010void    CreateConstraintsPrognostic(Constraints** pconstraints, IoModel* iomodel,FILE* iomodel_handle){
    1111
    12         /*Intermediary*/
    13         int i;
    14         int count;
    15        
    1612        /*Output*/
    1713        Constraints *constraints = NULL;
    18         Spc         *spc         = NULL;
    1914
    2015        /*Recover pointer: */
  • issm/trunk/src/c/modules/ModelProcessorx/Thermal/CreateConstraintsThermal.cpp

    r9002 r9081  
    2727        if(!constraints) constraints = new Constraints(ConstraintsEnum);
    2828
    29         /*return if 2d mesh*/
    30         if (iomodel->dim==2) goto cleanup_and_return;
    31 
    32         /*Create constraints: */
    33         IoModelToConstraintsx(constraints,iomodel,iomodel_handle,SpctemperatureEnum,ThermalAnalysisEnum);
    34 
    35         cleanup_and_return:
     29        /*Only 3d mesh supported*/
     30        if (iomodel->dim==3){
     31                IoModelToConstraintsx(constraints,iomodel,iomodel_handle,SpctemperatureEnum,ThermalAnalysisEnum);
     32        }
    3633
    3734        /*Assign output pointer: */
Note: See TracChangeset for help on using the changeset viewer.