Changeset 21487


Ignore:
Timestamp:
01/12/17 14:34:05 (8 years ago)
Author:
tsantos
Message:

CHG: cosmetics

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/classes/AdaptiveMeshRefinement.h

    r21484 r21487  
    22#define ADAPTIVEMESHREFINEMENT
    33
     4/*Common includes*/
     5/*{{{*/
    46#include <iostream>
    57#include <fstream>
    68#include <string>
    79
    8 #include "pzsave.h"
    9 #include "pzgmesh.h"
    10 #include "pzreal.h"
    11 #include "pzvec.h"
    12 #include "pzeltype.h"
     10/*NeoPZ includes*/
     11#include <pzsave.h>
     12#include <pzgmesh.h>
     13#include <pzreal.h>
     14#include <pzvec.h>
     15#include <pzeltype.h>
    1316
    14 #include "TPZRefPatternTools.h"
    15 #include "TPZRefPatternDataBase.h"
    16 #include "TPZRefPattern.h"
     17#include <TPZRefPatternTools.h>
     18#include <TPZRefPatternDataBase.h>
     19#include <TPZRefPattern.h>
    1720
    18 #include "tpzchangeel.h"
    19 #include "TPZGeoElement.h"
    20 #include "pzreftriangle.h"
    21 #include "tpzgeoelrefpattern.h"
    22 #include "TPZRefPattern.h"
     21#include <tpzchangeel.h>
     22#include <TPZGeoElement.h>
     23#include <pzreftriangle.h>
     24#include <tpzgeoelrefpattern.h>
     25/*}}}*/
    2326
    2427class AdaptiveMeshRefinement : public TPZSaveable {
     
    2831        /*Public methods*/
    2932        /* Constructor, destructor etc*/
    30         AdaptiveMeshRefinement();                                                                                                                       // Default constructor
    31         AdaptiveMeshRefinement(const AdaptiveMeshRefinement &cp);                                                       // Copy constructor
    32         AdaptiveMeshRefinement & operator= (const AdaptiveMeshRefinement &cp);                          // Operator of copy
     33        AdaptiveMeshRefinement();                                                                                                                               // Default constructor
     34        AdaptiveMeshRefinement(const AdaptiveMeshRefinement &cp);                                       // Copy constructor
     35        AdaptiveMeshRefinement & operator= (const AdaptiveMeshRefinement &cp);  // Operator of copy
    3336        virtual ~AdaptiveMeshRefinement();                                                                                                      // Destructor
    3437
    3538    /*Savable methods*/
    36     virtual int ClassId() const;                                                        // ClassId to save the class
    37     virtual void Read(TPZStream &buf, void *context);                                   // Read this class
    38     virtual void Write(TPZStream &buf, int withclassid);                                // Write this class, using ClassId to identify
     39        virtual int ClassId() const;                                            // ClassId to save the class
     40   virtual void Read(TPZStream &buf, void *context);                                                            // Read this class
     41   virtual void Write(TPZStream &buf, int withclassid);                    // Write this class, using ClassId to identify
    3942   
    4043        /*General methods*/
    41         void CleanUp();                                                                                                                                         //Clean all attributes
    42     void SetHMax(int &h);                                                               //Define the max level of refinement
    43     void SetElementWidth(int &width);                                                   //Define elements width
    44         void ExecuteRefinement(int &type_process,double *vx, double *vy, double *masklevelset, long &nvertices, long &nelements, long &nsegments, double** x, double** y, double** z, long*** elements, long*** segments=NULL);           //A new mesh will be created and refined. This returns the new mesh
     44        void CleanUp();                                                                                                                                                 //Clean all attributes
     45   void SetHMax(int &h);                                                   //Define the max level of refinement
     46   void SetElementWidth(int &width);                                       //Define elements width
     47        void ExecuteRefinement(int &type_process,double *vx, double *vy, double *masklevelset, long &nvertices, long &nelements, long &nsegments, double** x, double** y, double** z, long*** elements, long*** segments=NULL);                                 //A new mesh will be created and refined. This returns the new mesh
    4548        void CreateInitialMesh(long &nvertices, long &nelements, long &nsegments, int &width, double* x, double* y, double* z, long** elements, long** segments=NULL); //Create a NeoPZ geometric mesh by coords and elements
    46     void CheckMesh(long &nvertices, long &nelements, long &nsegments, int &width, double* x, double* y, double* z, long** elements, long** segments=NULL); //Check the consistency of the mesh
     49   void CheckMesh(long &nvertices, long &nelements, long &nsegments, int &width, double* x, double* y, double* z, long** elements, long** segments=NULL); //Check the consistency of the mesh
    4750
    4851private:
    4952
    5053        /*Private attributes*/
    51     int elementswidth;                                                                  // geometric nodes for element: 3 == Tria, 4 == Tetra, 6 == Penta
    52     int hmax;                                                                           // max level of refinement
    53         TPZGeoMesh *fathermesh;                                                                                                                         // Father Mesh is the entire mesh without refinement
    54         TPZGeoMesh *previousmesh;                                                                                                                       // Previous mesh is a refined mesh of last step
     54   int elementswidth;                                                      // geometric nodes for element: 3 == Tria, 4 == Tetra, 6 == Penta
     55   int hmax;                                                               // max level of refinement
     56        TPZGeoMesh *fathermesh;                                                                                                                                 // Father Mesh is the entire mesh without refinement
     57        TPZGeoMesh *previousmesh;                                                                                                                               // Previous mesh is a refined mesh of last step
    5558
    5659        /*Private methods*/
    57     void RefinementProcess(TPZGeoMesh *gmesh,std::vector<TPZVec<REAL> > &GLvec);        // Start the refinement process
     60   void RefinementProcess(TPZGeoMesh *gmesh,std::vector<TPZVec<REAL> > &GLvec);  // Start the refinement process
    5861        void RefineMesh(TPZGeoMesh *gmesh, std::vector<long> &ElemVec);                                         // Refine the elements in ElemVec
    59     void RefineMeshToAvoidHangingNodes(TPZGeoMesh *gmesh);                              // Refine the elements to avoid hanging nodes
     62   void RefineMeshToAvoidHangingNodes(TPZGeoMesh *gmesh);                        // Refine the elements to avoid hanging nodes
    6063        void SetElementsToRefine(TPZGeoMesh *gmesh,std::vector<TPZVec<REAL> > &GLvec,int &hlevel, std::vector<long> &ElemVec);  //Define wich elements will be refined
    61     void TagAllElements(TPZGeoMesh *gmesh,std::vector<long> &ElemVec);                  // This tag all elements to be refined, that is, refine all elements
    62     void TagElementsNearGroundingLine(TPZGeoMesh *gmesh,std::vector<TPZVec<REAL> > &GLvec,int &hlevel,std::vector<long> &ElemVec);    //This tag elements near the grounding line
    63     void CalcGroundingLinePosition(double *masklevelset,std::vector<TPZVec<REAL> > &GLvec);// calculate the grounding line position using previous mesh
     64   void TagAllElements(TPZGeoMesh *gmesh,std::vector<long> &ElemVec);                            // This tag all elements to be refined, that is, refine all elements
     65   void TagElementsNearGroundingLine(TPZGeoMesh *gmesh,std::vector<TPZVec<REAL> > &GLvec,int &hlevel,std::vector<long> &ElemVec);    //This tag elements near the grounding line
     66   void CalcGroundingLinePosition(double *masklevelset,std::vector<TPZVec<REAL> > &GLvec);      // calculate the grounding line position using previous mesh
    6467        void GetMesh(TPZGeoMesh *gmesh, long &nvertices, long &nelements, long &nsegments, double** meshX, double** meshY, double** meshZ, long*** elements, long*** segments=NULL); //Return coords and elements in ISSM data structure
    65     inline int GetElemMaterialID(){return 1;}                                           // Return element material ID
    66     inline int GetBoundaryMaterialID(){return 2;}                                       // Return segment (2D boundary) material ID
     68   inline int GetElemMaterialID(){return 1;}                               // Return element material ID
     69   inline int GetBoundaryMaterialID(){return 2;}                           // Return segment (2D boundary) material ID
    6770
    6871};
Note: See TracChangeset for help on using the changeset viewer.