-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implementation of a Python functor for the target density function in…
… 'pyEXP' and 'exp'
- Loading branch information
Martin D. Weinberg
committed
Dec 24, 2024
1 parent
5cd05f7
commit 4fb9894
Showing
8 changed files
with
140 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#ifndef _DiskDensityFunc_H_ | ||
#define _DiskDensityFunc_H_ | ||
|
||
#include <functional> | ||
|
||
#include <pybind11/pybind11.h> | ||
#include <pybind11/embed.h> | ||
|
||
// Convenience | ||
namespace py = pybind11; | ||
|
||
//! Python disk-density function wrapper | ||
class DiskDensityFunc | ||
{ | ||
private: | ||
|
||
//! The disk-density function | ||
py::function disk_density; | ||
|
||
public: | ||
|
||
//! Constructor | ||
DiskDensityFunc(const std::string& modulename); | ||
|
||
//! Destructor | ||
~DiskDensityFunc(); | ||
|
||
//! Evaluate the density | ||
double operator() (double R, double z, double phi); | ||
|
||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters