libsurf
Programmer's Documentation

dnwingcriterion.h (r6227/r5385)
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_DNWINGCRITERION_H
16 #define SURF_DNWINGCRITERION_H
17 
18 #include "curve.h"
19 #include "dnrefine.h"
20 
32 {
33  public:
34 
36  DnWingCriterion() : DnRegionCriterion(), lerFactor(1.0), terFactor(1.0) {
37  initBreaks();
38  }
39 
42  initBreaks();
43  }
44 
46  void addBreak(Real v, Real f);
47 
49  void addVKinks(const Surface & srf, const Vector & vk);
50 
52  void addBreaks(const CurvePtrArray & cpa, bool symflag = false);
53 
55  const Vector & breaks() const {return vbreak;}
56 
58  void edgeRefinement(Real lef, Real tef) {
59  lerFactor = lef;
60  terFactor = tef;
61  }
62 
64  Real leRefinement() const {return lerFactor;}
65 
67  Real teRefinement() const {return terFactor;}
68 
70  Real eval(const uint *vi) const;
71 
73  DnWingCriterion *clone() const;
74 
76  void fromXml(const XmlElement & xe);
77 
79  XmlElement toXml() const;
80 
81  private:
82 
84  void initBreaks();
85 
86  private:
87 
89  Vector vbreak, vkinks, scale;
90 
93 
95  Real lerFactor, terFactor;
96 };
97 
98 typedef boost::shared_ptr<DnWingCriterion> DnWingCriterionPtr;
99 
100 #endif
101 
Refinement criterion adapted for wing surfaces.
Definition: dnwingcriterion.h:31
void fromXml(const XmlElement &xe)
read criteria from xml representation
Definition: dnwingcriterion.cpp:300
Real teRefinement() const
access factors
Definition: dnwingcriterion.h:67
DnWingCriterion(const DnRegionCriterion &rc)
copy refinement regions
Definition: dnwingcriterion.h:41
void addVKinks(const Surface &srf, const Vector &vk)
register locations of kinks
Definition: dnwingcriterion.cpp:102
Real lerFactor
leading-edge and trailing-edge refinement factors
Definition: dnwingcriterion.h:95
Real leRefinement() const
access factors
Definition: dnwingcriterion.h:64
Vector vbreak
position of breaks and kinks
Definition: dnwingcriterion.h:89
void edgeRefinement(Real lef, Real tef)
change leading/trailing edge refinement factors
Definition: dnwingcriterion.h:58
void initBreaks()
default scale and breakpoints 0,1
Definition: dnwingcriterion.cpp:21
void addBreaks(const CurvePtrArray &cpa, bool symflag=false)
automatically generate breaks and scales from curve array
Definition: dnwingcriterion.cpp:40
DnWingCriterion()
create unbound criterion
Definition: dnwingcriterion.h:36
Real eval(const uint *vi) const
evaluate triangle &#39;quality&#39; - larger value means earlier refinement
Definition: dnwingcriterion.cpp:132
const Vector & breaks() const
access current break positions
Definition: dnwingcriterion.h:55
XmlElement toXml() const
write criteria to xml representation
Definition: dnwingcriterion.cpp:356
Surface interface.
Definition: surface.h:37
PointList< 3 > svkinks
local derivatives Sv at kinks
Definition: dnwingcriterion.h:92
void addBreak(Real v, Real f)
add a break location
Definition: dnwingcriterion.cpp:31
Locally adapted refinement criterion.
Definition: dnrefine.h:136
DnWingCriterion * clone() const
clone object
Definition: dnwingcriterion.cpp:294
Generated on Wed Jan 19 2022 03:03:15 for libsurf by   doxygen 1.8.5