Changeset 22758 for issm/trunk/src/c/classes/FemModel.h
- Timestamp:
- 05/10/18 10:24:27 (7 years ago)
- Location:
- issm/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk
- Property svn:mergeinfo changed
-
issm/trunk/src
- Property svn:mergeinfo changed
-
issm/trunk/src/c
- Property svn:ignore
-
old new 20 20 kriging 21 21 issm_slr 22 issm_ocean 23 lnb_param.mod 24 lovenb_sub.mod 25 model.mod 26 util.mod
-
- Property svn:ignore
-
issm/trunk/src/c/classes/FemModel.h
r21729 r22758 20 20 class Profiler; 21 21 class Elements; 22 #if def _HAVE_NEOPZ_22 #if defined(_HAVE_NEOPZ_) && !defined(_HAVE_ADOLC_) 23 23 #include "./AdaptiveMeshRefinement.h" 24 #endif 25 #if defined(_HAVE_BAMG_) && !defined(_HAVE_ADOLC_) 26 #include "./AmrBamg.h" 24 27 #endif 25 28 /*}}}*/ … … 47 50 Vertices *vertices; //one set of vertices 48 51 49 #ifdef _HAVE_NEOPZ_ 52 //FIXME: do we want only one class and have virtual functions? or keep 2 classes, at least rename AdaptiveMeshRefinement -> AmrNeopz 53 #if defined(_HAVE_NEOPZ_) && !defined(_HAVE_ADOLC_) 50 54 AdaptiveMeshRefinement *amr; //adaptive mesh refinement object. It keeps coarse mesh and execute refinement process 55 #endif 56 57 #if defined(_HAVE_BAMG_) && !defined(_HAVE_ADOLC_) 58 AmrBamg *amrbamg; //adaptive mesh refinement object. It keeps coarse mesh and execute refinement process 51 59 #endif 52 60 … … 61 69 FemModel* copy(); 62 70 void Echo(); 71 int GetElementsWidth(){return 3;};//just tria elements in this first version 63 72 void InitFromFiles(char* rootpath, char* inputfilename, char* outputfilename, char* petscfilename, char* lockfilename, char* restartfilename, const int solution_type,bool trace,IssmPDouble* X=NULL); 64 73 void InitFromFids(char* rootpath, FILE* IOMODEL, FILE* toolkitsoptionsfid, int in_solution_type, bool trace, IssmPDouble* X=NULL); … … 73 82 /*Modules*/ 74 83 void BalancethicknessMisfitx(IssmDouble* pV); 75 void CalvingRate Devx();84 void CalvingRateVonmisesx(); 76 85 void CalvingRateLevermannx(); 77 86 void DeviatoricStressx(); … … 79 88 void ElementOperationx(void (Element::*function)(void)); 80 89 void ElementResponsex(IssmDouble* presponse,int response_enum); 81 void FloatingAreax(IssmDouble* pV );90 void FloatingAreax(IssmDouble* pV, bool scaled); 82 91 void GetInputLocalMinMaxOnNodesx(IssmDouble** pmin,IssmDouble** pmax,IssmDouble* ug); 83 void GroundedAreax(IssmDouble* pV );84 void IceMassx(IssmDouble* pV );85 void IceVolumex(IssmDouble* pV );86 void IceVolumeAboveFloatationx(IssmDouble* pV );92 void GroundedAreax(IssmDouble* pV, bool scaled); 93 void IceMassx(IssmDouble* pV, bool scaled); 94 void IceVolumex(IssmDouble* pV, bool scaled); 95 void IceVolumeAboveFloatationx(IssmDouble* pV, bool scaled); 87 96 void MassFluxx(IssmDouble* presponse); 88 97 void MaxAbsVxx(IssmDouble* presponse); … … 98 107 void MinVyx(IssmDouble* presponse); 99 108 void MinVzx(IssmDouble* presponse); 109 void DistanceToFieldValue(int fieldenum,IssmDouble fieldvalue,int distanceenum); 100 110 void ResetLevelset(); 101 111 void StrainRateparallelx(); 102 112 void StrainRateperpendicularx(); 113 void StrainRateeffectivex(); 103 114 void StressIntensityFactorx(); 104 void TotalFloatingBmbx(IssmDouble* pFbmb );105 void TotalGroundedBmbx(IssmDouble* pGbmb );106 void TotalSmbx(IssmDouble* pSmb );115 void TotalFloatingBmbx(IssmDouble* pFbmb, bool scaled); 116 void TotalGroundedBmbx(IssmDouble* pGbmb, bool scaled); 117 void TotalSmbx(IssmDouble* pSmb, bool scaled); 107 118 #ifdef _HAVE_DAKOTA_ 108 119 void DakotaResponsesx(double* d_responses,char** responses_descriptors,int numresponsedescriptors,int d_numresponses); … … 116 127 void Responsex(IssmDouble* presponse,const char* response_descriptor); 117 128 void SurfaceAbsMisfitx( IssmDouble* pJ); 129 void OmegaAbsGradientx( IssmDouble* pJ); 130 void EtaDiffx( IssmDouble* pJ); 118 131 void ThicknessAbsGradientx( IssmDouble* pJ); 119 132 void ThicknessPositivex(IssmDouble* pJ); … … 122 135 #endif 123 136 #ifdef _HAVE_ESA_ 124 void EsaGeodetic2D(Vector<IssmDouble>* pUp, Vector<IssmDouble>* pNorth, Vector<IssmDouble>* pEast, IssmDouble* xx, IssmDouble* yy);137 void EsaGeodetic2D(Vector<IssmDouble>* pUp, Vector<IssmDouble>* pNorth, Vector<IssmDouble>* pEast, Vector<IssmDouble>* pX, Vector<IssmDouble>* pY, IssmDouble* xx, IssmDouble* yy); 125 138 void EsaGeodetic3D(Vector<IssmDouble>* pUp, Vector<IssmDouble>* pNorth, Vector<IssmDouble>* pEast, IssmDouble* latitude, IssmDouble* longitude, IssmDouble* radius, IssmDouble* xx, IssmDouble* yy, IssmDouble* zz); 126 139 #endif … … 128 141 void SealevelriseEustatic(Vector<IssmDouble>* pSgi, IssmDouble* peustatic, IssmDouble* latitude, IssmDouble* longitude, IssmDouble* radius); 129 142 void SealevelriseNonEustatic(Vector<IssmDouble>* pSgo, Vector<IssmDouble>* pSg_old, IssmDouble* latitude, IssmDouble* longitude, IssmDouble* radius,bool verboseconvolution); 130 void SealevelriseRotationalFeedback(Vector<IssmDouble>* pSgo_rot, Vector<IssmDouble>* pSg_old, IssmDouble* latitude, IssmDouble* longitude, IssmDouble* radius);143 void SealevelriseRotationalFeedback(Vector<IssmDouble>* pSgo_rot, Vector<IssmDouble>* pSg_old, IssmDouble* pIxz, IssmDouble* pIyz, IssmDouble* pIzz, IssmDouble* latitude, IssmDouble* longitude, IssmDouble* radius); 131 144 void SealevelriseGeodetic(Vector<IssmDouble>* pUp, Vector<IssmDouble>* pNorth, Vector<IssmDouble>* pEast, Vector<IssmDouble>* pSg_old, IssmDouble* latitude, IssmDouble* longitude, IssmDouble* radius, IssmDouble* xx, IssmDouble* yy, IssmDouble* zz); 132 145 IssmDouble SealevelriseOceanAverage(Vector<IssmDouble>* Sg); … … 137 150 void UpdateConstraintsExtrudeFromTopx(); 138 151 void UpdateConstraintsL2ProjectionEPLx(IssmDouble* pL2count); 152 void InitTransientOutputx(int* input_enum, int numoutputs); 153 void StackTransientOutputx(int* input_enum,int* stackedinput_enum, IssmDouble hydrotime, int numoutputs); 154 void AverageTransientOutputx(int* input_enum,int* averagedinput_enum,IssmDouble hydrotime,int numoutputs); 139 155 void UpdateConstraintsx(void); 140 156 int UpdateVertexPositionsx(void); … … 146 162 #endif 147 163 148 #ifdef _HAVE_NEOPZ_ 149 /*Adaptive mesh refinement methods*/ 150 void InitializeAdaptiveRefinement(void); 164 /*AMR*/ 165 #if !defined(_HAVE_ADOLC_) 151 166 void ReMesh(void); 152 167 void BedrockFromMismipPlus(void); 153 168 void AdjustBaseThicknessAndMask(void); 154 169 void GetMesh(Vertices* femmodel_vertices,Elements* femmodel_elements,IssmDouble** px, IssmDouble** py, IssmDouble** pz, int** pelementslist); 155 int GetElementsWidth(){return 3;};//just tria elements in this first version 156 void ExecuteRefinement(int &numberofvertices,int &numberofelements,IssmDouble** px,IssmDouble** py,IssmDouble** pz,int** pelementslist); 170 void GetMeshOnPartition(Vertices* femmodel_vertices,Elements* femmodel_elements,IssmDouble** px, IssmDouble** py, IssmDouble** pz, int** pelementslist,int** psidtoindex); 157 171 void GetGroundediceLevelSet(IssmDouble** pmasklevelset); 158 172 void CreateVertices(int newnumberofvertices,int newnumberofelements,int elementswidth,int* newelementslist,int* my_vertices,IssmDouble* newx,IssmDouble* newy,IssmDouble* newz,Vertices* vertices); … … 160 174 void CreateMaterials(int newnumberofelements,bool* my_elements,Materials* materials); 161 175 void CreateNodes(int newnumberofvertices,int* my_vertices,int nodecounter,int analysis_enum,Nodes* nodes); 162 void CreateConstraints(int newnumberofvertices,int newnumberofelements,int nodecounter,int constraintcounter,IssmDouble* newx,IssmDouble* newy,int* my_vertices,Constraints* constraints); 176 void CreateConstraints(Vertices* newfemmodel_vertices,int nodecounter,int constraintcounter,int analysis_enum,Constraints* newfemmodel_constraints); 177 void GetInputs(int* pnumP0inputs,IssmDouble** pP0inputs,int** pP0input_enums,int** pP0input_interp,int* pnumP1inputs,IssmDouble** pP1inputs,int** pP1input_enums,int** pP1input_interp); 163 178 void InterpolateInputs(Vertices* newfemmodel_vertices,Elements* newfemmodel_elements); 164 179 void UpdateElements(int newnumberofelements,int* newelementslist,bool* my_elements,int nodecounter,int analysis_counter,Elements* newelements); 165 180 void ElementsAndVerticesPartitioning(int& newnumberofvertices,int& newnumberofelements,int& elementswidth,int* newelementslist,bool** pmy_elements,int** pmy_vertices); 166 181 void WriteMeshInResults(void); 182 void WriteErrorEstimatorsInResults(void); 183 void SmoothedDeviatoricStressTensor(IssmDouble** ptauxx,IssmDouble** ptauyy,IssmDouble** ptauxy); //nodal values, just for SSA-P1: TauXX, TauYY, TauXY 184 void ZZErrorEstimator(IssmDouble** pelementerror); 185 void SmoothedGradThickness(IssmDouble** pdHdx,IssmDouble** pdHdy); 186 void ThicknessZZErrorEstimator(IssmDouble** pelementerror); 187 void MeanGroundedIceLevelSet(IssmDouble** pmasklevelset); 188 void GetElementCenterCoordinates(IssmDouble** pxc,IssmDouble** pyc); 189 void GetZeroLevelSetPoints(IssmDouble** pzerolevelset_points,int &numberofpoints,int levelset_type); 190 #endif 191 192 #if defined(_HAVE_BAMG_) && !defined(_HAVE_ADOLC_) 193 void ReMeshBamg(int* pnewnumberofvertices,int* pnewnumberofelements,IssmDouble** pnewx,IssmDouble** pnewy,IssmDouble** pnewz,int** pnewelementslist); 194 void InitializeAdaptiveRefinementBamg(void); 195 void GethmaxVerticesFromZeroLevelSetDistance(IssmDouble* hmaxvertices,int levelset_type); 196 void GethmaxVerticesFromEstimators(IssmDouble* hmaxvertices,int errorestimator_type); 197 void GetVerticeDistanceToZeroLevelSet(IssmDouble** pverticedistance,int leveset_type); 198 #endif 199 200 #if defined(_HAVE_NEOPZ_) && !defined(_HAVE_ADOLC_) 201 void ReMeshNeopz(int* pnewnumberofvertices,int* pnewnumberofelements,IssmDouble** pnewx,IssmDouble** pnewy,IssmDouble** pnewz,int** pnewelementslist); 202 void InitializeAdaptiveRefinementNeopz(void); 203 void GetElementDistanceToZeroLevelSet(IssmDouble** pelementdistance,int levelset_type); 167 204 void SetRefPatterns(void); 168 205 #endif 169 206 }; 170 171 207 172 208 #endif
Note:
See TracChangeset
for help on using the changeset viewer.