Index: ../trunk-jpl/src/c/bamg/GeomEdge.h =================================================================== --- ../trunk-jpl/src/c/bamg/GeomEdge.h (revision 21930) +++ ../trunk-jpl/src/c/bamg/GeomEdge.h (revision 21931) @@ -26,7 +26,6 @@ //Methods R2 F(double theta) const ; // parametrization of the curve edge - double R1tg(double theta,R2 &t) const ; // 1/radius of curvature + tangente int Cracked() const; int TgA() const; int TgB() const; Index: ../trunk-jpl/src/c/bamg/GeomEdge.cpp =================================================================== --- ../trunk-jpl/src/c/bamg/GeomEdge.cpp (revision 21930) +++ ../trunk-jpl/src/c/bamg/GeomEdge.cpp (revision 21931) @@ -62,77 +62,6 @@ int GeomEdge::Mark() const {/*{{{*/ return type &16; }/*}}}*/ - double GeomEdge::R1tg(double theta,R2 & t) const{/*{{{*/ - /*Original code from Frederic Hecht (BAMG v1.01, MeshGeom.cpp/R1tg)*/ - // 1/R of radius of cuvature - - R2 A=v[0]->r,B=v[1]->r; - double dca,dcb,dcta,dctb; - double ddca,ddcb,ddcta,ddctb; - double tt = theta*theta; - - //check theta - _assert_(theta>=0 && theta<=1); - - if (TgA()){ - if (TgB()){ - // Tangent A and B provided: - // interpolation d'hermite - dcb = 6*theta*(1-theta); - ddcb = 6*(1-2*theta); - dca = -dcb; - ddca = -ddcb; - dcta = (3*theta - 4)*theta + 1; - ddcta=6*theta-4; - dctb = 3*tt - 2*theta; - ddctb = 6*theta-2; - } - else { - //Tangent A provided but tangent B not provided - // 1-t*t, t-t*t, t*t - double t = theta; - dcb = 2*t; - ddcb = 2; - dca = -dcb; - ddca = -2; - dcta = 1-dcb; - ddcta = -ddcb; - dctb=0; - ddctb=0; - } - } - else{ - if (TgB()){ - //Tangent B provided but tangent A not provided - double t = 1-theta; - dca = -2*t; - ddca = 2; - dcb = -dca; - ddcb = -2; - dctb = 1+dca; - ddctb= ddca; - dcta =0; - ddcta =0; - } - else { - //Neither thangent A nor tangent B provided - // lagrange P1 - t=B-A; - return 0; - } - } - R2 d = A*dca + B*dcb + tg[0]* dcta + tg[1] * dctb; - R2 dd = A*ddca + B*ddcb + tg[0]* ddcta + tg[1] * ddctb; - double d2=(d,d); - double sd2 = sqrt(d2); - t=d; - if(d2>1.0e-20){ - t/=sd2; - return Abs(Det(d,dd))/(d2*sd2); - } - else return 0; - } - /*}}}*/ int GeomEdge::Required() {/*{{{*/ return type &64; }/*}}}*/ Index: ../trunk-jpl/src/c/bamg/Mesh.cpp =================================================================== --- ../trunk-jpl/src/c/bamg/Mesh.cpp (revision 21930) +++ ../trunk-jpl/src/c/bamg/Mesh.cpp (revision 21931) @@ -1593,7 +1593,10 @@ long i0 = GetId(triangles[it][VerticesOfTriangularEdge[j][0]]); long i1 = GetId(triangles[it][VerticesOfTriangularEdge[j][1]]); k = edge4->SortAndFind(i0,i1); - _assert_(k>=0); + if(k<0){ + delete [] colorV; + _error_("This should not happen"); + } subdomains[i].direction = (vertices + i0 == edges[k].v[0]) ? 1 : -1; subdomains[i].edge = edges+k; Gh.subdomains[i].edge = Gh.edges + k; @@ -2053,7 +2056,15 @@ if (xy==0) dd=dxdx; else if (xy==1) dd=dxdy; else if (xy==2) dd=dydy; - else _error_("not supported yet"); + else{ + delete [] detT; + delete [] Mmass; + delete [] workT; + delete [] workV; + delete [] Mmassxx; + delete [] OnBoundary; + _error_("not supported yet"); + } // do leat 2 iteration for boundary problem for (int ijacobi=0;ijacobi= maxnbv){ + delete [] bcurve; _error_("too many vertices on geometry: " << NbVerticesOnGeomVertex << " >= " << maxnbv); } Index: ../trunk-jpl/src/c/shared/Enum/EnumDefinitions.h =================================================================== --- ../trunk-jpl/src/c/shared/Enum/EnumDefinitions.h (revision 21930) +++ ../trunk-jpl/src/c/shared/Enum/EnumDefinitions.h (revision 21931) @@ -984,7 +984,6 @@ GiaIvinsAnalysisEnum, EsaSolutionEnum, EsaAnalysisEnum, - MeshdeformationAnalysisEnum, LevelsetAnalysisEnum, ExtrapolationAnalysisEnum, /*}}}*/ Index: ../trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp =================================================================== --- ../trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp (revision 21930) +++ ../trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp (revision 21931) @@ -952,7 +952,6 @@ case GiaIvinsAnalysisEnum : return "GiaIvinsAnalysis"; case EsaSolutionEnum : return "EsaSolution"; case EsaAnalysisEnum : return "EsaAnalysis"; - case MeshdeformationAnalysisEnum : return "MeshdeformationAnalysis"; case LevelsetAnalysisEnum : return "LevelsetAnalysis"; case ExtrapolationAnalysisEnum : return "ExtrapolationAnalysis"; case ApproximationEnum : return "Approximation"; Index: ../trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp =================================================================== --- ../trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp (revision 21930) +++ ../trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp (revision 21931) @@ -973,7 +973,6 @@ else if (strcmp(name,"GiaIvinsAnalysis")==0) return GiaIvinsAnalysisEnum; else if (strcmp(name,"EsaSolution")==0) return EsaSolutionEnum; else if (strcmp(name,"EsaAnalysis")==0) return EsaAnalysisEnum; - else if (strcmp(name,"MeshdeformationAnalysis")==0) return MeshdeformationAnalysisEnum; else if (strcmp(name,"LevelsetAnalysis")==0) return LevelsetAnalysisEnum; else if (strcmp(name,"ExtrapolationAnalysis")==0) return ExtrapolationAnalysisEnum; else if (strcmp(name,"Approximation")==0) return ApproximationEnum; @@ -997,11 +996,11 @@ else if (strcmp(name,"NearestInterp")==0) return NearestInterpEnum; else if (strcmp(name,"MinVel")==0) return MinVelEnum; else if (strcmp(name,"MaxVel")==0) return MaxVelEnum; + else if (strcmp(name,"MinVx")==0) return MinVxEnum; else stage=9; } if(stage==9){ - if (strcmp(name,"MinVx")==0) return MinVxEnum; - else if (strcmp(name,"MaxVx")==0) return MaxVxEnum; + if (strcmp(name,"MaxVx")==0) return MaxVxEnum; else if (strcmp(name,"MaxAbsVx")==0) return MaxAbsVxEnum; else if (strcmp(name,"MinVy")==0) return MinVyEnum; else if (strcmp(name,"MaxVy")==0) return MaxVyEnum; Index: ../trunk-jpl/src/c/shared/Numerics/GaussPoints.cpp =================================================================== --- ../trunk-jpl/src/c/shared/Numerics/GaussPoints.cpp (revision 21930) +++ ../trunk-jpl/src/c/shared/Numerics/GaussPoints.cpp (revision 21931) @@ -1690,20 +1690,3 @@ xDelete(work); }/*}}}*/ - -/*Element Gauss points TO BE REMOVED*/ -void gaussQuad( IssmPDouble** pxgaus, IssmPDouble** pxwgt, IssmPDouble** pegaus, IssmPDouble** pewgt, int nigaus, int njgaus ) {/*{{{*/ - /*Gauss quadrature points for the quadrilaterial.*/ - - /*get the gauss points using the product of two line rules */ - GaussLegendreLinear(pxgaus, pxwgt, nigaus); - GaussLegendreLinear(pegaus, pewgt, njgaus); -}/*}}}*/ -void gaussHexa( IssmPDouble** pxgaus, IssmPDouble** pxwgt, IssmPDouble** pegaus, IssmPDouble** pewgt, IssmPDouble** pzgaus, IssmPDouble ** pzwgt, int nigaus, int njgaus, int nkgaus ) {/*{{{*/ - /*Gauss quadrature points for the hexahedron.*/ - - /* get the gauss points using the product of three line rules */ - GaussLegendreLinear(pxgaus, pxwgt, nigaus); - GaussLegendreLinear(pegaus, pewgt, njgaus); - GaussLegendreLinear(pzgaus, pzwgt, nkgaus); -}/*}}}*/ Index: ../trunk-jpl/src/c/shared/Numerics/GaussPoints.h =================================================================== --- ../trunk-jpl/src/c/shared/Numerics/GaussPoints.h (revision 21930) +++ ../trunk-jpl/src/c/shared/Numerics/GaussPoints.h (revision 21931) @@ -17,7 +17,4 @@ #define MAX_GAUS_ITER 30 void GaussRecur(IssmPDouble* zero, IssmPDouble* weight, int n, IssmPDouble* alpha, IssmPDouble* beta); -void gaussQuad(IssmPDouble** pxgaus, IssmPDouble** pxwgt, IssmPDouble** pegaus, IssmPDouble** pewgt, int nigaus, int njgaus); -void gaussHexa(IssmPDouble** pxgaus, IssmPDouble** pxwgt, IssmPDouble** pegaus, IssmPDouble** pewgt, IssmPDouble** pzgaus, IssmPDouble ** pzwgt, int nigaus, int njgaus, int nkgaus); - #endif Index: ../trunk-jpl/src/c/modules/ExpToLevelSetx/ExpToLevelSetxt.cpp =================================================================== --- ../trunk-jpl/src/c/modules/ExpToLevelSetx/ExpToLevelSetxt.cpp (revision 21930) +++ ../trunk-jpl/src/c/modules/ExpToLevelSetx/ExpToLevelSetxt.cpp (revision 21931) @@ -67,18 +67,8 @@ } } -double ddistance(double x1,double y1,double x2,double y2){ - return sqrt(pow(x2-x1,2)+pow(y2-y1,2)); -} -double ddot(double x1, double y1, double x2, double y2){ - return x1*x2+y1*y2; -} - -bool isPointLeftOfRay(double x, double y, double raySx, double raySy, double rayEx, double rayEy) { - return (y-raySy)*(rayEx-raySx) - > (x-raySx)*(rayEy-raySy); -} - +double ddistance(double x1,double y1,double x2,double y2){ return sqrt(pow(x2-x1,2)+pow(y2-y1,2)); } +double ddot(double x1, double y1, double x2, double y2){ return x1*x2+y1*y2; } double minimum_distance(double x1, double y1, double x2, double y2, double x0, double y0){ // Return minimum distance between line segment [(x1,y1) (x2,y2)] and point (x0,y0) (v=(x1,y1), w=(x2,y2) and p=(x0,y0) Index: ../trunk-jpl/src/c/Makefile.am =================================================================== --- ../trunk-jpl/src/c/Makefile.am (revision 21930) +++ ../trunk-jpl/src/c/Makefile.am (revision 21931) @@ -293,7 +293,6 @@ ./cores/dummy_core.cpp\ ./cores/surfaceslope_core.cpp\ ./cores/bedslope_core.cpp\ - ./cores/meshdeformation_core.cpp\ ./cores/damage_core.cpp\ ./cores/levelsetfunctionslope_core.cpp\ ./cores/movingfront_core.cpp\ @@ -447,9 +446,6 @@ if SMOOTH issm_sources += ./analyses/SmoothAnalysis.cpp endif -if MESHDEFORMATION -issm_sources += ./analyses/MeshdeformationAnalysis.cpp -endif if LEVELSET issm_sources += ./analyses/LevelsetAnalysis.cpp issm_sources += ./modules/Calvingx/Calvingx.cpp Index: ../trunk-jpl/src/c/cores/meshdeformation_core.cpp =================================================================== --- ../trunk-jpl/src/c/cores/meshdeformation_core.cpp (revision 21930) +++ ../trunk-jpl/src/c/cores/meshdeformation_core.cpp (nonexistent) @@ -1,30 +0,0 @@ -/*!\file: meshdeformation_core.cpp - * \brief: core of the slope solution - */ - -#include "./cores.h" -#include "../toolkits/toolkits.h" -#include "../classes/classes.h" -#include "../shared/shared.h" -#include "../solutionsequences/solutionsequences.h" -#include "../modules/modules.h" - -void meshdeformation_core(FemModel* femmodel){ - - /*parameters: */ - bool save_results; - - /*Recover some parameters: */ - femmodel->parameters->FindParam(&save_results,SaveResultsEnum); - - if(VerboseSolution()) _printf0_("computing mesh deformation (elasticity)...\n"); - - /*Call on core computations: */ - femmodel->SetCurrentConfiguration(MeshdeformationAnalysisEnum); - solutionsequence_linear(femmodel); - - if(save_results){ - if(VerboseSolution()) _printf0_("saving results:\n"); - } - -} Index: ../trunk-jpl/src/c/classes/Elements/Penta.cpp =================================================================== --- ../trunk-jpl/src/c/classes/Elements/Penta.cpp (revision 21930) +++ ../trunk-jpl/src/c/classes/Elements/Penta.cpp (revision 21931) @@ -1221,49 +1221,6 @@ return base*(surface - bed + min( rho_water/rho_ice * bathymetry, 0.) ); } /*}}}*/ -void Penta::InputControlUpdate(IssmDouble scalar,bool save_parameter){/*{{{*/ - - /*Intermediary*/ - int num_controls; - int* control_type=NULL; - Input* input=NULL; - - /*retrieve some parameters: */ - this->parameters->FindParam(&num_controls,InversionNumControlParametersEnum); - this->parameters->FindParam(&control_type,NULL,InversionControlParametersEnum); - - for(int i=0;iinputs->GetInput(MaterialsRheologyBEnum); _assert_(input); - } - else if(control_type[i]==DamageDbarEnum){ - if (!IsOnBase()) goto cleanup_and_return; - input=(Input*)this->inputs->GetInput(DamageDEnum); _assert_(input); - } - else{ - input=(Input*)this->inputs->GetInput(control_type[i]); _assert_(input); - } - if(input->ObjectEnum()!=ControlInputEnum) _error_("input " << EnumToStringx(control_type[i]) << " is not a ControlInput"); - - ((ControlInput*)input)->UpdateValue(scalar); - ((ControlInput*)input)->Constrain(); - if (save_parameter) ((ControlInput*)input)->SaveValue(); - - if(control_type[i]==MaterialsRheologyBbarEnum){ - this->InputExtrude(MaterialsRheologyBEnum,-1); - } - else if(control_type[i]==DamageDbarEnum){ - this->InputExtrude(DamageDEnum,-1); - } - } - - /*Clean up and return*/ -cleanup_and_return: - xDelete(control_type); -} -/*}}}*/ void Penta::InputDepthAverageAtBase(int original_enum,int average_enum){/*{{{*/ IssmDouble Jdet,value; @@ -1367,18 +1324,6 @@ } } /*}}}*/ -void Penta::InputScale(int enum_type,IssmDouble scale_factor){/*{{{*/ - - Input* input=NULL; - - /*Make a copy of the original input: */ - input=(Input*)this->inputs->GetInput(enum_type); - if(!input)_error_("could not find old input with enum: " << EnumToStringx(enum_type)); - - /*Scale: */ - input->Scale(scale_factor); -} -/*}}}*/ void Penta::InputUpdateFromIoModel(int index,IoModel* iomodel){ /*{{{*/ /*Intermediaries*/ Index: ../trunk-jpl/src/c/classes/Elements/Penta.h =================================================================== --- ../trunk-jpl/src/c/classes/Elements/Penta.h (revision 21930) +++ ../trunk-jpl/src/c/classes/Elements/Penta.h (revision 21931) @@ -90,10 +90,8 @@ IssmDouble GroundedArea(void); IssmDouble IceVolume(void); IssmDouble IceVolumeAboveFloatation(void); - void InputControlUpdate(IssmDouble scalar,bool save_parameter); void InputDepthAverageAtBase(int enum_type,int average_enum_type); void InputExtrude(int enum_type,int start); - void InputScale(int enum_type,IssmDouble scale_factor); void InputUpdateFromIoModel(int index, IoModel* iomodel); void InputUpdateFromSolutionOneDof(IssmDouble* solutiong,int enum_type); void InputUpdateFromSolutionOneDofCollapsed(IssmDouble* solutiong,int enum_type); Index: ../trunk-jpl/src/c/classes/Elements/Seg.h =================================================================== --- ../trunk-jpl/src/c/classes/Elements/Seg.h (revision 21930) +++ ../trunk-jpl/src/c/classes/Elements/Seg.h (revision 21931) @@ -78,10 +78,8 @@ IssmDouble GroundedArea(void){_error_("not implemented yet");}; IssmDouble IceVolume(void){_error_("not implemented yet");}; IssmDouble IceVolumeAboveFloatation(void){_error_("not implemented yet");}; - void InputControlUpdate(IssmDouble scalar,bool save_parameter){_error_("not implemented yet");}; void InputDepthAverageAtBase(int enum_type,int average_enum_type){_error_("not implemented yet");}; void InputExtrude(int enum_type,int start){_error_("not implemented"); /*For penta only*/}; - void InputScale(int enum_type,IssmDouble scale_factor){_error_("not implemented yet");}; void InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("not implemented yet");}; void InputUpdateFromSolutionOneDof(IssmDouble* solution,int inputenum){_error_("not implemented yet");}; void InputUpdateFromSolutionOneDofCollapsed(IssmDouble* solution,int inputenum){_error_("not implemented yet");}; Index: ../trunk-jpl/src/c/classes/Elements/Tetra.h =================================================================== --- ../trunk-jpl/src/c/classes/Elements/Tetra.h (revision 21930) +++ ../trunk-jpl/src/c/classes/Elements/Tetra.h (revision 21931) @@ -92,10 +92,8 @@ bool IsOnBase(); bool IsOnSurface(); bool IsZeroLevelset(int levelset_enum){_error_("not implemented");}; - void InputControlUpdate(IssmDouble scalar,bool save_parameter){_error_("not implemented yet");}; void InputDepthAverageAtBase(int enum_type,int average_enum_type){_error_("not implemented yet");}; void InputExtrude(int enum_type,int start){_error_("not implemented"); /*For penta only*/}; - void InputScale(int enum_type,IssmDouble scale_factor){_error_("not implemented yet");}; void InputUpdateFromIoModel(int index, IoModel* iomodel); void InputUpdateFromSolutionOneDof(IssmDouble* solution,int inputenum); void InputUpdateFromSolutionOneDofCollapsed(IssmDouble* solution,int inputenum){_error_("not implemented yet");}; Index: ../trunk-jpl/src/c/classes/Elements/Element.h =================================================================== --- ../trunk-jpl/src/c/classes/Elements/Element.h (revision 21930) +++ ../trunk-jpl/src/c/classes/Elements/Element.h (revision 21931) @@ -221,10 +221,8 @@ virtual IssmDouble GroundedArea(void)=0; virtual IssmDouble IceVolume(void)=0; virtual IssmDouble IceVolumeAboveFloatation(void)=0; - virtual void InputControlUpdate(IssmDouble scalar,bool save_parameter)=0; virtual void InputDepthAverageAtBase(int enum_type,int average_enum_type)=0; virtual void InputExtrude(int input_enum,int start)=0; - virtual void InputScale(int enum_type,IssmDouble scale_factor)=0; virtual void InputUpdateFromSolutionOneDofCollapsed(IssmDouble* solution,int inputenum)=0; virtual void InputUpdateFromSolutionOneDof(IssmDouble* solution,int inputenum)=0; virtual bool IsFaceOnBoundary(void)=0; Index: ../trunk-jpl/src/c/classes/Elements/Tria.cpp =================================================================== --- ../trunk-jpl/src/c/classes/Elements/Tria.cpp (revision 21930) +++ ../trunk-jpl/src/c/classes/Elements/Tria.cpp (revision 21931) @@ -1366,7 +1366,7 @@ /*Computeportion of the element that has a positive levelset*/ bool negative=true; - int point; + int point=0; const IssmPDouble epsilon= 1.e-15; IssmDouble f1,f2; @@ -1404,6 +1404,9 @@ f1=gl[1]/(gl[1]-gl[2]); f2=gl[1]/(gl[1]-gl[0]); } + else{ + _error_("This case should NOT be happening"); + } } *point1=point; *fraction1=f1; @@ -1660,33 +1663,6 @@ return base*(surface-bed+min(rho_water/rho_ice*bathymetry,0.)); } /*}}}*/ -void Tria::InputControlUpdate(IssmDouble scalar,bool save_parameter){/*{{{*/ - - /*Intermediary*/ - int num_controls; - int* control_type=NULL; - Input* input=NULL; - - /*retrieve some parameters: */ - this->parameters->FindParam(&num_controls,InversionNumControlParametersEnum); - this->parameters->FindParam(&control_type,NULL,InversionControlParametersEnum); - - for(int i=0;iinputs->GetInput(control_type[i]); _assert_(input); - if (input->ObjectEnum()!=ControlInputEnum){ - _error_("input " << EnumToStringx(control_type[i]) << " is not a ControlInput"); - } - - ((ControlInput*)input)->UpdateValue(scalar); - ((ControlInput*)input)->Constrain(); - if (save_parameter) ((ControlInput*)input)->SaveValue(); - - } - - /*Clean up and return*/ - xDelete(control_type); -} -/*}}}*/ void Tria::InputDepthAverageAtBase(int enum_type,int average_enum_type){/*{{{*/ /*New input*/ @@ -1705,18 +1681,6 @@ this->inputs->AddInput((Input*)newinput); } /*}}}*/ -void Tria::InputScale(int enum_type,IssmDouble scale_factor){/*{{{*/ - - Input* input=NULL; - - /*Make a copy of the original input: */ - input=(Input*)this->inputs->GetInput(enum_type); - if(!input)_error_("could not find old input with enum: " << EnumToStringx(enum_type)); - - /*Scale: */ - input->Scale(scale_factor); -} -/*}}}*/ void Tria::InputUpdateFromIoModel(int index, IoModel* iomodel){ //i is the element index/*{{{*/ /*Intermediaries*/ Index: ../trunk-jpl/src/c/classes/Elements/Tria.h =================================================================== --- ../trunk-jpl/src/c/classes/Elements/Tria.h (revision 21930) +++ ../trunk-jpl/src/c/classes/Elements/Tria.h (revision 21931) @@ -90,10 +90,8 @@ bool HasEdgeOnSurface(); IssmDouble IceVolume(void); IssmDouble IceVolumeAboveFloatation(void); - void InputControlUpdate(IssmDouble scalar,bool save_parameter); void InputDepthAverageAtBase(int enum_type,int average_enum_type); void InputExtrude(int enum_type,int start){_error_("not implemented"); /*For penta only*/}; - void InputScale(int enum_type,IssmDouble scale_factor); bool IsFaceOnBoundary(void); bool IsIcefront(void); bool IsNodeOnShelfFromFlags(IssmDouble* flags); Index: ../trunk-jpl/src/c/classes/Inputs/ControlInput.h =================================================================== --- ../trunk-jpl/src/c/classes/Inputs/ControlInput.h (revision 21930) +++ ../trunk-jpl/src/c/classes/Inputs/ControlInput.h (revision 21931) @@ -80,7 +80,6 @@ void ResultToPatch(IssmDouble* values,int nodesperelement,int sid){_error_("not supported yet");}; void SaveValue(void); void Scale(IssmDouble scale_factor){_error_("not implemented yet");}; - void ScaleGradient(IssmDouble scale); void Set(IssmDouble setvalue){_error_("Set not implemented yet");}; void SetGradient(Input* gradient_in); void SetInput(Input* in_input); Index: ../trunk-jpl/src/c/classes/Inputs/DatasetInput.h =================================================================== --- ../trunk-jpl/src/c/classes/Inputs/DatasetInput.h (revision 21930) +++ ../trunk-jpl/src/c/classes/Inputs/DatasetInput.h (revision 21931) @@ -76,7 +76,6 @@ void ResultToPatch(IssmDouble* values,int nodesperelement,int sid){_error_("not supported yet");}; void SaveValue(void){_error_("not implemented yet");}; void Scale(IssmDouble scale_factor){_error_("not implemented yet");}; - void ScaleGradient(IssmDouble scale){_error_("not implemented yet");}; void Set(IssmDouble setvalue){_error_("Set not implemented yet");}; void SetGradient(Input* gradient_in){_error_("not implemented yet");}; void UpdateValue(IssmDouble scalar){_error_("not implemented yet");}; Index: ../trunk-jpl/src/c/classes/Inputs/ControlInput.cpp =================================================================== --- ../trunk-jpl/src/c/classes/Inputs/ControlInput.cpp (revision 21930) +++ ../trunk-jpl/src/c/classes/Inputs/ControlInput.cpp (revision 21931) @@ -235,10 +235,6 @@ if(savedvalues) delete this->savedvalues; this->savedvalues=xDynamicCast(this->values->copy()); }/*}}}*/ -void ControlInput::ScaleGradient(IssmDouble scaling_factor){/*{{{*/ - if(!gradient) _error_("Gradient of ControlInput " << EnumToStringx(enum_type) << " not found"); - gradient->Scale(scaling_factor); -}/*}}}*/ void ControlInput::SetGradient(Input* gradient_in){/*{{{*/ /*Get enum for current gradient*/ Index: ../trunk-jpl/src/c/analyses/MeshdeformationAnalysis.cpp =================================================================== --- ../trunk-jpl/src/c/analyses/MeshdeformationAnalysis.cpp (revision 21930) +++ ../trunk-jpl/src/c/analyses/MeshdeformationAnalysis.cpp (nonexistent) @@ -1,56 +0,0 @@ -#include "./MeshdeformationAnalysis.h" -#include "../toolkits/toolkits.h" -#include "../classes/classes.h" -#include "../shared/shared.h" -#include "../modules/modules.h" - -/*Model processing*/ -void MeshdeformationAnalysis::CreateConstraints(Constraints* constraints,IoModel* iomodel){/*{{{*/ - _error_("not implemented yet"); -}/*}}}*/ -void MeshdeformationAnalysis::CreateLoads(Loads* loads, IoModel* iomodel){/*{{{*/ - _error_("not implemented yet"); -}/*}}}*/ -void MeshdeformationAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel){/*{{{*/ - _error_("not implemented yet"); -}/*}}}*/ -int MeshdeformationAnalysis::DofsPerNode(int** doflist,int domaintype,int approximation){/*{{{*/ - _error_("not implemented"); -}/*}}}*/ -void MeshdeformationAnalysis::UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type){/*{{{*/ - _error_("not implemented yet"); -}/*}}}*/ -void MeshdeformationAnalysis::UpdateParameters(Parameters* parameters,IoModel* iomodel,int solution_enum,int analysis_enum){/*{{{*/ - _error_("not implemented yet"); -}/*}}}*/ - -/*Finite Element Analysis*/ -void MeshdeformationAnalysis::Core(FemModel* femmodel){/*{{{*/ - _error_("not implemented"); -}/*}}}*/ -ElementVector* MeshdeformationAnalysis::CreateDVector(Element* element){/*{{{*/ - /*Default, return NULL*/ - return NULL; -}/*}}}*/ -ElementMatrix* MeshdeformationAnalysis::CreateJacobianMatrix(Element* element){/*{{{*/ -_error_("Not implemented"); -}/*}}}*/ -ElementMatrix* MeshdeformationAnalysis::CreateKMatrix(Element* element){/*{{{*/ - _error_("not implemented yet"); -}/*}}}*/ -ElementVector* MeshdeformationAnalysis::CreatePVector(Element* element){/*{{{*/ -_error_("not implemented yet"); -}/*}}}*/ -void MeshdeformationAnalysis::GetSolutionFromInputs(Vector* solution,Element* element){/*{{{*/ - _error_("not implemented yet"); -}/*}}}*/ -void MeshdeformationAnalysis::GradientJ(Vector* gradient,Element* element,int control_type,int control_index){/*{{{*/ - _error_("Not implemented yet"); -}/*}}}*/ -void MeshdeformationAnalysis::InputUpdateFromSolution(IssmDouble* solution,Element* element){/*{{{*/ - _error_("not implemented yet"); -}/*}}}*/ -void MeshdeformationAnalysis::UpdateConstraints(FemModel* femmodel){/*{{{*/ - /*Default, do nothing*/ - return; -}/*}}}*/ Index: ../trunk-jpl/src/c/analyses/MeshdeformationAnalysis.h =================================================================== --- ../trunk-jpl/src/c/analyses/MeshdeformationAnalysis.h (revision 21930) +++ ../trunk-jpl/src/c/analyses/MeshdeformationAnalysis.h (nonexistent) @@ -1,33 +0,0 @@ -/*! \file MeshdeformationAnalysis.h - * \brief: header file for generic external result object - */ - -#ifndef _MeshdeformationAnalysis_ -#define _MeshdeformationAnalysis_ - -/*Headers*/ -#include "./Analysis.h" - -class MeshdeformationAnalysis: public Analysis{ - - public: - /*Model processing*/ - void CreateConstraints(Constraints* constraints,IoModel* iomodel); - void CreateLoads(Loads* loads, IoModel* iomodel); - void CreateNodes(Nodes* nodes,IoModel* iomodel); - int DofsPerNode(int** doflist,int domaintype,int approximation); - void UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type); - void UpdateParameters(Parameters* parameters,IoModel* iomodel,int solution_enum,int analysis_enum); - - /*Finite element Analysis*/ - void Core(FemModel* femmodel); - ElementVector* CreateDVector(Element* element); - ElementMatrix* CreateJacobianMatrix(Element* element); - ElementMatrix* CreateKMatrix(Element* element); - ElementVector* CreatePVector(Element* element); - void GetSolutionFromInputs(Vector* solution,Element* element); - void GradientJ(Vector* gradient,Element* element,int control_type,int control_index); - void InputUpdateFromSolution(IssmDouble* solution,Element* element); - void UpdateConstraints(FemModel* femmodel); -}; -#endif Index: ../trunk-jpl/src/c/analyses/LevelsetAnalysis.cpp =================================================================== --- ../trunk-jpl/src/c/analyses/LevelsetAnalysis.cpp (revision 21930) +++ ../trunk-jpl/src/c/analyses/LevelsetAnalysis.cpp (revision 21931) @@ -551,62 +551,6 @@ default: _error_("mesh "<vertices->NumberOfVertices(); - Element* element; - - Vector* vec_dist_zerolevelset = NULL; - GetVectorFromInputsx(&vec_dist_zerolevelset, femmodel, MaskIceLevelsetEnum, VertexPIdEnum); - - /* set NaN on elements intersected by zero levelset */ - for(i=0;ielements->Size();i++){ - element=xDynamicCast(femmodel->elements->GetObjectByOffset(i)); - if(element->IsZeroLevelset(MaskIceLevelsetEnum)) - for(k=0;kGetNumberOfVertices();k++) - vec_dist_zerolevelset->SetValue(element->vertices[k]->Sid(),NAN,INS_VAL); - } - - /* set distance on elements intersected by zero levelset */ - for(i=0;ielements->Size();i++){ - element=xDynamicCast(femmodel->elements->GetObjectByOffset(i)); - if(element->IsZeroLevelset(MaskIceLevelsetEnum)){ - SetDistanceToZeroLevelsetElement(vec_dist_zerolevelset, element); - - /* Get maximum distance to interface along vertices */ - for(k=0;kGetNumberOfVertices();k++){ - vec_dist_zerolevelset->GetValue(&val,element->vertices[k]->Sid()); - if((val>0.) && (val>dmaxp)) - dmaxp=val; - else if((val<0.) && (valGetValue(&val,i); - if(val==1.) //FIXME: improve check - vec_dist_zerolevelset->SetValue(i,3.*dmaxp,INS_VAL); - else if(val==-1.) - vec_dist_zerolevelset->SetValue(i,3.*dmaxm,INS_VAL); - } - - /*Assemble vector and serialize */ - vec_dist_zerolevelset->Assemble(); - IssmDouble* dist_zerolevelset=vec_dist_zerolevelset->ToMPISerial(); - InputUpdateFromVectorx(femmodel,dist_zerolevelset,MaskIceLevelsetEnum,VertexSIdEnum); - - /*Clean up and return*/ - delete vec_dist_zerolevelset; - delete dist_zerolevelset; -}/*}}}*/ void LevelsetAnalysis::SetDistanceToZeroLevelsetElement(Vector* vec_signed_dist, Element* element){/*{{{*/ if(!element->IsZeroLevelset(MaskIceLevelsetEnum)) Index: ../trunk-jpl/src/c/analyses/analyses.h =================================================================== --- ../trunk-jpl/src/c/analyses/analyses.h (revision 21930) +++ ../trunk-jpl/src/c/analyses/analyses.h (revision 21931) @@ -33,7 +33,6 @@ #include "./SmbAnalysis.h" #include "./SealevelriseAnalysis.h" #include "./MeltingAnalysis.h" -#include "./MeshdeformationAnalysis.h" #include "./SmoothAnalysis.h" #include "./StressbalanceAnalysis.h" #include "./StressbalanceSIAAnalysis.h" Index: ../trunk-jpl/src/c/analyses/LevelsetAnalysis.h =================================================================== --- ../trunk-jpl/src/c/analyses/LevelsetAnalysis.h (revision 21930) +++ ../trunk-jpl/src/c/analyses/LevelsetAnalysis.h (revision 21931) @@ -31,7 +31,6 @@ void GetSolutionFromInputs(Vector* solution,Element* element); void GradientJ(Vector* gradient,Element* element,int control_type,int control_index); void InputUpdateFromSolution(IssmDouble* solution,Element* element); - void SetDistanceOnIntersectedElements(FemModel* femmodel); void SetDistanceToZeroLevelsetElement(Vector* vec_signed_dist, Element* element); void UpdateConstraints(FemModel* femmodel); }; Index: ../trunk-jpl/src/c/analyses/EnumToAnalysis.cpp =================================================================== --- ../trunk-jpl/src/c/analyses/EnumToAnalysis.cpp (revision 21930) +++ ../trunk-jpl/src/c/analyses/EnumToAnalysis.cpp (revision 21931) @@ -109,9 +109,6 @@ #ifdef _HAVE_ESA_ case EsaAnalysisEnum : return new EsaAnalysis(); #endif - #ifdef _HAVE_MESHDEFORMATION_ - case MeshdeformationAnalysisEnum : return new MeshdeformationAnalysis(); - #endif #ifdef _HAVE_LEVELSET_ case LevelsetAnalysisEnum : return new LevelsetAnalysis(); #endif