Changeset 4001


Ignore:
Timestamp:
06/02/10 16:25:39 (15 years ago)
Author:
Mathieu Morlighem
Message:

minor fixing, still not compiling

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

Legend:

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

    r3913 r4001  
    1010#include "../../EnumDefinitions/EnumDefinitions.h"
    1111
    12 void SpcNodesx( DofVec** pyg, DataSet* nodes,DataSet* constraints){
     12void SpcNodesx(Vec* pyg, DataSet* nodes,DataSet* constraints){
    1313
    1414        int i;
     
    1717
    1818        /*output: */
    19         DofVec* yg=NULL;
     19        Vec* yg=NULL;
    2020
    2121        /*First, recover number of dofs from nodes: */
     
    2424        if(numberofdofs){
    2525               
    26                 /*Allocate dofvec: */
    27                 yg=new DofVec("yg");
    28                 yg->numdofs=numberofdofs;
    29 
    3026                /*Allocate yg: */
    31                 yg->vector=NewVec(numberofdofs);
     27                yg=NewVec(numberofdofs);
    3228
    3329                /*Now, go through constraints, and update the nodes and the constraint vector at the same time: */
    34                 constraints->SetupSpcs(nodes,yg->vector);
     30                constraints->SetupSpcs(nodes,yg);
    3531
    3632                /*Specify numentries: */
    3733                VecGetSize(yg->vector,&gsize);
    38                 yg->numentries=(int)gsize/yg->numdofs;
    39         }
    40         else{
    41                 /*Allocate dofvec: */
    42                 yg=new DofVec("yg");
    4334        }
    4435
  • issm/trunk/src/c/modules/SpcNodesx/SpcNodesx.h

    r3913 r4001  
    1111
    1212/* local prototypes: */
    13 void SpcNodesx( DofVec** pyg, DataSet* nodesin,DataSet* constraints);
     13void SpcNodesx(Vec* pyg, DataSet* nodesin,DataSet* constraints);
    1414
    1515#endif  /* _SPCNODESX_H */
    16 
  • issm/trunk/src/c/objects/Elements/Penta.h

    r3984 r4001  
    4343                Penta();
    4444                Penta(int penta_id,int i, IoModel* iomodel,int nummodels);
    45                 Update(IoModel* iomodel,int analysis_counter,int analysis_type);
    4645                ~Penta();
    4746                /*}}}*/
    4847                /*FUNCTION object management {{{1*/
    4948                void  Configure(DataSet* elements,DataSet* loads,DataSet* nodes,DataSet* materials,Parameters* parameters,int analysis_counter);
     49                void Update(IoModel* iomodel,int analysis_counter,int analysis_type);
    5050                Object* copy();
    5151                void  DeepEcho();
  • issm/trunk/src/c/objects/Elements/Tria.h

    r3984 r4001  
    3838                Tria();
    3939                Tria(int tria_id,int i, IoModel* iomodel);
    40                 Update(IoModel* iomodel,int analysis_counter,int analysis_type);
    4140                ~Tria();
    4241                /*}}}*/
    4342                /*FUNCTION object management {{{1*/
    4443                void  Configure(DataSet* elements,DataSet* loads,DataSet* nodes,DataSet* materials,Parameters* parameters);
     44                void  Update(IoModel* iomodel,int analysis_counter,int analysis_type);
    4545                Object* copy();
    4646                void  DeepEcho();
  • issm/trunk/src/c/objects/FemModel.cpp

    r3984 r4001  
    2222/*FUNCTION FemModel::constructor {{{1*/
    2323FemModel::FemModel(int in_nummodels){
     24
     25        /*intermediary*/
     26        int i;
    2427
    2528        nummodels=in_nummodels;
     
    5053FemModel::~FemModel(){
    5154
     55        /*Intermediary*/
    5256        int i;
    5357
     
    8993/*Object management*/
    9094/*FUNCTION FemModel::Echo {{{1*/
    91 
    9295void FemModel::Echo(void){
    9396
     
    9598        printf("   number of fem models: %i\n",nummodels);
    9699        printf("   analysis_type_list: \n");
    97         for(i=0;i<nummodels;i++)printf("     %i: %s\n",i,EnumAsString(analysis_type_list[i]));
     100        for(int i=0;i<nummodels;i++)printf("     %i: %s\n",i,EnumAsString(analysis_type_list[i]));
    98101        printf("   current analysis_type: \n");
    99         printf("     %i: %s\n",i,EnumAsString(analysis_type_list[analysis_counter]));
     102        printf("     %i: %s\n",analysis_counter,EnumAsString(analysis_type_list[analysis_counter]));
    100103
    101104
    102105}
    103 /*}}}1*/
     106/*}}}*/
    104107
    105108/*Numerics: */
     
    112115
    113116        /*intermediary: */
    114         IoFemModel* iomodel=NULL;
     117        IoModel* iomodel=NULL;
    115118       
    116119        _printf_("   fill model with matlab workspace data\n");
    117         iomodel=new IoFemModel(IOMODEL);
     120        iomodel = new IoModel(IOMODEL);
    118121
    119122        _printf_("   create datasets:\n");
     
    133136
    134137        _printf_("   reducing single point constraints vector:\n");
    135         Reducevectorgtosx(&ys[analysis_counter], yg[analysis_counter]->vector,nodesets[analysis_counter]);
     138        Reducevectorgtosx(&ys[analysis_counter], yg[analysis_counter],nodesets[analysis_counter]);
    136139       
    137140        _printf_("   normalizing rigid body constraints matrix:\n");
     
    149152/*}}}1*/
    150153/*FUNCTION FemModel::GetCurrentAnalysis {{{1*/
    151 FemFemModel* FemModel::GetCurrentAnalysis(){
     154int FemModel::GetCurrentAnalysis(){
    152155        return analysis_type_list[analysis_counter];
    153156}
     
    156159void FemModel::SetCurrentAnalysis(int analysis_type){
    157160        int found=-1;
    158         for(i=0;i<nummodels;i++){
     161        for(int i=0;i<nummodels;i++){
    159162                if (analysis_type_list[i]==analysis_type){
    160163                        found=i;
     
    162165                }
    163166        }
    164         if(found)analysis_counter=i;
    165         else ISSMERRR("%s%s%s"," could not find analysis_type ",EnumAsString(analysis_type) " in list of FemModel analyses");
     167        if(found!=-1) analysis_counter=found;
     168        else ISSMERROR("Could not find analysis_type %s in list of FemModel analyses",EnumAsString(analysis_type));
    166169}
    167170/*}}}1*/
  • issm/trunk/src/c/objects/FemModel.h

    r3984 r4001  
    4242                Mat*                 Gmn;
    4343                NodeSets**           nodesets; //boundary conditions dof sets
    44                 Vec*             yg; //boundary conditions in global g-set
     44                Vec*                 yg; //boundary conditions in global g-set
    4545                Vec*                 ys; //boundary conditions, in reduced s-set
    4646
     
    5050
    5151                /*Methods: */
    52                 Echo();
     52                void Echo();
    5353
    5454                /*Fem: */
    5555                void  AddAnalysis(ConstDataHandle IOMODEL, int analysis_type);
    56                 int   SetCurrentAnalysis(int analysis_type);
    57                 void  GetCurrentAnalysis(void);
     56                void  SetCurrentAnalysis(int analysis_type);
     57                int   GetCurrentAnalysis(void);
    5858
    5959};
    6060
    61 
    6261#endif
  • issm/trunk/src/c/objects/objects.h

    r3969 r4001  
    1515#include "./Node.h"
    1616#include "./NodeSets.h"
    17 #include "./Model.h"
    1817#include "./Result.h"
    1918#include "./IoModel.h"
Note: See TracChangeset for help on using the changeset viewer.