Changeset 9012
- Timestamp:
- 07/16/11 01:32:36 (14 years ago)
- Location:
- issm/trunk/src/c
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/modules/RheologyBbarx/RheologyBbarx.cpp
r9010 r9012 21 21 int index; 22 22 double rheology_bbar; 23 23 Element* element=NULL; 24 24 25 25 /*retrieve element we are interested in: */ … … 28 28 /*now, go through our elements, and retrieve the one with this id: index: */ 29 29 for(i=0;i<elements->Size();i++){ 30 Element*element=(Element*)elements->GetObjectByOffset(i);30 element=(Element*)elements->GetObjectByOffset(i); 31 31 if (element->Id()==index){ 32 32 found=1; … … 40 40 if(!sumfound)_error_("%s%i%s","could not find material with id",index," to compute RheologyBbar"); 41 41 42 43 _error_("element->RheologyBbarx not implemented yet!");44 45 42 /*Ok, we found the material, compute Bbar: */ 46 43 if(my_rank==cpu_found){ 47 //rheology_bbar=element->RheologyBbarx();44 rheology_bbar=element->RheologyBbarx(); 48 45 } 49 46 50 47 /*Broadcast and plug into response: */ 48 MPI_Allreduce ( &cpu_found,&cpu_found,1,MPI_INT,MPI_MAX,MPI_COMM_WORLD); 51 49 MPI_Bcast(&rheology_bbar,1,MPI_DOUBLE,cpu_found,MPI_COMM_WORLD); 50 52 51 *prheology_bbar=rheology_bbar; 53 52 } -
issm/trunk/src/c/objects/Elements/Element.h
r8967 r9012 94 94 virtual void UpdateShelfFlags(double* new_shelf_nodes)=0; 95 95 virtual int UpdatePotentialSheetUngrounding(double* potential_sheet_ungrounding,Vec vec_nodes_on_iceshelf,double* nodes_on_iceshelf)=0; 96 virtual double RheologyBbarx(void)=0; 96 97 97 98 /*Implementation: */ -
issm/trunk/src/c/objects/Elements/Penta.cpp
r9009 r9012 7032 7032 /*Affect value to the reduced matrix */ 7033 7033 for(i=0;i<24;i++) *(Pe_reduced+i)=Pi[i]-Pright[i]; 7034 } 7035 /*}}}*/ 7036 /*FUNCTION Penta::RheologyBbarx{{{1*/ 7037 double Penta::RheologyBbarx(void){ 7038 7039 double Bbar; 7040 Penta* base=NULL; 7041 7042 /*We here compute the vertically averaged Bbar. To do so, we go to the 7043 * base element under this one, and call this->InputDepthAverageAtBase:*/ 7044 7045 base=this; 7046 7047 if(!base->IsOnBed()){ 7048 7049 for(;;){ 7050 base=base->verticalneighbors[0]; 7051 if(base->IsOnBed())break; 7052 } 7053 } 7054 7055 /*We have found the base under this. Call InputDepthAverageAtBase on it: */ 7056 base->InputDepthAverageAtBase(RheologyBEnum,RheologyBbarEnum,MaterialsEnum); 7057 7058 /*Ok, base->matice now has the Bbar. Ask Bbar from this enum: */ 7059 Bbar=base->matice->GetBbar(); 7060 7061 return Bbar; 7034 7062 } 7035 7063 /*}}}*/ -
issm/trunk/src/c/objects/Elements/Penta.h
r8967 r9012 142 142 double TimeAdapt(); 143 143 int* GetHorizontalNeighboorSids(void); 144 double RheologyBbarx(void); 144 145 /*}}}*/ 145 146 /*Penta specific routines:{{{1*/ -
issm/trunk/src/c/objects/Elements/Tria.cpp
r9010 r9012 4628 4628 } 4629 4629 /*}}}*/ 4630 /*FUNCTION Tria::RheologyBbarx{{{1*/ 4631 double Tria::RheologyBbarx(void){ 4632 4633 return this->matice->GetBbar(); 4634 4635 } 4636 /*}}}*/ 4630 4637 /*FUNCTION Tria::RheologyBbarAbsGradient{{{1*/ 4631 4638 double Tria::RheologyBbarAbsGradient(bool process_units,int weight_index){ -
issm/trunk/src/c/objects/Elements/Tria.h
r8967 r9012 146 146 double TimeAdapt(); 147 147 int* GetHorizontalNeighboorSids(void); 148 double RheologyBbarx(void); 148 149 /*}}}*/ 149 150 /*Tria specific routines:{{{1*/
Note:
See TracChangeset
for help on using the changeset viewer.