libsurf
Programmer's Documentation

smribmesh.h (r6227/r5337)
1 
2 /* Copyright (C) 2015 David Eller <david@larosterna.com>
3  *
4  * Commercial License Usage
5  * Licensees holding valid commercial licenses may use this file in accordance
6  * with the terms contained in their respective non-exclusive license agreement.
7  * For further information contact david@larosterna.com .
8  *
9  * GNU General Public License Usage
10  * Alternatively, this file may be used under the terms of the GNU General
11  * Public License version 3.0 as published by the Free Software Foundation and
12  * appearing in the file gpl.txt included in the packaging of this file.
13  */
14 
15 #ifndef SURF_SMRIBMESH_H
16 #define SURF_SMRIBMESH_H
17 
18 #include "forward.h"
19 #include "planarmesh.h"
20 
26 class SmRibMesh
27 {
28 public:
29 
31  SmRibMesh() : m_ipid(0), m_imcid(0), m_npweb(5), m_maxstretch(3.5), m_ndpass(1), m_quadmesh(true) {}
32 
34  void webPoints(uint nw) {m_npweb = nw;}
35 
37  void pid(uint p) {m_ipid = p;}
38 
40  void mcid(uint m) {m_imcid = m;}
41 
43  void bpoints(const Vct3 & top, const Vct3 & bot, bool isweb = false) {
44  m_ptop.push_back(top);
45  m_pbot.push_back(bot);
46  if (isweb)
47  m_iwebpos.push_back(m_ptop.size()-1);
48  }
49 
51  void punch(const PointList<3> & hole);
52 
54  void delaunayParameters(Real maxratio, uint npass) {
55  m_maxstretch = maxratio;
56  m_ndpass = npass;
57  }
58 
60  void addElements(NstMesh & nst);
61 
62 private:
63 
65  void initPlanarMesh();
66 
67 private:
68 
71 
73  Indices m_iwebpos;
74 
77 
79  uint m_ipid, m_imcid, m_npweb;
80 
83 
85  uint m_ndpass;
86 
88  bool m_quadmesh;
89 };
90 
91 
92 #endif
uint size() const
uint push_back(const value_type &x)
void bpoints(const Vct3 &top, const Vct3 &bot, bool isweb=false)
append boundary points to list
Definition: smribmesh.h:43
Nastran mesh.
Definition: nstmesh.h:35
Real m_maxstretch
maximum allowd stretch ratio for triangle meshing
Definition: smribmesh.h:82
uint m_ndpass
number of triangle mesh refinement passes
Definition: smribmesh.h:85
void punch(const PointList< 3 > &hole)
specify cutout
Definition: smribmesh.cpp:23
uint m_ipid
PID and material coordinate system ID, number of web points.
Definition: smribmesh.h:79
void delaunayParameters(Real maxratio, uint npass)
change triangle mesh generation parameters
Definition: smribmesh.h:54
bool m_quadmesh
whether to use structured quad or unstructured mesh
Definition: smribmesh.h:88
SmRibMesh()
initialize with default values
Definition: smribmesh.h:31
Indices m_iwebpos
indices in ptop/pbot where to enforce constraints
Definition: smribmesh.h:73
void webPoints(uint nw)
set number of point divisions in vertical direction
Definition: smribmesh.h:34
Planar triangular mesh with cutouts.
Definition: planarmesh.h:30
void mcid(uint m)
change material coordinate system ID
Definition: smribmesh.h:40
void initPlanarMesh()
utility : assemble boundary points (before punch)
Definition: smribmesh.cpp:67
void pid(uint p)
change property ID
Definition: smribmesh.h:37
Structural mesh for ribs.
Definition: smribmesh.h:26
void addElements(NstMesh &nst)
add elements to Nastran mesh
Definition: smribmesh.cpp:31
PlanarMesh m_plm
planar triangular mesh used for ribs with cutouts
Definition: smribmesh.h:76
PointList< 3 > m_ptop
boundary points on top and bottom wing surface
Definition: smribmesh.h:70
Generated on Wed Jan 19 2022 03:03:15 for libsurf by   doxygen 1.8.5