Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
971ca014
Commit
971ca014
authored
9 years ago
by
Van Herck, Walter
Browse files
Options
Downloads
Plain Diff
Merge branch 'memleaks' into develop
parents
645b5de6
da1831cf
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Core/Algorithms/inc/IInterferenceFunctionStrategy.h
+2
-1
2 additions, 1 deletion
Core/Algorithms/inc/IInterferenceFunctionStrategy.h
Core/Algorithms/src/IInterferenceFunctionStrategy.cpp
+8
-10
8 additions, 10 deletions
Core/Algorithms/src/IInterferenceFunctionStrategy.cpp
with
10 additions
and
11 deletions
Core/Algorithms/inc/IInterferenceFunctionStrategy.h
+
2
−
1
View file @
971ca014
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#include
"FormFactorDWBAPol.h"
#include
"FormFactorDWBAPol.h"
#include
<vector>
#include
<vector>
#include
<boost/scoped_ptr.hpp>
//! @class IInterferenceFunctionStrategy
//! @class IInterferenceFunctionStrategy
...
@@ -58,7 +59,7 @@ protected:
...
@@ -58,7 +59,7 @@ protected:
SafePointerVector
<
FormFactorInfo
>
m_ff_infos
;
//!< form factor info
SafePointerVector
<
FormFactorInfo
>
m_ff_infos
;
//!< form factor info
SafePointerVector
<
IInterferenceFunction
>
m_ifs
;
//!< interference functions
SafePointerVector
<
IInterferenceFunction
>
m_ifs
;
//!< interference functions
SimulationParameters
m_sim_params
;
//!< simulation parameters
SimulationParameters
m_sim_params
;
//!< simulation parameters
LayerSpecularInfo
*
mp
_specular_info
;
//!< R and T coefficients for DWBA
boost
::
scoped_ptr
<
LayerSpecularInfo
>
mP
_specular_info
;
//!< R and T coefficients for DWBA
private
:
private
:
struct
IntegrationParamsAlpha
{
struct
IntegrationParamsAlpha
{
...
...
This diff is collapsed.
Click to expand it.
Core/Algorithms/src/IInterferenceFunctionStrategy.cpp
+
8
−
10
View file @
971ca014
...
@@ -23,7 +23,6 @@
...
@@ -23,7 +23,6 @@
IInterferenceFunctionStrategy
::
IInterferenceFunctionStrategy
(
IInterferenceFunctionStrategy
::
IInterferenceFunctionStrategy
(
SimulationParameters
sim_params
)
SimulationParameters
sim_params
)
:
m_sim_params
(
sim_params
)
:
m_sim_params
(
sim_params
)
,
mp_specular_info
(
0
)
{
{
}
}
...
@@ -38,9 +37,8 @@ void IInterferenceFunctionStrategy::init(
...
@@ -38,9 +37,8 @@ void IInterferenceFunctionStrategy::init(
void
IInterferenceFunctionStrategy
::
setSpecularInfo
(
void
IInterferenceFunctionStrategy
::
setSpecularInfo
(
const
LayerSpecularInfo
&
specular_info
)
const
LayerSpecularInfo
&
specular_info
)
{
{
if
(
mp_specular_info
!=
&
specular_info
)
{
if
(
mP_specular_info
.
get
()
!=
&
specular_info
)
{
delete
mp_specular_info
;
mP_specular_info
.
reset
(
specular_info
.
clone
());
mp_specular_info
=
specular_info
.
clone
();
}
}
}
}
...
@@ -76,9 +74,9 @@ void IInterferenceFunctionStrategy::calculateFormFactorList(
...
@@ -76,9 +74,9 @@ void IInterferenceFunctionStrategy::calculateFormFactorList(
{
{
clearFormFactorLists
();
clearFormFactorLists
();
const
ILayerRTCoefficients
*
p_in_coeffs
=
const
ILayerRTCoefficients
*
p_in_coeffs
=
m
p
_specular_info
->
getInCoefficients
();
m
P
_specular_info
->
getInCoefficients
();
boost
::
scoped_ptr
<
const
ILayerRTCoefficients
>
P_out_coeffs
(
boost
::
scoped_ptr
<
const
ILayerRTCoefficients
>
P_out_coeffs
(
m
p
_specular_info
->
getOutCoefficients
(
m
P
_specular_info
->
getOutCoefficients
(
alpha_f_bin
.
getMidPoint
(),
0.0
)
);
alpha_f_bin
.
getMidPoint
(),
0.0
)
);
SafePointerVector
<
FormFactorInfo
>::
const_iterator
it
=
SafePointerVector
<
FormFactorInfo
>::
const_iterator
it
=
m_ff_infos
.
begin
();
m_ff_infos
.
begin
();
...
@@ -96,9 +94,9 @@ void IInterferenceFunctionStrategy::calculateFormFactorLists(
...
@@ -96,9 +94,9 @@ void IInterferenceFunctionStrategy::calculateFormFactorLists(
{
{
clearFormFactorLists
();
clearFormFactorLists
();
const
ILayerRTCoefficients
*
p_in_coeffs
=
const
ILayerRTCoefficients
*
p_in_coeffs
=
m
p
_specular_info
->
getInCoefficients
();
m
P
_specular_info
->
getInCoefficients
();
boost
::
scoped_ptr
<
const
ILayerRTCoefficients
>
P_out_coeffs
(
boost
::
scoped_ptr
<
const
ILayerRTCoefficients
>
P_out_coeffs
(
m
p
_specular_info
->
getOutCoefficients
(
m
P
_specular_info
->
getOutCoefficients
(
alpha_f_bin
.
getMidPoint
(),
phi_f_bin
.
getMidPoint
())
);
alpha_f_bin
.
getMidPoint
(),
phi_f_bin
.
getMidPoint
())
);
SafePointerVector
<
FormFactorInfo
>::
const_iterator
it
=
SafePointerVector
<
FormFactorInfo
>::
const_iterator
it
=
m_ff_infos
.
begin
();
m_ff_infos
.
begin
();
...
@@ -203,7 +201,7 @@ double IInterferenceFunctionStrategy::evaluate_for_fixed_angles(double *fraction
...
@@ -203,7 +201,7 @@ double IInterferenceFunctionStrategy::evaluate_for_fixed_angles(double *fraction
+
par1
*
(
pars
->
phi_bin
.
m_upper
-
pars
->
phi_bin
.
m_lower
);
+
par1
*
(
pars
->
phi_bin
.
m_upper
-
pars
->
phi_bin
.
m_lower
);
k_f
.
setLambdaAlphaPhi
(
pars
->
wavelength
,
alpha
,
phi
);
k_f
.
setLambdaAlphaPhi
(
pars
->
wavelength
,
alpha
,
phi
);
boost
::
scoped_ptr
<
const
ILayerRTCoefficients
>
out_coeff
(
boost
::
scoped_ptr
<
const
ILayerRTCoefficients
>
out_coeff
(
m
p
_specular_info
->
getOutCoefficients
(
alpha
,
phi
));
m
P
_specular_info
->
getOutCoefficients
(
alpha
,
phi
));
k_f
.
setZ
(
out_coeff
->
getScalarKz
());
k_f
.
setZ
(
out_coeff
->
getScalarKz
());
Bin1DCVector
k_f_bin
(
k_f
,
k_f
);
Bin1DCVector
k_f_bin
(
k_f
,
k_f
);
...
@@ -228,7 +226,7 @@ double IInterferenceFunctionStrategy::evaluate_for_fixed_angles_pol(
...
@@ -228,7 +226,7 @@ double IInterferenceFunctionStrategy::evaluate_for_fixed_angles_pol(
+
par1
*
(
pars
->
phi_bin
.
m_upper
-
pars
->
phi_bin
.
m_lower
);
+
par1
*
(
pars
->
phi_bin
.
m_upper
-
pars
->
phi_bin
.
m_lower
);
k_f
.
setLambdaAlphaPhi
(
pars
->
wavelength
,
alpha
,
phi
);
k_f
.
setLambdaAlphaPhi
(
pars
->
wavelength
,
alpha
,
phi
);
boost
::
scoped_ptr
<
const
ILayerRTCoefficients
>
out_coeff
(
boost
::
scoped_ptr
<
const
ILayerRTCoefficients
>
out_coeff
(
m
p
_specular_info
->
getOutCoefficients
(
alpha
,
phi
));
m
P
_specular_info
->
getOutCoefficients
(
alpha
,
phi
));
k_f
.
setZ
(
out_coeff
->
getScalarKz
());
k_f
.
setZ
(
out_coeff
->
getScalarKz
());
Bin1DCVector
k_f_bin
(
k_f
,
k_f
);
Bin1DCVector
k_f_bin
(
k_f
,
k_f
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment