Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CLHEP
CLHEP
Commits
f5d140bf
Commit
f5d140bf
authored
Nov 10, 2012
by
Joseph Boudreau
Browse files
removed some extraneous pieces from the spherical bessel/neumann functions
parent
ee3830ed
Changes
4
Hide whitespace changes
Inline
Side-by-side
GenericFunctions/GenericFunctions/SphericalBessel.hh
View file @
f5d140bf
...
...
@@ -40,18 +40,12 @@ namespace Genfun {
private:
// It is illegal to assign a
n adjustable constant
// It is illegal to assign a
spherical bessel
const
SphericalBessel
&
operator
=
(
const
SphericalBessel
&
right
);
// Here is the
decay constant
// Here is the
index
unsigned
int
_l
;
// Here is the "work function"
const
AbsFunction
*
_function
;
// This function is needed in all constructors:
void
create
();
};
}
// namespace Genfun
#include "CLHEP/GenericFunctions/SphericalBessel.icc"
...
...
GenericFunctions/GenericFunctions/SphericalBessel.icc
View file @
f5d140bf
...
...
@@ -20,19 +20,16 @@ inline
SphericalBessel::SphericalBessel(unsigned int l):
_l(l)
{
create();
}
inline
SphericalBessel::~SphericalBessel() {
delete _function;
}
inline
SphericalBessel::SphericalBessel(const SphericalBessel & right):
_l(right._l)
{
create();
}
inline
...
...
@@ -48,7 +45,6 @@ double SphericalBessel::operator() (double x) const {
raise(SIGFPE);
}
return result.val;
//return (*_function)(x);
}
inline
...
...
@@ -56,22 +52,4 @@ unsigned int SphericalBessel::l() const {
return _l;
}
inline
void SphericalBessel::create() {
Sin sine;
Cos cosine;
Variable x;
if (_l==0) {
_function = (sine/x).clone();
}
else if (_l==1) {
_function = (sine/x/x - cosine/x).clone();
}
else {
SphericalBessel j_minus(_l-1);
SphericalBessel j_minus_minus(_l-2);
_function = ((2*_l-1)*j_minus/x - j_minus_minus).clone();;
}
}
} // end namespace Genfun
GenericFunctions/GenericFunctions/SphericalNeumann.hh
View file @
f5d140bf
...
...
@@ -40,18 +40,12 @@ namespace Genfun {
private:
// It is illegal to assign a
n adjustable const
an
t
// It is illegal to assign a
spherical neum
an
n
const
SphericalNeumann
&
operator
=
(
const
SphericalNeumann
&
right
);
// Here is the
decay constant
// Here is the
index
unsigned
int
_l
;
// Here is the "work function"
const
AbsFunction
*
_function
;
// This function is needed in all constructors:
void
create
();
};
}
// namespace Genfun
#include "CLHEP/GenericFunctions/SphericalNeumann.icc"
...
...
GenericFunctions/GenericFunctions/SphericalNeumann.icc
View file @
f5d140bf
...
...
@@ -20,19 +20,16 @@ inline
SphericalNeumann::SphericalNeumann(unsigned int l):
_l(l)
{
create();
}
inline
SphericalNeumann::~SphericalNeumann() {
delete _function;
}
inline
SphericalNeumann::SphericalNeumann(const SphericalNeumann & right):
_l(right._l)
{
create();
}
inline
...
...
@@ -48,7 +45,6 @@ double SphericalNeumann::operator() (double x) const {
raise(SIGFPE);
}
return result.val;
//return (*_function)(x);
}
inline
...
...
@@ -56,22 +52,4 @@ unsigned int SphericalNeumann::l() const {
return _l;
}
inline
void SphericalNeumann::create() {
Sin sine;
Cos cosine;
Variable x;
if (_l==0) {
_function = (-cosine/x).clone();
}
else if (_l==1) {
_function = (-cosine/x/x - sine/x).clone();
}
else {
SphericalNeumann j_minus(_l-1);
SphericalNeumann j_minus_minus(_l-2);
_function = ((2*_l-1)*j_minus/x - j_minus_minus).clone();;
}
}
} // end of namespace Genfun
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment