source: molecuilder/src/element.cpp@ 3021d93

Last change on this file since 3021d93 was e08f45, checked in by Frederik Heber <heber@…>, 17 years ago

Merge branch 'ConcaveHull' of ../espack2 into ConcaveHull

Conflicts:

molecuilder/src/boundary.cpp
molecuilder/src/boundary.hpp
molecuilder/src/builder.cpp
molecuilder/src/linkedcell.cpp
molecuilder/src/linkedcell.hpp
molecuilder/src/vector.cpp
molecuilder/src/vector.hpp
util/src/NanoCreator.c

Basically, this resulted from a lot of conversions two from spaces to one tab, which is my standard indentation. The mess was caused by eclipse auto-indenting. And in espack2:ConcaveHull was the new stuff, so all from ConcaveHull was replaced in case of doubt.
Additionally, vector had ofstream << operator instead ostream << ...

  • Property mode set to 100755
File size: 1.4 KB
RevLine 
[a0bcf1]1/** \file element.cpp
2 *
3 * Function implementations for the class element.
4 *
5 */
6
[375dcf]7#include "periodentafel.hpp"
[a0bcf1]8
9/************************************* Functions for class element **********************************/
10
11/** Constructor of class element.
12 */
[51483b]13element::element() {
[e08f45]14 Z = -1;
15 No = -1;
16 previous = NULL;
17 next = NULL;
18 sort = NULL;
[51483b]19};
[a0bcf1]20
21/** Destructor of class element.
22 */
23element::~element() {};
24
25/** Prints element data to \a *out.
26 * \param *out outstream
27 */
28bool element::Output(ofstream *out) const
29{
[e08f45]30 if (out != NULL) {
31 *out << name << "\t" << symbol << "\t" << period << "\t" << group << "\t" << block << "\t" << Z << "\t" << mass << "\t" << CovalentRadius << "\t" << VanDerWaalsRadius << endl;
32 //*out << Z << "\t" << fixed << setprecision(11) << showpoint << mass << "g/mol\t" << name << "\t" << symbol << "\t" << endl;
33 return true;
34 } else
35 return false;
[a0bcf1]36};
37
38/** Prints element data to \a *out.
39 * \param *out outstream
[e08f45]40 * \param No cardinal number of element
[a0bcf1]41 * \param NoOfAtoms total number of atom of this element type
42 */
[75793b2]43bool element::Checkout(ofstream *out, const int Number, const int NoOfAtoms) const
[a0bcf1]44{
[e08f45]45 if (out != NULL) {
46 *out << "Ion_Type" << Number << "\t" << NoOfAtoms << "\t" << Z << "\t1.0\t3\t3\t" << fixed << setprecision(11) << showpoint << mass << "\t" << name << "\t" << symbol <<endl;
47 return true;
48 } else
49 return false;
[a0bcf1]50};
Note: See TracBrowser for help on using the repository browser.