Skip to content

Commit c2a30ca

Browse files
committed
Merge branch 'feature/copy-deepcopy' into 'develop'
Feature/copy deepcopy See merge request njoy/dryad!92
2 parents 4c8f47d + d780c74 commit c2a30ca

File tree

132 files changed

+573
-1114
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+573
-1114
lines changed

python/src/dryad/AtomicRelaxation.python.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,6 @@ void wrapAtomicRelaxation( python::module& module ) {
6161
" normalise option to indicate whether or not to normalise\n"
6262
" all probability data (default: no normalisation)"
6363
)
64-
.def(
65-
66-
python::init< const Component& >(),
67-
python::arg( "instance" ),
68-
"Initialise a copy\n\n"
69-
"Arguments:\n"
70-
" instance the instance to be copied\n"
71-
)
7264
.def_property(
7365

7466
"documentation",
@@ -174,6 +166,9 @@ void wrapAtomicRelaxation( python::module& module ) {
174166

175167
// add standard equality comparison definitions
176168
addStandardEqualityComparisonDefinitions< Component >( component );
169+
170+
// add standard copy definitions
171+
addStandardCopyDefinitions< Component >( component );
177172
}
178173

179174
} // dryad namespace

python/src/dryad/CoherentDistributionData.python.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,6 @@ void wrapCoherentDistributionData( python::module& module ) {
6060
" real the real part of the anamolous form factor\n"
6161
" imaginary the imaginary part of the anamolous form factor"
6262
)
63-
.def(
64-
65-
python::init< const Component& >(),
66-
python::arg( "instance" ),
67-
"Initialise a copy\n\n"
68-
"Arguments:\n"
69-
" instance the instance to be copied\n"
70-
)
7163
.def_property_readonly(
7264

7365
// static constexpr function needs lambda
@@ -114,6 +106,9 @@ void wrapCoherentDistributionData( python::module& module ) {
114106

115107
// add standard equality comparison definitions
116108
addStandardEqualityComparisonDefinitions< Component >( component );
109+
110+
// add standard copy definitions
111+
addStandardCopyDefinitions< Component >( component );
117112
}
118113

119114
} // dryad namespace

python/src/dryad/Documentation.python.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,6 @@ void wrapDocumentation( python::module& module ) {
4444
" version the version number\n"
4545
" description the description"
4646
)
47-
.def(
48-
49-
python::init< const Component& >(),
50-
python::arg( "instance" ),
51-
"Initialise a copy\n\n"
52-
"Arguments:\n"
53-
" instance the instance to be copied\n"
54-
)
5547
.def_property(
5648

5749
"awr",
@@ -83,6 +75,9 @@ void wrapDocumentation( python::module& module ) {
8375

8476
// add standard equality comparison definitions
8577
addStandardEqualityComparisonDefinitions< Component >( component );
78+
79+
// add standard copy definitions
80+
addStandardCopyDefinitions< Component >( component );
8681
}
8782

8883
} // dryad namespace

python/src/dryad/IncoherentDistributionData.python.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,6 @@ void wrapIncoherentDistributionData( python::module& module ) {
4545
" frame the reference frame of the distribution data\n"
4646
" scattering the scattering function"
4747
)
48-
.def(
49-
50-
python::init< const Component& >(),
51-
python::arg( "instance" ),
52-
"Initialise a copy\n\n"
53-
"Arguments:\n"
54-
" instance the instance to be copied\n"
55-
)
5648
.def_property_readonly(
5749

5850
// static constexpr function needs lambda
@@ -78,6 +70,9 @@ void wrapIncoherentDistributionData( python::module& module ) {
7870

7971
// add standard equality comparison definitions
8072
addStandardEqualityComparisonDefinitions< Component >( component );
73+
74+
// add standard copy definitions
75+
addStandardCopyDefinitions< Component >( component );
8176
}
8277

8378
} // dryad namespace

python/src/dryad/IsotropicAngularDistributions.python.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,13 @@ void wrapIsotropicAngularDistributions( python::module& module ) {
3434
"Initialise the component\n\n"
3535
"Arguments:\n"
3636
" self the component"
37-
)
38-
.def(
39-
40-
python::init< const Component& >(),
41-
python::arg( "instance" ),
42-
"Initialise a copy\n\n"
43-
"Arguments:\n"
44-
" instance the instance to be copied\n"
4537
);
4638

4739
// add standard equality comparison definitions
4840
addStandardEqualityComparisonDefinitions< Component >( component );
41+
42+
// add standard copy definitions
43+
addStandardCopyDefinitions< Component >( component );
4944
}
5045

5146
} // dryad namespace

