Changeset 16675 for issm/trunk-jpl/src
- Timestamp:
- 11/08/13 09:15:08 (11 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 1 added
- 94 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/Makefile.am
r16550 r16675 25 25 ./datastructures/datastructures.h\ 26 26 ./classes/classes.h\ 27 ./classes/gauss/Gauss.h\ 27 28 ./classes/gauss/GaussSeg.h\ 28 29 ./classes/gauss/GaussSeg.cpp\ -
issm/trunk-jpl/src/c/analyses/AdjointBalancethicknessAnalysis.cpp
r16542 r16675 24 24 _error_("not implemented yet"); 25 25 }/*}}}*/ 26 27 /*Numerics*/ 28 void AdjointBalancethicknessAnalysis::GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element){/*{{{*/ 29 _error_("not implemented yet"); 30 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/AdjointBalancethicknessAnalysis.h
r16542 r16675 18 18 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 19 19 void CreateLoads(Loads* loads, IoModel* iomodel); 20 void GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element); 20 21 }; 21 22 #endif -
issm/trunk-jpl/src/c/analyses/AdjointHorizAnalysis.cpp
r16542 r16675 24 24 _error_("not implemented yet"); 25 25 }/*}}}*/ 26 27 /*Numerics*/ 28 void AdjointHorizAnalysis::GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element){/*{{{*/ 29 _error_("not implemented yet"); 30 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/AdjointHorizAnalysis.h
r16542 r16675 18 18 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 19 19 void CreateLoads(Loads* loads, IoModel* iomodel); 20 void GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element); 20 21 }; 21 22 #endif -
issm/trunk-jpl/src/c/analyses/Analysis.h
r16542 r16675 6 6 #define _ANALYSIS_H_ 7 7 8 #include "../toolkits/objects/toolkitobjects.h" 8 9 class Parameters; 9 10 class IoModel; … … 12 13 class Constraints; 13 14 class Loads; 15 class Element; 14 16 15 17 class Analysis{ … … 24 26 virtual void CreateConstraints(Constraints* constraints,IoModel* iomodel)=0; 25 27 virtual void CreateLoads(Loads* loads, IoModel* iomodel)=0; 28 29 virtual void GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element)=0; 26 30 }; 27 31 #endif -
issm/trunk-jpl/src/c/analyses/BalancethicknessAnalysis.cpp
r16542 r16675 112 112 } 113 113 }/*}}}*/ 114 115 /*Numerics*/ 116 void BalancethicknessAnalysis::GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element){/*{{{*/ 117 _error_("not implemented yet"); 118 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/BalancethicknessAnalysis.h
r16542 r16675 18 18 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 19 19 void CreateLoads(Loads* loads, IoModel* iomodel); 20 void GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element); 20 21 }; 21 22 #endif -
issm/trunk-jpl/src/c/analyses/BalancethicknessSoftAnalysis.cpp
r16542 r16675 24 24 _error_("not implemented yet"); 25 25 }/*}}}*/ 26 27 /*Numerics*/ 28 void BalancethicknessSoftAnalysis::GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element){/*{{{*/ 29 _error_("not implemented yet"); 30 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/BalancethicknessSoftAnalysis.h
r16542 r16675 18 18 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 19 19 void CreateLoads(Loads* loads, IoModel* iomodel); 20 void GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element); 20 21 }; 21 22 #endif -
issm/trunk-jpl/src/c/analyses/BalancevelocityAnalysis.cpp
r16542 r16675 57 57 /*No loads*/ 58 58 }/*}}}*/ 59 60 /*Numerics*/ 61 void BalancevelocityAnalysis::GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element){/*{{{*/ 62 _error_("not implemented yet"); 63 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/BalancevelocityAnalysis.h
r16542 r16675 18 18 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 19 19 void CreateLoads(Loads* loads, IoModel* iomodel); 20 void GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element); 20 21 }; 21 22 #endif -
issm/trunk-jpl/src/c/analyses/DamageEvolutionAnalysis.cpp
r16542 r16675 93 93 94 94 }/*}}}*/ 95 96 /*Numerics*/ 97 void DamageEvolutionAnalysis::GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element){/*{{{*/ 98 _error_("not implemented yet"); 99 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/DamageEvolutionAnalysis.h
r16542 r16675 18 18 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 19 19 void CreateLoads(Loads* loads, IoModel* iomodel); 20 void GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element); 20 21 }; 21 22 #endif -
issm/trunk-jpl/src/c/analyses/EnthalpyAnalysis.cpp
r16604 r16675 182 182 /*No loads */ 183 183 }/*}}}*/ 184 185 /*Numerics*/ 186 void EnthalpyAnalysis::GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element){/*{{{*/ 187 element->GetSolutionFromInputsOneDof(solution,EnthalpyEnum); 188 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/EnthalpyAnalysis.h
r16542 r16675 18 18 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 19 19 void CreateLoads(Loads* loads, IoModel* iomodel); 20 void GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element); 20 21 }; 21 22 #endif -
issm/trunk-jpl/src/c/analyses/EnumToAnalysis.h
r16542 r16675 13 13 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 14 14 void CreateLoads(Loads* loads, IoModel* iomodel); 15 void GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element); -
issm/trunk-jpl/src/c/analyses/ExtrudeFromBaseAnalysis.cpp
r16542 r16675 35 35 void ExtrudeFromBaseAnalysis::CreateLoads(Loads* loads, IoModel* iomodel){/*{{{*/ 36 36 }/*}}}*/ 37 38 /*Numerics*/ 39 void ExtrudeFromBaseAnalysis::GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element){/*{{{*/ 40 _error_("not implemented yet"); 41 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/ExtrudeFromBaseAnalysis.h
r16542 r16675 18 18 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 19 19 void CreateLoads(Loads* loads, IoModel* iomodel); 20 void GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element); 20 21 }; 21 22 #endif -
issm/trunk-jpl/src/c/analyses/ExtrudeFromTopAnalysis.cpp
r16574 r16675 35 35 void ExtrudeFromTopAnalysis::CreateLoads(Loads* loads, IoModel* iomodel){/*{{{*/ 36 36 }/*}}}*/ 37 38 /*Numerics*/ 39 void ExtrudeFromTopAnalysis::GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element){/*{{{*/ 40 _error_("not implemented yet"); 41 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/ExtrudeFromTopAnalysis.h
r16542 r16675 18 18 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 19 19 void CreateLoads(Loads* loads, IoModel* iomodel); 20 void GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element); 20 21 }; 21 22 #endif -
issm/trunk-jpl/src/c/analyses/FreeSurfaceBaseAnalysis.cpp
r16542 r16675 88 88 iomodel->DeleteData(nodeonbed,MeshVertexonbedEnum); 89 89 }/*}}}*/ 90 91 /*Numerics*/ 92 void FreeSurfaceBaseAnalysis::GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element){/*{{{*/ 93 _error_("not implemented yet"); 94 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/FreeSurfaceBaseAnalysis.h
r16542 r16675 18 18 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 19 19 void CreateLoads(Loads* loads, IoModel* iomodel); 20 void GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element); 20 21 }; 21 22 #endif -
issm/trunk-jpl/src/c/analyses/FreeSurfaceTopAnalysis.cpp
r16542 r16675 86 86 iomodel->DeleteData(nodeonsurface,MeshVertexonsurfaceEnum); 87 87 }/*}}}*/ 88 89 /*Numerics*/ 90 void FreeSurfaceTopAnalysis::GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element){/*{{{*/ 91 _error_("not implemented yet"); 92 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/FreeSurfaceTopAnalysis.h
r16542 r16675 18 18 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 19 19 void CreateLoads(Loads* loads, IoModel* iomodel); 20 void GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element); 20 21 }; 21 22 #endif -
issm/trunk-jpl/src/c/analyses/GiaAnalysis.cpp
r16542 r16675 36 36 /*No loads*/ 37 37 }/*}}}*/ 38 39 /*Numerics*/ 40 void GiaAnalysis::GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element){/*{{{*/ 41 _error_("not implemented yet"); 42 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/GiaAnalysis.h
r16542 r16675 18 18 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 19 19 void CreateLoads(Loads* loads, IoModel* iomodel); 20 void GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element); 20 21 }; 21 22 #endif -
issm/trunk-jpl/src/c/analyses/HydrologyDCEfficientAnalysis.cpp
r16638 r16675 105 105 /*Nothing for now*/ 106 106 }/*}}}*/ 107 108 /*Numerics*/ 109 void HydrologyDCEfficientAnalysis::GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element){/*{{{*/ 110 element->GetSolutionFromInputsOneDof(solution,EplHeadEnum); 111 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/HydrologyDCEfficientAnalysis.h
r16542 r16675 18 18 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 19 19 void CreateLoads(Loads* loads, IoModel* iomodel); 20 void GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element); 20 21 }; 21 22 #endif -
issm/trunk-jpl/src/c/analyses/HydrologyDCInefficientAnalysis.cpp
r16600 r16675 135 135 iomodel->DeleteData(1,MeshVertexonbedEnum); 136 136 }/*}}}*/ 137 138 /*Numerics*/ 139 void HydrologyDCInefficientAnalysis::GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element){/*{{{*/ 140 element->GetSolutionFromInputsOneDof(solution,SedimentHeadEnum); 141 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/HydrologyDCInefficientAnalysis.h
r16542 r16675 18 18 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 19 19 void CreateLoads(Loads* loads, IoModel* iomodel); 20 void GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element); 20 21 }; 21 22 #endif -
issm/trunk-jpl/src/c/analyses/HydrologyShreveAnalysis.cpp
r16542 r16675 80 80 /*No loads*/ 81 81 }/*}}}*/ 82 83 /*Numerics*/ 84 void HydrologyShreveAnalysis::GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element){/*{{{*/ 85 element->GetSolutionFromInputsOneDof(solution,WatercolumnEnum); 86 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/HydrologyShreveAnalysis.h
r16542 r16675 18 18 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 19 19 void CreateLoads(Loads* loads, IoModel* iomodel); 20 void GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element); 20 21 }; 21 22 #endif -
issm/trunk-jpl/src/c/analyses/L2ProjectionBaseAnalysis.cpp
r16542 r16675 53 53 /*No loads*/ 54 54 }/*}}}*/ 55 56 /*Numerics*/ 57 void L2ProjectionBaseAnalysis::GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element){/*{{{*/ 58 _error_("not implemented yet"); 59 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/L2ProjectionBaseAnalysis.h
r16542 r16675 18 18 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 19 19 void CreateLoads(Loads* loads, IoModel* iomodel); 20 void GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element); 20 21 }; 21 22 #endif -
issm/trunk-jpl/src/c/analyses/MasstransportAnalysis.cpp
r16599 r16675 210 210 211 211 }/*}}}*/ 212 213 /*Numerics*/ 214 void MasstransportAnalysis::GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element){/*{{{*/ 215 _error_("not implemented yet"); 216 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/MasstransportAnalysis.h
r16542 r16675 18 18 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 19 19 void CreateLoads(Loads* loads, IoModel* iomodel); 20 void GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element); 20 21 }; 21 22 #endif -
issm/trunk-jpl/src/c/analyses/MeltingAnalysis.cpp
r16542 r16675 70 70 71 71 }/*}}}*/ 72 73 /*Numerics*/ 74 void MeltingAnalysis::GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element){/*{{{*/ 75 _error_("not implemented yet"); 76 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/MeltingAnalysis.h
r16542 r16675 18 18 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 19 19 void CreateLoads(Loads* loads, IoModel* iomodel); 20 void GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element); 20 21 }; 21 22 #endif -
issm/trunk-jpl/src/c/analyses/MeshdeformationAnalysis.cpp
r16542 r16675 24 24 _error_("not implemented yet"); 25 25 }/*}}}*/ 26 27 /*Numerics*/ 28 void MeshdeformationAnalysis::GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element){/*{{{*/ 29 _error_("not implemented yet"); 30 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/MeshdeformationAnalysis.h
r16542 r16675 18 18 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 19 19 void CreateLoads(Loads* loads, IoModel* iomodel); 20 void GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element); 20 21 }; 21 22 #endif -
issm/trunk-jpl/src/c/analyses/SmoothedSurfaceSlopeXAnalysis.cpp
r16542 r16675 43 43 void SmoothedSurfaceSlopeXAnalysis::CreateLoads(Loads* loads, IoModel* iomodel){/*{{{*/ 44 44 }/*}}}*/ 45 46 /*Numerics*/ 47 void SmoothedSurfaceSlopeXAnalysis::GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element){/*{{{*/ 48 _error_("not implemented yet"); 49 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/SmoothedSurfaceSlopeXAnalysis.h
r16542 r16675 18 18 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 19 19 void CreateLoads(Loads* loads, IoModel* iomodel); 20 void GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element); 20 21 }; 21 22 #endif -
issm/trunk-jpl/src/c/analyses/SmoothedSurfaceSlopeYAnalysis.cpp
r16542 r16675 43 43 void SmoothedSurfaceSlopeYAnalysis::CreateLoads(Loads* loads, IoModel* iomodel){/*{{{*/ 44 44 }/*}}}*/ 45 46 /*Numerics*/ 47 void SmoothedSurfaceSlopeYAnalysis::GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element){/*{{{*/ 48 _error_("not implemented yet"); 49 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/SmoothedSurfaceSlopeYAnalysis.h
r16542 r16675 18 18 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 19 19 void CreateLoads(Loads* loads, IoModel* iomodel); 20 void GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element); 20 21 }; 21 22 #endif -
issm/trunk-jpl/src/c/analyses/StressbalanceAnalysis.cpp
r16612 r16675 800 800 #endif 801 801 }/*}}}*/ 802 803 /*Numerics*/ 804 void StressbalanceAnalysis::GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element){/*{{{*/ 805 806 int approximation; 807 element->GetInputValue(&approximation,ApproximationEnum); 808 switch(approximation){ 809 case FSApproximationEnum: case NoneApproximationEnum: 810 GetSolutionFromInputsFS(solution,element); 811 return; 812 case SSAApproximationEnum: case HOApproximationEnum: case SIAApproximationEnum: 813 GetSolutionFromInputsHoriz(solution,element); 814 return; 815 case SSAHOApproximationEnum: case HOFSApproximationEnum: case SSAFSApproximationEnum: 816 /*the elements around will create the solution*/ 817 return; 818 default: 819 _error_("Approximation "<<EnumToStringx(approximation)<<" not supported"); 820 } 821 }/*}}}*/ 822 void StressbalanceAnalysis::GetSolutionFromInputsFS(Vector<IssmDouble>* solution,Element* element){/*{{{*/ 823 824 int* vdoflist=NULL; 825 int* pdoflist=NULL; 826 Input* vz_input=NULL; 827 int meshtype,dim; 828 IssmDouble vx,vy,vz,p; 829 IssmDouble FSreconditioning; 830 831 /*Get some parameters*/ 832 element->FindParam(&meshtype,MeshTypeEnum); 833 element->FindParam(&FSreconditioning,StressbalanceFSreconditioningEnum); 834 switch(meshtype){ 835 case Mesh2DverticalEnum: dim = 2; break; 836 case Mesh3DEnum: dim = 3; break; 837 default: _error_("mesh "<<EnumToStringx(meshtype)<<" not supported yet"); 838 } 839 840 /*Fetch number of nodes and dof for this finite element*/ 841 int vnumnodes = element->NumberofNodesVelocity(); 842 int pnumnodes = element->NumberofNodesPressure(); 843 int vnumdof = vnumnodes*dim; 844 int pnumdof = pnumnodes*1; 845 846 /*Initialize values*/ 847 IssmDouble* vvalues = xNew<IssmDouble>(vnumdof); 848 IssmDouble* pvalues = xNew<IssmDouble>(pnumdof); 849 850 /*Get dof list: */ 851 element->GetDofListVelocity(&vdoflist,GsetEnum); 852 element->GetDofListPressure(&pdoflist,GsetEnum); 853 Input* vx_input=element->GetInput(VxEnum); _assert_(vx_input); 854 Input* vy_input=element->GetInput(VyEnum); _assert_(vy_input); 855 if(dim==3) vz_input=element->GetInput(VzEnum); _assert_(vz_input); 856 Input* p_input =element->GetInput(PressureEnum); _assert_(p_input); 857 858 element->FindParam(&FSreconditioning,StressbalanceFSreconditioningEnum); 859 860 /*Ok, we have the velocities in inputs, fill in solution */ 861 Gauss* gauss = element->NewGauss(); 862 for(int i=0;i<vnumnodes;i++){ 863 gauss->GaussNode(element->VelocityInterpolation(),i); 864 vx_input->GetInputValue(&vx,gauss); 865 vy_input->GetInputValue(&vy,gauss); 866 vvalues[i*dim+0]=vx; 867 vvalues[i*dim+1]=vy; 868 if(dim==3){ 869 vz_input->GetInputValue(&vz,gauss); 870 vvalues[i*dim+2]=vz; 871 } 872 } 873 for(int i=0;i<pnumnodes;i++){ 874 gauss->GaussNode(element->PressureInterpolation(),i); 875 p_input->GetInputValue(&p ,gauss); 876 pvalues[i]=p/FSreconditioning; 877 } 878 879 /*Add value to global vector*/ 880 solution->SetValues(vnumdof,vdoflist,vvalues,INS_VAL); 881 solution->SetValues(pnumdof,pdoflist,pvalues,INS_VAL); 882 883 /*Free ressources:*/ 884 delete gauss; 885 xDelete<int>(pdoflist); 886 xDelete<int>(vdoflist); 887 xDelete<IssmDouble>(pvalues); 888 xDelete<IssmDouble>(vvalues); 889 }/*}}}*/ 890 void StressbalanceAnalysis::GetSolutionFromInputsHoriz(Vector<IssmDouble>* solution,Element* element){/*{{{*/ 891 892 IssmDouble vx,vy; 893 int* doflist = NULL; 894 895 /*Fetch number of nodes and dof for this finite element*/ 896 int numnodes = element->GetNumberOfNodes(); 897 int numdof = numnodes*2; 898 899 /*Fetch dof list and allocate solution vector*/ 900 element->GetDofList(&doflist,NoneApproximationEnum,GsetEnum); 901 IssmDouble* values = xNew<IssmDouble>(numdof); 902 903 /*Get inputs*/ 904 Input* vx_input=element->GetInput(VxEnum); _assert_(vx_input); 905 Input* vy_input=element->GetInput(VyEnum); _assert_(vy_input); 906 907 /*Ok, we have vx and vy in values, fill in vx and vy arrays: */ 908 Gauss* gauss=element->NewGauss(); 909 for(int i=0;i<numnodes;i++){ 910 gauss->GaussNode(element->FiniteElement(),i); 911 912 /*Recover vx and vy*/ 913 vx_input->GetInputValue(&vx,gauss); 914 vy_input->GetInputValue(&vy,gauss); 915 values[i*NDOF2+0]=vx; 916 values[i*NDOF2+1]=vy; 917 } 918 919 solution->SetValues(numdof,doflist,values,INS_VAL); 920 921 /*Free ressources:*/ 922 delete gauss; 923 xDelete<IssmDouble>(values); 924 xDelete<int>(doflist); 925 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/StressbalanceAnalysis.h
r16542 r16675 18 18 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 19 19 void CreateLoads(Loads* loads, IoModel* iomodel); 20 void GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element); 21 void GetSolutionFromInputsFS(Vector<IssmDouble>* solution,Element* element); 22 void GetSolutionFromInputsHoriz(Vector<IssmDouble>* solution,Element* element); 20 23 }; 21 24 #endif -
issm/trunk-jpl/src/c/analyses/StressbalanceSIAAnalysis.cpp
r16542 r16675 132 132 133 133 }/*}}}*/ 134 135 /*Numerics*/ 136 void StressbalanceSIAAnalysis::GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element){/*{{{*/ 137 138 IssmDouble vx,vy; 139 int *doflist = NULL; 140 141 /*Fetch number of nodes and initialize values*/ 142 int numnodes = element->GetNumberOfNodes(); 143 int numdof = numnodes*2; 144 IssmDouble* values = xNew<IssmDouble>(numdof); 145 146 /*Get dof list and inputs */ 147 element->GetDofList(&doflist,NoneApproximationEnum,GsetEnum); 148 Input* vx_input=element->GetInput(VxEnum); _assert_(vx_input); 149 Input* vy_input=element->GetInput(VyEnum); _assert_(vy_input); 150 151 /*Ok, we have the velocities in inputs, fill in solution */ 152 Gauss* gauss=element->NewGauss(); 153 for(int i=0;i<numnodes;i++){ 154 gauss->GaussVertex(i); 155 vx_input->GetInputValue(&vx,gauss); 156 vy_input->GetInputValue(&vy,gauss); 157 values[i*2+0]=vx; 158 values[i*2+1]=vy; 159 } 160 161 /*Add value to global vector*/ 162 solution->SetValues(numdof,doflist,values,INS_VAL); 163 164 /*Free ressources:*/ 165 delete gauss; 166 xDelete<int>(doflist); 167 xDelete<IssmDouble>(values); 168 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/StressbalanceSIAAnalysis.h
r16542 r16675 18 18 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 19 19 void CreateLoads(Loads* loads, IoModel* iomodel); 20 void GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element); 20 21 }; 21 22 #endif -
issm/trunk-jpl/src/c/analyses/StressbalanceVerticalAnalysis.cpp
r16607 r16675 94 94 95 95 }/*}}}*/ 96 97 /*Numerics*/ 98 void StressbalanceVerticalAnalysis::GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element){/*{{{*/ 99 _error_("not implemented yet"); 100 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/StressbalanceVerticalAnalysis.h
r16542 r16675 18 18 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 19 19 void CreateLoads(Loads* loads, IoModel* iomodel); 20 void GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element); 20 21 }; 21 22 #endif -
issm/trunk-jpl/src/c/analyses/ThermalAnalysis.cpp
r16605 r16675 110 110 111 111 }/*}}}*/ 112 113 /*Numerics*/ 114 void ThermalAnalysis::GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element){/*{{{*/ 115 element->GetSolutionFromInputsOneDof(solution,TemperatureEnum); 116 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/ThermalAnalysis.h
r16542 r16675 18 18 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 19 19 void CreateLoads(Loads* loads, IoModel* iomodel); 20 void GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element); 20 21 }; 21 22 #endif -
issm/trunk-jpl/src/c/classes/Elements/Element.h
r16600 r16675 21 21 class Vertices; 22 22 class Materials; 23 class Input; 24 class Gauss; 23 25 template <class doublematrix> class Matrix; 24 26 template <class doubletype> class Vector; … … 40 42 virtual void CreatePVector(Vector<IssmDouble>* pf)=0; 41 43 virtual void CreateJacobianMatrix(Matrix<IssmDouble>* Jff)=0; 44 virtual void FindParam(int* pvalue,int paramenum)=0; 45 virtual void FindParam(IssmDouble* pvalue,int paramenum)=0; 46 virtual int FiniteElement(void)=0; 47 virtual void GetDofList(int** pdoflist,int approximation_enum,int setenum)=0; 48 virtual void GetDofListVelocity(int** pdoflist,int setenum)=0; 49 virtual void GetDofListPressure(int** pdoflist,int setenum)=0; 42 50 virtual void GetSolutionFromInputs(Vector<IssmDouble>* solution)=0; 51 virtual void GetSolutionFromInputsOneDof(Vector<IssmDouble>* solution,int solutionenum)=0; 43 52 virtual int GetNodeIndex(Node* node)=0; 44 53 virtual int GetNumberOfNodes(void)=0; … … 52 61 virtual void GetInputListOnVertices(IssmDouble* pvalue,int enumtype)=0; 53 62 virtual void GetInputListOnVertices(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue)=0; 63 virtual Input* GetInput(int inputenum)=0; 54 64 virtual void GetInputValue(IssmDouble* pvalue,Node* node,int enumtype)=0; 65 virtual void GetInputValue(bool* pvalue,int enum_type)=0; 66 virtual void GetInputValue(int* pvalue,int enum_type)=0; 67 virtual void GetInputValue(IssmDouble* pvalue,int enum_type)=0; 55 68 virtual void GetMaterialInputValue(IssmDouble* pvalue,Node* node,int enumtype)=0; 56 69 … … 66 79 67 80 virtual int NodalValue(IssmDouble* pvalue, int index, int natureofdataenum)=0; 81 virtual int NumberofNodesVelocity(void)=0; 82 virtual int NumberofNodesPressure(void)=0; 83 virtual Gauss* NewGauss(void)=0; 68 84 virtual void InputScale(int enum_type,IssmDouble scale_factor)=0; 69 85 virtual void GetVectorFromInputs(Vector<IssmDouble>* vector, int name_enum)=0; … … 73 89 virtual void SmbGradients()=0; 74 90 virtual void ResetCoordinateSystem()=0; 91 virtual int VelocityInterpolation()=0; 92 virtual int PressureInterpolation()=0; 75 93 76 94 #ifdef _HAVE_RESPONSES_ -
issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
r16638 r16675 918 918 } 919 919 /*}}}*/ 920 /*FUNCTION Penta::FindParam(int* pvalue,int paramenum){{{*/ 921 void Penta::FindParam(int* pvalue,int paramenum){ 922 this->parameters->FindParam(pvalue,paramenum); 923 } 924 /*}}}*/ 925 /*FUNCTION Penta::FindParam(IssmDouble* pvalue,int paramenum){{{*/ 926 void Penta::FindParam(IssmDouble* pvalue,int paramenum){ 927 this->parameters->FindParam(pvalue,paramenum); 928 } 929 /*}}}*/ 930 /*FUNCTION Penta::FiniteElement{{{*/ 931 int Penta::FiniteElement(void){ 932 return this->element_type; 933 } 934 /*}}}*/ 920 935 /*FUNCTION Penta::ObjectEnum{{{*/ 921 936 int Penta::ObjectEnum(void){ … … 1316 1331 } 1317 1332 /*}}}*/ 1333 /*FUNCTION Penta::GetInput(int inputenum) {{{*/ 1334 Input* Penta::GetInput(int inputenum){ 1335 return inputs->GetInput(inputenum); 1336 } 1337 /*}}}*/ 1318 1338 /*FUNCTION Penta::GetInputListOnVertices(IssmDouble* pvalue,int enumtype) {{{*/ 1319 1339 void Penta::GetInputListOnVertices(IssmDouble* pvalue,int enumtype){ … … 1413 1433 } 1414 1434 /*}}}*/ 1435 /*FUNCTION Penta::GetInputValue(bool* pvalue,int inputenum) {{{*/ 1436 void Penta::GetInputValue(bool* pvalue,int inputenum){ 1437 1438 Input* input=inputs->GetInput(inputenum); 1439 if(!input) _error_("Input " << EnumToStringx(inputenum) << " not found in element"); 1440 input->GetInputValue(pvalue); 1441 1442 }/*}}}*/ 1443 /*FUNCTION Penta::GetInputValue(int* pvalue,int inputenum) {{{*/ 1444 void Penta::GetInputValue(int* pvalue,int inputenum){ 1445 1446 Input* input=inputs->GetInput(inputenum); 1447 if(!input) _error_("Input " << EnumToStringx(inputenum) << " not found in element"); 1448 input->GetInputValue(pvalue); 1449 1450 }/*}}}*/ 1451 /*FUNCTION Penta::GetInputValue(IssmDouble* pvalue,int inputenum) {{{*/ 1452 void Penta::GetInputValue(IssmDouble* pvalue,int inputenum){ 1453 1454 Input* input=inputs->GetInput(inputenum); 1455 if(!input) _error_("Input " << EnumToStringx(inputenum) << " not found in element"); 1456 input->GetInputValue(pvalue); 1457 1458 }/*}}}*/ 1415 1459 /*FUNCTION Penta::GetMaterialInputValue(IssmDouble* pvalue,Node* node,int enumtype) {{{*/ 1416 1460 void Penta::GetMaterialInputValue(IssmDouble* pvalue,Node* node,int enumtype){ … … 2765 2809 if(found)*pvalue=value; 2766 2810 return found; 2811 } 2812 /*}}}*/ 2813 /*FUNCTION Penta::NewGauss{{{*/ 2814 Gauss* Penta::NewGauss(void){ 2815 return new GaussPenta(); 2816 } 2817 /*}}}*/ 2818 /*FUNCTION Penta::NumberofNodesPressure{{{*/ 2819 int Penta::NumberofNodesPressure(void){ 2820 return PentaRef::NumberofNodesPressure(); 2821 } 2822 /*}}}*/ 2823 /*FUNCTION Penta::NumberofNodesVelocity{{{*/ 2824 int Penta::NumberofNodesVelocity(void){ 2825 return PentaRef::NumberofNodesVelocity(); 2767 2826 } 2768 2827 /*}}}*/ … … 3457 3516 /*Clean up and return*/ 3458 3517 delete gauss; 3518 } 3519 /*}}}*/ 3520 /*FUNCTION Penta::VelocityInterpolation{{{*/ 3521 int Penta::VelocityInterpolation(void){ 3522 return PentaRef::VelocityInterpolation(); 3523 } 3524 /*}}}*/ 3525 /*FUNCTION Penta::PressureInterpolation{{{*/ 3526 int Penta::PressureInterpolation(void){ 3527 return PentaRef::PressureInterpolation(); 3459 3528 } 3460 3529 /*}}}*/ -
issm/trunk-jpl/src/c/classes/Elements/Penta.h
r16600 r16675 74 74 void ComputeStressTensor(); 75 75 void Configure(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters); 76 void FindParam(int* pvalue,int paramenum); 77 void FindParam(IssmDouble* pvalue,int paramenum); 78 int FiniteElement(void); 76 79 void SetCurrentConfiguration(Elements* elements,Loads* loads,Nodes* nodes,Materials* materials,Parameters* parameters); 77 80 void SetwiseNodeConnectivity(int* d_nz,int* o_nz,Node* node,bool* flags,int* flagsindices,int set1_enum,int set2_enum); … … 81 84 void CreateJacobianMatrix(Matrix<IssmDouble>* Jff); 82 85 void Delta18oParameterization(void); 86 void GetDofList(int** pdoflist,int approximation_enum,int setenum); 87 void GetDofListVelocity(int** pdoflist,int setenum); 88 void GetDofListPressure(int** pdoflist,int setenum); 83 89 int GetNodeIndex(Node* node); 84 90 void GetNodesSidList(int* sidlist); … … 86 92 int GetNumberOfNodes(void); 87 93 void GetSolutionFromInputs(Vector<IssmDouble>* solution); 94 void GetSolutionFromInputsOneDof(Vector<IssmDouble>* solution,int enum_type); 88 95 IssmDouble GetZcoord(GaussPenta* gauss); 89 96 void GetVectorFromInputs(Vector<IssmDouble>* vector,int name_enum); … … 94 101 void InputDuplicate(int original_enum,int new_enum); 95 102 void InputScale(int enum_type,IssmDouble scale_factor); 103 int NumberofNodesVelocity(void); 104 int NumberofNodesPressure(void); 105 int VelocityInterpolation(); 106 int PressureInterpolation(); 96 107 97 108 void ResultInterpolation(int* pinterpolation,int output_enum); … … 181 192 ElementVector* CreatePVectorL2ProjectionBase(void); 182 193 void GetAreaCoordinates(IssmDouble *area_coordinates,IssmDouble xyz_zero[3][3],IssmDouble xyz_list[6][3],int numpoints); 183 void GetDofList(int** pdoflist,int approximation_enum,int setenum); 184 void GetDofListVelocity(int** pdoflist,int setenum); 185 void GetDofListPressure(int** pdoflist,int setenum); 194 186 195 void GetVertexPidList(int* doflist); 187 196 void GetVertexSidList(int* sidlist); … … 191 200 int GetElementType(void); 192 201 void GetElementSizes(IssmDouble* hx,IssmDouble* hy,IssmDouble* hz); 202 Input* GetInput(int inputenum); 193 203 void GetInputListOnVertices(IssmDouble* pvalue,int enumtype); 194 204 void GetInputListOnVertices(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue); … … 196 206 void GetInputListOnNodes(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue); 197 207 void GetInputValue(IssmDouble* pvalue,Node* node,int enumtype); 208 void GetInputValue(bool* pvalue,int enum_type); 209 void GetInputValue(int* pvalue,int enum_type); 210 void GetInputValue(IssmDouble* pvalue,int enum_type); 198 211 void GetMaterialInputValue(IssmDouble* pvalue,Node* node,int enumtype); 199 212 void GetPhi(IssmDouble* phi, IssmDouble* epsilon, IssmDouble viscosity); … … 218 231 bool IsNodeOnShelfFromFlags(IssmDouble* flags); 219 232 bool NoIceInElement(void); 233 Gauss* NewGauss(void); 220 234 IssmDouble MinEdgeLength(IssmDouble xyz_list[6][3]); 221 235 void SetClone(int* minranks); … … 319 333 void GetHydrologyDCInefficientHmax(IssmDouble* ph_max, Node* innode); 320 334 void GetHydrologyTransfer(Vector<IssmDouble>* transfer); 321 void GetSolutionFromInputsOneDof(Vector<IssmDouble>* solution, int enum_type);322 335 void HydrologyEPLGetActive(Vector<IssmDouble>* active_vec); 323 336 void HydrologyEPLGetMask(Vector<IssmDouble>* vec_mask); -
issm/trunk-jpl/src/c/classes/Elements/Seg.cpp
r16611 r16675 88 88 } 89 89 /*}}}*/ 90 /*FUNCTION Seg::FindParam(int* pvalue,int paramenum){{{*/ 91 void Seg::FindParam(int* pvalue,int paramenum){ 92 this->parameters->FindParam(pvalue,paramenum); 93 } 94 /*}}}*/ 95 /*FUNCTION Seg::FindParam(IssmDouble* pvalue,int paramenum){{{*/ 96 void Seg::FindParam(IssmDouble* pvalue,int paramenum){ 97 this->parameters->FindParam(pvalue,paramenum); 98 } 99 /*}}}*/ 100 /*FUNCTION Seg::FiniteElement{{{*/ 101 int Seg::FiniteElement(void){ 102 return this->element_type; 103 } 104 /*}}}*/ 90 105 /*FUNCTION Seg::DeepEcho{{{*/ 91 106 void Seg::DeepEcho(void){ -
issm/trunk-jpl/src/c/classes/Elements/Seg.h
r16600 r16675 78 78 void CreateJacobianMatrix(Matrix<IssmDouble>* Jff){_error_("not implemented yet");}; 79 79 void Delta18oParameterization(void){_error_("not implemented yet");}; 80 void FindParam(int* pvalue,int paramenum); 81 void FindParam(IssmDouble* pvalue,int paramenum); 82 int FiniteElement(void); 83 void GetDofList(int** pdoflist,int approximation_enum,int setenum){_error_("not implemented yet");}; 84 void GetDofListVelocity(int** pdoflist,int setenum){_error_("not implemented yet");}; 85 void GetDofListPressure(int** pdoflist,int setenum){_error_("not implemented yet");}; 80 86 int GetNodeIndex(Node* node){_error_("not implemented yet");}; 81 87 void GetNodesSidList(int* sidlist){_error_("not implemented yet");}; … … 86 92 bool IsFloating(){_error_("not implemented yet");}; 87 93 bool IsNodeOnShelfFromFlags(IssmDouble* flags){_error_("not implemented yet");}; 94 int NumberofNodesVelocity(void){_error_("not implemented yet");}; 95 int NumberofNodesPressure(void){_error_("not implemented yet");}; 96 int VelocityInterpolation(void){_error_("not implemented yet");}; 97 int PressureInterpolation(void){_error_("not implemented yet");}; 88 98 bool NoIceInElement(){_error_("not implemented yet");}; 89 void GetInputListOnVertices(IssmDouble* pvalue,int enumtype){_error_("not implemented yet");}; 90 void GetInputListOnVertices(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue){_error_("not implemented yet");}; 91 void GetInputValue(IssmDouble* pvalue,Node* node,int enumtype){_error_("not implemented yet");}; 92 void GetMaterialInputValue(IssmDouble* pvalue,Node* node,int enumtype){_error_("not implemented yet");}; 99 Input* GetInput(int inputenum){_error_("not implemented yet");}; 100 void GetInputListOnVertices(IssmDouble* pvalue,int enumtype){_error_("not implemented yet");}; 101 void GetInputListOnVertices(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue){_error_("not implemented yet");}; 102 void GetInputValue(IssmDouble* pvalue,Node* node,int enumtype){_error_("not implemented yet");}; 103 void GetInputValue(bool* pvalue,int enum_type){_error_("not implemented yet");}; 104 void GetInputValue(int* pvalue,int enum_type){_error_("not implemented yet");}; 105 void GetInputValue(IssmDouble* pvalue,int enum_type){_error_("not implemented yet");}; 106 void GetMaterialInputValue(IssmDouble* pvalue,Node* node,int enumtype){_error_("not implemented yet");}; 107 Gauss* NewGauss(void){_error_("not implemented yet");}; 93 108 #ifdef _HAVE_THERMAL_ 94 109 void UpdateBasalConstraintsEnthalpy(void){_error_("not implemented yet");}; … … 104 119 #endif 105 120 void GetSolutionFromInputs(Vector<IssmDouble>* solution){_error_("not implemented yet");}; 121 void GetSolutionFromInputsOneDof(Vector<IssmDouble>* solution,int enum_type){_error_("not implemented yet");}; 106 122 void GetVectorFromInputs(Vector<IssmDouble>* vector, int name_enum){_error_("not implemented yet");}; 107 123 void InputCreate(IssmDouble* vector,IoModel* iomodel,int M,int N,int vector_type,int vector_enum,int code){_error_("not implemented yet");}; -
issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
r16657 r16675 867 867 } 868 868 /*}}}*/ 869 /*FUNCTION Tria::FindParam(int* pvalue,int paramenum){{{*/ 870 void Tria::FindParam(int* pvalue,int paramenum){ 871 this->parameters->FindParam(pvalue,paramenum); 872 } 873 /*}}}*/ 874 /*FUNCTION Tria::FindParam(IssmDouble* pvalue,int paramenum){{{*/ 875 void Tria::FindParam(IssmDouble* pvalue,int paramenum){ 876 this->parameters->FindParam(pvalue,paramenum); 877 } 878 /*}}}*/ 879 /*FUNCTION Tria::FiniteElement{{{*/ 880 int Tria::FiniteElement(void){ 881 return this->element_type; 882 } 883 /*}}}*/ 869 884 /*FUNCTION Tria::ObjectEnum{{{*/ 870 885 int Tria::ObjectEnum(void){ … … 1311 1326 } 1312 1327 /*}}}*/ 1328 /*FUNCTION Tria::GetInput(int inputenum) {{{*/ 1329 Input* Tria::GetInput(int inputenum){ 1330 return inputs->GetInput(inputenum); 1331 } 1332 /*}}}*/ 1313 1333 /*FUNCTION Tria::GetInputListOnVertices(IssmDouble* pvalue,int enumtype) {{{*/ 1314 1334 void Tria::GetInputListOnVertices(IssmDouble* pvalue,int enumtype){ … … 1429 1449 } 1430 1450 /*}}}*/ 1451 /*FUNCTION Tria::GetInputValue(bool* pvalue,int inputenum) {{{*/ 1452 void Tria::GetInputValue(bool* pvalue,int inputenum){ 1453 1454 Input* input=inputs->GetInput(inputenum); 1455 if(!input) _error_("Input " << EnumToStringx(inputenum) << " not found in element"); 1456 input->GetInputValue(pvalue); 1457 1458 }/*}}}*/ 1459 /*FUNCTION Tria::GetInputValue(int* pvalue,int inputenum) {{{*/ 1460 void Tria::GetInputValue(int* pvalue,int inputenum){ 1461 1462 Input* input=inputs->GetInput(inputenum); 1463 if(!input) _error_("Input " << EnumToStringx(inputenum) << " not found in element"); 1464 input->GetInputValue(pvalue); 1465 1466 }/*}}}*/ 1467 /*FUNCTION Tria::GetInputValue(IssmDouble* pvalue,int inputenum) {{{*/ 1468 void Tria::GetInputValue(IssmDouble* pvalue,int inputenum){ 1469 1470 Input* input=inputs->GetInput(inputenum); 1471 if(!input) _error_("Input " << EnumToStringx(inputenum) << " not found in element"); 1472 input->GetInputValue(pvalue); 1473 1474 }/*}}}*/ 1431 1475 /*FUNCTION Tria::GetMaterialInputValue(IssmDouble* pvalue,Node* node,int enumtype) {{{*/ 1432 1476 void Tria::GetMaterialInputValue(IssmDouble* pvalue,Node* node,int enumtype){ … … 2327 2371 } 2328 2372 /*}}}*/ 2373 /*FUNCTION Tria::NewGauss{{{*/ 2374 Gauss* Tria::NewGauss(void){ 2375 return new GaussTria(); 2376 } 2377 /*}}}*/ 2329 2378 /*FUNCTION Tria::NoIceInElement {{{*/ 2330 2379 bool Tria::NoIceInElement(){ … … 2372 2421 if(found)*pvalue=value; 2373 2422 return found; 2423 } 2424 /*}}}*/ 2425 /*FUNCTION Tria::VelocityInterpolation{{{*/ 2426 int Tria::VelocityInterpolation(void){ 2427 return TriaRef::VelocityInterpolation(); 2428 } 2429 /*}}}*/ 2430 /*FUNCTION Tria::PressureInterpolation{{{*/ 2431 int Tria::PressureInterpolation(void){ 2432 return TriaRef::PressureInterpolation(); 2433 } 2434 /*}}}*/ 2435 /*FUNCTION Tria::NumberofNodesPressure{{{*/ 2436 int Tria::NumberofNodesPressure(void){ 2437 return TriaRef::NumberofNodesPressure(); 2438 } 2439 /*}}}*/ 2440 /*FUNCTION Tria::NumberofNodesVelocity{{{*/ 2441 int Tria::NumberofNodesVelocity(void){ 2442 return TriaRef::NumberofNodesVelocity(); 2374 2443 } 2375 2444 /*}}}*/ … … 7338 7407 } 7339 7408 /*}}}*/ 7340 7341 7342 7409 #endif 7343 7410 -
issm/trunk-jpl/src/c/classes/Elements/Tria.h
r16657 r16675 79 79 void CreateJacobianMatrix(Matrix<IssmDouble>* Jff); 80 80 void Delta18oParameterization(void); 81 void FindParam(int* pvalue,int paramenum); 82 void FindParam(IssmDouble* pvalue,int paramenum); 83 int FiniteElement(void); 84 void GetDofList(int** pdoflist,int approximation_enum,int setenum); 85 void GetDofListVelocity(int** pdoflist,int setenum); 86 void GetDofListPressure(int** pdoflist,int setenum); 81 87 int GetNodeIndex(Node* node); 82 88 void GetNodesSidList(int* sidlist); … … 95 101 bool IsFloating(); 96 102 bool IsNodeOnShelfFromFlags(IssmDouble* flags); 103 int NumberofNodesVelocity(void); 104 int NumberofNodesPressure(void); 97 105 bool NoIceInElement(); 98 106 void GetSolutionFromInputs(Vector<IssmDouble>* solution); 107 void GetSolutionFromInputsOneDof(Vector<IssmDouble>* solution,int enum_type); 99 108 void GetVectorFromInputs(Vector<IssmDouble>* vector, int name_enum); 100 109 void InputCreate(IssmDouble* vector,IoModel* iomodel,int M,int N,int vector_type,int vector_enum,int code); … … 109 118 void ResetCoordinateSystem(void); 110 119 void SmbGradients(); 120 int VelocityInterpolation(); 121 int PressureInterpolation(); 111 122 IssmDouble SurfaceArea(void); 112 123 void Update(int index, IoModel* iomodel,int analysis_counter,int analysis_type,int finitelement); … … 220 231 void GetAreaCoordinates(IssmDouble *area_coordinates,IssmDouble xyz_zero[3][3],IssmDouble xyz_list[3][3],int numpoints); 221 232 int GetElementType(void); 222 void GetDofList(int** pdoflist,int approximation_enum,int setenum); 223 void GetDofListVelocity(int** pdoflist,int setenum); 224 void GetDofListPressure(int** pdoflist,int setenum); 233 225 234 void GetVertexPidList(int* doflist); 226 235 void GetVertexSidList(int* sidlist); … … 230 239 void GetSegmentNormal(IssmDouble* normal,IssmDouble xyz_list[2][3]); 231 240 void GetZeroLevelsetCoordinates(IssmDouble* xyz_zero,IssmDouble xyz_list[3][3],int levelsetenum); 241 Input* GetInput(int inputenum); 232 242 void GetInputListOnVertices(IssmDouble* pvalue,int enumtype); 233 243 void GetInputListOnVertices(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue); … … 236 246 void GetInputListOnNodes(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue); 237 247 void GetInputValue(IssmDouble* pvalue,Node* node,int enumtype); 248 void GetInputValue(bool* pvalue,int enum_type); 249 void GetInputValue(int* pvalue,int enum_type); 250 void GetInputValue(IssmDouble* pvalue,int enum_type); 238 251 void GetMaterialInputValue(IssmDouble* pvalue,Node* node,int enumtype); 239 252 void GetStrainRate2d(IssmDouble* epsilon,IssmDouble* xyz_list, GaussTria* gauss, Input* vx_input, Input* vy_input); … … 241 254 void InputUpdateFromSolutionMasstransport(IssmDouble* solution); 242 255 bool IsInput(int name); 256 Gauss* NewGauss(void); 243 257 void SetClone(int* minranks); 244 258 Seg* SpawnSeg(int index1,int index2); … … 294 308 ElementVector* CreatePVectorHydrologyDCInefficient(void); 295 309 ElementVector* CreatePVectorHydrologyDCEfficient(void); 296 void GetSolutionFromInputsOneDof(Vector<IssmDouble>* solution,int enum_type);297 310 void CreateHydrologyWaterVelocityInput(void); 298 311 void InputUpdateFromSolutionHydrology(IssmDouble* solution); -
issm/trunk-jpl/src/c/classes/Inputs/BoolInput.cpp
r16656 r16675 112 112 void BoolInput::GetInputValue(IssmDouble* pvalue){_error_("not supported yet!");} 113 113 /*}}}*/ 114 /*FUNCTION BoolInput::GetInputValue(IssmDouble* pvalue,GaussTria* gauss){{{*/ 115 void BoolInput::GetInputValue(IssmDouble* pvalue,GaussTria* gauss){_error_("not supported yet!");} 116 /*}}}*/ 117 /*FUNCTION BoolInput::GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){{{*/ 118 void BoolInput::GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){_error_("not supported yet!");} 114 /*FUNCTION BoolInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){{{*/ 115 void BoolInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){_error_("not supported yet!");} 119 116 /*}}}*/ 120 117 /*FUNCTION BoolInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss){{{*/ -
issm/trunk-jpl/src/c/classes/Inputs/BoolInput.h
r16486 r16675 47 47 void GetInputValue(int* pvalue); 48 48 void GetInputValue(IssmDouble* pvalue); 49 void GetInputValue(IssmDouble* pvalue,GaussSeg* gauss){_error_("not implemented yet");}; 50 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss); 51 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss); 52 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss,IssmDouble time){_error_("not implemented yet");}; 53 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,IssmDouble time){_error_("not implemented yet");}; 54 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");}; 55 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss ,int index){_error_("not implemented yet");}; 49 void GetInputValue(IssmDouble* pvalue,Gauss* gauss); 50 void GetInputValue(IssmDouble* pvalue,Gauss* gauss,IssmDouble time){_error_("not implemented yet");}; 51 void GetInputValue(IssmDouble* pvalue,Gauss* gauss ,int index){_error_("not implemented yet");}; 56 52 void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussSeg* gauss){_error_("not implemented yet");}; 57 53 void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss); -
issm/trunk-jpl/src/c/classes/Inputs/ControlInput.cpp
r16656 r16675 235 235 values->GetInputValue(pvalue); 236 236 }/*}}}*/ 237 /*FUNCTION ControlInput::GetInputValue(IssmDouble* pvalue){{{*/ 238 void ControlInput::GetInputValue(IssmDouble* pvalue,GaussTria* gauss){ 239 values->GetInputValue(pvalue,gauss); 240 }/*}}}*/ 241 /*FUNCTION ControlInput::GetInputValue(IssmDouble* pvalue){{{*/ 242 void ControlInput::GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){ 237 /*FUNCTION ControlInput::GetInputValue(Issm* pvalue,Gauss* gauss){{{*/ 238 void ControlInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){ 243 239 values->GetInputValue(pvalue,gauss); 244 240 }/*}}}*/ -
issm/trunk-jpl/src/c/classes/Inputs/ControlInput.h
r16486 r16675 53 53 void GetInputValue(int* pvalue); 54 54 void GetInputValue(IssmDouble* pvalue); 55 void GetInputValue(IssmDouble* pvalue,GaussSeg* gauss){_error_("not implemented yet");}; 56 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss); 57 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss); 58 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss,IssmDouble time){_error_("not implemented yet");}; 59 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,IssmDouble time){_error_("not implemented yet");}; 60 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");}; 61 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss ,int index){_error_("not implemented yet");}; 55 void GetInputValue(IssmDouble* pvalue,Gauss* gauss); 56 void GetInputValue(IssmDouble* pvalue,Gauss* gauss,IssmDouble time){_error_("not implemented yet");}; 57 void GetInputValue(IssmDouble* pvalue,Gauss* gauss ,int index){_error_("not implemented yet");}; 62 58 void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussSeg* gauss){_error_("not implemented yet");}; 63 59 void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss); -
issm/trunk-jpl/src/c/classes/Inputs/DatasetInput.cpp
r16382 r16675 158 158 } 159 159 /*}}}*/ 160 /*FUNCTION DatasetInput::GetInputValue(IssmDouble* pvalue,Gauss Tria* gauss,int id){{{*/161 void DatasetInput::GetInputValue(IssmDouble* pvalue,Gauss Tria* gauss,int id){160 /*FUNCTION DatasetInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss,int id){{{*/ 161 void DatasetInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss,int id){ 162 162 163 163 int offset = -1; … … 172 172 } 173 173 /*}}}*/ 174 /*FUNCTION DatasetInput::GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,int id){{{*/175 void DatasetInput::GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,int id){176 177 int offset = -1;178 _assert_(this->numids == this->inputs->Size());179 180 /*Get requested input within dataset*/181 for(int i=0;i<this->numids;i++) if(this->ids[i]==id) offset=i;182 if(offset<0) _error_("Could not find input of id "<<id);183 184 Input* input=dynamic_cast<Input*>(this->inputs->GetObjectByOffset(offset));185 input->GetInputValue(pvalue,gauss);186 }187 /*}}}*/ -
issm/trunk-jpl/src/c/classes/Inputs/DatasetInput.h
r16486 r16675 48 48 void GetInputValue(int* pvalue){_error_("not implemented yet");}; 49 49 void GetInputValue(IssmDouble* pvalue){_error_("not implemented yet");}; 50 void GetInputValue(IssmDouble* pvalue,GaussSeg* gauss){_error_("not implemented yet");}; 51 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss){_error_("not implemented yet");}; 52 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){_error_("not implemented yet");}; 53 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss,IssmDouble time){_error_("not implemented yet");}; 54 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,IssmDouble time){_error_("not implemented yet");}; 55 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index); 56 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss ,int index); 50 void GetInputValue(IssmDouble* pvalue,Gauss* gauss){_error_("not implemented yet");}; 51 void GetInputValue(IssmDouble* pvalue,Gauss* gauss,IssmDouble time){_error_("not implemented yet");}; 52 void GetInputValue(IssmDouble* pvalue,Gauss* gauss ,int index); 57 53 void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussSeg* gauss){_error_("not implemented yet");}; 58 54 void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");}; -
issm/trunk-jpl/src/c/classes/Inputs/DoubleInput.cpp
r16656 r16675 120 120 } 121 121 /*}}}*/ 122 /*FUNCTION DoubleInput::GetInputValue(IssmDouble* pvalue,GaussTria* gauss){{{*/ 123 void DoubleInput::GetInputValue(IssmDouble* pvalue,GaussTria* gauss){*pvalue=this->value;} 124 /*}}}*/ 125 /*FUNCTION DoubleInput::GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){{{*/ 126 void DoubleInput::GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){*pvalue=this->value;} 122 /*FUNCTION DoubleInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){{{*/ 123 void DoubleInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){*pvalue=this->value;} 127 124 /*}}}*/ 128 125 /*FUNCTION DoubleInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss){{{*/ -
issm/trunk-jpl/src/c/classes/Inputs/DoubleInput.h
r16486 r16675 46 46 void GetInputValue(int* pvalue); 47 47 void GetInputValue(IssmDouble* pvalue); 48 void GetInputValue(IssmDouble* pvalue,GaussSeg* gauss){_error_("not implemented yet");}; 49 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss); 50 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss); 51 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss,IssmDouble time){_error_("not implemented yet");}; 52 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,IssmDouble time){_error_("not implemented yet");}; 53 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");}; 54 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss ,int index){_error_("not implemented yet");}; 48 void GetInputValue(IssmDouble* pvalue,Gauss* gauss); 49 void GetInputValue(IssmDouble* pvalue,Gauss* gauss,IssmDouble time){_error_("not implemented yet");}; 50 void GetInputValue(IssmDouble* pvalue,Gauss* gauss ,int index){_error_("not implemented yet");}; 55 51 void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussSeg* gauss){_error_("not implemented yet");}; 56 52 void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss); -
issm/trunk-jpl/src/c/classes/Inputs/Input.h
r16486 r16675 11 11 #include "../../shared/shared.h" 12 12 class Node; 13 class Gauss; 13 14 class GaussTria; 14 15 class GaussSeg; … … 28 29 virtual void GetInputValue(int* pvalue)=0; 29 30 virtual void GetInputValue(IssmDouble* pvalue)=0; 30 virtual void GetInputValue(IssmDouble* pvalue,GaussSeg* gauss)=0; 31 virtual void GetInputValue(IssmDouble* pvalue,GaussTria* gauss)=0; 32 virtual void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss)=0; 33 virtual void GetInputValue(IssmDouble* pvalue,GaussTria* gauss,IssmDouble time)=0; 34 virtual void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,IssmDouble time)=0; 35 virtual void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index)=0; 36 virtual void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,int index)=0; 31 virtual void GetInputValue(IssmDouble* pvalue,Gauss* gauss)=0; 32 virtual void GetInputValue(IssmDouble* pvalue,Gauss* gauss,IssmDouble time)=0; 33 virtual void GetInputValue(IssmDouble* pvalue,Gauss* gauss,int index)=0; 37 34 virtual void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussSeg* gauss)=0; 38 35 virtual void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss)=0; -
issm/trunk-jpl/src/c/classes/Inputs/IntInput.cpp
r16656 r16675 112 112 } 113 113 /*}}}*/ 114 /*FUNCTION IntInput::GetInputValue(IssmDouble* pvalue,GaussTria* gauss){{{*/ 115 void IntInput::GetInputValue(IssmDouble* pvalue,GaussTria* gauss){_error_("not supported yet!");} 116 /*}}}*/ 117 /*FUNCTION IntInput::GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){{{*/ 118 void IntInput::GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){_error_("not supported yet!");} 114 /*FUNCTION IntInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){{{*/ 115 void IntInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){_error_("not supported yet!");} 119 116 /*}}}*/ 120 117 /*FUNCTION IntInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss){{{*/ -
issm/trunk-jpl/src/c/classes/Inputs/IntInput.h
r16486 r16675 47 47 void GetInputValue(int* pvalue); 48 48 void GetInputValue(IssmDouble* pvalue); 49 void GetInputValue(IssmDouble* pvalue,GaussSeg* gauss){_error_("not implemented yet");}; 50 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss); 51 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss); 52 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss,IssmDouble time){_error_("not implemented yet");}; 53 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,IssmDouble time){_error_("not implemented yet");}; 54 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");}; 55 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss ,int index){_error_("not implemented yet");}; 49 void GetInputValue(IssmDouble* pvalue,Gauss* gauss); 50 void GetInputValue(IssmDouble* pvalue,Gauss* gauss,IssmDouble time){_error_("not implemented yet");}; 51 void GetInputValue(IssmDouble* pvalue,Gauss* gauss ,int index){_error_("not implemented yet");}; 56 52 void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussSeg* gauss){_error_("not implemented yet");}; 57 53 void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss); -
issm/trunk-jpl/src/c/classes/Inputs/PentaInput.cpp
r16656 r16675 137 137 138 138 /*Object functions*/ 139 /*FUNCTION PentaInput::GetInputValue(IssmDouble* pvalue,Gauss Penta* gauss){{{*/140 void PentaInput::GetInputValue(IssmDouble* pvalue,Gauss Penta* gauss){139 /*FUNCTION PentaInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){{{*/ 140 void PentaInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){ 141 141 142 142 /*Call PentaRef function*/ 143 PentaRef::GetInputValue(pvalue,&values[0],gauss); 143 _assert_(gauss->Enum()==GaussPentaEnum); 144 PentaRef::GetInputValue(pvalue,&values[0],(GaussPenta*)gauss); 144 145 145 146 } -
issm/trunk-jpl/src/c/classes/Inputs/PentaInput.h
r16486 r16675 46 46 void GetInputValue(int* pvalue){_error_("not implemented yet");}; 47 47 void GetInputValue(IssmDouble* pvalue){_error_("not implemented yet");}; 48 void GetInputValue(IssmDouble* pvalue,GaussSeg* gauss){_error_("not implemented yet");}; 49 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss){_error_("not implemented yet");}; 50 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss); 51 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss,IssmDouble time){_error_("not implemented yet");}; 52 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,IssmDouble time){_error_("not implemented yet");}; 53 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");}; 54 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss ,int index){_error_("not implemented yet");}; 48 void GetInputValue(IssmDouble* pvalue,Gauss* gauss); 49 void GetInputValue(IssmDouble* pvalue,Gauss* gauss,IssmDouble time){_error_("not implemented yet");}; 50 void GetInputValue(IssmDouble* pvalue,Gauss* gauss ,int index){_error_("not implemented yet");}; 55 51 void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussSeg* gauss){_error_("not implemented yet");}; 56 52 void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");}; -
issm/trunk-jpl/src/c/classes/Inputs/SegInput.cpp
r16656 r16675 96 96 } 97 97 /*}}}*/ 98 /*FUNCTION SegInput::GetInputValue(IssmDouble* pvalue,Gauss Seg* gauss){{{*/99 void SegInput::GetInputValue(IssmDouble* pvalue,Gauss Seg* gauss){98 /*FUNCTION SegInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){{{*/ 99 void SegInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){ 100 100 101 101 /*Call SegRef function*/ 102 SegRef::GetInputValue(pvalue,&values[0],gauss); 102 _assert_(gauss->Enum()==GaussSegEnum); 103 SegRef::GetInputValue(pvalue,&values[0],(GaussSeg*)gauss); 103 104 104 105 } -
issm/trunk-jpl/src/c/classes/Inputs/SegInput.h
r16486 r16675 47 47 void GetInputValue(int* pvalue){_error_("not implemented yet");} 48 48 void GetInputValue(IssmDouble* pvalue){_error_("not implemented yet");} 49 void GetInputValue(IssmDouble* pvalue,Gauss Seg* gauss);49 void GetInputValue(IssmDouble* pvalue,Gauss* gauss); 50 50 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss){_error_("not implemented yet");}; 51 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){_error_("not implemented yet");}; 52 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss,IssmDouble time){_error_("not implemented yet");}; 53 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,IssmDouble time){_error_("not implemented yet");}; 54 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");}; 55 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,int index){_error_("not implemented yet");}; 51 void GetInputValue(IssmDouble* pvalue,Gauss* gauss,IssmDouble time){_error_("not implemented yet");}; 52 void GetInputValue(IssmDouble* pvalue,Gauss* gauss ,int index){_error_("not implemented yet");}; 56 53 void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussSeg* gauss); 57 54 void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");}; -
issm/trunk-jpl/src/c/classes/Inputs/TransientInput.cpp
r16486 r16675 149 149 150 150 /*Object functions*/ 151 /*FUNCTION TransientInput::GetInputValue(IssmDouble* pvalue,Gauss Tria* gauss){{{*/152 void TransientInput::GetInputValue(IssmDouble* pvalue,Gauss Tria* gauss){151 /*FUNCTION TransientInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){{{*/ 152 void TransientInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){ 153 153 IssmDouble time; 154 154 … … 165 165 } 166 166 /*}}}*/ 167 /*FUNCTION TransientInput::GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){{{*/ 168 void TransientInput::GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){ 169 IssmDouble time; 170 171 /*First, recover current time from parameters: */ 172 this->parameters->FindParam(&time,TimeEnum); 173 174 /*Retrieve interpolated values for this time step: */ 175 Input* input=GetTimeInput(time); 176 177 /*Call input function*/ 178 input->GetInputValue(pvalue,gauss); 179 180 delete input; 181 } 182 /*}}}*/ 183 /*FUNCTION TransientInput::GetInputValue(IssmDouble* pvalue,GaussTria* gauss,IssmDouble time){{{*/ 184 void TransientInput::GetInputValue(IssmDouble* pvalue,GaussTria* gauss,IssmDouble time){ 185 186 /*Retrieve interpolated values for this time step: */ 187 Input* input=GetTimeInput(time); 188 189 /*Call input function*/ 190 input->GetInputValue(pvalue,gauss); 191 192 delete input; 193 } 194 /*}}}*/ 195 /*FUNCTION TransientInput::GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,IssmDouble time){{{*/ 196 void TransientInput::GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,IssmDouble time){ 167 /*FUNCTION TransientInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss,IssmDouble time){{{*/ 168 void TransientInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss,IssmDouble time){ 197 169 198 170 /*Retrieve interpolated values for this time step: */ -
issm/trunk-jpl/src/c/classes/Inputs/TransientInput.h
r16486 r16675 50 50 void GetInputValue(int* pvalue){_error_("not implemented yet");}; 51 51 void GetInputValue(IssmDouble* pvalue){_error_("not implemented yet");}; 52 void GetInputValue(IssmDouble* pvalue,GaussSeg* gauss){_error_("not implemented yet");}; 53 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss); 54 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss); 55 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss,IssmDouble time); 56 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,IssmDouble time); 57 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");}; 58 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss ,int index){_error_("not implemented yet");}; 52 void GetInputValue(IssmDouble* pvalue,Gauss* gauss); 53 void GetInputValue(IssmDouble* pvalue,Gauss* gauss,IssmDouble time); 54 void GetInputValue(IssmDouble* pvalue,Gauss* gauss ,int index){_error_("not implemented yet");}; 59 55 void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussSeg* gauss){_error_("not implemented yet");}; 60 56 void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss); -
issm/trunk-jpl/src/c/classes/Inputs/TriaInput.cpp
r16656 r16675 124 124 125 125 /*Object functions*/ 126 /*FUNCTION TriaInput::GetInputValue(IssmDouble* pvalue,Gauss Tria* gauss){{{*/127 void TriaInput::GetInputValue(IssmDouble* pvalue,Gauss Tria* gauss){126 /*FUNCTION TriaInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){{{*/ 127 void TriaInput::GetInputValue(IssmDouble* pvalue,Gauss* gauss){ 128 128 129 129 /*Call TriaRef function*/ 130 TriaRef::GetInputValue(pvalue,&values[0],gauss); 130 _assert_(gauss->Enum()==GaussTriaEnum); 131 TriaRef::GetInputValue(pvalue,&values[0],(GaussTria*)gauss); 131 132 132 133 } -
issm/trunk-jpl/src/c/classes/Inputs/TriaInput.h
r16486 r16675 47 47 void GetInputValue(int* pvalue){_error_("not implemented yet");} 48 48 void GetInputValue(IssmDouble* pvalue){_error_("not implemented yet");} 49 void GetInputValue(IssmDouble* pvalue,GaussSeg* gauss){_error_("not implemented yet");}; 50 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss); 51 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){_error_("not implemented yet");}; 52 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss,IssmDouble time){_error_("not implemented yet");}; 53 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,IssmDouble time){_error_("not implemented yet");}; 54 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");}; 55 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,int index){_error_("not implemented yet");}; 49 void GetInputValue(IssmDouble* pvalue,Gauss* gauss); 50 void GetInputValue(IssmDouble* pvalue,Gauss* gauss,IssmDouble time){_error_("not implemented yet");}; 51 void GetInputValue(IssmDouble* pvalue,Gauss* gauss,int index){_error_("not implemented yet");}; 56 52 void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussSeg* gauss){_error_("not implemented yet");}; 57 53 void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss); -
issm/trunk-jpl/src/c/classes/gauss/GaussPenta.cpp
r16233 r16675 495 495 } 496 496 /*}}}*/ 497 /*FUNCTION GaussPenta::Enum{{{*/ 498 int GaussPenta::Enum(void){ 499 return GaussPentaEnum; 500 } 501 /*}}}*/ 497 502 /*FUNCTION GaussPenta::GaussPoint{{{*/ 498 503 void GaussPenta::GaussPoint(int ig){ -
issm/trunk-jpl/src/c/classes/gauss/GaussPenta.h
r16233 r16675 8 8 /*Headers:*/ 9 9 #include "../../shared/Numerics/types.h" 10 #include "./Gauss.h" 10 11 class GaussTria; 11 12 12 class GaussPenta {13 class GaussPenta: public Gauss{ 13 14 14 15 private: … … 43 44 int end(void); 44 45 void Echo(void); 46 int Enum(void); 45 47 void GaussPoint(int ig); 46 48 void GaussVertex(int iv); -
issm/trunk-jpl/src/c/classes/gauss/GaussSeg.cpp
r16440 r16675 70 70 } 71 71 /*}}}*/ 72 /*FUNCTION GaussSeg::Enum{{{*/ 73 int GaussSeg::Enum(void){ 74 return GaussSegEnum; 75 } 76 /*}}}*/ 72 77 /*FUNCTION GaussSeg::GaussPoint{{{*/ 73 78 void GaussSeg::GaussPoint(int ig){ … … 79 84 weight=weights[ig]; 80 85 coord1=coords1[ig]; 86 } 87 /*}}}*/ 88 /*FUNCTION GaussSeg::GaussVertex{{{*/ 89 void GaussSeg::GaussVertex(int iv){ 90 91 _error_("not supported"); 92 } 93 /*}}}*/ 94 /*FUNCTION GaussSeg::GaussNode{{{*/ 95 void GaussSeg::GaussNode(int finiteelement,int iv){ 96 97 _error_("not supported"); 98 81 99 } 82 100 /*}}}*/ -
issm/trunk-jpl/src/c/classes/gauss/GaussSeg.h
r16376 r16675 8 8 /*Headers:*/ 9 9 #include "../../shared/Numerics/types.h" 10 #include "./Gauss.h" 10 11 11 class GaussSeg {12 class GaussSeg: public Gauss{ 12 13 13 14 private: … … 30 31 int end(void); 31 32 void Echo(void); 33 int Enum(void); 32 34 void GaussPoint(int ig); 35 void GaussVertex(int iv); 36 void GaussNode(int finitelement,int iv); 33 37 }; 34 38 #endif -
issm/trunk-jpl/src/c/classes/gauss/GaussTria.cpp
r16233 r16675 339 339 _printf_(" coord3 = " << coord3 << "\n"); 340 340 341 } 342 /*}}}*/ 343 /*FUNCTION GaussTria::Enum{{{*/ 344 int GaussTria::Enum(void){ 345 return GaussTriaEnum; 341 346 } 342 347 /*}}}*/ -
issm/trunk-jpl/src/c/classes/gauss/GaussTria.h
r16233 r16675 8 8 /*Headers:*/ 9 9 #include "../../shared/Numerics/types.h" 10 #include "./Gauss.h" 10 11 11 class GaussTria {12 class GaussTria: public Gauss{ 12 13 13 14 private: … … 38 39 int end(void); 39 40 void Echo(void); 41 int Enum(void); 40 42 void GaussFromCoords(IssmDouble x1,IssmDouble y1,IssmDouble* xyz_list); 41 43 void GaussPoint(int ig); -
issm/trunk-jpl/src/c/classes/gauss/gaussobjects.h
r16376 r16675 6 6 #define ALL_GAUSS_OBJECTS_H_ 7 7 8 #include "./Gauss.h" 8 9 #include "./GaussSeg.h" 9 10 #include "./GaussTria.h" -
issm/trunk-jpl/src/c/modules/GetSolutionFromInputsx/GetSolutionFromInputsx.cpp
r15849 r16675 11 11 /*intermediary: */ 12 12 int gsize; 13 Element* element = NULL; 14 15 int configuration_type; 13 int configuration,analysisenum; 16 14 17 15 /*output: */ … … 21 19 22 20 /*retrive parameters: */ 23 femmodel->parameters->FindParam(&configuration_type,ConfigurationTypeEnum); 21 femmodel->parameters->FindParam(&configuration,ConfigurationTypeEnum); 22 femmodel->parameters->FindParam(&analysisenum,AnalysisTypeEnum); 24 23 25 24 /*Get size of vector: */ 26 gsize=femmodel->nodes->NumberOfDofs(configuration _type,GsetEnum);27 if(gsize==0) _error_("Allocating a Vec of size 0 as gsize=0 for configuration : " << EnumToStringx(configuration_type));25 gsize=femmodel->nodes->NumberOfDofs(configuration,GsetEnum); 26 if(gsize==0) _error_("Allocating a Vec of size 0 as gsize=0 for configuration "<<EnumToStringx(configuration)); 28 27 29 28 /*Initialize solution: */ … … 31 30 32 31 /*Go through elements and plug solution: */ 32 Analysis* analysis = EnumToAnalysis(analysisenum); 33 33 for(int i=0;i<femmodel->elements->Size();i++){ 34 element=dynamic_cast<Element*>(femmodel->elements->GetObjectByOffset(i));35 element->GetSolutionFromInputs(solution);34 Element* element=dynamic_cast<Element*>(femmodel->elements->GetObjectByOffset(i)); 35 analysis->GetSolutionFromInputs(solution,element); 36 36 } 37 delete analysis; 37 38 38 39 /*Assemble vector: */ -
issm/trunk-jpl/src/c/modules/GetSolutionFromInputsx/GetSolutionFromInputsx.h
r15849 r16675 7 7 8 8 #include "../../classes/classes.h" 9 #include "../../analyses/analyses.h" 9 10 10 11 /* local prototypes: */ -
issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h
r16669 r16675 580 580 QmuMaskGroundediceLevelsetEnum, 581 581 /*}}}*/ 582 /*Gauss{{{*/ 583 GaussSegEnum, 584 GaussTriaEnum, 585 GaussPentaEnum, 586 /*}}}*/ 582 587 /*Solver{{{*/ 583 588 FSSolverEnum, -
issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp
r16669 r16675 561 561 case MaskGroundediceLevelsetEnum : return "MaskGroundediceLevelset"; 562 562 case QmuMaskGroundediceLevelsetEnum : return "QmuMaskGroundediceLevelset"; 563 case GaussSegEnum : return "GaussSeg"; 564 case GaussTriaEnum : return "GaussTria"; 565 case GaussPentaEnum : return "GaussPenta"; 563 566 case FSSolverEnum : return "FSSolver"; 564 567 case AdjointEnum : return "Adjoint"; -
issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp
r16669 r16675 573 573 else if (strcmp(name,"MaskGroundediceLevelset")==0) return MaskGroundediceLevelsetEnum; 574 574 else if (strcmp(name,"QmuMaskGroundediceLevelset")==0) return QmuMaskGroundediceLevelsetEnum; 575 else if (strcmp(name,"GaussSeg")==0) return GaussSegEnum; 576 else if (strcmp(name,"GaussTria")==0) return GaussTriaEnum; 577 else if (strcmp(name,"GaussPenta")==0) return GaussPentaEnum; 575 578 else if (strcmp(name,"FSSolver")==0) return FSSolverEnum; 576 579 else if (strcmp(name,"Adjoint")==0) return AdjointEnum; -
issm/trunk-jpl/src/c/toolkits/objects/Matrix.h
r15238 r16675 16 16 #include <cstring> 17 17 #include "../../shared/Enum/Enum.h" 18 #include "../petsc/petscincludes.h" 18 19 #include "../issm/issmtoolkit.h" 19 20 /*}}}*/ -
issm/trunk-jpl/src/c/toolkits/objects/Solver.h
r15051 r16675 14 14 #include "./Vector.h" 15 15 #include "../issm/issmtoolkit.h" 16 #include "../petsc/petscincludes.h" 16 17 class Parameters; 17 18 -
issm/trunk-jpl/src/c/toolkits/objects/Vector.h
r15051 r16675 16 16 #include <cstring> 17 17 #include "../../shared/Enum/Enum.h" 18 #include "../petsc/petscincludes.h" 18 19 #include "../issm/issmtoolkit.h" 19 20 /*}}}*/
Note:
See TracChangeset
for help on using the changeset viewer.