VertSmoothingMod.h
1 /******************************************************************************
2 
3  (c) 2004-2014 Scientific Computation Research Center,
4  Rensselaer Polytechnic Institute. All rights reserved.
5 
6  The LICENSE-SCOREC file included with this distribution describes the terms
7  of the SCOREC Non-Commercial License this program is distributed under.
8 
9 *******************************************************************************/
10 /* this is the class defining vertex smoothing modification */
11 /* target entity is a given mesh vertex */
12 /* operates on a local patch of regions defined by the vertex */
13 
14 #ifndef MA_VERTSMOOTHINGMOD_H
15 #define MA_VERTSMOOTHINGMOD_H
16 
17 #include "LocMeshMod.h"
18 
19 class VertSmoothingMod: public locMeshMod
20 {
21 
22  public:
23 
24  /* VertSmoothingMod specfic */
25 
27 
28  VertSmoothingMod(pPart p, pSField mf, modelType mt): locMeshMod(p,mf,0,0, mt)
29  {
30  for (int i=0; i<3; i++) {
31  m_current_xyzcoords[i] = 0.0;
32  m_target_xyzcoords[i] = 0.0;
33  m_target_paramcoords[i] = 0.0;
34  }
35  }
36 
38  {
39 
40  }
41 
42  void setVertex(pMeshVtx inputVert) {
43  m_vertex = inputVert;
44  this->updateVertCoords();
45  }
46  void updateVertCoords(){
47  V_coord(m_vertex, m_current_xyzcoords);
48  }
49  void getNgbrVertsOnGEdge(pMeshVtx& , pMeshVtx&);
50 
51  /* the common interface */
52 
53  /* check the topology validity of this modification */
54  int topoCheck();
55  /* ensure no element turning inside out, and geometry similarity for bdry entity */
56  int geomCheck();
57  /* retrieve size information */
58  int sizeCheck();
59  /* get the mesh regions to be affected by this modification */
60  void getAffectedRgns(pumi::pPList *);
61  /* perform the modification with new elements not returned */
62  int apply();
63  /* perform the modification with new elements returned */
64  int apply(pumi::pPList *);
65 
66  /* return the type of this modification */
67  modType type();
68 
69  private:
70 
71  pMeshVtx m_vertex;
72  double m_current_xyzcoords[3];
73  double m_target_xyzcoords[3];
74  double m_target_paramcoords[3];
75 
76 };
77 
78 #endif//MA_VERTSMOOTHINGMOD_H
Definition: VertSmoothingMod.h:19