Ignore:
Timestamp:
05/10/18 10:24:27 (7 years ago)
Author:
Mathieu Morlighem
Message:

merged trunk-jpl and trunk for revision 22757

Location:
issm/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk

  • issm/trunk/src

  • issm/trunk/src/c

    • Property svn:ignore
      •  

        old new  
        2020kriging
        2121issm_slr
         22issm_ocean
         23lnb_param.mod
         24lovenb_sub.mod
         25model.mod
         26util.mod
  • issm/trunk/src/c/classes/FemModel.h

    r21729 r22758  
    2020class Profiler;
    2121class Elements;
    22 #ifdef _HAVE_NEOPZ_
     22#if defined(_HAVE_NEOPZ_) && !defined(_HAVE_ADOLC_)
    2323#include "./AdaptiveMeshRefinement.h"
     24#endif
     25#if defined(_HAVE_BAMG_) && !defined(_HAVE_ADOLC_)
     26#include "./AmrBamg.h"
    2427#endif
    2528/*}}}*/
     
    4750                Vertices    *vertices;             //one set of vertices
    4851
    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_)
    5054                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
    5159                #endif
    5260
     
    6169                FemModel* copy();
    6270                void Echo();
     71                int  GetElementsWidth(){return 3;};//just tria elements in this first version
    6372                void InitFromFiles(char* rootpath, char* inputfilename, char* outputfilename, char* petscfilename, char* lockfilename, char* restartfilename, const int solution_type,bool trace,IssmPDouble* X=NULL);
    6473                void InitFromFids(char* rootpath, FILE* IOMODEL, FILE* toolkitsoptionsfid, int in_solution_type, bool trace, IssmPDouble* X=NULL);
     
    7382                /*Modules*/
    7483                void BalancethicknessMisfitx(IssmDouble* pV);
    75                 void CalvingRateDevx();
     84                void CalvingRateVonmisesx();
    7685                void CalvingRateLevermannx();
    7786                void DeviatoricStressx();
     
    7988                void ElementOperationx(void (Element::*function)(void));
    8089                void ElementResponsex(IssmDouble* presponse,int response_enum);
    81                 void FloatingAreax(IssmDouble* pV);
     90                void FloatingAreax(IssmDouble* pV, bool scaled);
    8291                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);
    8796                void MassFluxx(IssmDouble* presponse);
    8897                void MaxAbsVxx(IssmDouble* presponse);
     
    98107                void MinVyx(IssmDouble* presponse);
    99108                void MinVzx(IssmDouble* presponse);
     109                void DistanceToFieldValue(int fieldenum,IssmDouble fieldvalue,int distanceenum);
    100110                void ResetLevelset();
    101111                void StrainRateparallelx();
    102112                void StrainRateperpendicularx();
     113                void StrainRateeffectivex();
    103114                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);
    107118                #ifdef  _HAVE_DAKOTA_
    108119                void DakotaResponsesx(double* d_responses,char** responses_descriptors,int numresponsedescriptors,int d_numresponses);
     
    116127                void Responsex(IssmDouble* presponse,const char* response_descriptor);
    117128                void SurfaceAbsMisfitx( IssmDouble* pJ);
     129                void OmegaAbsGradientx( IssmDouble* pJ);
     130                void EtaDiffx( IssmDouble* pJ);
    118131                void ThicknessAbsGradientx( IssmDouble* pJ);
    119132                void ThicknessPositivex(IssmDouble* pJ);
     
    122135                #endif
    123136                #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);
    125138                void EsaGeodetic3D(Vector<IssmDouble>* pUp, Vector<IssmDouble>* pNorth, Vector<IssmDouble>* pEast, IssmDouble* latitude, IssmDouble* longitude, IssmDouble* radius, IssmDouble* xx, IssmDouble* yy, IssmDouble* zz);
    126139                #endif
     
    128141                void SealevelriseEustatic(Vector<IssmDouble>* pSgi, IssmDouble* peustatic, IssmDouble* latitude, IssmDouble* longitude, IssmDouble* radius);
    129142                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);
    131144                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);
    132145                IssmDouble SealevelriseOceanAverage(Vector<IssmDouble>* Sg);
     
    137150                void UpdateConstraintsExtrudeFromTopx();
    138151                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);
    139155                void UpdateConstraintsx(void);
    140156                int  UpdateVertexPositionsx(void);
     
    146162                #endif
    147163
    148                 #ifdef _HAVE_NEOPZ_
    149                 /*Adaptive mesh refinement methods*/
    150                 void InitializeAdaptiveRefinement(void);
     164                /*AMR*/
     165                #if !defined(_HAVE_ADOLC_)
    151166                void ReMesh(void);
    152167                void BedrockFromMismipPlus(void);
    153168                void AdjustBaseThicknessAndMask(void);
    154169                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);
    157171                void GetGroundediceLevelSet(IssmDouble** pmasklevelset);
    158172                void CreateVertices(int newnumberofvertices,int newnumberofelements,int elementswidth,int* newelementslist,int* my_vertices,IssmDouble* newx,IssmDouble* newy,IssmDouble* newz,Vertices* vertices);
     
    160174                void CreateMaterials(int newnumberofelements,bool* my_elements,Materials* materials);
    161175                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);
    163178                void InterpolateInputs(Vertices* newfemmodel_vertices,Elements* newfemmodel_elements);
    164179                void UpdateElements(int newnumberofelements,int* newelementslist,bool* my_elements,int nodecounter,int analysis_counter,Elements* newelements);
    165180                void ElementsAndVerticesPartitioning(int& newnumberofvertices,int& newnumberofelements,int& elementswidth,int* newelementslist,bool** pmy_elements,int** pmy_vertices);
    166181                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);
    167204                void SetRefPatterns(void);
    168205                #endif
    169206};
    170                
    171207
    172208#endif
Note: See TracChangeset for help on using the changeset viewer.