BubbleProfiler  0.3.0
by Peter Athron, Csaba Balazs, Michael Bardsley, Andrew Fowlie, Dylan Harries & Graham White
thin_wall_potential.hpp
Go to the documentation of this file.
1 /*
2  * This file is part of BubbleProfiler.
3  *
4  * BubbleProfiler is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * BubbleProfiler is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with BubbleProfiler. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef BUBBLEPROFILER_THIN_WALL_POTENTIAL_HPP_INCLUDED
19 #define BUBBLEPROFILER_THIN_WALL_POTENTIAL_HPP_INCLUDED
20 
21 #include "field_profiles.hpp"
22 #include "potential.hpp"
23 
24 #include <Eigen/Core>
25 
26 namespace BubbleProfiler {
27 
41 public:
42  Thin_wall_potential() = default;
43  Thin_wall_potential(double, double, double);
44  virtual ~Thin_wall_potential() = default;
45  Thin_wall_potential(const Thin_wall_potential&) = default;
48  const Thin_wall_potential&) = default;
50  Thin_wall_potential&&) = default;
51 
52  virtual Thin_wall_potential* clone() const override {
53  return new Thin_wall_potential(*this);
54  }
55 
56  virtual double operator()(const Eigen::VectorXd&) const override;
57  virtual double partial(const Eigen::VectorXd&, int) const override;
58  virtual double partial(const Eigen::VectorXd&, int, int) const override;
59 
60  virtual std::size_t get_number_of_fields() const override { return 1; }
61 
62  virtual void translate_origin(const Eigen::VectorXd &translation) override {
63  origin += translation(0);
64  }
65 
66  virtual void apply_basis_change(const Eigen::MatrixXd& cob_matrix) override {
67  scale *= cob_matrix(0,0);
68  }
69 
70  virtual void add_constant_term(double _offset) override {
71  offset += _offset;
72  }
73 
79  double operator()(double) const;
80 
86  double first_deriv(double) const;
87 
93  double second_deriv(double) const;
94 
99  double get_local_minimum_location() const;
100 
105  double get_local_maximum_location() const;
106 
111  double get_global_minimum_location() const;
112 
117  double get_thin_wall_action() const;
118 
119 private:
120  double lambda{1.};
121  double a{1.};
122  double epsilon{0.01};
123  double origin{0.};
124  double scale{1.};
125  double offset{0.};
126 };
127 
128 } // namespace BubbleProfiler
129 
130 #endif
contains the definition of the Field_profiles clas
double get_local_minimum_location() const
returns the location of the local minimum
virtual double partial(const Eigen::VectorXd &, int) const override
Partial derivative WRT coordinate i at a point.
Thin_wall_potential & operator=(const Thin_wall_potential &)=default
virtual void translate_origin(const Eigen::VectorXd &translation) override
Shift the location of the origin by a specified vector.
virtual Thin_wall_potential * clone() const override
Subclasses must implement a clone method.
double first_deriv(double) const
evaluates the first derivative of the potential
virtual ~Thin_wall_potential()=default
virtual void add_constant_term(double _offset) override
Add a constant offset to the potential.
virtual double operator()(const Eigen::VectorXd &) const override
Evaluate potential at point.
virtual void apply_basis_change(const Eigen::MatrixXd &cob_matrix) override
Apply a change of basis matrix.
Example thin wall potential as given by Coleman.
double get_thin_wall_action() const
returns the approximate action in the thin-wall approximation
double second_deriv(double) const
evaluates the second derivative of the potential
virtual std::size_t get_number_of_fields() const override
Abstract base class for a generic potential.
Definition: potential.hpp:36
double get_local_maximum_location() const
returns the location of the local maximum
double get_global_minimum_location() const
returns the location of the global minimum