[16556] | 1 | Index: ../trunk-jpl/src/c/bamg/Mesh.cpp
|
---|
| 2 | ===================================================================
|
---|
| 3 | --- ../trunk-jpl/src/c/bamg/Mesh.cpp (revision 16199)
|
---|
| 4 | +++ ../trunk-jpl/src/c/bamg/Mesh.cpp (revision 16200)
|
---|
| 5 | @@ -1052,7 +1052,6 @@
|
---|
| 6 | /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Metric.cpp/IntersectGeomMetric)*/
|
---|
| 7 |
|
---|
| 8 | /*Get options*/
|
---|
| 9 | - int verbose = bamgopts->verbose;
|
---|
| 10 | double anisomax = bamgopts->anisomax;
|
---|
| 11 | double errg = bamgopts->errg;
|
---|
| 12 |
|
---|
| 13 | @@ -3311,7 +3310,6 @@
|
---|
| 14 | delete [] first_np_or_next_t;
|
---|
| 15 |
|
---|
| 16 | long NbSwapf =0;
|
---|
| 17 | -
|
---|
| 18 | for(i=0;i<nbv;i++) NbSwapf += vertices[i].Optim(0);
|
---|
| 19 | }/*}}}*/
|
---|
| 20 | /*FUNCTION Mesh::ProjectOnCurve{{{*/
|
---|
| 21 | Index: ../trunk-jpl/src/c/modules/ModelProcessorx/Enthalpy/CreateConstraintsEnthalpy.cpp
|
---|
| 22 | ===================================================================
|
---|
| 23 | --- ../trunk-jpl/src/c/modules/ModelProcessorx/Enthalpy/CreateConstraintsEnthalpy.cpp (revision 16199)
|
---|
| 24 | +++ ../trunk-jpl/src/c/modules/ModelProcessorx/Enthalpy/CreateConstraintsEnthalpy.cpp (revision 16200)
|
---|
| 25 | @@ -10,7 +10,6 @@
|
---|
| 26 | void CreateConstraintsEnthalpy(Constraints** pconstraints, IoModel* iomodel){
|
---|
| 27 |
|
---|
| 28 | /*Intermediary*/
|
---|
| 29 | - int i,j;
|
---|
| 30 | int count;
|
---|
| 31 | int M,N;
|
---|
| 32 | bool spcpresent = false;
|
---|
| 33 | Index: ../trunk-jpl/src/c/modules/ModelProcessorx/FreeSurfaceBase/UpdateElementsFreeSurfaceBase.cpp
|
---|
| 34 | ===================================================================
|
---|
| 35 | --- ../trunk-jpl/src/c/modules/ModelProcessorx/FreeSurfaceBase/UpdateElementsFreeSurfaceBase.cpp (revision 16199)
|
---|
| 36 | +++ ../trunk-jpl/src/c/modules/ModelProcessorx/FreeSurfaceBase/UpdateElementsFreeSurfaceBase.cpp (revision 16200)
|
---|
| 37 | @@ -10,14 +10,11 @@
|
---|
| 38 |
|
---|
| 39 | void UpdateElementsFreeSurfaceBase(Elements* elements, IoModel* iomodel,int analysis_counter,int analysis_type){
|
---|
| 40 |
|
---|
| 41 | - int finiteelement;
|
---|
| 42 | - bool dakota_analysis;
|
---|
| 43 | -
|
---|
| 44 | /*Now, is the model 3d? otherwise, do nothing: */
|
---|
| 45 | if (iomodel->dim==2)return;
|
---|
| 46 |
|
---|
| 47 | /*Finite element type*/
|
---|
| 48 | - finiteelement = P1Enum;
|
---|
| 49 | + int finiteelement = P1Enum;
|
---|
| 50 |
|
---|
| 51 | /*Update elements: */
|
---|
| 52 | int counter=0;
|
---|
| 53 | Index: ../trunk-jpl/src/c/modules/ModelProcessorx/FreeSurfaceBase/CreateLoadsFreeSurfaceBase.cpp
|
---|
| 54 | ===================================================================
|
---|
| 55 | --- ../trunk-jpl/src/c/modules/ModelProcessorx/FreeSurfaceBase/CreateLoadsFreeSurfaceBase.cpp (revision 16199)
|
---|
| 56 | +++ ../trunk-jpl/src/c/modules/ModelProcessorx/FreeSurfaceBase/CreateLoadsFreeSurfaceBase.cpp (revision 16200)
|
---|
| 57 | @@ -9,7 +9,6 @@
|
---|
| 58 | void CreateLoadsFreeSurfaceBase(Loads** ploads, IoModel* iomodel){
|
---|
| 59 |
|
---|
| 60 | /*Intermediaries*/
|
---|
| 61 | - int element;
|
---|
| 62 | int penpair_ids[2];
|
---|
| 63 | int count=0;
|
---|
| 64 | int numvertex_pairing;
|
---|
| 65 | Index: ../trunk-jpl/src/c/modules/ModelProcessorx/HydrologyShreve/CreateParametersHydrologyShreve.cpp
|
---|
| 66 | ===================================================================
|
---|
| 67 | --- ../trunk-jpl/src/c/modules/ModelProcessorx/HydrologyShreve/CreateParametersHydrologyShreve.cpp (revision 16199)
|
---|
| 68 | +++ ../trunk-jpl/src/c/modules/ModelProcessorx/HydrologyShreve/CreateParametersHydrologyShreve.cpp (revision 16200)
|
---|
| 69 | @@ -11,7 +11,6 @@
|
---|
| 70 |
|
---|
| 71 | Parameters *parameters = NULL;
|
---|
| 72 | int hydrology_model;
|
---|
| 73 | - bool isefficientlayer;
|
---|
| 74 |
|
---|
| 75 | /*Get parameters: */
|
---|
| 76 | parameters=*pparameters;
|
---|
| 77 | Index: ../trunk-jpl/src/c/modules/ModelProcessorx/FreeSurfaceTop/CreateLoadsFreeSurfaceTop.cpp
|
---|
| 78 | ===================================================================
|
---|
| 79 | --- ../trunk-jpl/src/c/modules/ModelProcessorx/FreeSurfaceTop/CreateLoadsFreeSurfaceTop.cpp (revision 16199)
|
---|
| 80 | +++ ../trunk-jpl/src/c/modules/ModelProcessorx/FreeSurfaceTop/CreateLoadsFreeSurfaceTop.cpp (revision 16200)
|
---|
| 81 | @@ -9,7 +9,6 @@
|
---|
| 82 | void CreateLoadsFreeSurfaceTop(Loads** ploads, IoModel* iomodel){
|
---|
| 83 |
|
---|
| 84 | /*Intermediaries*/
|
---|
| 85 | - int element;
|
---|
| 86 | int penpair_ids[2];
|
---|
| 87 | int count=0;
|
---|
| 88 | int numvertex_pairing;
|
---|
| 89 | Index: ../trunk-jpl/src/c/modules/ModelProcessorx/FreeSurfaceTop/UpdateElementsFreeSurfaceTop.cpp
|
---|
| 90 | ===================================================================
|
---|
| 91 | --- ../trunk-jpl/src/c/modules/ModelProcessorx/FreeSurfaceTop/UpdateElementsFreeSurfaceTop.cpp (revision 16199)
|
---|
| 92 | +++ ../trunk-jpl/src/c/modules/ModelProcessorx/FreeSurfaceTop/UpdateElementsFreeSurfaceTop.cpp (revision 16200)
|
---|
| 93 | @@ -10,13 +10,10 @@
|
---|
| 94 |
|
---|
| 95 | void UpdateElementsFreeSurfaceTop(Elements* elements, IoModel* iomodel,int analysis_counter,int analysis_type){
|
---|
| 96 |
|
---|
| 97 | - int finiteelement;
|
---|
| 98 | - bool dakota_analysis;
|
---|
| 99 | -
|
---|
| 100 | /*Now, is the model 3d? otherwise, do nothing: */
|
---|
| 101 | if (iomodel->dim==2)return;
|
---|
| 102 |
|
---|
| 103 | - finiteelement = P1Enum;
|
---|
| 104 | + int finiteelement = P1Enum;
|
---|
| 105 |
|
---|
| 106 | /*Update elements: */
|
---|
| 107 | int counter=0;
|
---|
| 108 | Index: ../trunk-jpl/src/c/modules/ModelProcessorx/NodesPartitioning.cpp
|
---|
| 109 | ===================================================================
|
---|
| 110 | --- ../trunk-jpl/src/c/modules/ModelProcessorx/NodesPartitioning.cpp (revision 16199)
|
---|
| 111 | +++ ../trunk-jpl/src/c/modules/ModelProcessorx/NodesPartitioning.cpp (revision 16200)
|
---|
| 112 | @@ -45,7 +45,6 @@
|
---|
| 113 |
|
---|
| 114 | /*Intermediaries*/
|
---|
| 115 | int i,i1,i2;
|
---|
| 116 | - int cols;
|
---|
| 117 | int e1,e2;
|
---|
| 118 | int pos;
|
---|
| 119 |
|
---|
| 120 | Index: ../trunk-jpl/src/c/modules/ModelProcessorx/Stressbalance/CreateLoadsStressbalance.cpp
|
---|
| 121 | ===================================================================
|
---|
| 122 | --- ../trunk-jpl/src/c/modules/ModelProcessorx/Stressbalance/CreateLoadsStressbalance.cpp (revision 16199)
|
---|
| 123 | +++ ../trunk-jpl/src/c/modules/ModelProcessorx/Stressbalance/CreateLoadsStressbalance.cpp (revision 16200)
|
---|
| 124 | @@ -9,8 +9,6 @@
|
---|
| 125 | void CreateLoadsStressbalance(Loads** ploads, IoModel* iomodel){
|
---|
| 126 |
|
---|
| 127 | /*Intermediary*/
|
---|
| 128 | - int segment_width;
|
---|
| 129 | - int element;
|
---|
| 130 | int i;
|
---|
| 131 | int count;
|
---|
| 132 | int penpair_ids[2];
|
---|
| 133 | Index: ../trunk-jpl/src/c/modules/ConstraintsStatex/ConstraintsStatex.cpp
|
---|
| 134 | ===================================================================
|
---|
| 135 | --- ../trunk-jpl/src/c/modules/ConstraintsStatex/ConstraintsStatex.cpp (revision 16199)
|
---|
| 136 | +++ ../trunk-jpl/src/c/modules/ConstraintsStatex/ConstraintsStatex.cpp (revision 16200)
|
---|
| 137 | @@ -10,9 +10,11 @@
|
---|
| 138 | void ConstraintsStatex(int* pconverged, int* pnum_unstable_constraints,FemModel* femmodel){
|
---|
| 139 |
|
---|
| 140 | /*output: */
|
---|
| 141 | - int converged = 0;
|
---|
| 142 | - int num_unstable_constraints = 0;
|
---|
| 143 | - int min_mechanical_constraints = 0;
|
---|
| 144 | + int converged = 1;
|
---|
| 145 | + int num_unstable_constraints = 0;
|
---|
| 146 | + int min_mechanical_constraints = 0;
|
---|
| 147 | + int unstable = 0;
|
---|
| 148 | + int sum_num_unstable_constraints = 0;
|
---|
| 149 | int analysis_type;
|
---|
| 150 |
|
---|
| 151 | /*Display message*/
|
---|
| 152 | @@ -22,28 +24,32 @@
|
---|
| 153 | femmodel->parameters->FindParam(&min_mechanical_constraints,StressbalanceRiftPenaltyThresholdEnum);
|
---|
| 154 | femmodel->parameters->FindParam(&analysis_type,AnalysisTypeEnum);
|
---|
| 155 |
|
---|
| 156 | - /*Do we have penalties linked to rifts? In this case, run our special rifts penalty
|
---|
| 157 | - * management routine, otherwise, skip : */
|
---|
| 158 | -
|
---|
| 159 | - /*No constraints management by default!:*/
|
---|
| 160 | - num_unstable_constraints=0;
|
---|
| 161 | - converged=1;
|
---|
| 162 | -
|
---|
| 163 | + /*Rift penalties first*/
|
---|
| 164 | #ifdef _HAVE_RIFTS_
|
---|
| 165 | if(RiftIsPresent(femmodel->loads,analysis_type)){
|
---|
| 166 | -
|
---|
| 167 | RiftConstraintsState(&converged,&num_unstable_constraints,femmodel->loads,min_mechanical_constraints,analysis_type);
|
---|
| 168 | }
|
---|
| 169 | #endif
|
---|
| 170 |
|
---|
| 171 | - /*FIXME: this function is actually called by Hydrology and damage evolution. Should be renamed*/
|
---|
| 172 | - #ifdef _HAVE_THERMAL_
|
---|
| 173 | - if(PengridIsPresent(femmodel->loads,analysis_type)){
|
---|
| 174 | - ThermalConstraintsState(femmodel->loads,&converged,&num_unstable_constraints,analysis_type);
|
---|
| 175 | + /*Deal with pengrid*/
|
---|
| 176 | + for(int i=0;i<femmodel->loads->Size();i++){
|
---|
| 177 | + Load* load=(Load*)femmodel->loads->GetObjectByOffset(i);
|
---|
| 178 | + if(load->InAnalysis(analysis_type)){
|
---|
| 179 | + if(load->ObjectEnum()==PengridEnum){
|
---|
| 180 | + Pengrid* pengrid=(Pengrid*)load;
|
---|
| 181 | + pengrid->ConstraintActivate(&unstable);
|
---|
| 182 | + num_unstable_constraints += unstable;
|
---|
| 183 | + }
|
---|
| 184 | + }
|
---|
| 185 | }
|
---|
| 186 | - #endif
|
---|
| 187 | + ISSM_MPI_Reduce(&num_unstable_constraints,&sum_num_unstable_constraints,1,ISSM_MPI_INT,ISSM_MPI_SUM,0,IssmComm::GetComm() );
|
---|
| 188 | + ISSM_MPI_Bcast(&sum_num_unstable_constraints,1,ISSM_MPI_INT,0,IssmComm::GetComm());
|
---|
| 189 | + num_unstable_constraints=sum_num_unstable_constraints;
|
---|
| 190 |
|
---|
| 191 | + /*Have we converged? : */
|
---|
| 192 | + if(num_unstable_constraints) converged=0;
|
---|
| 193 | +
|
---|
| 194 | /*Assign output pointers: */
|
---|
| 195 | - *pconverged=converged;
|
---|
| 196 | - *pnum_unstable_constraints=num_unstable_constraints;
|
---|
| 197 | + *pconverged = converged;
|
---|
| 198 | + *pnum_unstable_constraints = num_unstable_constraints;
|
---|
| 199 | }
|
---|
| 200 | Index: ../trunk-jpl/src/c/classes/Elements/Penta.cpp
|
---|
| 201 | ===================================================================
|
---|
| 202 | --- ../trunk-jpl/src/c/classes/Elements/Penta.cpp (revision 16199)
|
---|
| 203 | +++ ../trunk-jpl/src/c/classes/Elements/Penta.cpp (revision 16200)
|
---|
| 204 | @@ -3305,7 +3305,6 @@
|
---|
| 205 | this->SpawnTriaHook(dynamic_cast<ElementHook*>(tria),location);
|
---|
| 206 |
|
---|
| 207 | /*Spawn material*/
|
---|
| 208 | - tria->material=NULL;
|
---|
| 209 | tria->material=(Material*)this->material->copy();
|
---|
| 210 | delete tria->material->inputs;
|
---|
| 211 | tria->material->inputs=(Inputs*)this->material->inputs->SpawnTriaInputs(location);
|
---|
| 212 | Index: ../trunk-jpl/src/c/classes/gauss/GaussTria.cpp
|
---|
| 213 | ===================================================================
|
---|
| 214 | --- ../trunk-jpl/src/c/classes/gauss/GaussTria.cpp (revision 16199)
|
---|
| 215 | +++ ../trunk-jpl/src/c/classes/gauss/GaussTria.cpp (revision 16200)
|
---|
| 216 | @@ -43,7 +43,6 @@
|
---|
| 217 | IssmPDouble *seg_coords = NULL;
|
---|
| 218 | IssmPDouble *seg_weights = NULL;
|
---|
| 219 | IssmDouble a1,b1,c1,a2,b2,c2;
|
---|
| 220 | - int i,index3;
|
---|
| 221 |
|
---|
| 222 | /*Get Segment gauss points*/
|
---|
| 223 | numgauss=order;
|
---|
| 224 | @@ -82,7 +81,7 @@
|
---|
| 225 | }
|
---|
| 226 |
|
---|
| 227 | /*Build Triangle Gauss point*/
|
---|
| 228 | - for(i=0;i<numgauss;i++){
|
---|
| 229 | + for(int i=0;i<numgauss;i++){
|
---|
| 230 | coords1[i]=0.5*(a1+a2) + 0.5*seg_coords[i]*(a2-a1);
|
---|
| 231 | coords2[i]=0.5*(b1+b2) + 0.5*seg_coords[i]*(b2-b1);
|
---|
| 232 | coords3[i]=0.5*(c1+c2) + 0.5*seg_coords[i]*(c2-c1);
|
---|
| 233 | @@ -106,7 +105,6 @@
|
---|
| 234 | /*Intermediaties*/
|
---|
| 235 | IssmPDouble *seg_coords = NULL;
|
---|
| 236 | IssmPDouble *seg_weights = NULL;
|
---|
| 237 | - int i,index3;
|
---|
| 238 |
|
---|
| 239 | /*Get Segment gauss points*/
|
---|
| 240 | numgauss=order;
|
---|
| 241 | @@ -119,7 +117,7 @@
|
---|
| 242 | weights=xNew<IssmDouble>(numgauss);
|
---|
| 243 |
|
---|
| 244 | /*Build Triangle Gauss point*/
|
---|
| 245 | - for(i=0;i<numgauss;i++){
|
---|
| 246 | + for(int i=0;i<numgauss;i++){
|
---|
| 247 | coords1[i]=0.5*(area_coordinates[0][0]+area_coordinates[1][0]) + 0.5*seg_coords[i]*(area_coordinates[1][0]-area_coordinates[0][0]);
|
---|
| 248 | coords2[i]=0.5*(area_coordinates[0][1]+area_coordinates[1][1]) + 0.5*seg_coords[i]*(area_coordinates[1][1]-area_coordinates[0][1]);
|
---|
| 249 | coords3[i]=0.5*(area_coordinates[0][2]+area_coordinates[1][2]) + 0.5*seg_coords[i]*(area_coordinates[1][2]-area_coordinates[0][2]);
|
---|