Changeset 5250
- Timestamp:
- 08/13/10 14:54:02 (15 years ago)
- Location:
- issm/trunk/src
- Files:
-
- 3 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/Makefile.am
r5247 r5250 525 525 ./modules/PenaltySystemMatricesx/PenaltySystemMatricesx.cpp\ 526 526 ./modules/PenaltySystemMatricesx/PenaltySystemMatricesx.h\ 527 ./modules/Responsex/Responsex.h\ 528 ./modules/Responsex/Responsex.cpp\ 527 529 ./modules/Scotchx/Scotchx.cpp\ 528 530 ./modules/Scotchx/Scotchx.h\ … … 1052 1054 ./modules/PenaltySystemMatricesx/PenaltySystemMatricesx.cpp\ 1053 1055 ./modules/PenaltySystemMatricesx/PenaltySystemMatricesx.h\ 1056 ./modules/Responsex/Responsex.h\ 1057 ./modules/Responsex/Responsex.cpp\ 1054 1058 ./modules/Solverx/Solverx.cpp\ 1055 1059 ./modules/Solverx/Solverx.h\ -
issm/trunk/src/c/modules/DakotaResponsesx/DakotaResponsesx.cpp
r4974 r5250 35 35 36 36 /*Compute response for this response_descriptor:*/ 37 38 if(strcmp(response_descriptor,"MinVel")==0){ 39 MinVelx( &femmodel_response, elements,nodes, vertices, loads, materials, parameters,process_units); 40 } 41 else if(strcmp(response_descriptor,"MaxVel")==0){ 42 MaxVelx( &femmodel_response, elements,nodes, vertices, loads, materials, parameters,process_units); 43 } 44 else if(strcmp(response_descriptor,"MinVx")==0){ 45 MinVxx( &femmodel_response, elements,nodes, vertices, loads, materials, parameters,process_units); 46 } 47 else if(strcmp(response_descriptor,"MaxVx")==0){ 48 MaxVxx( &femmodel_response, elements,nodes, vertices, loads, materials, parameters,process_units); 49 } 50 else if(strcmp(response_descriptor,"MaxAbsVx")==0){ 51 MaxAbsVxx( &femmodel_response, elements,nodes, vertices, loads, materials, parameters,process_units); 52 } 53 else if(strcmp(response_descriptor,"MinVy")==0){ 54 MinVyx( &femmodel_response, elements,nodes, vertices, loads, materials, parameters,process_units); 55 } 56 else if(strcmp(response_descriptor,"MaxVy")==0){ 57 MaxVyx( &femmodel_response, elements,nodes, vertices, loads, materials, parameters,process_units); 58 } 59 else if(strcmp(response_descriptor,"MaxAbsVy")==0){ 60 MaxAbsVyx( &femmodel_response, elements,nodes, vertices, loads, materials, parameters,process_units); 61 } 62 else if(strcmp(response_descriptor,"MinVz")==0){ 63 MinVzx( &femmodel_response, elements,nodes, vertices, loads, materials, parameters,process_units); 64 } 65 else if(strcmp(response_descriptor,"MaxVz")==0){ 66 MaxVzx( &femmodel_response, elements,nodes, vertices, loads, materials, parameters,process_units); 67 } 68 else if(strcmp(response_descriptor,"MaxAbsVz")==0){ 69 MaxAbsVzx( &femmodel_response, elements,nodes, vertices, loads, materials, parameters,process_units); 70 } 71 else if(strcmp(response_descriptor,"Misfit")==0){ 72 Misfitx( &femmodel_response, elements,nodes, vertices, loads, materials, parameters,process_units); 73 } 74 else if(strlen(response_descriptor)>=8){ 75 if(strncmp(response_descriptor,"MassFlux",8)==0){ 76 77 /*Deal with several mass flux computations: {{{1*/ 78 double** array=NULL; 79 int M; 80 int* mdims_array=NULL; 81 int* ndims_array=NULL; 82 83 double* segments=NULL; 84 int num_segments; 85 86 /*retrieve qmu_mass_flux_segments: */ 87 parameters->FindParam(&array,&M,&mdims_array,&ndims_array,QmuMassFluxSegmentsEnum); 88 89 /*figure out counter after MassFlux: */ 90 sscanf(response_descriptor,"MassFlux%i",&counter); 91 92 /*retrieve segments from array: */ 93 segments=array[counter-1]; //matlab to "C" indexing 94 num_segments=mdims_array[counter-1]; 95 96 /*call mass flux module: */ 97 MassFluxx(&femmodel_response,elements,nodes,vertices,loads,materials,parameters,segments,num_segments,process_units); 98 99 /*Free ressources:*/ 100 for(j=0;j<M;j++){ 101 double* matrix=array[j]; 102 xfree((void**)&matrix); 103 } 104 xfree((void**)&mdims_array); 105 xfree((void**)&ndims_array); 106 xfree((void**)&array); 107 /*}}}*/ 108 } 109 } 110 else{ 111 ISSMERROR("%s%s%s"," response descriptor : ",response_descriptor," not supported yet!"); 112 } 37 Responsex(&femmodel_response,elements,nodes, vertices,loads,materials, parameters,response_descriptor,process_units); 113 38 114 39 #ifdef _DEBUG_ -
issm/trunk/src/c/modules/MassFluxx/MassFluxx.cpp
r4974 r5250 10 10 #include "../../EnumDefinitions/EnumDefinitions.h" 11 11 12 void MassFluxx(double* pmass_flux, Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters, double* segments,int num_segments,bool process_units){12 void MassFluxx(double* pmass_flux, Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters,char* descriptor,bool process_units){ 13 13 14 14 int i,j; … … 23 23 double all_mass_flux=0; 24 24 25 int counter; 26 27 /*all segments: */ 28 double** array=NULL; 29 int M; 30 int* mdims_array=NULL; 31 int* ndims_array=NULL; 32 33 /*our segments of interest: */ 34 double* segments=NULL; 35 int num_segments; 36 37 /*First, figure out which segment to compute our mass flux on. Start with retrieving qmu_mass_flux_segments: */ 38 parameters->FindParam(&array,&M,&mdims_array,&ndims_array,QmuMassFluxSegmentsEnum); 39 40 /*figure out counter in the descriptor: */ 41 sscanf(descriptor,"MassFlux%i",&counter); 42 43 /*retrieve segments from array: */ 44 segments=array[counter-1]; //matlab to "C" indexing 45 num_segments=mdims_array[counter-1]; 46 25 47 /*Go through segments, and then elements, and figure out which elements belong to a segment. 26 48 * When we find one, use the element to compute the mass flux on the segment: */ 27 28 49 for(i=0;i<num_segments;i++){ 29 50 element_id=(int)*(segments+5*i+4); … … 43 64 #endif 44 65 66 /*Free ressources:*/ 67 for(j=0;j<M;j++){ 68 double* matrix=array[j]; 69 xfree((void**)&matrix); 70 } 71 xfree((void**)&mdims_array); 72 xfree((void**)&ndims_array); 73 xfree((void**)&array); 74 45 75 /*Assign output pointers: */ 46 76 *pmass_flux=mass_flux; -
issm/trunk/src/c/modules/MassFluxx/MassFluxx.h
r4974 r5250 10 10 11 11 /* local prototypes: */ 12 void MassFluxx(double* pmass_flux, Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters, double* segments,int num_segments,bool process_units);12 void MassFluxx(double* pmass_flux, Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters,char* descriptor,bool process_units); 13 13 14 14 -
issm/trunk/src/c/modules/modules.h
r5057 r5250 70 70 #include "./Reducevectorgtosx/Reducevectorgtosx.h" 71 71 #include "./Reducevectorgtofx/Reducevectorgtofx.h" 72 #include "./Responsex/Responsex.h" 72 73 #include "./Scotchx/Scotchx.h" 73 74 #include "./Solverx/Solverx.h" -
issm/trunk/src/m/classes/public/parameterization/parametercontrolB.m
r3337 r5250 22 22 23 23 %control type 24 md.control_type=' B';24 md.control_type='rheology_B'; 25 25 26 26 %weights
Note:
See TracChangeset
for help on using the changeset viewer.