Copyright | (c) 2013-2015 2021 Jean-Luc JOULIN |
---|---|
License | Private |
Maintainer | jean-luc-joulin@orange.fr |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell98 |
Les algorithmes de générations des nœuds pour des arcs de cercle.
Synopsis
- meshArc :: (Enum a, Integral a, Enum b, RealFloat b) => (b, b, b) -> (b, b, b) -> (b, b, b) -> MeshingMethod1D a b -> MeshingResult1D b
Documentation
La fonction principale de maillage des arcs de cercle est meshArc
.
Cette fonction permet de générer des nœuds sur un arc de cercle avec les différentes
méthodes MeshingMethod1D
.
>>>
meshArc (0,0,0) (-10,0,0) (0,10,0) (NdivRegular 3)
Mesh1D [(-10.0,0.0,0.0),(-8.660254037844387,4.999999999999999,0.0),(-5.000000000000001,8.660254037844386,0.0),(0.0,10.0,0.0)]
>>>
meshArc (0,0,0) (10,0,0) (0,10,0) (NdivRegular 3)
Mesh1D [(10.0,0.0,0.0),(8.660254037844387,4.999999999999999,0.0),(5.000000000000001,8.660254037844386,0.0),(0.0,10.0,0.0)]
>>>
meshArc (0,0,0) (-10,0,0) (0,10,0) (NdivRegular 4)
Mesh1D [(-10.0,0.0,0.0),(-9.238795325112868,3.826834323650898,0.0),(-7.0710678118654755,7.071067811865475,0.0),(-3.8268343236508984,9.238795325112868,0.0),(0.0,10.0,0.0)]
>>>
meshArc (0,0,0) (10,0,0) (0,10,0) (NdivRegular 4)
Mesh1D [(10.0,0.0,0.0),(9.238795325112868,3.826834323650898,0.0),(7.0710678118654755,7.071067811865475,0.0),(3.8268343236508984,9.238795325112868,0.0),(0.0,10.0,0.0)]
Meshing_Test_1D_Odd_Arc_NdivRegular2_3
Meshing_Test_1D_Even_Arc_NdivRegular1_3
Meshing_Test_1D_Odd_Arc_NdivRegular2_4
Meshing_Test_1D_Even_Arc_NdivRegular1_4
>>>
meshArc (0,0,0) (-10,0,0) (0,10,0) (NdivRegular 9)
Mesh1D [(-10.0,0.0,0.0),(-9.84807753012208,1.7364817766693033,0.0),(-9.396926207859085,3.420201433256687,0.0),(-8.660254037844387,4.999999999999999,0.0),(-7.66044443118978,6.4278760968653925,0.0),(-6.427876096865393,7.66044443118978,0.0),(-5.000000000000001,8.660254037844386,0.0),(-3.4202014332566884,9.396926207859083,0.0),(-1.7364817766693041,9.84807753012208,0.0),(0.0,10.0,0.0)]
>>>
meshArc (0,0,0) (10,0,0) (0,10,0) (NdivRegular 9)
Mesh1D [(10.0,0.0,0.0),(9.84807753012208,1.7364817766693033,0.0),(9.396926207859085,3.420201433256687,0.0),(8.660254037844387,4.999999999999999,0.0),(7.66044443118978,6.4278760968653925,0.0),(6.427876096865393,7.66044443118978,0.0),(5.000000000000001,8.660254037844386,0.0),(3.4202014332566884,9.396926207859083,0.0),(1.7364817766693041,9.84807753012208,0.0),(0.0,10.0,0.0)]
>>>
meshArc (0,0,0) (-10,0,0) (0,10,0) (NdivRegular 10)
Mesh1D [(-10.0,0.0,0.0),(-9.876883405951379,1.5643446504023086,0.0),(-9.510565162951535,3.090169943749474,0.0),(-8.910065241883679,4.5399049973954675,0.0),(-8.090169943749475,5.877852522924732,0.0),(-7.0710678118654755,7.071067811865475,0.0),(-5.877852522924732,8.090169943749475,0.0),(-4.539904997395468,8.910065241883679,0.0),(-3.0901699437494745,9.510565162951535,0.0),(-1.5643446504023093,9.876883405951379,0.0),(0.0,10.0,0.0)]
>>>
meshArc (0,0,0) (10,0,0) (0,10,0) (NdivRegular 10)
Mesh1D [(10.0,0.0,0.0),(9.876883405951379,1.5643446504023086,0.0),(9.510565162951535,3.090169943749474,0.0),(8.910065241883679,4.5399049973954675,0.0),(8.090169943749475,5.877852522924732,0.0),(7.0710678118654755,7.071067811865475,0.0),(5.877852522924732,8.090169943749475,0.0),(4.539904997395468,8.910065241883679,0.0),(3.0901699437494745,9.510565162951535,0.0),(1.5643446504023093,9.876883405951379,0.0),(0.0,10.0,0.0)]
Meshing_Test_1D_Odd_Arc_NdivRegular2_9
Meshing_Test_1D_Even_Arc_NdivRegular1_9
Meshing_Test_1D_Odd_Arc_NdivRegular2_10
Meshing_Test_1D_Even_Arc_NdivRegular1_10
>>>
meshArc (0,0,0) (-10,0,0) (0,10,0) (NdivLinear 9 5)
Mesh1D [(-10.0,0.0,0.0),(-9.983081582712682,0.5814482891047583,0.0),(-9.894416385809444,1.4493185930724675,0.0),(-9.659258262890683,2.588190451025208,0.0),(-9.18216106880274,3.9607976603915684,0.0),(-8.354878114129363,5.495089780708061,0.0),(-7.0710678118654755,7.071067811865475,0.0),(-5.249765803345602,8.511166724369998,0.0),(-2.8680323271109014,9.57989512315489,0.0),(-6.123233995736766e-16,10.0,0.0)]
>>>
meshArc (0,0,0) (10,0,0) (0,10,0) (NdivLinear 9 5)
Mesh1D [(10.0,0.0,0.0),(9.983081582712682,0.5814482891047583,0.0),(9.894416385809444,1.4493185930724675,0.0),(9.659258262890683,2.588190451025208,0.0),(9.18216106880274,3.9607976603915684,0.0),(8.354878114129363,5.495089780708061,0.0),(7.0710678118654755,7.071067811865475,0.0),(5.249765803345602,8.511166724369998,0.0),(2.8680323271109014,9.57989512315489,0.0),(6.123233995736766e-16,10.0,0.0)]
>>>
meshArc (0,0,0) (-10,0,0) (0,10,0) (NdivLinear 10 5)
Mesh1D [(-10.0,0.0,0.0),(-9.986295347545738,0.5233595624294383,0.0),(-9.918203515412618,1.276416478605946,0.0),(-9.743700647852352,2.24951054343865,0.0),(-9.396926207859083,3.420201433256688,0.0),(-8.802013911801112,4.746003697476404,0.0),(-7.880107536067219,6.156614753256583,0.0),(-6.560590289905073,7.54709580222772,0.0),(-4.797131132502462,8.77425397954582,0.0),(-2.588190451025205,9.659258262890683,0.0),(-6.123233995736766e-16,10.0,0.0)]
>>>
meshArc (0,0,0) (10,0,0) (0,10,0) (NdivLinear 10 5)
Mesh1D [(10.0,0.0,0.0),(9.986295347545738,0.5233595624294383,0.0),(9.918203515412618,1.276416478605946,0.0),(9.743700647852352,2.24951054343865,0.0),(9.396926207859083,3.420201433256688,0.0),(8.802013911801112,4.746003697476404,0.0),(7.880107536067219,6.156614753256583,0.0),(6.560590289905073,7.54709580222772,0.0),(4.797131132502462,8.77425397954582,0.0),(2.588190451025205,9.659258262890683,0.0),(6.123233995736766e-16,10.0,0.0)]
Meshing_Test_1D_Odd_Arc_NdivLinear2_9_5
Meshing_Test_1D_Even_Arc_NdivLinear1_9_5
Meshing_Test_1D_Odd_Arc_NdivLinear2_10_5
Meshing_Test_1D_Even_Arc_NdivLinear1_10_5
>>>
meshArc (0,0,0) (-10,0,0) (0,10,0) (NdivLinear 9 0.2)
Mesh1D [(-10.0,0.0,0.0),(-9.57989512315489,2.8680323271109027,0.0),(-8.511166724369998,5.249765803345602,0.0),(-7.071067811865475,7.0710678118654755,0.0),(-5.49508978070806,8.354878114129363,0.0),(-3.9607976603915676,9.182161068802742,0.0),(-2.5881904510252096,9.659258262890681,0.0),(-1.4493185930724715,9.894416385809444,0.0),(-0.5814482891047612,9.983081582712682,0.0),(-6.123233995736766e-16,10.0,0.0)]
>>>
meshArc (0,0,0) (10,0,0) (0,10,0) (NdivLinear 9 0.2)
Mesh1D [(10.0,0.0,0.0),(9.57989512315489,2.8680323271109027,0.0),(8.511166724369998,5.249765803345602,0.0),(7.071067811865475,7.0710678118654755,0.0),(5.49508978070806,8.354878114129363,0.0),(3.9607976603915676,9.182161068802742,0.0),(2.5881904510252096,9.659258262890681,0.0),(1.4493185930724715,9.894416385809444,0.0),(0.5814482891047612,9.983081582712682,0.0),(6.123233995736766e-16,10.0,0.0)]
>>>
meshArc (0,0,0) (-10,0,0) (0,10,0) (NdivLinear 10 0.2)
Mesh1D [(-10.0,0.0,0.0),(-9.659258262890683,2.5881904510252074,0.0),(-8.77425397954582,4.797131132502463,0.0),(-7.54709580222772,6.560590289905073,0.0),(-6.156614753256583,7.880107536067219,0.0),(-4.7460036974764055,8.80201391180111,0.0),(-3.420201433256686,9.396926207859085,0.0),(-2.249510543438649,9.743700647852352,0.0),(-1.2764164786059453,9.918203515412618,0.0),(-0.5233595624294375,9.986295347545738,0.0),(-6.123233995736766e-16,10.0,0.0)]
>>>
meshArc (0,0,0) (10,0,0) (0,10,0) (NdivLinear 10 0.2)
Mesh1D [(10.0,0.0,0.0),(9.659258262890683,2.5881904510252074,0.0),(8.77425397954582,4.797131132502463,0.0),(7.54709580222772,6.560590289905073,0.0),(6.156614753256583,7.880107536067219,0.0),(4.7460036974764055,8.80201391180111,0.0),(3.420201433256686,9.396926207859085,0.0),(2.249510543438649,9.743700647852352,0.0),(1.2764164786059453,9.918203515412618,0.0),(0.5233595624294375,9.986295347545738,0.0),(6.123233995736766e-16,10.0,0.0)]
Meshing_Test_1D_Odd_Arc_NdivLinear2_9_0.2
Meshing_Test_1D_Even_Arc_NdivLinear1_9_0.2
Meshing_Test_1D_Odd_Arc_NdivLinear2_10_0.2
Meshing_Test_1D_Even_Arc_NdivLinear1_10_0.2
>>>
meshArc (0,0,0) (-10,0,0) (0,10,0) (NdivDoubleLinear 9 5)
Mesh1D [(-10.0,0.0,0.0),(-9.95974293995239,0.896393089034335,0.0),(-9.773631737125193,2.1156849167726284,0.0),(-9.322336073880143,3.6185701769667213,0.0),(-8.46724199228284,5.320320765153365,0.0),(-5.320320765153365,8.46724199228284,0.0),(-3.618570176966722,9.322336073880141,0.0),(-2.1156849167726293,9.773631737125191,0.0),(-0.8963930890343355,9.95974293995239,0.0),(-6.123233995736766e-16,10.0,0.0)]
>>>
meshArc (0,0,0) (10,0,0) (0,10,0) (NdivDoubleLinear 9 5)
Mesh1D [(10.0,0.0,0.0),(9.95974293995239,0.896393089034335,0.0),(9.773631737125193,2.1156849167726284,0.0),(9.322336073880143,3.6185701769667213,0.0),(8.46724199228284,5.320320765153365,0.0),(5.320320765153365,8.46724199228284,0.0),(3.618570176966722,9.322336073880141,0.0),(2.1156849167726293,9.773631737125191,0.0),(0.8963930890343355,9.95974293995239,0.0),(6.123233995736766e-16,10.0,0.0)]
>>>
meshArc (0,0,0) (-10,0,0) (0,10,0) (NdivDoubleLinear 10 5)
Mesh1D [(-10.0,0.0,0.0),(-9.986295347545738,0.5233595624294383,0.0),(-9.876883405951379,1.5643446504023086,0.0),(-9.510565162951535,3.090169943749474,0.0),(-8.660254037844387,4.999999999999999,0.0),(-7.0710678118654755,7.071067811865475,0.0),(-5.000000000000001,8.660254037844386,0.0),(-3.0901699437494767,9.510565162951535,0.0),(-1.5643446504023093,9.876883405951379,0.0),(-0.5233595624294375,9.986295347545738,0.0),(-6.123233995736766e-16,10.0,0.0)]
>>>
meshArc (0,0,0) (10,0,0) (0,10,0) (NdivDoubleLinear 10 5)
Mesh1D [(10.0,0.0,0.0),(9.986295347545738,0.5233595624294383,0.0),(9.876883405951379,1.5643446504023086,0.0),(9.510565162951535,3.090169943749474,0.0),(8.660254037844387,4.999999999999999,0.0),(7.0710678118654755,7.071067811865475,0.0),(5.000000000000001,8.660254037844386,0.0),(3.0901699437494767,9.510565162951535,0.0),(1.5643446504023093,9.876883405951379,0.0),(0.5233595624294375,9.986295347545738,0.0),(6.123233995736766e-16,10.0,0.0)]
Meshing_Test_1D_Odd_Arc_NdivDoubleLinear2_9_5
Meshing_Test_1D_Even_Arc_NdivDoubleLinear1_9_5
Meshing_Test_1D_Odd_Arc_NdivDoubleLinear2_10_5
Meshing_Test_1D_Even_Arc_NdivDoubleLinear1_10_5
>>>
meshArc (0,0,0) (-10,0,0) (0,10,0) (NdivDoubleLinear 9 0.2)
Mesh1D [(-10.0,0.0,0.0),(-9.594929736144973,2.817325568414297,0.0),(-8.742348172152726,4.855033309551841,0.0),(-7.875220820526217,6.162864352551528,0.0),(-7.270105951300737,6.866262408098135,0.0),(-6.866262408098135,7.270105951300737,0.0),(-6.162864352551529,7.875220820526217,0.0),(-4.855033309551841,8.742348172152726,0.0),(-2.8173255684142977,9.594929736144973,0.0),(-6.123233995736766e-16,10.0,0.0)]
>>>
meshArc (0,0,0) (10,0,0) (0,10,0) (NdivDoubleLinear 9 0.2)
Mesh1D [(10.0,0.0,0.0),(9.594929736144973,2.817325568414297,0.0),(8.742348172152726,4.855033309551841,0.0),(7.875220820526217,6.162864352551528,0.0),(7.270105951300737,6.866262408098135,0.0),(6.866262408098135,7.270105951300737,0.0),(6.162864352551529,7.875220820526217,0.0),(4.855033309551841,8.742348172152726,0.0),(2.8173255684142977,9.594929736144973,0.0),(6.123233995736766e-16,10.0,0.0)]
>>>
meshArc (0,0,0) (-10,0,0) (0,10,0) (NdivDoubleLinear 10 0.2)
Mesh1D [(-10.0,0.0,0.0),(-9.659258262890683,2.5881904510252074,0.0),(-8.910065241883679,4.5399049973954675,0.0),(-8.090169943749475,5.877852522924732,0.0),(-7.431448254773942,6.691306063588582,0.0),(-7.0710678118654755,7.071067811865475,0.0),(-6.691306063588582,7.431448254773941,0.0),(-5.877852522924732,8.090169943749475,0.0),(-4.539904997395468,8.910065241883679,0.0),(-2.5881904510252096,9.659258262890681,0.0),(-6.123233995736766e-16,10.0,0.0)]
>>>
meshArc (0,0,0) (10,0,0) (0,10,0) (NdivDoubleLinear 10 0.2)
Mesh1D [(10.0,0.0,0.0),(9.659258262890683,2.5881904510252074,0.0),(8.910065241883679,4.5399049973954675,0.0),(8.090169943749475,5.877852522924732,0.0),(7.431448254773942,6.691306063588582,0.0),(7.0710678118654755,7.071067811865475,0.0),(6.691306063588582,7.431448254773941,0.0),(5.877852522924732,8.090169943749475,0.0),(4.539904997395468,8.910065241883679,0.0),(2.5881904510252096,9.659258262890681,0.0),(6.123233995736766e-16,10.0,0.0)]
Meshing_Test_1D_Odd_Arc_NdivDoubleLinear2_9_0.2
Meshing_Test_1D_Even_Arc_NdivDoubleLinear1_9_0.2
Meshing_Test_1D_Odd_Arc_NdivDoubleLinear2_10_0.2
Meshing_Test_1D_Even_Arc_NdivDoubleLinear1_10_0.2
>>>
meshArc (0,0,0) (-10,0,0) (0,10,0) (NdivRegular 0)
NegativeSizing
>>>
meshArc (0,0,0) (-10,0,0) (0,0,0) (NdivRegular 3)
PointsOnSameLine (0.0,0.0,0.0) (-10.0,0.0,0.0) (0.0,0.0,0.0)
>>>
meshArc (0,0,0) (-10,0,0) (10,0,0) (NdivRegular 3)
PointsOnSameLine (0.0,0.0,0.0) (-10.0,0.0,0.0) (10.0,0.0,0.0)
:: (Enum a, Integral a, Enum b, RealFloat b) | |
=> (b, b, b) | Les coordonnées du centre de l'arc de cercle !! Il est impératif de renseigner le centre de l'arc |
-> (b, b, b) | Les coordonnées du premier point de l'arc de cercle |
-> (b, b, b) | Les coordonnées du deuxième point de l'arc de cercle |
-> MeshingMethod1D a b | La méthode |
-> MeshingResult1D b | Le résultat du maillage |
Si on renseigne un nombre de division de 0 ou 1 les coordonnées sont celles de départ.