python/src/dryad/LegendreAngularDistribution.python.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,6 @@ void wrapLegendreAngularDistribution( python::module& module ) {
4545
" normalise option to indicate whether or not to normalise\n"
4646
" all probability data (default: no normalisation)"
4747
)
48-
.def(
49-
50-
python::init< const Component& >(),
51-
python::arg( "instance" ),
52-
"Initialise a copy\n\n"
53-
"Arguments:\n"
54-
" instance the instance to be copied\n"
55-
)
5648
.def_property_readonly(
5749

5850
"coefficients",
@@ -110,6 +102,9 @@ void wrapLegendreAngularDistribution( python::module& module ) {
110102

111103
// add standard equality comparison definitions
112104
addStandardEqualityComparisonDefinitions< Component >( component );
105+
106+
// add standard copy definitions
107+
addStandardCopyDefinitions< Component >( component );
113108
}
114109

115110
} // dryad namespace

python/src/dryad/LegendreAngularDistributionFunction.python.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,6 @@ void wrapLegendreAngularDistributionFunction( python::module& module ) {
4949
" coefficients the coefficients of the Legendre series (from\n"
5050
" lowest to highest order coefficient)"
5151
)
52-
.def(
53-
54-
python::init< const Component& >(),
55-
python::arg( "instance" ),
56-
"Initialise a copy\n\n"
57-
"Arguments:\n"
58-
" instance the instance to be copied\n"
59-
)
6052
.def_property_readonly(
6153

6254
"lower_cosine_limit",
@@ -106,6 +98,9 @@ void wrapLegendreAngularDistributionFunction( python::module& module ) {
10698

10799
// add standard tabulated data definitions
108100
addStandardSeriesDefinitions< Component >( component );
101+
102+
// add standard copy definitions
103+
addStandardCopyDefinitions< Component >( component );
109104
}
110105

111106
} // dryad namespace

python/src/dryad/LegendreAngularDistributions.python.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,6 @@ void wrapLegendreAngularDistributions( python::module& module ) {
7070
" normalise option to indicate whether or not to normalise\n"
7171
" all probability data (default: no normalisation)"
7272
)
73-
.def(
74-
75-
python::init< const Component& >(),
76-
python::arg( "instance" ),
77-
"Initialise a copy\n\n"
78-
"Arguments:\n"
79-
" instance the instance to be copied\n"
80-
)
8173
.def_property_readonly(
8274

8375
"grid",
@@ -135,6 +127,9 @@ void wrapLegendreAngularDistributions( python::module& module ) {
135127

136128
// add standard tabulated data definitions
137129
addStandardInterpolationTableDefinitions< Component >( component );
130+
131+
// add standard copy definitions
132+
addStandardCopyDefinitions< Component >( component );
138133
}
139134

140135
} // dryad namespace

python/src/dryad/PolynomialMultiplicity.python.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,6 @@ void wrapPolynomialMultiplicity( python::module& module ) {
4242
" coefficients the coefficients of the polynomial series (from\n"
4343
" lowest to highest order coefficient)"
4444
)
45-
.def(
46-
47-
python::init< const Component& >(),
48-
python::arg( "instance" ),
49-
"Initialise a copy\n\n"
50-
"Arguments:\n"
51-
" instance the instance to be copied\n"
52-
)
5345
.def_property_readonly(
5446

5547
"lower_energy_limit",
@@ -79,6 +71,9 @@ void wrapPolynomialMultiplicity( python::module& module ) {
7971

8072
// add standard series data definitions
8173
addStandardSeriesDefinitions< Component >( component );
74+
75+
// add standard copy definitions
76+
addStandardCopyDefinitions< Component >( component );
8277
}
8378

8479
} // dryad namespace

python/src/dryad/ProjectileTarget.python.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,6 @@ void wrapProjectileTarget( python::module& module ) {
9090
" normalise option to indicate whether or not to normalise\n"
9191
" all probability data (default: no normalisation)"
9292
)
93-
.def(
94-
95-
python::init< const Component& >(),
96-
python::arg( "instance" ),
97-
"Initialise a copy\n\n"
98-
"Arguments:\n"
99-
" instance the instance to be copied\n"
100-
)
10193
.def_property(
10294

10395
"documentation",
@@ -245,6 +237,9 @@ void wrapProjectileTarget( python::module& module ) {
245237

246238
// add standard equality comparison definitions
247239
addStandardEqualityComparisonDefinitions< Component >( component );
240+
241+
// add standard copy definitions
242+
addStandardCopyDefinitions< Component >( component );
248243
}
249244

250245
} // dryad namespace

0 commit comments

Comments
 (0)