2 #include "DiracOperator/TensorOperator.hpp"
3 #include "IO/InputBlock.hpp"
4 #include "Wavefunction/Wavefunction.hpp"
17 std::vector<double> fillVec(
const Grid &gr,
18 const std::function<
double(
double)> &f) {
19 std::vector<double> f_r;
27 RadialF(
const Grid &rgrid,
const std::function<
double(
double)> &f)
31 return std::pow(r, n);
33 std::string
name() const override final {
return "RadialFunction"; }
34 std::string
units() const override final {
return "au"; }
42 :
ScalarOperator(Parity::even, 1.0, {}, {1, 0, 0, 1}, 1, Realness::real) {
44 std::string
name() const override final {
return "dr"; }
45 std::string
units() const override final {
return "au"; }
49 inline std::unique_ptr<DiracOperator::TensorOperator>
52 input.
check({{
"power",
"Power (real) for r^k"}});
56 const auto power = input.
get(
"power", 1.0);
57 std::cout <<
"r^(" << power <<
")\n";
58 return std::make_unique<RadialF>(wf.
grid(), power);
61 inline std::unique_ptr<DiracOperator::TensorOperator>
63 input.
check({{
"",
"no input"}});
68 return std::make_unique<dr>();
General function of r, even scalar operator.
Definition: RadialF.hpp:11
std::string name() const override final
Returns "name" of operator (e.g., 'E1')
Definition: RadialF.hpp:33
std::string units() const override final
Returns units of operator (usually au, may be MHz, etc.)
Definition: RadialF.hpp:34
Speacial case for scalar operator.
Definition: TensorOperator.hpp:233
radial derivative operator
Definition: RadialF.hpp:38
std::string units() const override final
Returns units of operator (usually au, may be MHz, etc.)
Definition: RadialF.hpp:45
std::string name() const override final
Returns "name" of operator (e.g., 'E1')
Definition: RadialF.hpp:44
Holds grid, including type + Jacobian (dr/du)
Definition: Grid.hpp:31
auto num_points() const
Number of grid points.
Definition: Grid.hpp:64
const std::vector< double > & r() const
Grid points, r.
Definition: Grid.hpp:75
Stores Wavefunction (set of valence orbitals, grid, HF etc.)
Definition: Wavefunction.hpp:36
const Grid & grid() const
Returns a const reference to the radial grid.
Definition: Wavefunction.hpp:81
Dirac Operators: General + derived.
Definition: GenerateOperator.cpp:12