ttnte is a Python library for solving the discrete ordinates neutron transport
equation (NTE) with a discontinuous isogeometric analysis (IGA) spatial
discretization. This repository features IGA assembly through PyTorch sparse
tensors and tensor trains (TTs). The application of TTs aims to exploit the
multiscale structure commonly found in reactor applications. The IGA
discretization offers higher continuity than traditional finite elements and
benefits from working directly with CAD, cutting out the often expensive meshing
step.
- torch
- torchtt
- numpy
- igakit
- geomdl
- pandas
- matplotlib
- plotly
- h5py
- tqdm
- cotengra
- optuna
- cmaes
- cotengrust
- cytools
- kahypar
- loky
- networkx
- opt_einsum
Note
For best performance compile
geomdl with Cython,
PyTorch with CUDA,
torchTT with its C++ extension, and ensure ttnte
compiles by setting TTNTE_CPP_BACKEND=True environment variable. ttnte will compile the C++
backend by default but if it fails to compile it will fall back on the Python implementations.
pip install https://github.com/dalcinl/igakit/archive/refs/heads/master.zip
pip install git+https://github.com/ion-g-ion/torchTT.git
pip install git+https://github.com/myerspat/ttnte.gitgit clone https://github.com/myerspat/ttnte.git && cd ttnte
pip install https://github.com/dalcinl/igakit/archive/refs/heads/master.zip
pip install git+https://github.com/ion-g-ion/torchTT.git
pip install .git clone git@github.com:myerspat/ttnte.git && cd ttnte
pip install https://github.com/dalcinl/igakit/archive/refs/heads/master.zip
pip install git+https://github.com/ion-g-ion/torchTT.git
pip install -e ".[dev]"
pre-commit installTTNTE_CPP_BACKEND: Ensure the C++ backend compiles by setting this toTrue. You can also toggle the C++ backend at runtime.DEBUG: Compile the C++ backend in debug mode.NJOBS: Number of threads to use when compiling. This defaults toos.cpu_count().TTNTE_PROFILE: By default ifDEBUG=Truethis environment variable defaults toTrue. This toggles compilation with-gand-fno-omit-frame-pointerflags.TTNTE_OPTIMIZED: If this is set toTruethen the C++ backend is compiled with-O3and-march=nativeflags. This defaults toTrueunlessDEBUG=True.USE_CUDA: Link PyTorch with CUDA support. This defaults toTrue.TORCH_INSTALL_PREFIX: Path to the base PyTorch directory. This defaults toos.path.abspath(os.path.dirname(torch.__file__))._GLIBCXX_USE_CXX_ABI: This is either0or1and is used by PyTorch. This defaults toint(torch._C._GLIBCXX_USE_CXX11_ABI).
ttnte.xs.Server: Class for handling multigroup cross section information.ttnte.cad.Patch: Patch class.ttnte.iga.IGAMesh: Meshing object for NURBS surfaces defined asigakit.nurbs.NURBS.ttnte.assemblers.MatrixAssembler: Assembler discretized system intottnte.assemblers.operators.SparseOperators.ttnte.assemblers.TTAssembler: Assembler discretized system intotorchtt.TTs.ttnte.linalg.gmres(): Method for solving the resulting discretized fixed source systemsttnte.linalg.power(): Method for solving the resulting discretized eigenvalue problem.ttnte.linalg.LinearSolverOptions: Options class for GMRES used inttnte.linalg.power().
ttnte.xs.benchmarks: XS data sets from common neutron transport benchmarks.ttnte.cad.curves: Methods for building NURBS curves used in the notebooks.ttnte.cad.surfaces: Methods for building NURBS surfaces used in the notebooks.ttnte.sources: Define fixed sources.
- Homogeneous square
- Homogeneous circle
- Quarter circle with void
- Cruciform source with cylindrical wall
- Homogeneous square
- Homogeneous circle
- Homogeneous quarter circle
- C5G7 infinite pincell array
- Infinite array of cruciform four-lobe fuel with a