-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from njoy/feature/multigroup-part7
Feature/multigroup part7
- Loading branch information
Showing
68 changed files
with
2,464 additions
and
61 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
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
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,87 @@ | ||
// system includes | ||
#include <pybind11/pybind11.h> | ||
#include <pybind11/stl.h> | ||
|
||
// local includes | ||
#include "NDItk/multigroup/LegendreMoment.hpp" | ||
#include "tools/views/views-python.hpp" | ||
#include "definitions.hpp" | ||
|
||
// namespace aliases | ||
namespace python = pybind11; | ||
|
||
namespace multigroup { | ||
|
||
void wrapLegendreMoment( python::module& module, python::module& ) { | ||
|
||
// type aliases | ||
using Record = njoy::NDItk::multigroup::LegendreMoment; | ||
|
||
// wrap views created by this record | ||
|
||
// create the record | ||
python::class_< Record > record( | ||
|
||
module, | ||
"LegendreMoment", | ||
"A Legendre moment subrecord for multigroup neutron and photon data" | ||
); | ||
|
||
// wrap the record | ||
record | ||
.def( | ||
|
||
python::init< int, std::vector< double >, unsigned int >(), | ||
python::arg( "order" ), python::arg( "values" ), | ||
python::arg( "incident" ), | ||
"Initialise the subrecord\n\n" | ||
"Arguments:\n" | ||
" self the record\n" | ||
" order the Legendre order\n" | ||
" values the values of the matrix\n" | ||
" incident the number of primary groups" | ||
) | ||
.def( | ||
|
||
python::init< int, std::vector< double >, unsigned int, unsigned int >(), | ||
python::arg( "order" ), python::arg( "values" ), | ||
python::arg( "incident" ), python::arg( "outgoing" ), | ||
"Initialise the subrecord\n\n" | ||
"Arguments:\n" | ||
" self the record\n" | ||
" order the Legendre order\n" | ||
" values the values of the matrix\n" | ||
" incident the number of primary groups\n" | ||
" outgoing the number of outgoing groups" | ||
) | ||
.def_property_readonly( | ||
|
||
"order", | ||
&Record::order, | ||
"The Legendre moment order" | ||
) | ||
.def_property_readonly( | ||
|
||
"number_primary_groups", | ||
&Record::numberPrimaryGroups, | ||
"The number of incident groups" | ||
) | ||
.def_property_readonly( | ||
|
||
"number_outgoing_groups", | ||
&Record::numberOutgoingGroups, | ||
"The number of outgoing groups" | ||
) | ||
.def_property_readonly( | ||
|
||
"matrix", | ||
[] ( const Record& self ) -> DoubleRange2D | ||
{ return self.matrix(); }, | ||
"The matrix defined by this subrecord" | ||
); | ||
|
||
// add standard record definitions | ||
addStandardSubrecordDefinitions< Record, DoubleRange >( record ); | ||
} | ||
|
||
} // multigroup namespace |
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
Oops, something went wrong.