Skip to main content

MCNP-related packages. Cell geometry algebraic manipulation

Project description

MCNP-related packaged: Cell geometry algebraic manipulations

Description of cell geometry can be interpreted as mathematical expression containing addition (union) and multiplication (intersection) operations. This package provides functions to parse the cell geometry description into an algebraic expression and manipulate the latter.

This is a needed part for MCNP -> CAD geometry converter, see https://github.com/travleev/mcnp2spaceclaim. Example MCNp input files that can be processed with mcrp_cgam can be found there.

To generate json file needed for MCNP -> CAD conversion, use the script provided with this package::

    >cgam input [-maxterms 100] [-writeby model]

The first command line argument, input is the name of MCNP input file. The other arguments are optional.

An integer number following the -maxterms keyword specifies the maximal number of pieces that represent the cell's geometry. In current implementation a cell consisting of an intersection of unions is rearranged into a union of intersections. For some cells, the number of terms in the latter representation can be huge therefore cells with the number of terms exceeding the value specified by -maxterms are skipped.

The keyword -writeby can be followed by one of the following strings: model, cell or part, or their combination (written together, e.g. modelcell). When model is given, a single json file containing all cells is generated. When cell is given, a separate json file is generated for every cell. When part is given, a separate json file is generated for every cell's part (the part corresponds to each term in the union representation of the cell geometry, see above).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

mcrp_cgam-0.2.0-cp27-cp27mu-manylinux2010_x86_64.whl (2.5 MB view hashes)

Uploaded CPython 2.7mu manylinux: glibc 2.12+ x86-64

mcrp_cgam-0.2.0-cp27-cp27mu-manylinux1_x86_64.whl (2.5 MB view hashes)

Uploaded CPython 2.7mu

mcrp_cgam-0.2.0-cp27-cp27m-manylinux2010_x86_64.whl (2.5 MB view hashes)

Uploaded CPython 2.7m manylinux: glibc 2.12+ x86-64

mcrp_cgam-0.2.0-cp27-cp27m-manylinux1_x86_64.whl (2.5 MB view hashes)

Uploaded CPython 2.7m

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page