Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Elements/elements.h =================================================================== --- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Elements/elements.h (revision 11655) +++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Elements/elements.h (revision 11656) @@ -16,8 +16,8 @@ int GetNumberOfDofs( Node** nodes,int numnodes,int setenum,int approximation_enum); int* GetLocalDofList( Node** nodes,int numnodes,int setenum,int approximation_enum); int* GetGlobalDofList(Node** nodes,int numnodes,int setenum,int approximation_enum); +#ifdef _HAVE_DIAGNOSTIC_ void CoordinateSystemTransform(double** ptransform,Node** nodes,int numnodes,int* cs_array); -#ifdef _HAVE_DIAGNOSTIC_ void TransformInvStiffnessMatrixCoord(ElementMatrix* Ke,Node** nodes,int numnodes,int cs_enum); void TransformInvStiffnessMatrixCoord(ElementMatrix* Ke,Node** nodes,int numnodes,int* cs_array); void TransformStiffnessMatrixCoord(ElementMatrix* Ke,Node** nodes,int numnodes,int cs_enum); Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am =================================================================== --- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am (revision 11655) +++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am (revision 11656) @@ -203,7 +203,6 @@ ./shared/Elements/GetLocalDofList.cpp\ ./shared/Elements/GetGlobalDofList.cpp\ ./shared/Elements/GetNumberOfDofs.cpp\ - ./shared/Elements/CoordinateSystemTransform.cpp\ ./shared/String/sharedstring.h\ ./toolkits/petsc\ ./toolkits/petsc/patches\ @@ -501,6 +500,7 @@ ./modules/ModelProcessorx/DiagnosticHutter/CreateNodesDiagnosticHutter.cpp \ ./modules/ModelProcessorx/DiagnosticHutter/CreateConstraintsDiagnosticHutter.cpp \ ./modules/ModelProcessorx/DiagnosticHutter/CreateLoadsDiagnosticHutter.cpp \ + ./shared/Elements/CoordinateSystemTransform.cpp\ ./shared/Elements/TransformLoadVectorCoord.cpp \ ./shared/Elements/TransformStiffnessMatrixCoord.cpp \ ./shared/Elements/TransformInvStiffnessMatrixCoord.cpp \ Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Loads/Pengrid.cpp =================================================================== --- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Loads/Pengrid.cpp (revision 11655) +++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Loads/Pengrid.cpp (revision 11656) @@ -318,15 +318,19 @@ this->parameters->FindParam(&analysis_type,AnalysisTypeEnum); switch(analysis_type){ + #ifdef _HAVE_DIAGNOSTIC_ case DiagnosticHorizAnalysisEnum: case AdjointHorizAnalysisEnum: Ke=PenaltyCreateKMatrixDiagnosticStokes(kmax); break; + #endif + #ifdef _HAVE_THERMAL_ case ThermalAnalysisEnum: Ke=PenaltyCreateKMatrixThermal(kmax); break; case MeltingAnalysisEnum: Ke=PenaltyCreateKMatrixMelting(kmax); break; + #endif default: _error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type)); } @@ -347,14 +351,18 @@ this->parameters->FindParam(&analysis_type,AnalysisTypeEnum); switch(analysis_type){ + #ifdef _HAVE_DIAGNOSTIC_ case ThermalAnalysisEnum: pe=PenaltyCreatePVectorThermal(kmax); break; + #endif + #ifdef _HAVE_THERMAL_ case MeltingAnalysisEnum: pe=PenaltyCreatePVectorMelting(kmax); break; case DiagnosticHorizAnalysisEnum: case AdjointHorizAnalysisEnum: break; + #endif default: _error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type)); } @@ -538,6 +546,7 @@ *punstable=unstable; } /*}}}1*/ +#ifdef _HAVE_DIAGNOSTIC_ /*FUNCTION Pengrid::PenaltyCreateKMatrixDiagnosticStokes {{{1*/ ElementMatrix* Pengrid::PenaltyCreateKMatrixDiagnosticStokes(double kmax){ @@ -570,6 +579,8 @@ return Ke; } /*}}}1*/ +#endif +#ifdef _HAVE_THERMAL_ /*FUNCTION Pengrid::PenaltyCreateKMatrixMelting {{{1*/ ElementMatrix* Pengrid::PenaltyCreateKMatrixMelting(double kmax){ @@ -689,6 +700,7 @@ return pe; } /*}}}1*/ +#endif /*FUNCTION Pengrid::ResetConstraint {{{1*/ void Pengrid::ResetConstraint(void){ active=0; Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Loads/Pengrid.h =================================================================== --- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Loads/Pengrid.h (revision 11655) +++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Loads/Pengrid.h (revision 11656) @@ -83,11 +83,15 @@ bool InAnalysis(int analysis_type); /*}}}*/ /*Pengrid management {{{1*/ + #ifdef _HAVE_DIAGNOSTIC_ ElementMatrix* PenaltyCreateKMatrixDiagnosticStokes(double kmax); + #endif + #ifdef _HAVE_THERMAL_ ElementMatrix* PenaltyCreateKMatrixThermal(double kmax); ElementMatrix* PenaltyCreateKMatrixMelting(double kmax); ElementVector* PenaltyCreatePVectorThermal(double kmax); ElementVector* PenaltyCreatePVectorMelting(double kmax); + #endif void ConstraintActivate(int* punstable); void ConstraintActivateThermal(int* punstable); void UpdateInputs(double* solution); Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Elements/Element.h =================================================================== --- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Elements/Element.h (revision 11655) +++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Elements/Element.h (revision 11656) @@ -57,6 +57,7 @@ virtual void ProcessResultsUnits(void)=0; virtual void RequestedOutput(int output_enum,int step,double time)=0; + virtual int NodalValue(double* pvalue, int index, int natureofdataenum,bool process_units)=0; virtual void InputScale(int enum_type,double scale_factor)=0; virtual void GetVectorFromInputs(Vec vector, int name_enum)=0; virtual void GetVectorFromResults(Vec vector,int id,int interp)=0; @@ -87,7 +88,6 @@ virtual double MassFlux(double* segment,bool process_units)=0; virtual void ElementResponse(double* presponse,int response_enum,bool process_units)=0; virtual double IceVolume(void)=0; - virtual int NodalValue(double* pvalue, int index, int natureofdataenum,bool process_units)=0; #endif #ifdef _HAVE_CONTROL_ Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Elements/Tria.cpp =================================================================== --- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Elements/Tria.cpp (revision 11655) +++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Elements/Tria.cpp (revision 11656) @@ -2122,6 +2122,37 @@ return my_rank; } /*}}}*/ +/*FUNCTION Tria::NodalValue {{{1*/ +int Tria::NodalValue(double* pvalue, int index, int natureofdataenum,bool process_units){ + + int i; + int found=0; + double value; + Input* data=NULL; + GaussTria *gauss = NULL; + + /*First, serarch the input: */ + data=inputs->GetInput(natureofdataenum); + + /*figure out if we have the vertex id: */ + found=0; + for(i=0;iGetVertexId()){ + /*Do we have natureofdataenum in our inputs? :*/ + if(data){ + /*ok, we are good. retrieve value of input at vertex :*/ + gauss=new GaussTria(); gauss->GaussVertex(i); + data->GetInputValue(&value,gauss); + found=1; + break; + } + } + } + + if(found)*pvalue=value; + return found; +} +/*}}}*/ /*FUNCTION Tria::PatchFill{{{1*/ void Tria::PatchFill(int* prow, Patch* patch){ @@ -2738,37 +2769,6 @@ *pminvz=minvz; } /*}}}*/ -/*FUNCTION Tria::NodalValue {{{1*/ -int Tria::NodalValue(double* pvalue, int index, int natureofdataenum,bool process_units){ - - int i; - int found=0; - double value; - Input* data=NULL; - GaussTria *gauss = NULL; - - /*First, serarch the input: */ - data=inputs->GetInput(natureofdataenum); - - /*figure out if we have the vertex id: */ - found=0; - for(i=0;iGetVertexId()){ - /*Do we have natureofdataenum in our inputs? :*/ - if(data){ - /*ok, we are good. retrieve value of input at vertex :*/ - gauss=new GaussTria(); gauss->GaussVertex(i); - data->GetInputValue(&value,gauss); - found=1; - break; - } - } - } - - if(found)*pvalue=value; - return found; -} -/*}}}*/ /*FUNCTION Tria::ElementResponse{{{1*/ void Tria::ElementResponse(double* presponse,int response_enum,bool process_units){ Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Elements/Tria.h =================================================================== --- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Elements/Tria.h (revision 11655) +++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Elements/Tria.h (revision 11656) @@ -105,6 +105,7 @@ void DeleteResults(void); void MaterialUpdateFromTemperature(void){_error_("not implemented yet");}; void MigrateGroundingLine(double* oldfloating,double* sheet_ungrounding); + int NodalValue(double* pvalue, int index, int natureofdataenum,bool process_units); void PotentialSheetUngrounding(Vec potential_sheet_ungrounding); void PositiveDegreeDay(void); void RequestedOutput(int output_enum,int step,double time); @@ -126,7 +127,6 @@ void MinVx(double* pminvx, bool process_units); void MinVy(double* pminvy, bool process_units); void MinVz(double* pminvz, bool process_units); - int NodalValue(double* pvalue, int index, int natureofdataenum,bool process_units); double MassFlux(double* segment,bool process_units); void MaxAbsVx(double* pmaxabsvx, bool process_units); void MaxAbsVy(double* pmaxabsvy, bool process_units); Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Elements/Penta.cpp =================================================================== --- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Elements/Penta.cpp (revision 11655) +++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Elements/Penta.cpp (revision 11656) @@ -2326,6 +2326,37 @@ return my_rank; } /*}}}*/ +/*FUNCTION Penta::NodalValue {{{1*/ +int Penta::NodalValue(double* pvalue, int index, int natureofdataenum,bool process_units){ + + int i; + int found=0; + double value; + Input* data=NULL; + GaussPenta* gauss=NULL; + + /*First, serarch the input: */ + data=inputs->GetInput(natureofdataenum); + + /*figure out if we have the vertex id: */ + found=0; + for(i=0;iGetVertexId()){ + /*Do we have natureofdataenum in our inputs? :*/ + if(data){ + /*ok, we are good. retrieve value of input at vertex :*/ + gauss=new GaussPenta(); gauss->GaussVertex(i); + data->GetInputValue(&value,gauss); + found=1; + break; + } + } + } + + if(found)*pvalue=value; + return found; +} +/*}}}*/ /*FUNCTION Penta::PatchFill{{{1*/ void Penta::PatchFill(int* pcount, Patch* patch){ @@ -3001,37 +3032,6 @@ return base*height; } /*}}}*/ -/*FUNCTION Penta::NodalValue {{{1*/ -int Penta::NodalValue(double* pvalue, int index, int natureofdataenum,bool process_units){ - - int i; - int found=0; - double value; - Input* data=NULL; - GaussPenta* gauss=NULL; - - /*First, serarch the input: */ - data=inputs->GetInput(natureofdataenum); - - /*figure out if we have the vertex id: */ - found=0; - for(i=0;iGetVertexId()){ - /*Do we have natureofdataenum in our inputs? :*/ - if(data){ - /*ok, we are good. retrieve value of input at vertex :*/ - gauss=new GaussPenta(); gauss->GaussVertex(i); - data->GetInputValue(&value,gauss); - found=1; - break; - } - } - } - - if(found)*pvalue=value; - return found; -} -/*}}}*/ /*FUNCTION Penta::MinVel{{{1*/ void Penta::MinVel(double* pminvel, bool process_units){ Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Elements/Penta.h =================================================================== --- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Elements/Penta.h (revision 11655) +++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Elements/Penta.h (revision 11656) @@ -117,6 +117,7 @@ double SurfaceArea(void); void Update(int index, IoModel* iomodel,int analysis_counter,int analysis_type); int UpdatePotentialSheetUngrounding(double* potential_sheet_ungrounding,Vec vec_nodes_on_iceshelf,double* nodes_on_iceshelf); + int NodalValue(double* pvalue, int index, int natureofdataenum,bool process_units); double TimeAdapt(); int* GetHorizontalNeighboorSids(void); void ViscousHeatingCreateInput(void); @@ -128,7 +129,6 @@ void MinVx(double* pminvx, bool process_units); void MinVy(double* pminvy, bool process_units); void MinVz(double* pminvz, bool process_units); - int NodalValue(double* pvalue, int index, int natureofdataenum,bool process_units); double MassFlux(double* segment,bool process_units); void MaxAbsVx(double* pmaxabsvx, bool process_units); void MaxAbsVy(double* pmaxabsvy, bool process_units);