Changeset 14846
- Timestamp:
- 05/02/13 08:04:05 (12 years ago)
- Location:
- issm/trunk-jpl/src/c/classes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/DofIndexing.cpp
r13761 r14846 37 37 /*FUNCTION DofIndexing::DofIndexing(int gsize){{{*/ 38 38 DofIndexing::DofIndexing(int in_gsize){ 39 39 40 this->Init(in_gsize,NULL); 41 40 42 } 41 43 /*}}}*/ … … 93 95 void DofIndexing::Init(int in_gsize,int* in_doftype){ 94 96 95 this->gsize=in_gsize; 96 this->clone=false; 97 98 /*allocate: */ 97 this->gsize = in_gsize; 98 99 /*At this point, assume this is not a clone (will be dealt with later)*/ 100 this->clone = false; 101 102 /*memory allocation */ 99 103 if(this->gsize>0){ 100 this->f_set=xNew<bool>(this->gsize); 101 this->s_set=xNew<bool>(this->gsize); 102 this->svalues=xNew<IssmDouble>(this->gsize); 103 if(in_doftype)this->doftype=xNew<int>(this->gsize); 104 this->gdoflist=xNew<int>(this->gsize); 105 } 106 104 this->f_set = xNew<bool>(this->gsize); 105 this->s_set = xNew<bool>(this->gsize); 106 this->svalues = xNew<IssmDouble>(this->gsize); 107 this->gdoflist = xNew<int>(this->gsize); 108 109 if(in_doftype) 110 this->doftype = xNew<int>(this->gsize); 111 } 112 113 /*Assign values assuming no Dirichlet at this point*/ 107 114 for(int i=0;i<this->gsize;i++){ 108 /*assume dof is free, no constraints, no rigid body constraint: */ 109 this->f_set[i]=true; 110 this->s_set[i]=false; 111 if(this->doftype)this->doftype[i]=in_doftype[i]; 112 this->svalues[i]=0; //0 constraint is the default value 113 this->gdoflist[i]=UNDEF; 115 this->f_set[i] = true; 116 this->s_set[i] = false; 117 this->svalues[i] = 0.; //0 constraint is the default value 118 this->gdoflist[i] = UNDEF; 119 120 if(this->doftype) 121 this->doftype[i]=in_doftype[i]; 114 122 } 115 123 } … … 128 136 this->fsize=size; 129 137 xDelete<int>(this->fdoflist); 130 if(this->fsize)this->fdoflist=xNew<int>(size); 131 else this->fdoflist=NULL; 138 139 if(this->fsize) 140 this->fdoflist=xNew<int>(size); 141 else 142 this->fdoflist=NULL; 132 143 } 133 144 else if(setenum==SsetEnum){ … … 136 147 this->ssize=size; 137 148 xDelete<int>(this->sdoflist); 138 if(this->ssize)this->sdoflist=xNew<int>(size); 139 else this->sdoflist=NULL; 149 150 if(this->ssize) 151 this->sdoflist=xNew<int>(size); 152 else 153 this->sdoflist=NULL; 140 154 } 141 155 else _error_("set of enum type " << EnumToStringx(setenum) << " not supported yet!"); -
issm/trunk-jpl/src/c/classes/objects/Node.cpp
r14763 r14846 40 40 41 41 /*id: */ 42 this->id =node_id;43 this->sid =node_sid;44 this->analysis_type =analysis_type;42 this->id = node_id; 43 this->sid = node_sid; 44 this->analysis_type = analysis_type; 45 45 46 46 /*Initialize coord_system: Identity matrix by default*/
Note:
See TracChangeset
for help on using the changeset viewer.