atomicrex  0.1
An advanced atomistic model building tool
AtomCoordinatesDOF.h
1 //
3 // Copyright (C) 2017, Alexander Stukowski and Paul Erhart
4 //
5 // This file is part of atomicrex.
6 //
7 // Atomicrex is free software; you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by
9 // the Free Software Foundation; either version 3 of the License, or
10 // (at your option) any later version.
11 //
12 // Atomicrex is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with this program. If not, see <http://www.gnu.org/licenses/>.
19 //
21 
22 #pragma once
23 
24 #include "DegreeOfFreedom.h"
25 
26 namespace atomicrex {
27 
28 class AtomicStructure;
29 
38 {
39 public:
40 
42  AtomCoordinatesDOF() : DegreeOfFreedom("atom-coordinates") {}
43 
45  virtual int numScalars() override;
46 
48  virtual void exportValue(double*& dst) override;
49 
51  virtual void importValue(const double*& src) override;
52 
54  AtomicStructure* structure() const;
55 
57  virtual void reset() override;
58 
59 };
60 
61 } // End of namespace
Base class for maintaining structures.
Definition: AtomicStructure.h:42
virtual void exportValue(double *&dst) override
Lets the DOF export its current value(s) into the given value array.
Definition: AtomCoordinatesDOF.cpp:58
virtual void importValue(const double *&src) override
Lets the DOF import its value(s) from the given value array.
Definition: AtomCoordinatesDOF.cpp:67
virtual void reset() override
Resets the value of the DOF to what was given in the job file.
Definition: AtomCoordinatesDOF.cpp:41
AtomicStructure * structure() const
Returns the structure to which this DOF belongs.
Definition: AtomCoordinatesDOF.cpp:33
This DOF manages the atomic positions in a structure.
Definition: AtomCoordinatesDOF.h:37
This file collects the definition of classes that define various simple crystal structures.
Definition: Atomicrex.h:67
AtomCoordinatesDOF()
Constructor.
Definition: AtomCoordinatesDOF.h:42
Base class for all degrees of freedom a potential or a structure may have.
Definition: DegreeOfFreedom.h:46
virtual int numScalars() override
Returns the number of scalar degrees of freedom this DOF is composed of.
Definition: AtomCoordinatesDOF.cpp:50