Develop and Download Open Source Software

Browse Subversion Repository

Contents of /Conograph/trunk/src/bravais_type/enumBravaisType.hh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 33 - (show annotations) (download) (as text)
Wed Sep 7 04:38:51 2016 UTC (7 years, 6 months ago) by rtomiyasu
File MIME type: text/x-c++hdr
File size: 2697 byte(s)
The output format for base-centered monoclinic cells was corrected.
1 /*
2 * The MIT License
3
4 Conograph (powder auto-indexing program)
5
6 Copyright (c) <2012> <Ryoko Oishi-Tomiyasu, KEK>
7
8 Permission is hereby granted, free of charge, to any person obtaining a copy
9 of this software and associated documentation files (the "Software"), to deal
10 in the Software without restriction, including without limitation the rights
11 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 copies of the Software, and to permit persons to whom the Software is
13 furnished to do so, subject to the following conditions:
14
15 The above copyright notice and this permission notice shall be included in
16 all copies or substantial portions of the Software.
17
18 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24 THE SOFTWARE.
25 *
26 */
27 #ifndef enumBravaisType_HH_
28 #define enumBravaisType_HH_
29
30 #include "enumAxis.hh"
31 #include "../centring_type/enumCentringType.hh"
32 #include "../point_group/enumPointGroup.hh"
33
34 // Triclinic, Monoclinic, Monoclinic(C),
35 // Orthorhombic(P), Orthorhombic(C), Orthorhombic(I), Orthorhombic(F),
36 // Tetragonal(P), Tetragonal(I), Rhombohedral, Hexagonal.
37 // Cubic(P), Cubic(I), Cubic(F).
38 enum eBravaisType{ CSUndefined = -1, Triclinic = 0, Monoclinic_P = 1, Monoclinic_B = 2,
39 Orthorhombic_P = 3, Orthorhombic_C = 4, Orthorhombic_I = 5, Orthorhombic_F = 6,
40 Tetragonal_P = 7, Tetragonal_I = 8, Rhombohedral = 9, Hexagonal = 10,
41 Cubic_P = 11, Cubic_I = 12, Cubic_F = 13 };
42
43 inline const Int4& put_number_of_bravais_types()
44 {
45 static const Int4 NUM_LS = 14;
46 return NUM_LS;
47 }
48
49
50 inline string put_bravais_type_name(const eBravaisType& i, const eABCaxis& axis)
51 {
52 static const size_t NUM_LS = 14;
53 static const string name[NUM_LS] = { "Triclinic", "Monoclinic(P)", "Monoclinic",
54 "Orthorhombic(P)", "Orthorhombic(C)",
55 "Orthorhombic(I)", "Orthorhombic(F)",
56 "Tetragonal(P)", "Tetragonal(I)",
57 "Rhombohedral", "Hexagonal",
58 "Cubic(P)", "Cubic(I)", "Cubic(F)" };
59
60 if( i == Monoclinic_B )
61 {
62 if( axis == A_Axis ) return name[(size_t)i] + "(B)";
63 else if( axis == B_Axis ) return name[(size_t)i] + "(C)";
64 else // if( axis == C_Axis )
65 return name[(size_t)i] + "(A)";
66 }
67 else return name[(size_t)i];
68 }
69
70 #endif /*enumBravaisType_HH_*/

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26