Develop and Download Open Source Software

Browse Subversion Repository

Annotation of /Conograph/trunk/src/LatticeWithSameQ/p_out_same_q.cc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 33 - (hide 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++src
File size: 2409 byte(s)
The output format for base-centered monoclinic cells was corrected.
1 rtomiyasu 25 /*
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     #include "../lattice_symmetry/LatticeFigureOfMeritToCheckSymmetry.hh"
28     #include "../ControlParam.hh"
29     #include "p_out_same_q.hh"
30    
31    
32    
33    
34     void printSolutions(const vector<LatticeFigureOfMerit>& lattice_result,
35     const ControlParam& cdata,
36 rtomiyasu 33 ostream* const os, const size_t number_output)
37 rtomiyasu 25 {
38 rtomiyasu 33 if( number_output < 0 ) return;
39    
40 rtomiyasu 25 os->precision(6);
41    
42 rtomiyasu 33 VecDat3<Double> length_axis, angle_axis;
43 rtomiyasu 25 Int4 count = 0;
44 rtomiyasu 33 for(size_t n=0; n<min(lattice_result.size(), number_output); n++)
45 rtomiyasu 25 {
46     *os << "(" << ++count << ") ";
47    
48     lattice_result[n].putReducedLatticeConstantsDegree(cdata.putBaseCenteredAxis(), cdata.putRhombohedralAxis(), length_axis, angle_axis);
49    
50     *os << length_axis[0] << " " << length_axis[1] << " " << length_axis[2] << " "
51     << angle_axis[0] << " " << angle_axis[1] << " " << angle_axis[2] << " ("
52     << put_bravais_type_name( lattice_result[n].enumBravaisType(), cdata.putBaseCenteredAxis() )
53     << ", Volume=" << lattice_result[n].putLatticeVolume()
54     << ", " << lattice_result[n].putFiguresOfMerit().putLabel_FigureOfMeritWolff()
55     << "=" << lattice_result[n].putFiguresOfMerit().putFigureOfMeritWolff() << ")\n";
56     }
57     *os << endl;
58     }

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