MercuryDPM  Trunk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
O.cc
Go to the documentation of this file.
1 //Copyright (c) 2013-2020, The MercuryDPM Developers Team. All rights reserved.
2 //For the list of developers, see <http://www.MercuryDPM.org/Team>.
3 //
4 //Redistribution and use in source and binary forms, with or without
5 //modification, are permitted provided that the following conditions are met:
6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above copyright
9 // notice, this list of conditions and the following disclaimer in the
10 // documentation and/or other materials provided with the distribution.
11 // * Neither the name MercuryDPM nor the
12 // names of its contributors may be used to endorse or promote products
13 // derived from this software without specific prior written permission.
14 //
15 //THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16 //ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17 //WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18 //DISCLAIMED. IN NO EVENT SHALL THE MERCURYDPM DEVELOPERS TEAM BE LIABLE FOR ANY
19 //DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20 //(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21 //LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22 //ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 //(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24 //SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 
26 #include "O.h"
27 #include "Particles/BaseParticle.h"
28 #include "DPMBase.h"
29 
30 using namespace CGCoordinates;
31 
32 void O::writeNames(std::ostream& os)
33 {
34 }
35 
36 void O::write(std::ostream& os) const
37 {
38 }
39 
42 {
43  Vec3D dim = max - min;
44  return dim.X * dim.Y * dim.Z;
45 }
46 
48 {
49  return 0.0;
50 }
51 
52 void O::normalisePolynomialCoefficients(std::vector<Mdouble>& coefficients, Mdouble cutoff UNUSED)
53 {
54 }
55 
56 const unsigned O::countVariables()
57 {
58  return 0;
59 }
60 
61 std::string O::getName()
62 {
63  return "O";
64 }
Mdouble X
the vector components
Definition: Vector.h:65
double Mdouble
Definition: GeneralDefine.h:34
void write(std::ostream &os) const
Writes the coordinates in human-readable form to an ostream.
Definition: O.cc:36
static void writeNames(std::ostream &os)
Writes the coordinate names in human-readable form to an ostream.
Definition: O.cc:32
static const unsigned countVariables()
Definition: O.cc:56
Mdouble getDistanceSquared(const Vec3D &p) const
Returns the square of the distance between the particle p and the current CGPoint, in the non-averaged directions.
Definition: O.cc:47
#define UNUSED
Definition: GeneralDefine.h:39
Mdouble Y
Definition: Vector.h:65
static void normalisePolynomialCoefficients(std::vector< Mdouble > &coefficients, Mdouble cutoff)
Normalises the coefficients of Polynomial CGFunction such that the integral over all non-averaged dim...
Definition: O.cc:52
static std::string getName()
Definition: O.cc:61
Definition: Vector.h:49
static Mdouble getVolumeOfAveragedDimensions(const Vec3D &min, const Vec3D &max)
returns the factor the CGFunction has to be divided by, due to integrating the variables over the ave...
Definition: O.cc:41
Mdouble Z
Definition: Vector.h:65