O.h
Go to the documentation of this file.
1 // This file is part of the MercuryDPM project (https://www.mercurydpm.org).
2 // Copyright (c), The MercuryDPM Developers Team. All rights reserved.
3 // License: BSD 3-Clause License; see the LICENSE file in the root directory.
4 
5 #ifndef O_H
6 #define O_H
7 
8 #include <GeneralDefine.h>
9 #include <iostream>
10 #include "Math/Vector.h"
11 #include <vector>
12 #include <array>
13 #include "BaseCoordinates.h"
14 
15 class BaseParticle;
16 
17 class BaseInteraction;
18 
19 class DPMBase;
20 
21 namespace CGCoordinates
22 {
23 
30 class O : public BaseCoordinates
31 {
32 public:
33 
37  static void writeNames(std::ostream& os);
38 
42  void write(std::ostream& os) const;
43 
48  static Mdouble getVolumeOfAveragedDimensions(const Vec3D& min, const Vec3D& max);
49 
54  Mdouble getDistanceSquared(const Vec3D& p) const;
55 
60  static void normalisePolynomialCoefficients(std::vector<Mdouble>& coefficients, Mdouble cutoff);
61 
65  static const unsigned countVariables();
66 
67  static Mdouble getGaussPrefactor(Mdouble width, Mdouble cutoff)
68  { return 1.0; }
69 
70  static bool isResolvedIn(unsigned dim) {return false;}
71 
72  static std::string getName();
73 
74 };
75 
79 template<typename T>
81 spaceEvenly(Vec3D min, Vec3D max, std::vector<std::size_t> nAll, std::vector<T>& points)
82 {
83  points.resize(1);
84 }
85 
86 }
87 #endif
float * p
Definition: Tutorial_Map_using.cpp:9
Stores information about interactions between two interactable objects; often particles but could be ...
Definition: BaseInteraction.h:39
Definition: BaseParticle.h:33
Contains common member functions of the X, Y, and Z classes.
Definition: BaseCoordinates.h:22
Defines the non-averaged directions on which spatial coarse-graining is applied (none for O); all oth...
Definition: O.h:31
static const unsigned countVariables()
Definition: O.cc:35
void write(std::ostream &os) const
Writes the coordinates in human-readable form to an ostream.
Definition: O.cc:15
static void writeNames(std::ostream &os)
Writes the coordinate names in human-readable form to an ostream.
Definition: O.cc:11
static bool isResolvedIn(unsigned dim)
Definition: O.h:70
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:31
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:20
Mdouble getDistanceSquared(const Vec3D &p) const
Returns the square of the distance between the particle p and the current CGPoint,...
Definition: O.cc:26
static std::string getName()
Definition: O.cc:40
static Mdouble getGaussPrefactor(Mdouble width, Mdouble cutoff)
Definition: O.h:67
The DPMBase header includes quite a few header files, defining all the handlers, which are essential....
Definition: DPMBase.h:56
Definition: Kernel/Math/Vector.h:30
#define min(a, b)
Definition: datatypes.h:22
#define max(a, b)
Definition: datatypes.h:23
The class in this namespace contain the position of a CGPoint, in the non-averaged directions,...
Definition: Base_X_Y_Z.h:21
std::enable_if< std::is_base_of< CGCoordinates::O, typename T::CoordinatesType >::value, void >::type spaceEvenly(Vec3D min, Vec3D max, std::vector< std::size_t > nAll, std::vector< T > &points)
Definition: O.h:81
squared absolute value
Definition: GlobalFunctions.h:87
type
Definition: compute_granudrum_aor.py:141
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286