Changeset 23585
- Timestamp:
- 01/01/19 21:09:23 (6 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 86 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified issm/trunk-jpl/src/c/analyses/AdjointBalancethickness2Analysis.cpp ¶
r22265 r23585 12 12 _error_("not implemented yet"); 13 13 }/*}}}*/ 14 void AdjointBalancethickness2Analysis::CreateNodes(Nodes* nodes,IoModel* iomodel ){/*{{{*/14 void AdjointBalancethickness2Analysis::CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr){/*{{{*/ 15 15 _error_("not implemented yet"); 16 16 }/*}}}*/ -
TabularUnified issm/trunk-jpl/src/c/analyses/AdjointBalancethickness2Analysis.h ¶
r22265 r23585 15 15 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 16 16 void CreateLoads(Loads* loads, IoModel* iomodel); 17 void CreateNodes(Nodes* nodes,IoModel* iomodel );17 void CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr=false); 18 18 int DofsPerNode(int** doflist,int domaintype,int approximation); 19 19 void UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type); -
TabularUnified issm/trunk-jpl/src/c/analyses/AdjointBalancethicknessAnalysis.cpp ¶
r22265 r23585 12 12 _error_("not implemented yet"); 13 13 }/*}}}*/ 14 void AdjointBalancethicknessAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel ){/*{{{*/14 void AdjointBalancethicknessAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr){/*{{{*/ 15 15 _error_("not implemented yet"); 16 16 }/*}}}*/ -
TabularUnified issm/trunk-jpl/src/c/analyses/AdjointBalancethicknessAnalysis.h ¶
r22265 r23585 15 15 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 16 16 void CreateLoads(Loads* loads, IoModel* iomodel); 17 void CreateNodes(Nodes* nodes,IoModel* iomodel );17 void CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr=false); 18 18 int DofsPerNode(int** doflist,int domaintype,int approximation); 19 19 void UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type); -
TabularUnified issm/trunk-jpl/src/c/analyses/AdjointHorizAnalysis.cpp ¶
r23066 r23585 12 12 _error_("not implemented yet"); 13 13 }/*}}}*/ 14 void AdjointHorizAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel ){/*{{{*/14 void AdjointHorizAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr){/*{{{*/ 15 15 _error_("not implemented yet"); 16 16 }/*}}}*/ -
TabularUnified issm/trunk-jpl/src/c/analyses/AdjointHorizAnalysis.h ¶
r19002 r23585 15 15 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 16 16 void CreateLoads(Loads* loads, IoModel* iomodel); 17 void CreateNodes(Nodes* nodes,IoModel* iomodel );17 void CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr=false); 18 18 int DofsPerNode(int** doflist,int domaintype,int approximation); 19 19 void UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type); -
TabularUnified issm/trunk-jpl/src/c/analyses/Analysis.h ¶
r20065 r23585 36 36 virtual void CreateConstraints(Constraints* constraints,IoModel* iomodel)=0; 37 37 virtual void CreateLoads(Loads* loads, IoModel* iomodel)=0; 38 virtual void CreateNodes(Nodes* nodes,IoModel* iomodel )=0;38 virtual void CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr=false)=0; 39 39 virtual int DofsPerNode(int** doflist,int domaintype,int approximation)=0; 40 40 virtual void UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type)=0; -
TabularUnified issm/trunk-jpl/src/c/analyses/Balancethickness2Analysis.cpp ¶
r23066 r23585 15 15 16 16 }/*}}}*/ 17 void Balancethickness2Analysis::CreateNodes(Nodes* nodes,IoModel* iomodel ){/*{{{*/17 void Balancethickness2Analysis::CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr){/*{{{*/ 18 18 19 19 int finiteelement = P1Enum; -
TabularUnified issm/trunk-jpl/src/c/analyses/Balancethickness2Analysis.h ¶
r22178 r23585 15 15 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 16 16 void CreateLoads(Loads* loads, IoModel* iomodel); 17 void CreateNodes(Nodes* nodes,IoModel* iomodel );17 void CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr=false); 18 18 int DofsPerNode(int** doflist,int domaintype,int approximation); 19 19 void UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type); -
TabularUnified issm/trunk-jpl/src/c/analyses/BalancethicknessAnalysis.cpp ¶
r23532 r23585 51 51 } 52 52 }/*}}}*/ 53 void BalancethicknessAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel ){/*{{{*/53 void BalancethicknessAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr){/*{{{*/ 54 54 55 55 int stabilization; -
TabularUnified issm/trunk-jpl/src/c/analyses/BalancethicknessAnalysis.h ¶
r18930 r23585 15 15 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 16 16 void CreateLoads(Loads* loads, IoModel* iomodel); 17 void CreateNodes(Nodes* nodes,IoModel* iomodel );17 void CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr=false); 18 18 int DofsPerNode(int** doflist,int domaintype,int approximation); 19 19 void UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type); -
TabularUnified issm/trunk-jpl/src/c/analyses/BalancethicknessSoftAnalysis.cpp ¶
r18057 r23585 15 15 _error_("not implemented yet"); 16 16 }/*}}}*/ 17 void BalancethicknessSoftAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel ){/*{{{*/17 void BalancethicknessSoftAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr){/*{{{*/ 18 18 _error_("not implemented yet"); 19 19 }/*}}}*/ -
TabularUnified issm/trunk-jpl/src/c/analyses/BalancethicknessSoftAnalysis.h ¶
r18057 r23585 16 16 void UpdateParameters(Parameters* parameters,IoModel* iomodel,int solution_enum,int analysis_enum); 17 17 void UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type); 18 void CreateNodes(Nodes* nodes,IoModel* iomodel );18 void CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr=false); 19 19 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 20 20 void CreateLoads(Loads* loads, IoModel* iomodel); -
TabularUnified issm/trunk-jpl/src/c/analyses/BalancevelocityAnalysis.cpp ¶
r23066 r23585 15 15 /*No loads*/ 16 16 }/*}}}*/ 17 void BalancevelocityAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel ){/*{{{*/17 void BalancevelocityAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr){/*{{{*/ 18 18 19 19 /*Check in 3d*/ -
TabularUnified issm/trunk-jpl/src/c/analyses/BalancevelocityAnalysis.h ¶
r18930 r23585 15 15 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 16 16 void CreateLoads(Loads* loads, IoModel* iomodel); 17 void CreateNodes(Nodes* nodes,IoModel* iomodel );17 void CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr=false); 18 18 int DofsPerNode(int** doflist,int domaintype,int approximation); 19 19 void UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type); -
TabularUnified issm/trunk-jpl/src/c/analyses/DamageEvolutionAnalysis.cpp ¶
r23066 r23585 30 30 31 31 }/*}}}*/ 32 void DamageEvolutionAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel ){/*{{{*/32 void DamageEvolutionAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr){/*{{{*/ 33 33 34 34 int finiteelement; -
TabularUnified issm/trunk-jpl/src/c/analyses/DamageEvolutionAnalysis.h ¶
r19386 r23585 15 15 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 16 16 void CreateLoads(Loads* loads, IoModel* iomodel); 17 void CreateNodes(Nodes* nodes,IoModel* iomodel );17 void CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr=false); 18 18 int DofsPerNode(int** doflist,int domaintype,int approximation); 19 19 void UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type); -
TabularUnified issm/trunk-jpl/src/c/analyses/DepthAverageAnalysis.cpp ¶
r21074 r23585 10 10 void DepthAverageAnalysis::CreateLoads(Loads* loads, IoModel* iomodel){/*{{{*/ 11 11 }/*}}}*/ 12 void DepthAverageAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel ){/*{{{*/12 void DepthAverageAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr){/*{{{*/ 13 13 14 14 ::CreateNodes(nodes,iomodel,DepthAverageAnalysisEnum,P1Enum); -
TabularUnified issm/trunk-jpl/src/c/analyses/DepthAverageAnalysis.h ¶
r18929 r23585 15 15 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 16 16 void CreateLoads(Loads* loads, IoModel* iomodel); 17 void CreateNodes(Nodes* nodes,IoModel* iomodel );17 void CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr=false); 18 18 int DofsPerNode(int** doflist,int domaintype,int approximation); 19 19 void UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type); -
TabularUnified issm/trunk-jpl/src/c/analyses/EnthalpyAnalysis.cpp ¶
r23475 r23585 87 87 /*No loads */ 88 88 }/*}}}*/ 89 void EnthalpyAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel ){/*{{{*/89 void EnthalpyAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr){/*{{{*/ 90 90 91 91 int finiteelement; -
TabularUnified issm/trunk-jpl/src/c/analyses/EnthalpyAnalysis.h ¶
r21721 r23585 16 16 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 17 17 void CreateLoads(Loads* loads, IoModel* iomodel); 18 void CreateNodes(Nodes* nodes,IoModel* iomodel );18 void CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr=false); 19 19 int DofsPerNode(int** doflist,int domaintype,int approximation); 20 20 void UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type); -
TabularUnified issm/trunk-jpl/src/c/analyses/EnumToAnalysis.h ¶
r18057 r23585 11 11 void UpdateParameters(Parameters* parameters,IoModel* iomodel,int solution_enum,int analysis_enum); 12 12 void UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type); 13 void CreateNodes(Nodes* nodes,IoModel* iomodel );13 void CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr=false); 14 14 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 15 15 void CreateLoads(Loads* loads, IoModel* iomodel); -
TabularUnified issm/trunk-jpl/src/c/analyses/EsaAnalysis.cpp ¶
r23066 r23585 12 12 /*No loads*/ 13 13 }/*}}}*/ 14 void EsaAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel ){/*{{{*/14 void EsaAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr){/*{{{*/ 15 15 ::CreateNodes(nodes,iomodel,EsaAnalysisEnum,P1Enum); 16 16 }/*}}}*/ -
TabularUnified issm/trunk-jpl/src/c/analyses/EsaAnalysis.h ¶
r21261 r23585 15 15 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 16 16 void CreateLoads(Loads* loads, IoModel* iomodel); 17 void CreateNodes(Nodes* nodes,IoModel* iomodel );17 void CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr=false); 18 18 int DofsPerNode(int** doflist,int domaintype,int approximation); 19 19 void UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type); -
TabularUnified issm/trunk-jpl/src/c/analyses/ExtrapolationAnalysis.cpp ¶
r23380 r23585 15 15 return; 16 16 }/*}}}*/ 17 void ExtrapolationAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel ){/*{{{*/17 void ExtrapolationAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr){/*{{{*/ 18 18 int finiteelement=P1Enum; 19 19 if(iomodel->domaintype!=Domain2DhorizontalEnum) iomodel->FetchData(2,"md.mesh.vertexonbase","md.mesh.vertexonsurface"); -
TabularUnified issm/trunk-jpl/src/c/analyses/ExtrapolationAnalysis.h ¶
r20117 r23585 15 15 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 16 16 void CreateLoads(Loads* loads, IoModel* iomodel); 17 void CreateNodes(Nodes* nodes,IoModel* iomodel );17 void CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr=false); 18 18 int DofsPerNode(int** doflist,int domaintype,int approximation); 19 19 void UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type); -
TabularUnified issm/trunk-jpl/src/c/analyses/ExtrudeFromBaseAnalysis.cpp ¶
r21111 r23585 10 10 void ExtrudeFromBaseAnalysis::CreateLoads(Loads* loads, IoModel* iomodel){/*{{{*/ 11 11 }/*}}}*/ 12 void ExtrudeFromBaseAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel ){/*{{{*/12 void ExtrudeFromBaseAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr){/*{{{*/ 13 13 14 14 ::CreateNodes(nodes,iomodel,ExtrudeFromBaseAnalysisEnum,P1Enum); -
TabularUnified issm/trunk-jpl/src/c/analyses/ExtrudeFromBaseAnalysis.h ¶
r20665 r23585 15 15 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 16 16 void CreateLoads(Loads* loads, IoModel* iomodel); 17 void CreateNodes(Nodes* nodes,IoModel* iomodel );17 void CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr=false); 18 18 int DofsPerNode(int** doflist,int domaintype,int approximation); 19 19 void UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type); -
TabularUnified issm/trunk-jpl/src/c/analyses/ExtrudeFromTopAnalysis.cpp ¶
r21111 r23585 10 10 void ExtrudeFromTopAnalysis::CreateLoads(Loads* loads, IoModel* iomodel){/*{{{*/ 11 11 }/*}}}*/ 12 void ExtrudeFromTopAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel ){/*{{{*/12 void ExtrudeFromTopAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr){/*{{{*/ 13 13 14 14 ::CreateNodes(nodes,iomodel,ExtrudeFromTopAnalysisEnum,P1Enum); -
TabularUnified issm/trunk-jpl/src/c/analyses/ExtrudeFromTopAnalysis.h ¶
r20666 r23585 15 15 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 16 16 void CreateLoads(Loads* loads, IoModel* iomodel); 17 void CreateNodes(Nodes* nodes,IoModel* iomodel );17 void CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr=false); 18 18 int DofsPerNode(int** doflist,int domaintype,int approximation); 19 19 void UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type); -
TabularUnified issm/trunk-jpl/src/c/analyses/FreeSurfaceBaseAnalysis.cpp ¶
r23532 r23585 46 46 iomodel->DeleteData(nodeonbase,"md.mesh.vertexonbase"); 47 47 }/*}}}*/ 48 void FreeSurfaceBaseAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel ){/*{{{*/48 void FreeSurfaceBaseAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr){/*{{{*/ 49 49 50 50 if(iomodel->domaintype!=Domain2DhorizontalEnum) iomodel->FetchData(2,"md.mesh.vertexonbase","md.mesh.vertexonsurface"); -
TabularUnified issm/trunk-jpl/src/c/analyses/FreeSurfaceBaseAnalysis.h ¶
r18929 r23585 15 15 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 16 16 void CreateLoads(Loads* loads, IoModel* iomodel); 17 void CreateNodes(Nodes* nodes,IoModel* iomodel );17 void CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr=false); 18 18 int DofsPerNode(int** doflist,int domaintype,int approximation); 19 19 void UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type); -
TabularUnified issm/trunk-jpl/src/c/analyses/FreeSurfaceTopAnalysis.cpp ¶
r23532 r23585 46 46 iomodel->DeleteData(nodeonsurface,"md.mesh.vertexonsurface"); 47 47 }/*}}}*/ 48 void FreeSurfaceTopAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel ){/*{{{*/48 void FreeSurfaceTopAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr){/*{{{*/ 49 49 50 50 if(iomodel->domaintype!=Domain2DhorizontalEnum) iomodel->FetchData(2,"md.mesh.vertexonbase","md.mesh.vertexonsurface"); -
TabularUnified issm/trunk-jpl/src/c/analyses/FreeSurfaceTopAnalysis.h ¶
r18929 r23585 15 15 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 16 16 void CreateLoads(Loads* loads, IoModel* iomodel); 17 void CreateNodes(Nodes* nodes,IoModel* iomodel );17 void CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr=false); 18 18 int DofsPerNode(int** doflist,int domaintype,int approximation); 19 19 void UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type); -
TabularUnified issm/trunk-jpl/src/c/analyses/GLheightadvectionAnalysis.cpp ¶
r23507 r23585 14 14 /*No loads*/ 15 15 }/*}}}*/ 16 void GLheightadvectionAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel ){/*{{{*/16 void GLheightadvectionAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr){/*{{{*/ 17 17 18 18 /*First fetch data: */ -
TabularUnified issm/trunk-jpl/src/c/analyses/GLheightadvectionAnalysis.h ¶
r22911 r23585 15 15 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 16 16 void CreateLoads(Loads* loads, IoModel* iomodel); 17 void CreateNodes(Nodes* nodes,IoModel* iomodel );17 void CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr=false); 18 18 int DofsPerNode(int** doflist,int domaintype,int approximation); 19 19 void UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type); -
TabularUnified issm/trunk-jpl/src/c/analyses/GiaIvinsAnalysis.cpp ¶
r22969 r23585 12 12 /*No loads*/ 13 13 }/*}}}*/ 14 void GiaIvinsAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel ){/*{{{*/14 void GiaIvinsAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr){/*{{{*/ 15 15 ::CreateNodes(nodes,iomodel,GiaIvinsAnalysisEnum,P1Enum); 16 16 }/*}}}*/ -
TabularUnified issm/trunk-jpl/src/c/analyses/GiaIvinsAnalysis.h ¶
r21532 r23585 15 15 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 16 16 void CreateLoads(Loads* loads, IoModel* iomodel); 17 void CreateNodes(Nodes* nodes,IoModel* iomodel );17 void CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr=false); 18 18 int DofsPerNode(int** doflist,int domaintype,int approximation); 19 19 void UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type); -
TabularUnified issm/trunk-jpl/src/c/analyses/HydrologyDCEfficientAnalysis.cpp ¶
r23546 r23585 71 71 }/*}}}*/ 72 72 73 void HydrologyDCEfficientAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel ){/*{{{*/73 void HydrologyDCEfficientAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr){/*{{{*/ 74 74 75 75 /*Now, do we really want DC?*/ -
TabularUnified issm/trunk-jpl/src/c/analyses/HydrologyDCEfficientAnalysis.h ¶
r23528 r23585 17 17 void UpdateParameters(Parameters* parameters,IoModel* iomodel,int solution_enum,int analysis_enum); 18 18 void UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type); 19 void CreateNodes(Nodes* nodes,IoModel* iomodel );19 void CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr=false); 20 20 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 21 21 void CreateLoads(Loads* loads, IoModel* iomodel); -
TabularUnified issm/trunk-jpl/src/c/analyses/HydrologyDCInefficientAnalysis.cpp ¶
r23546 r23585 115 115 116 116 }/*}}}*/ 117 void HydrologyDCInefficientAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel ){/*{{{*/117 void HydrologyDCInefficientAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr){/*{{{*/ 118 118 119 119 /*Fetch parameters: */ -
TabularUnified issm/trunk-jpl/src/c/analyses/HydrologyDCInefficientAnalysis.h ¶
r22902 r23585 17 17 void UpdateParameters(Parameters* parameters,IoModel* iomodel,int solution_enum,int analysis_enum); 18 18 void UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type); 19 void CreateNodes(Nodes* nodes,IoModel* iomodel );19 void CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr=false); 20 20 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 21 21 void CreateLoads(Loads* loads, IoModel* iomodel); -
TabularUnified issm/trunk-jpl/src/c/analyses/HydrologyPismAnalysis.cpp ¶
r23156 r23585 16 16 17 17 }/*}}}*/ 18 void HydrologyPismAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel ){/*{{{*/18 void HydrologyPismAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr){/*{{{*/ 19 19 return; 20 20 }/*}}}*/ -
TabularUnified issm/trunk-jpl/src/c/analyses/HydrologyPismAnalysis.h ¶
r23020 r23585 15 15 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 16 16 void CreateLoads(Loads* loads, IoModel* iomodel); 17 void CreateNodes(Nodes* nodes,IoModel* iomodel );17 void CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr=false); 18 18 int DofsPerNode(int** doflist,int domaintype,int approximation); 19 19 void UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type); -
TabularUnified issm/trunk-jpl/src/c/analyses/HydrologyShaktiAnalysis.cpp ¶
r23532 r23585 65 65 66 66 }/*}}}*/ 67 void HydrologyShaktiAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel ){/*{{{*/67 void HydrologyShaktiAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr){/*{{{*/ 68 68 69 69 /*Fetch parameters: */ -
TabularUnified issm/trunk-jpl/src/c/analyses/HydrologyShaktiAnalysis.h ¶
r23020 r23585 15 15 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 16 16 void CreateLoads(Loads* loads, IoModel* iomodel); 17 void CreateNodes(Nodes* nodes,IoModel* iomodel );17 void CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr=false); 18 18 int DofsPerNode(int** doflist,int domaintype,int approximation); 19 19 void UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type); -
TabularUnified issm/trunk-jpl/src/c/analyses/HydrologyShreveAnalysis.cpp ¶
r23066 r23585 20 20 /*No loads*/ 21 21 }/*}}}*/ 22 void HydrologyShreveAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel ){/*{{{*/22 void HydrologyShreveAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr){/*{{{*/ 23 23 24 24 /*Fetch parameters: */ -
TabularUnified issm/trunk-jpl/src/c/analyses/HydrologyShreveAnalysis.h ¶
r18930 r23585 15 15 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 16 16 void CreateLoads(Loads* loads, IoModel* iomodel); 17 void CreateNodes(Nodes* nodes,IoModel* iomodel );17 void CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr=false); 18 18 int DofsPerNode(int** doflist,int domaintype,int approximation); 19 19 void UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type); -
TabularUnified issm/trunk-jpl/src/c/analyses/L2ProjectionBaseAnalysis.cpp ¶
r22919 r23585 14 14 /*No loads*/ 15 15 }/*}}}*/ 16 void L2ProjectionBaseAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel ){/*{{{*/16 void L2ProjectionBaseAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr){/*{{{*/ 17 17 18 18 if(iomodel->domaintype==Domain3DEnum){ -
TabularUnified issm/trunk-jpl/src/c/analyses/L2ProjectionBaseAnalysis.h ¶
r18930 r23585 15 15 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 16 16 void CreateLoads(Loads* loads, IoModel* iomodel); 17 void CreateNodes(Nodes* nodes,IoModel* iomodel );17 void CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr=false); 18 18 int DofsPerNode(int** doflist,int domaintype,int approximation); 19 19 void UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type); -
TabularUnified issm/trunk-jpl/src/c/analyses/L2ProjectionEPLAnalysis.cpp ¶
r22856 r23585 14 14 /*No loads*/ 15 15 }/*}}}*/ 16 void L2ProjectionEPLAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel ){/*{{{*/16 void L2ProjectionEPLAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr){/*{{{*/ 17 17 /*Now, do we really want DC?*/ 18 18 int hydrology_model; -
TabularUnified issm/trunk-jpl/src/c/analyses/L2ProjectionEPLAnalysis.h ¶
r18930 r23585 15 15 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 16 16 void CreateLoads(Loads* loads, IoModel* iomodel); 17 void CreateNodes(Nodes* nodes,IoModel* iomodel );17 void CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr=false); 18 18 int DofsPerNode(int** doflist,int domaintype,int approximation); 19 19 void UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type); -
TabularUnified issm/trunk-jpl/src/c/analyses/LevelsetAnalysis.cpp ¶
r23380 r23585 20 20 return; 21 21 }/*}}}*/ 22 void LevelsetAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel ){/*{{{*/22 void LevelsetAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr){/*{{{*/ 23 23 int finiteelement; 24 24 iomodel->FindConstant(&finiteelement,"md.levelset.fe"); -
TabularUnified issm/trunk-jpl/src/c/analyses/LevelsetAnalysis.h ¶
r22987 r23585 15 15 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 16 16 void CreateLoads(Loads* loads, IoModel* iomodel); 17 void CreateNodes(Nodes* nodes,IoModel* iomodel );17 void CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr=false); 18 18 int DofsPerNode(int** doflist,int domaintype,int approximation); 19 19 void UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type); -
TabularUnified issm/trunk-jpl/src/c/analyses/LoveAnalysis.cpp ¶
r22004 r23585 10 10 void LoveAnalysis::CreateLoads(Loads* loads, IoModel* iomodel){/*{{{*/ 11 11 }/*}}}*/ 12 void LoveAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel ){/*{{{*/12 void LoveAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr){/*{{{*/ 13 13 }/*}}}*/ 14 14 int LoveAnalysis::DofsPerNode(int** doflist,int domaintype,int approximation){/*{{{*/ -
TabularUnified issm/trunk-jpl/src/c/analyses/LoveAnalysis.h ¶
r22004 r23585 15 15 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 16 16 void CreateLoads(Loads* loads, IoModel* iomodel); 17 void CreateNodes(Nodes* nodes,IoModel* iomodel );17 void CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr=false); 18 18 int DofsPerNode(int** doflist,int domaintype,int approximation); 19 19 void UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type); -
TabularUnified issm/trunk-jpl/src/c/analyses/MasstransportAnalysis.cpp ¶
r23532 r23585 90 90 iomodel->DeleteData(nodeonbase,"md.mesh.vertexonbase"); 91 91 }/*}}}*/ 92 void MasstransportAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel ){/*{{{*/92 void MasstransportAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr){/*{{{*/ 93 93 94 94 /*Fetch parameters: */ … … 102 102 if(iomodel->domaintype!=Domain2DhorizontalEnum) iomodel->FetchData(2,"md.mesh.vertexonbase","md.mesh.vertexonsurface"); 103 103 if(stabilization!=3){ 104 ::CreateNodes(nodes,iomodel,MasstransportAnalysisEnum,P1Enum );104 ::CreateNodes(nodes,iomodel,MasstransportAnalysisEnum,P1Enum,isamr); 105 105 } 106 106 else{ 107 ::CreateNodes(nodes,iomodel,MasstransportAnalysisEnum,P1DGEnum );107 ::CreateNodes(nodes,iomodel,MasstransportAnalysisEnum,P1DGEnum,isamr); 108 108 } 109 109 iomodel->DeleteData(2,"md.mesh.vertexonbase","md.mesh.vertexonsurface"); -
TabularUnified issm/trunk-jpl/src/c/analyses/MasstransportAnalysis.h ¶
r18930 r23585 15 15 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 16 16 void CreateLoads(Loads* loads, IoModel* iomodel); 17 void CreateNodes(Nodes* nodes,IoModel* iomodel );17 void CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr=false); 18 18 int DofsPerNode(int** doflist,int domaintype,int approximation); 19 19 void UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type); -
TabularUnified issm/trunk-jpl/src/c/analyses/MeltingAnalysis.cpp ¶
r23532 r23585 28 28 29 29 }/*}}}*/ 30 void MeltingAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel ){/*{{{*/30 void MeltingAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr){/*{{{*/ 31 31 32 32 if(iomodel->domaintype==Domain3DEnum) iomodel->FetchData(2,"md.mesh.vertexonbase","md.mesh.vertexonsurface"); -
TabularUnified issm/trunk-jpl/src/c/analyses/MeltingAnalysis.h ¶
r18930 r23585 15 15 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 16 16 void CreateLoads(Loads* loads, IoModel* iomodel); 17 void CreateNodes(Nodes* nodes,IoModel* iomodel );17 void CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr=false); 18 18 int DofsPerNode(int** doflist,int domaintype,int approximation); 19 19 void UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type); -
TabularUnified issm/trunk-jpl/src/c/analyses/SealevelriseAnalysis.cpp ¶
r23066 r23585 12 12 /*No loads*/ 13 13 }/*}}}*/ 14 void SealevelriseAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel ){/*{{{*/14 void SealevelriseAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr){/*{{{*/ 15 15 ::CreateNodes(nodes,iomodel,SealevelriseAnalysisEnum,P1Enum); 16 16 }/*}}}*/ -
TabularUnified issm/trunk-jpl/src/c/analyses/SealevelriseAnalysis.h ¶
r19984 r23585 15 15 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 16 16 void CreateLoads(Loads* loads, IoModel* iomodel); 17 void CreateNodes(Nodes* nodes,IoModel* iomodel );17 void CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr=false); 18 18 int DofsPerNode(int** doflist,int domaintype,int approximation); 19 19 void UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type); -
TabularUnified issm/trunk-jpl/src/c/analyses/SmbAnalysis.cpp ¶
r23540 r23585 15 15 /*No loads*/ 16 16 }/*}}}*/ 17 void SmbAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel ){/*{{{*/17 void SmbAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr){/*{{{*/ 18 18 ::CreateNodes(nodes,iomodel,SmbAnalysisEnum,P1Enum); 19 19 }/*}}}*/ -
TabularUnified issm/trunk-jpl/src/c/analyses/SmbAnalysis.h ¶
r19528 r23585 15 15 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 16 16 void CreateLoads(Loads* loads, IoModel* iomodel); 17 void CreateNodes(Nodes* nodes,IoModel* iomodel );17 void CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr=false); 18 18 int DofsPerNode(int** doflist,int domaintype,int approximation); 19 19 void UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type); -
TabularUnified issm/trunk-jpl/src/c/analyses/SmoothAnalysis.cpp ¶
r23066 r23585 10 10 void SmoothAnalysis::CreateLoads(Loads* loads, IoModel* iomodel){/*{{{*/ 11 11 }/*}}}*/ 12 void SmoothAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel ){/*{{{*/12 void SmoothAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr){/*{{{*/ 13 13 14 14 ::CreateNodes(nodes,iomodel,SmoothAnalysisEnum,P1Enum); -
TabularUnified issm/trunk-jpl/src/c/analyses/SmoothAnalysis.h ¶
r18930 r23585 15 15 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 16 16 void CreateLoads(Loads* loads, IoModel* iomodel); 17 void CreateNodes(Nodes* nodes,IoModel* iomodel );17 void CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr=false); 18 18 int DofsPerNode(int** doflist,int domaintype,int approximation); 19 19 void UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type); -
TabularUnified issm/trunk-jpl/src/c/analyses/StressbalanceAnalysis.cpp ¶
r23576 r23585 496 496 } 497 497 }/*}}}*/ 498 void StressbalanceAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel ){/*{{{*/498 void StressbalanceAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr){/*{{{*/ 499 499 500 500 /*Intermediary*/ … … 537 537 iomodel->FindConstant(&finiteelement,"md.flowequation.fe_FS"); 538 538 } 539 iomodel->FetchData(3,"md.flowequation.borderSSA","md.flowequation.vertex_equation","md.stressbalance.referential"); 540 if(iomodel->domaintype!=Domain2DhorizontalEnum) iomodel->FetchData(3,"md.mesh.vertexonbase","md.mesh.vertexonsurface","md.flowequation.borderFS"); 541 ::CreateNodes(nodes,iomodel,StressbalanceAnalysisEnum,finiteelement,approximation); 542 iomodel->DeleteData(6,"md.mesh.vertexonbase","md.mesh.vertexonsurface","md.flowequation.borderSSA","md.flowequation.vertex_equation", 539 if(!isamr){ 540 iomodel->FetchData(3,"md.flowequation.borderSSA","md.flowequation.vertex_equation","md.stressbalance.referential"); 541 if(iomodel->domaintype!=Domain2DhorizontalEnum) iomodel->FetchData(3,"md.mesh.vertexonbase","md.mesh.vertexonsurface","md.flowequation.borderFS"); 542 } 543 ::CreateNodes(nodes,iomodel,StressbalanceAnalysisEnum,finiteelement,isamr,approximation); 544 if(!isamr){ 545 iomodel->DeleteData(6,"md.mesh.vertexonbase","md.mesh.vertexonsurface","md.flowequation.borderSSA","md.flowequation.vertex_equation", 543 546 "md.stressbalance.referential","md.flowequation.borderFS"); 547 } 544 548 } 545 549 else{ … … 556 560 for(int i=0;i<iomodel->numberofelements;i++) approximations[iomodel->numberofvertices+i] = FSvelocityEnum; 557 561 for(int i=0;i<iomodel->numberofvertices;i++) approximations[iomodel->numberofvertices+iomodel->numberofelements+i] = FSpressureEnum; 558 ::CreateNodes(nodes,iomodel,StressbalanceAnalysisEnum,MINIcondensedEnum, 0,approximations);562 ::CreateNodes(nodes,iomodel,StressbalanceAnalysisEnum,MINIcondensedEnum,isamr,0,approximations); 559 563 xDelete<int>(approximations); 560 564 … … 575 579 int* approximations = xNew<int>(iomodel->numberofvertices); 576 580 for(int i=0;i<iomodel->numberofvertices;i++) approximations[i] = IoCodeToEnumVertexEquation(reCast<int>(iomodel->Data("md.flowequation.vertex_equation")[i])); 577 ::CreateNodes(nodes,iomodel,StressbalanceAnalysisEnum,P1Enum, 0,approximations);581 ::CreateNodes(nodes,iomodel,StressbalanceAnalysisEnum,P1Enum,isamr,0,approximations); 578 582 xDelete<int>(approximations); 579 583 } -
TabularUnified issm/trunk-jpl/src/c/analyses/StressbalanceAnalysis.h ¶
r23199 r23585 15 15 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 16 16 void CreateLoads(Loads* loads, IoModel* iomodel); 17 void CreateNodes(Nodes* nodes,IoModel* iomodel );17 void CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr=false); 18 18 int DofsPerNode(int** doflist,int domaintype,int approximation); 19 19 void UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type); -
TabularUnified issm/trunk-jpl/src/c/analyses/StressbalanceSIAAnalysis.cpp ¶
r23576 r23585 76 76 77 77 }/*}}}*/ 78 void StressbalanceSIAAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel ){/*{{{*/78 void StressbalanceSIAAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr){/*{{{*/ 79 79 80 80 /*Intermediaries*/ -
TabularUnified issm/trunk-jpl/src/c/analyses/StressbalanceSIAAnalysis.h ¶
r18930 r23585 15 15 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 16 16 void CreateLoads(Loads* loads, IoModel* iomodel); 17 void CreateNodes(Nodes* nodes,IoModel* iomodel );17 void CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr=false); 18 18 int DofsPerNode(int** doflist,int domaintype,int approximation); 19 19 void UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type); -
TabularUnified issm/trunk-jpl/src/c/analyses/StressbalanceVerticalAnalysis.cpp ¶
r23532 r23585 74 74 75 75 }/*}}}*/ 76 void StressbalanceVerticalAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel ){/*{{{*/76 void StressbalanceVerticalAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr){/*{{{*/ 77 77 78 78 /*return if not 3d mesh*/ -
TabularUnified issm/trunk-jpl/src/c/analyses/StressbalanceVerticalAnalysis.h ¶
r22535 r23585 15 15 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 16 16 void CreateLoads(Loads* loads, IoModel* iomodel); 17 void CreateNodes(Nodes* nodes,IoModel* iomodel );17 void CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr=false); 18 18 int DofsPerNode(int** doflist,int domaintype,int approximation); 19 19 void UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type); -
TabularUnified issm/trunk-jpl/src/c/analyses/ThermalAnalysis.cpp ¶
r23532 r23585 91 91 92 92 }/*}}}*/ 93 void ThermalAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel ){/*{{{*/93 void ThermalAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr){/*{{{*/ 94 94 95 95 int finiteelement; -
TabularUnified issm/trunk-jpl/src/c/analyses/ThermalAnalysis.h ¶
r18930 r23585 15 15 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 16 16 void CreateLoads(Loads* loads, IoModel* iomodel); 17 void CreateNodes(Nodes* nodes,IoModel* iomodel );17 void CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr=false); 18 18 int DofsPerNode(int** doflist,int domaintype,int approximation); 19 19 void UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type); -
TabularUnified issm/trunk-jpl/src/c/analyses/UzawaPressureAnalysis.cpp ¶
r20690 r23585 12 12 return; 13 13 }/*}}}*/ 14 void UzawaPressureAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel ){/*{{{*/14 void UzawaPressureAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr){/*{{{*/ 15 15 16 16 int finiteelement; -
TabularUnified issm/trunk-jpl/src/c/analyses/UzawaPressureAnalysis.h ¶
r18930 r23585 15 15 void CreateConstraints(Constraints* constraints,IoModel* iomodel); 16 16 void CreateLoads(Loads* loads, IoModel* iomodel); 17 void CreateNodes(Nodes* nodes,IoModel* iomodel );17 void CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr=false); 18 18 int DofsPerNode(int** doflist,int domaintype,int approximation); 19 19 void UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type); -
TabularUnified issm/trunk-jpl/src/c/classes/FemModel.cpp ¶
r23576 r23585 2609 2609 int newnumberofvertices = -1; 2610 2610 int newnumberofelements = -1; 2611 bool* my_elements = NULL; 2612 int* my_vertices = NULL; 2611 2613 2612 int elementswidth = this->GetElementsWidth();//just tria elements in this version 2614 2613 int amrtype,basalforcing_model; … … 2620 2619 #if defined(_HAVE_NEOPZ_) && !defined(_HAVE_AD_) 2621 2620 case AmrNeopzEnum: this->ReMeshNeopz(&newnumberofvertices,&newnumberofelements,&newx,&newy,&newz,&newelementslist); break; 2622 2621 #endif 2623 2622 2624 2623 #if defined(_HAVE_BAMG_) && !defined(_HAVE_AD_) … … 2629 2628 } 2630 2629 2630 /*Create iomodel for model processing*/ 2631 IoModel* iomodel = new IoModel(); 2632 this->parameters->FindParam(&iomodel->domaintype,DomainTypeEnum); 2633 this->parameters->FindParam(&iomodel->domaindim ,DomainDimensionEnum); 2634 this->parameters->FindParam(&iomodel->meshelementtype,MeshElementtypeEnum); 2635 iomodel->numberofvertices = newnumberofvertices; 2636 iomodel->numberofelements = newnumberofelements; 2637 iomodel->elements = newelementslist; 2638 iomodel->AddConstant(new IoConstant(0,"md.rifts.numrifts")); 2639 iomodel->AddConstant(new IoConstant(false,"md.transient.isoceancoupling")); 2640 bool temp; int tempint; 2641 this->parameters->FindParam(&temp,FlowequationIsSIAEnum); iomodel->AddConstant(new IoConstant(temp,"md.flowequation.isSIA")); 2642 this->parameters->FindParam(&temp,FlowequationIsSSAEnum); iomodel->AddConstant(new IoConstant(temp,"md.flowequation.isSSA")); 2643 this->parameters->FindParam(&temp,FlowequationIsL1L2Enum); iomodel->AddConstant(new IoConstant(temp,"md.flowequation.isL1L2")); 2644 this->parameters->FindParam(&temp,FlowequationIsHOEnum); iomodel->AddConstant(new IoConstant(temp,"md.flowequation.isHO")); 2645 this->parameters->FindParam(&temp,FlowequationIsFSEnum); iomodel->AddConstant(new IoConstant(temp,"md.flowequation.isFS")); 2646 this->parameters->FindParam(&tempint,MasstransportStabilizationEnum); iomodel->AddConstant(new IoConstant(tempint,"md.masstransport.stabilization")); 2647 iomodel->AddConstant(new IoConstant(P1Enum,"md.flowequation.fe_SSA")); 2648 2631 2649 /*Partitioning the new mesh. Maybe ElementsAndVerticesPartitioning.cpp could be modified to set this without iomodel.*/ 2632 this->ElementsAndVerticesPartitioning(newnumberofvertices,newnumberofelements,elementswidth,newelementslist,&my_elements,&my_vertices); 2633 2634 /*Create vertices*/ 2635 Vertices* new_vertices=new Vertices(); 2636 this->CreateVertices(newnumberofvertices,newnumberofelements,elementswidth,newelementslist,my_vertices,newx,newy,newz,new_vertices); 2650 ::ElementsAndVerticesPartitioning(iomodel); 2637 2651 2638 2652 /*Creating elements*/ 2639 2653 /*Just Tria in this version*/ 2640 2654 Elements* new_elements=new Elements(); 2641 this->CreateElements(newnumberofelements,elementswidth,newelementslist,my_elements,new_elements); 2655 this->CreateElements(newnumberofelements,elementswidth,newelementslist,iomodel->my_elements,new_elements); 2656 2657 /*Create vertices*/ 2658 Vertices* new_vertices=new Vertices(); 2659 CreateNumberNodeToElementConnectivity(iomodel); 2660 ::CreateVertices(new_elements,new_vertices,iomodel,TransientSolutionEnum,true); 2661 for(int i=0;i<new_vertices->Size();i++){ 2662 Vertex *vertex=(Vertex*)new_vertices->GetObjectByOffset(i); 2663 int sid = vertex->Sid(); 2664 vertex->x=newx[sid]; 2665 vertex->y=newy[sid]; 2666 vertex->z=newz[sid]; 2667 } 2642 2668 2643 2669 /*Creating materials*/ 2644 2670 Materials* new_materials=new Materials(); 2645 this->CreateMaterials(newnumberofelements, my_elements,new_materials);2671 this->CreateMaterials(newnumberofelements,iomodel->my_elements,new_materials); 2646 2672 2647 2673 /*Creating nodes and constraints*/ 2648 2674 /*Just SSA (2D) and P1 in this version*/ 2649 Constraints **new_constraints_list = xNew<Constraints*>(this->nummodels);2650 Nodes ** new_nodes_list= xNew<Nodes*>(this->nummodels);2675 Constraints **new_constraints_list = xNew<Constraints*>(this->nummodels); 2676 Nodes **new_nodes_list = xNew<Nodes*>(this->nummodels); 2651 2677 2652 2678 this->analysis_counter=-1; 2653 2679 for(int i=0;i<this->nummodels;i++){//create nodes for each analysis in analysis_type_list 2680 2681 int analysis_enum = this->analysis_type_list[i]; 2682 if(VerboseMProcessor()) _printf0_(" creating datasets for analysis " << EnumToStringx(analysis_enum) << "\n"); 2654 2683 2655 2684 if(this->loads_list[i]->Size()!=0) _error_("not supported yet"); … … 2657 2686 new_nodes_list[i] = new Nodes(); 2658 2687 2659 int analysis_enum = this->analysis_type_list[i];2660 2661 2688 /*As the domain is 2D, it is not necessary to create nodes for this analysis*/ 2662 2689 if(analysis_enum==StressbalanceVerticalAnalysisEnum) continue; 2663 2664 this->CreateNodes(newnumberofvertices,my_vertices,analysis_enum,new_nodes_list[i]); 2665 this->UpdateElements(newnumberofelements,newelementslist,my_elements,i,new_elements); 2690 Analysis* analysis = EnumToAnalysis(analysis_enum); 2691 analysis->CreateNodes(new_nodes_list[i],iomodel,true); 2692 delete analysis; 2693 this->UpdateElements(newnumberofelements,newelementslist,iomodel->my_elements,i,new_elements); 2666 2694 this->CreateConstraints(new_vertices,analysis_enum,new_constraints_list[i]); 2667 2695 … … 2748 2776 /*Cleanup*/ 2749 2777 xDelete<IssmDouble>(newz); 2750 xDelete<int>(my_vertices); 2751 xDelete<bool>(my_elements); 2778 /*Delete iomodel, but make sure to not erase some pointers*/ 2779 iomodel->elements = NULL; 2780 delete iomodel; 2752 2781 } 2753 2782 /*}}}*/ … … 3164 3193 } 3165 3194 /*}}}*/ 3166 void FemModel::CreateVertices(int newnumberofvertices,int newnumberofelements,int elementswidth,int* newelementslist,int* my_vertices,IssmDouble* newx,IssmDouble* newy,IssmDouble* newz,Vertices* vertices){/*{{{*/3167 3168 /*newelementslist is in Matlab indexing*/3169 3170 /*Creating connectivity table*/3171 int* connectivity=NULL;3172 connectivity=xNewZeroInit<int>(newnumberofvertices);3173 3174 for(int i=0;i<newnumberofelements;i++){3175 for(int j=0;j<elementswidth;j++){3176 int vertexid = newelementslist[elementswidth*i+j];3177 _assert_(vertexid>0 && vertexid-1<newnumberofvertices);//Matlab indexing3178 connectivity[vertexid-1]+=1;//Matlab to C indexing3179 }3180 }3181 3182 /*Create vertex and insert in vertices*/3183 for(int i=0;i<newnumberofvertices;i++){3184 if(my_vertices[i]){3185 Vertex *newvertex=new Vertex();3186 newvertex->id=i+1;3187 newvertex->sid=i;3188 newvertex->pid=UNDEF;3189 newvertex->x=newx[i];3190 newvertex->y=newy[i];3191 newvertex->z=newz[i];3192 newvertex->domaintype=Domain2DhorizontalEnum;3193 newvertex->sigma=0.;3194 newvertex->connectivity=connectivity[i];3195 newvertex->clone=false;//itapopo check this3196 vertices->AddObject(newvertex);3197 }3198 }3199 3200 xDelete<int>(connectivity);3201 }3202 /*}}}*/3203 3195 void FemModel::CreateElements(int newnumberofelements,int elementswidth,int* newelementslist,bool* my_elements,Elements* elements){/*{{{*/ 3204 3196 … … 3261 3253 } 3262 3254 /*}}}*/ 3263 void FemModel::CreateNodes(int newnumberofvertices,int* my_vertices,int analysis_enum,Nodes* nodes){/*{{{*/3264 3265 int lid=0;3266 for(int j=0;j<newnumberofvertices;j++){3267 if(my_vertices[j]){3268 3269 Node* newnode=new Node();3270 3271 /*id: */3272 newnode->id=j+1;3273 newnode->sid=j;3274 newnode->lid=lid++;3275 newnode->analysis_enum=analysis_enum;3276 3277 /*Initialize coord_system: Identity matrix by default*/3278 for(int k=0;k<3;k++) for(int l=0;l<3;l++) newnode->coord_system[k][l]=0.0;3279 for(int k=0;k<3;k++) newnode->coord_system[k][k]=1.0;3280 3281 /*indexing:*/3282 newnode->indexingupdate=true;3283 3284 Analysis* analysis=EnumToAnalysis(analysis_enum);3285 int *doftypes=NULL;3286 int numdofs=analysis->DofsPerNode(&doftypes,Domain2DhorizontalEnum,SSAApproximationEnum);3287 newnode->indexing.Init(numdofs,false,doftypes);3288 xDelete<int>(doftypes);3289 delete analysis;3290 if(analysis_enum==StressbalanceAnalysisEnum)3291 newnode->SetApproximation(SSAApproximationEnum);3292 else3293 newnode->SetApproximation(0);3294 3295 /*Stressbalance Horiz*/3296 if(analysis_enum==StressbalanceAnalysisEnum){3297 // itapopo this code is rarely used.3298 /*Coordinate system provided, convert to coord_system matrix*/3299 //XZvectorsToCoordinateSystem(&this->coord_system[0][0],&iomodel->Data(StressbalanceReferentialEnum)[j*6]);3300 //_assert_(sqrt( coord_system[0][0]*coord_system[0][0] + coord_system[1][0]*coord_system[1][0]) >1.e-4);3301 3302 }3303 nodes->AddObject(newnode);3304 }3305 }3306 }3307 /*}}}*/3308 3255 void FemModel::GetMesh(Vertices* femmodel_vertices, Elements* femmodel_elements,IssmDouble** px, IssmDouble** py, int** pelementslist){/*{{{*/ 3309 3256 … … 3592 3539 } 3593 3540 return; 3594 }3595 /*}}}*/3596 void FemModel::ElementsAndVerticesPartitioning(int& newnumberofvertices,int& newnumberofelements,int& elementswidth,int* newelementslist,bool** pmy_elements,int** pmy_vertices){/*{{{*/3597 3598 /*newelementslist come in Matlab indexing*/3599 3600 int *epart = NULL; //element partitioning.3601 int *npart = NULL; //node partitioning.3602 int *index = NULL; //elements in C indexing3603 int edgecut = 1;3604 int numflag = 0;3605 int etype = 1;3606 int my_rank = IssmComm::GetRank();3607 int numprocs = IssmComm::GetSize();3608 bool *my_elements = NULL;3609 int *my_vertices = NULL;3610 3611 _assert_(newnumberofvertices>0);3612 _assert_(newnumberofelements>0);3613 epart=xNew<int>(newnumberofelements);3614 npart=xNew<int>(newnumberofvertices);3615 index=xNew<int>(elementswidth*newnumberofelements);3616 3617 for (int i=0;i<newnumberofelements;i++){3618 for (int j=0;j<elementswidth;j++){3619 *(index+elementswidth*i+j)=(*(newelementslist+elementswidth*i+j))-1; //-1 for C indexing in Metis3620 }3621 }3622 3623 /*Partition using Metis:*/3624 if (numprocs>1){3625 #ifdef _HAVE_METIS_3626 METIS_PartMeshNodalPatch(&newnumberofelements,&newnumberofvertices, index, &etype, &numflag, &numprocs, &edgecut, epart, npart);3627 #else3628 _error_("metis has not beed installed. Cannot run with more than 1 cpu");3629 #endif3630 }3631 else if (numprocs==1){3632 /*METIS does not know how to deal with one cpu only!*/3633 for (int i=0;i<newnumberofelements;i++) epart[i]=0;3634 for (int i=0;i<newnumberofvertices;i++) npart[i]=0;3635 }3636 else _error_("At least one processor is required");3637 3638 my_vertices=xNew<int>(newnumberofvertices);3639 my_elements=xNew<bool>(newnumberofelements);3640 for(int i=0;i<newnumberofvertices;i++) my_vertices[i]=0;3641 for(int i=0;i<newnumberofelements;i++) my_elements[i]=false;3642 3643 /*Start figuring out, out of the partition, which elements belong to this cpu: */3644 for(int i=0;i<newnumberofelements;i++){3645 /*!All elements have been partitioned above, only deal with elements for this cpu: */3646 if(my_rank==epart[i]){3647 my_elements[i]=true;3648 /*Now that we are here, we can also start building the list of vertices belonging to this cpu partition: we use3649 *the element index to do this. For each element n, we know index[n][0:2] holds the indices (matlab indexing)3650 into the vertices coordinates. If we start plugging 1 into my_vertices for each index[n][i] (i=0:2), then my_vertices3651 will hold which vertices belong to this partition*/3652 for(int j=0;j<elementswidth;j++){3653 _assert_(newelementslist[elementswidth*i+j]-1<newnumberofvertices);//newelementslist is in Matlab indexing3654 my_vertices[newelementslist[elementswidth*i+j]-1]=1;//newelementslist is in Matlab indexing3655 }3656 }3657 }3658 3659 /*Assign output pointers:*/3660 *pmy_elements=my_elements;3661 *pmy_vertices=my_vertices;3662 3663 /*Free ressources:*/3664 xDelete<int>(epart);3665 xDelete<int>(npart);3666 xDelete<int>(index);3667 3541 } 3668 3542 /*}}}*/ -
TabularUnified issm/trunk-jpl/src/c/classes/FemModel.h ¶
r23546 r23585 179 179 void GetMeshOnPartition(Vertices* femmodel_vertices,Elements* femmodel_elements,IssmDouble** px, IssmDouble** py, IssmDouble** pz, int** pelementslist,int** psidtoindex); 180 180 void GetGroundediceLevelSet(IssmDouble** pmasklevelset); 181 void CreateVertices(int newnumberofvertices,int newnumberofelements,int elementswidth,int* newelementslist,int* my_vertices,IssmDouble* newx,IssmDouble* newy,IssmDouble* newz,Vertices* vertices);182 181 void CreateElements(int newnumberofelements,int elementswidth,int* newelementslist,bool* my_elements,Elements* elements); 183 182 void CreateMaterials(int newnumberofelements,bool* my_elements,Materials* materials); 184 void CreateNodes(int newnumberofvertices,int* my_vertices,int analysis_enum,Nodes* nodes);185 183 void CreateConstraints(Vertices* newfemmodel_vertices,int analysis_enum,Constraints* newfemmodel_constraints); 186 184 void GetInputs(int* pnumP0inputs,IssmDouble** pP0inputs,int** pP0input_enums,int** pP0input_interp,int* pnumP1inputs,IssmDouble** pP1inputs,int** pP1input_enums,int** pP1input_interp); 187 185 void InterpolateInputs(Vertices* newfemmodel_vertices,Elements* newfemmodel_elements); 188 186 void UpdateElements(int newnumberofelements,int* newelementslist,bool* my_elements,int analysis_counter,Elements* newelements); 189 void ElementsAndVerticesPartitioning(int& newnumberofvertices,int& newnumberofelements,int& elementswidth,int* newelementslist,bool** pmy_elements,int** pmy_vertices);190 187 void WriteMeshInResults(void); 191 188 void WriteErrorEstimatorsInResults(void); -
TabularUnified issm/trunk-jpl/src/c/classes/Node.cpp ¶
r23561 r23585 21 21 } 22 22 /*}}}*/ 23 Node::Node(int node_id,int node_sid,int node_lid,int node_pid,int io_index,bool isclone,IoModel* iomodel,int analysis_enum,int in_approximation ){/*{{{*/23 Node::Node(int node_id,int node_sid,int node_lid,int node_pid,int io_index,bool isclone,IoModel* iomodel,int analysis_enum,int in_approximation,bool isamr){/*{{{*/ 24 24 25 25 /*Intermediary*/ … … 51 51 else 52 52 this->approximation=0; 53 54 /*Stop here if AMR*/ 55 if(isamr) return; 53 56 54 57 /*Stressbalance Horiz*/ -
TabularUnified issm/trunk-jpl/src/c/classes/Node.h ¶
r23561 r23585 41 41 /*Node constructors, destructors*/ 42 42 Node(); 43 Node(int node_id,int node_sid,int node_lid,int node_pid,int io_index,bool isclone,IoModel* iomodel,int analysis_enum,int approximation_in );43 Node(int node_id,int node_sid,int node_lid,int node_pid,int io_index,bool isclone,IoModel* iomodel,int analysis_enum,int approximation_in,bool isamr); 44 44 ~Node(); 45 45 -
TabularUnified issm/trunk-jpl/src/c/classes/Vertex.cpp ¶
r23523 r23585 20 20 } 21 21 /*}}}*/ 22 Vertex::Vertex(int vertex_id, int vertex_sid,int vertex_lid,int vertex_pid,bool vertex_clone, IoModel* iomodel ){/*{{{*/22 Vertex::Vertex(int vertex_id, int vertex_sid,int vertex_lid,int vertex_pid,bool vertex_clone, IoModel* iomodel,bool isamr){/*{{{*/ 23 23 24 24 /*Checks in debugging mode*/ … … 26 26 27 27 /*IDs*/ 28 this->id = vertex_id;29 this->sid = vertex_sid;30 this->pid = vertex_pid;31 this->lid = vertex_lid;28 this->id = vertex_id; 29 this->sid = vertex_sid; 30 this->pid = vertex_pid; 31 this->lid = vertex_lid; 32 32 this->clone = vertex_clone; 33 33 34 /*Coordinates*/ 35 _assert_(iomodel->Data("md.mesh.x") && iomodel->Data("md.mesh.y") && iomodel->Data("md.mesh.z")); 36 this->x = iomodel->Data("md.mesh.x")[vertex_sid]; 37 this->y = iomodel->Data("md.mesh.y")[vertex_sid]; 38 this->z = iomodel->Data("md.mesh.z")[vertex_sid]; 34 /*Properties from iomodel*/ 35 _assert_(iomodel->numbernodetoelementconnectivity); 36 this->connectivity = iomodel->numbernodetoelementconnectivity[vertex_sid]; 39 37 this->domaintype = iomodel->domaintype; 40 if(iomodel->Data("md.mesh.lat") && iomodel->Data("md.mesh.long")){ 41 this->latitute = iomodel->Data("md.mesh.lat")[vertex_sid]; 42 this->longitude = iomodel->Data("md.mesh.long")[vertex_sid]; 43 } 44 45 switch(iomodel->domaintype){ 46 case Domain3DEnum: 47 _assert_(iomodel->Data("md.geometry.base") && iomodel->Data("md.geometry.thickness")); 48 this->sigma = (iomodel->Data("md.mesh.z")[vertex_sid]-iomodel->Data("md.geometry.base")[vertex_sid])/(iomodel->Data("md.geometry.thickness")[vertex_sid]); 49 break; 50 case Domain3DsurfaceEnum: 51 _assert_(iomodel->Data("md.mesh.lat") && iomodel->Data("md.mesh.long") && iomodel->Data("md.mesh.r")); 38 39 /*Coordinates, only if not AMR*/ 40 if(!isamr){ 41 _assert_(iomodel->Data("md.mesh.x") && iomodel->Data("md.mesh.y") && iomodel->Data("md.mesh.z")); 42 this->x = iomodel->Data("md.mesh.x")[vertex_sid]; 43 this->y = iomodel->Data("md.mesh.y")[vertex_sid]; 44 this->z = iomodel->Data("md.mesh.z")[vertex_sid]; 45 if(iomodel->Data("md.mesh.lat") && iomodel->Data("md.mesh.long")){ 52 46 this->latitute = iomodel->Data("md.mesh.lat")[vertex_sid]; 53 47 this->longitude = iomodel->Data("md.mesh.long")[vertex_sid]; 54 this->R = iomodel->Data("md.mesh.r")[vertex_sid]; 55 break; 56 case Domain2DhorizontalEnum: 57 this->sigma = 0.; 58 break; 59 case Domain2DverticalEnum: 60 _assert_(iomodel->Data("md.geometry.base") && iomodel->Data("md.geometry.thickness")); 61 this->sigma = (iomodel->Data("md.mesh.y")[vertex_sid]-iomodel->Data("md.geometry.base")[vertex_sid])/(iomodel->Data("md.geometry.thickness")[vertex_sid]); 62 break; 63 } 64 65 _assert_(iomodel->numbernodetoelementconnectivity); 66 this->connectivity = iomodel->numbernodetoelementconnectivity[vertex_sid]; 48 } 49 50 switch(iomodel->domaintype){ 51 case Domain3DEnum: 52 _assert_(iomodel->Data("md.geometry.base") && iomodel->Data("md.geometry.thickness")); 53 this->sigma = (iomodel->Data("md.mesh.z")[vertex_sid]-iomodel->Data("md.geometry.base")[vertex_sid])/(iomodel->Data("md.geometry.thickness")[vertex_sid]); 54 break; 55 case Domain3DsurfaceEnum: 56 _assert_(iomodel->Data("md.mesh.lat") && iomodel->Data("md.mesh.long") && iomodel->Data("md.mesh.r")); 57 this->latitute = iomodel->Data("md.mesh.lat")[vertex_sid]; 58 this->longitude = iomodel->Data("md.mesh.long")[vertex_sid]; 59 this->R = iomodel->Data("md.mesh.r")[vertex_sid]; 60 break; 61 case Domain2DhorizontalEnum: 62 this->sigma = 0.; 63 break; 64 case Domain2DverticalEnum: 65 _assert_(iomodel->Data("md.geometry.base") && iomodel->Data("md.geometry.thickness")); 66 this->sigma = (iomodel->Data("md.mesh.y")[vertex_sid]-iomodel->Data("md.geometry.base")[vertex_sid])/(iomodel->Data("md.geometry.thickness")[vertex_sid]); 67 break; 68 } 69 } 70 else{ 71 this->x = 0.; 72 this->y = 0.; 73 this->z = 0.; 74 this->latitute = 0.; 75 this->longitude = 0.; 76 this->R = 0.; 77 this->sigma = 0.; 78 } 67 79 68 80 }/*}}}*/ -
TabularUnified issm/trunk-jpl/src/c/classes/Vertex.h ¶
r23522 r23585 37 37 /*Vertex constructors, destructors {{{*/ 38 38 Vertex(); 39 Vertex(int id, int sid,int lid,int pid,bool clone, IoModel* iomodel );39 Vertex(int id, int sid,int lid,int pid,bool clone, IoModel* iomodel,bool isamr); 40 40 ~Vertex(); 41 41 /*}}}*/ -
TabularUnified issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateElementsVerticesAndMaterials.cpp ¶
r23582 r23585 7 7 #include "../../shared/shared.h" 8 8 #include "./ModelProcessorx.h" 9 10 #define MAXCONNECTIVITY 5 11 12 bool IsVertexInRank(int* vertices_ranks,int* vertices_proc_count,int vid,int rank){/*{{{*/ 13 14 /*See if node is already in partition*/ 15 for(int k=0;k<vertices_proc_count[vid];k++){ 16 if(vertices_ranks[MAXCONNECTIVITY*vid+k] == rank) return true; 17 } 18 19 return false; 20 }/*}}}*/ 21 int VertexMasterRank(int* vertices_ranks,int vid){/*{{{*/ 22 return vertices_ranks[MAXCONNECTIVITY*vid+0]; 23 }/*}}}*/ 24 void AddVertexToRank(int* vertices_ranks,int* vertices_proc_count,int vid,int rank){/*{{{*/ 25 26 /*See if node is already in partition, return if this is the case*/ 27 if(IsVertexInRank(vertices_ranks,vertices_proc_count,vid,rank)) return; 28 29 /*This rank has not been marked for this node just yet so go ahead and add it*/ 30 vertices_ranks[MAXCONNECTIVITY*vid+vertices_proc_count[vid]] = rank; 31 vertices_proc_count[vid]++; 32 }/*}}}*/ 9 33 10 34 void CreateElements(Elements* elements,IoModel* iomodel,const int nummodels){/*{{{*/ … … 235 259 236 260 }/*}}}*/ 237 void CreateVertices(Elements* elements,Vertices* vertices,IoModel* iomodel,int solution_type){/*{{{*/ 238 239 /*Fetch parameters: */ 240 bool isoceancoupling; 241 iomodel->FindConstant(&isoceancoupling,"md.transient.isoceancoupling"); 242 243 /*Fetch data that will be used by the Vertex Constructor*/ 244 iomodel->FetchData(6,"md.mesh.x","md.mesh.y","md.mesh.z","md.geometry.base","md.geometry.thickness","md.mask.ice_levelset"); 245 if (iomodel->domaintype == Domain3DsurfaceEnum) iomodel->FetchData(3,"md.mesh.lat","md.mesh.long","md.mesh.r"); 246 else iomodel->FetchDataToInput(elements,"md.mesh.scale_factor",MeshScaleFactorEnum,1.); 247 if (isoceancoupling) iomodel->FetchData(2,"md.mesh.lat","md.mesh.long"); 248 if (solution_type!=LoveSolutionEnum) CreateNumberNodeToElementConnectivity(iomodel); 249 250 const int MAXCONNECTIVITY = 5; 251 int* epart = iomodel->epart; 261 void CreateVertices(Elements* elements,Vertices* vertices,IoModel* iomodel,int solution_type,bool isamr){/*{{{*/ 262 263 264 /*Get element partitionning*/ 265 int* epart = iomodel->epart; 252 266 253 267 /*Determine element width*/ … … 271 285 int* vertices_proc_count = xNewZeroInit<int>(iomodel->numberofvertices); 272 286 273 /*Create vector of size total nbv, initialized with -1, that will keep track of local ids*/274 int* vertices_lids = xNew<int>(iomodel->numberofvertices);275 for(int i=0;i<iomodel->numberofvertices;i++) vertices_lids[i] = -1;276 277 287 /*Go through all elements and mark all vertices for all partitions*/ 278 int lid = 0;279 288 for(int i=0;i<iomodel->numberofelements;i++){ 280 289 for(int j=0;j<elements_width;j++){ 281 282 290 /*Get current vertex sid*/ 283 291 int vid = iomodel->elements[elements_width*i+j]-1; 284 285 /*See if it has already been marked*/ 286 bool found = false; 287 for(int k=0;k<vertices_proc_count[vid];k++){ 288 if(vertices_ranks[MAXCONNECTIVITY*vid+k] == epart[i]){ 289 found = true; 290 break; 291 } 292 } 293 294 /*On go below if this vertex has not been seen yet in this partition*/ 295 if(!found){ 296 /*This rank has not been marked for this vertex just yet so go ahead and mark it*/ 297 vertices_ranks[MAXCONNECTIVITY*vid+vertices_proc_count[vid]] = epart[i]; 298 vertices_proc_count[vid]++; 299 300 /*Keep track of local ids!*/ 301 if(epart[i]==my_rank){ 302 vertices_lids[vid] = lid; 303 lid++; 304 } 305 306 /*Make sure we don't go too far in the table*/ 307 if(vertices_proc_count[vid]>MAXCONNECTIVITY) _error_("need to increase MAXCONNECTIVITY (this is hard coded, contact ISSM developer)"); 308 } 292 AddVertexToRank(vertices_ranks,vertices_proc_count,vid,epart[i]); 293 } 294 } 295 296 /*Create vector of size total numnodes, initialized with -1, that will keep track of local ids*/ 297 int lid = 0; 298 int* vertices_lids = xNew<int>(iomodel->numberofvertices); 299 for(int i=0;i<iomodel->numberofvertices;i++){ 300 if(IsVertexInRank(vertices_ranks,vertices_proc_count,i,my_rank)){ 301 vertices_lids[i] = lid++; 302 } 303 else{ 304 vertices_lids[i] = -1; 309 305 } 310 306 } … … 377 373 } 378 374 } 379 xDelete<int>(vertices_proc_count);380 375 381 376 /*Final step: prepare pids (parallel ids), first count number of masters for each proc*/ … … 401 396 xDelete<int>(rank_offsets); 402 397 403 /*Go ahead and create vertices now that we have all we need*/ 404 for(int i=0;i<iomodel->numberofvertices;i++){ 405 if(vertices_lids[i]!=-1){ 406 bool isclone = (vertices_ranks[MAXCONNECTIVITY*i+0]!=my_rank); 407 vertices->AddObject(new Vertex(i+1,i,vertices_lids[i],vertices_pids[i],isclone,iomodel)); 408 } 409 } 410 xDelete<int>(vertices_ranks); 398 /*Create Vertices, depending on the constructor type: */ 399 if(solution_type!=LoveSolutionEnum) CreateNumberNodeToElementConnectivity(iomodel); 400 if(!isamr){ 401 bool isoceancoupling; 402 iomodel->FindConstant(&isoceancoupling,"md.transient.isoceancoupling"); 403 404 iomodel->FetchData(6,"md.mesh.x","md.mesh.y","md.mesh.z","md.geometry.base","md.geometry.thickness","md.mask.ice_levelset"); 405 if (iomodel->domaintype == Domain3DsurfaceEnum) iomodel->FetchData(3,"md.mesh.lat","md.mesh.long","md.mesh.r"); 406 else iomodel->FetchDataToInput(elements,"md.mesh.scale_factor",MeshScaleFactorEnum,1.); 407 if (isoceancoupling) iomodel->FetchData(2,"md.mesh.lat","md.mesh.long"); 408 409 for(int i=0;i<iomodel->numberofvertices;i++){ 410 if(vertices_lids[i]!=-1){ 411 bool isclone = (vertices_ranks[MAXCONNECTIVITY*i+0]!=my_rank); 412 vertices->AddObject(new Vertex(i+1,i,vertices_lids[i],vertices_pids[i],isclone,iomodel,isamr)); 413 } 414 } 415 416 /*Free data: */ 417 iomodel->DeleteData(6,"md.mesh.x","md.mesh.y","md.mesh.z","md.geometry.base","md.geometry.thickness","md.mask.ice_levelset"); 418 if (iomodel->domaintype == Domain3DsurfaceEnum) iomodel->DeleteData(3,"md.mesh.lat","md.mesh.long","md.mesh.r"); 419 if (isoceancoupling) iomodel->DeleteData(2,"md.mesh.lat","md.mesh.long"); 420 } 421 else{ 422 for(int i=0;i<iomodel->numberofvertices;i++){ 423 if(vertices_lids[i]!=-1){ 424 bool isclone = (vertices_ranks[MAXCONNECTIVITY*i+0]!=my_rank); 425 vertices->AddObject(new Vertex(i+1,i,vertices_lids[i],vertices_pids[i],isclone,iomodel,isamr)); 426 } 427 } 428 } 429 411 430 xDelete<int>(vertices_lids); 412 431 xDelete<int>(vertices_pids); 413 432 433 /*Final step, create my_vertices*/ 434 _assert_(!iomodel->my_vertices); 435 iomodel->my_vertices = xNew<bool>(iomodel->numberofvertices); 436 for(int i=0;i<iomodel->numberofvertices;i++){ 437 if(IsVertexInRank(vertices_ranks,vertices_proc_count,i,my_rank)){ 438 iomodel->my_vertices[i] = true; 439 } 440 else{ 441 iomodel->my_vertices[i] = false; 442 } 443 } 444 414 445 /*Free data: */ 415 iomodel->DeleteData(6,"md.mesh.x","md.mesh.y","md.mesh.z","md.geometry.base","md.geometry.thickness","md.mask.ice_levelset");416 if (iomodel->domaintype == Domain3DsurfaceEnum) iomodel->DeleteData(3,"md.mesh.lat","md.mesh.long","md.mesh.r");417 if (isoceancoupling) iomodel->DeleteData(2,"md.mesh.lat","md.mesh.long"); 418 446 xDelete<int>(vertices_ranks); 447 xDelete<int>(vertices_proc_count); 448 449 /*Assign communicators*/ 419 450 vertices->common_send=common_send; 420 451 vertices->common_recv=common_recv; -
TabularUnified issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateNodes.cpp ¶
r23584 r23585 33 33 }/*}}}*/ 34 34 35 void CreateNodes(Nodes* nodes, IoModel* iomodel,int analysis,int finite_element, int approximation,int* approximations){35 void CreateNodes(Nodes* nodes, IoModel* iomodel,int analysis,int finite_element,bool isamr,int approximation,int* approximations){ 36 36 37 37 /*Intermediaries*/ … … 538 538 }/*}}}*/ 539 539 /*Vertex pairing for stressbalance{{{*/ 540 if( analysis==StressbalanceAnalysisEnum || analysis==StressbalanceVerticalAnalysisEnum){540 if(!isamr & (analysis==StressbalanceAnalysisEnum || analysis==StressbalanceVerticalAnalysisEnum)){ 541 541 int *vertex_pairing = NULL; 542 542 int numvertex_pairing; 543 543 iomodel->FetchData(&vertex_pairing,&numvertex_pairing,NULL,"md.stressbalance.vertex_pairing"); 544 _assert_(numvertex_pairing==0 || finite_element==P1Enum); 545 for(int i=0;i<numvertex_pairing;i++){ 546 int nid1 = vertex_pairing[2*i+0]-1; 547 int nid2 = vertex_pairing[2*i+1]-1; 548 for(int j=0;j<nodes_proc_count[nid1];j++) AddNodeToRank(nodes_ranks,nodes_proc_count,nid2,nodes_ranks[MAXCONNECTIVITY*nid1+j]); 549 for(int j=0;j<nodes_proc_count[nid2];j++) AddNodeToRank(nodes_ranks,nodes_proc_count,nid1,nodes_ranks[MAXCONNECTIVITY*nid2+j]); 550 } 551 xDelete<int>(vertex_pairing); 552 } 553 if(!isamr & analysis==MasstransportAnalysisEnum){ 554 int *vertex_pairing = NULL; 555 int numvertex_pairing; 556 iomodel->FetchData(&vertex_pairing,&numvertex_pairing,NULL,"md.masstransport.vertex_pairing"); 544 557 _assert_(numvertex_pairing==0 || finite_element==P1Enum); 545 558 for(int i=0;i<numvertex_pairing;i++){ … … 657 670 int io_index = 0; 658 671 if(i<iomodel->numberofvertices) io_index = i; 659 Node* node=new Node(i+1,i,nodes_lids[i],nodes_pids[i],io_index,isclone,iomodel,analysis,nodes_approx[i] );672 Node* node=new Node(i+1,i,nodes_lids[i],nodes_pids[i],io_index,isclone,iomodel,analysis,nodes_approx[i],isamr); 660 673 if(finite_element==MINIcondensedEnum || finite_element==P1bubblecondensedEnum){ 661 674 /*Bubble function is collapsed, needs to constrain it, maybe this is not the best place to do this, but that's life!*/ -
TabularUnified issm/trunk-jpl/src/c/modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp ¶
r23582 r23585 81 81 } 82 82 83 /*Create my_ vertices and my_elements, used by each partition */83 /*Create my_elements, used by each partition */ 84 84 bool *my_elements = xNewZeroInit<bool>(iomodel->numberofelements); 85 bool *my_vertices = xNewZeroInit<bool>(iomodel->numberofvertices);86 85 87 86 /*Start figuring out, out of the partition, which elements belong to this cpu: */ … … 89 88 90 89 /*!All elements have been partitioned above, only deal with elements for this cpu: */ 91 if(my_rank==epart[i]){ 92 my_elements[i]=true; 93 /*Now that we are here, we can also start building the list of vertices belonging to this cpu partition: we use 94 *the element index to do this. For each element n, we know index[n][0:2] holds the indices (matlab indexing) 95 into the vertices coordinates. If we start plugging 1 into my_vertices for each index[n][i] (i=0:2), then my_vertices 96 will hold which vertices belong to this partition*/ 97 for(int j=0;j<elements_width;j++){ 98 my_vertices[iomodel->elements[elements_width*i+j]-1]=true; 99 } 100 } 90 if(my_rank==epart[i]) my_elements[i]=true; 101 91 } 102 103 /*We might have vertex_pairing in which case, some vertices have to be104 * cloned: penpair has 2 nodes that are poointing toward 2 vertices.105 * The 2 vertices must be in the same cpu as the penpair (only do this in non AMR mode, i.e. fid!=NULL)*/106 //if(!iomodel->dummy){107 int *vertex_pairing = NULL;108 iomodel->FetchData(&vertex_pairing,&numvertex_pairing,NULL,"md.stressbalance.vertex_pairing");109 for(int i=0;i<numvertex_pairing;i++){110 if(my_vertices[vertex_pairing[2*i+0]-1] && !my_vertices[vertex_pairing[2*i+1]-1]){111 my_vertices[vertex_pairing[2*i+1]-1]=true;112 }113 }114 xDelete<int>(vertex_pairing);115 iomodel->FetchData(&vertex_pairing,&numvertex_pairing,NULL,"md.masstransport.vertex_pairing");116 for(int i=0;i<numvertex_pairing;i++){117 if(my_vertices[vertex_pairing[2*i+0]-1] && !my_vertices[vertex_pairing[2*i+1]-1]){118 my_vertices[vertex_pairing[2*i+1]-1]=true;119 }120 }121 xDelete<int>(vertex_pairing);122 //}123 92 124 93 /*Assign pointers to iomodel*/ 125 94 iomodel->epart =epart; 126 95 iomodel->my_elements=my_elements; 127 iomodel->my_vertices=my_vertices;128 96 } -
TabularUnified issm/trunk-jpl/src/c/modules/ModelProcessorx/ModelProcessorx.h ¶
r23582 r23585 14 14 void CreateElements(Elements* elements,IoModel* iomodel,int nummodels); 15 15 void CreateMaterials(Elements* elements,Materials* materials,IoModel* iomodel,int nummodels); 16 void CreateVertices(Elements* elements,Vertices* vertices,IoModel* iomodel,int solution_type );16 void CreateVertices(Elements* elements,Vertices* vertices,IoModel* iomodel,int solution_type,bool isamr=false); 17 17 void CreateParameters(Parameters*parameters,IoModel* iomodel,char* rootpath,FILE* toolkitfile,const int solution_type); 18 18 void CreateParametersAutodiff(Parameters* parameters,IoModel* iomodel); … … 24 24 void UpdateElementsAndMaterialsDakota(Elements* elements,Materials* materials, IoModel* iomodel); 25 25 void UpdateElementsTransient(Elements* elements,Parameters* parameters,IoModel* iomodel); 26 void CreateNodes(Nodes*nodes, IoModel* iomodel,int analysis,int finite_element, int approximation=NoneApproximationEnum,int* approximations=NULL);26 void CreateNodes(Nodes*nodes, IoModel* iomodel,int analysis,int finite_element,bool isamr=false,int approximation=NoneApproximationEnum,int* approximations=NULL); 27 27 28 28 /*partitioning: */
Note:
See TracChangeset
for help on using the changeset viewer.