├── .codecov.yaml
├── .github
├── ISSUE_TEMPLATE
│ ├── bug_report.md
│ ├── feature_request.md
│ └── release_checklist.md
├── PULL_REQUEST_TEMPLATE
│ └── pull_request_template.md
└── workflows
│ ├── cd.yml
│ ├── ci.yml
│ ├── cla.yml
│ ├── coverage.yml
│ └── deploy_documentation.yml
├── .gitignore
├── .readthedocs.yaml
├── .zenodo.json
├── AUTHORS.md
├── BUILD-LINUX.md
├── BUILD-OSX.md
├── BUILD-WINDOWS.md
├── CITATION.bib
├── CLA.md
├── CMakeLists.txt
├── CMakeSettings.json
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE.txt
├── README.rst
├── SECURITY.md
├── ThirdParty-LICENSES.txt
├── ThirdParty
├── Catch
│ ├── LICENSE.txt
│ ├── README.md
│ ├── catch.hpp
│ ├── contrib
│ │ ├── Catch.cmake
│ │ ├── CatchAddTests.cmake
│ │ └── ParseAndAddCatchTests.cmake
│ └── docs
│ │ ├── Readme.md
│ │ ├── assertions.md
│ │ ├── build-systems.md
│ │ ├── command-line.md
│ │ ├── commercial-users.md
│ │ ├── configuration.md
│ │ ├── contributing.md
│ │ ├── event-listeners.md
│ │ ├── limitations.md
│ │ ├── list-of-examples.md
│ │ ├── logging.md
│ │ ├── matchers.md
│ │ ├── opensource-users.md
│ │ ├── own-main.md
│ │ ├── release-notes.md
│ │ ├── release-process.md
│ │ ├── reporters.md
│ │ ├── slow-compiles.md
│ │ ├── test-cases-and-sections.md
│ │ ├── test-fixtures.md
│ │ ├── tostring.md
│ │ ├── tutorial.md
│ │ └── why-catch.md
├── inja
│ ├── LICENSE
│ ├── README.md
│ └── inja.hpp
├── json
│ └── json.hpp
├── pugixml
│ ├── pugiconfig.hpp
│ ├── pugixml.cpp
│ ├── pugixml.hpp
│ └── readme.txt
├── sundials
│ ├── CMakeLists.txt
│ ├── LICENSE
│ ├── README.md
│ ├── config
│ │ ├── SundialsCMakeMacros.cmake
│ │ ├── SundialsCXX.cmake
│ │ ├── SundialsDeprecated.cmake
│ │ └── SundialsIndexSize.cmake
│ ├── include
│ │ ├── idas
│ │ │ ├── idas.h
│ │ │ ├── idas_bbdpre.h
│ │ │ ├── idas_direct.h
│ │ │ └── idas_spils.h
│ │ ├── nvector
│ │ │ └── nvector_serial.h
│ │ ├── sundials
│ │ │ ├── sundials_band.h
│ │ │ ├── sundials_config.in
│ │ │ ├── sundials_dense.h
│ │ │ ├── sundials_direct.h
│ │ │ ├── sundials_fnvector.h
│ │ │ ├── sundials_iterative.h
│ │ │ ├── sundials_klu_impl.h
│ │ │ ├── sundials_lapack.h
│ │ │ ├── sundials_linearsolver.h
│ │ │ ├── sundials_math.h
│ │ │ ├── sundials_matrix.h
│ │ │ ├── sundials_mpi.h
│ │ │ ├── sundials_mpi_types.h
│ │ │ ├── sundials_nvector.h
│ │ │ ├── sundials_pcg.h
│ │ │ ├── sundials_sparse.h
│ │ │ ├── sundials_spbcgs.h
│ │ │ ├── sundials_spfgmr.h
│ │ │ ├── sundials_spgmr.h
│ │ │ ├── sundials_sptfqmr.h
│ │ │ ├── sundials_superlumt_impl.h
│ │ │ ├── sundials_types.h
│ │ │ └── sundials_version.h
│ │ ├── sunlinsol
│ │ │ ├── sunlinsol_band.h
│ │ │ ├── sunlinsol_dense.h
│ │ │ ├── sunlinsol_klu.h
│ │ │ ├── sunlinsol_lapackband.h
│ │ │ ├── sunlinsol_lapackdense.h
│ │ │ ├── sunlinsol_pcg.h
│ │ │ ├── sunlinsol_spbcgs.h
│ │ │ ├── sunlinsol_spfgmr.h
│ │ │ ├── sunlinsol_spgmr.h
│ │ │ ├── sunlinsol_sptfqmr.h
│ │ │ └── sunlinsol_superlumt.h
│ │ └── sunmatrix
│ │ │ ├── sunmatrix_band.h
│ │ │ ├── sunmatrix_dense.h
│ │ │ └── sunmatrix_sparse.h
│ └── src
│ │ ├── CMakeLists.txt
│ │ ├── idas
│ │ ├── CMakeLists.txt
│ │ ├── LICENSE
│ │ ├── README
│ │ ├── idaa.c
│ │ ├── idaa_io.c
│ │ ├── idas.c
│ │ ├── idas_bbdpre.c
│ │ ├── idas_bbdpre_impl.h
│ │ ├── idas_direct.c
│ │ ├── idas_direct_impl.h
│ │ ├── idas_ic.c
│ │ ├── idas_impl.h
│ │ ├── idas_io.c
│ │ ├── idas_spils.c
│ │ └── idas_spils_impl.h
│ │ ├── nvec_ser
│ │ ├── CMakeLists.txt
│ │ ├── fnvector_serial.c
│ │ ├── fnvector_serial.h
│ │ └── nvector_serial.c
│ │ ├── sundials
│ │ ├── sundials_band.c
│ │ ├── sundials_dense.c
│ │ ├── sundials_direct.c
│ │ ├── sundials_iterative.c
│ │ ├── sundials_linearsolver.c
│ │ ├── sundials_math.c
│ │ ├── sundials_matrix.c
│ │ ├── sundials_mpi.c
│ │ ├── sundials_nvector.c
│ │ ├── sundials_pcg.c
│ │ ├── sundials_sparse.c
│ │ ├── sundials_spbcgs.c
│ │ ├── sundials_spfgmr.c
│ │ ├── sundials_spgmr.c
│ │ ├── sundials_sptfqmr.c
│ │ └── sundials_version.c
│ │ ├── sunlinsol_spbcgs
│ │ ├── CMakeLists.txt
│ │ ├── fsunlinsol_spbcgs.c
│ │ ├── fsunlinsol_spbcgs.h
│ │ └── sunlinsol_spbcgs.c
│ │ ├── sunlinsol_spfgmr
│ │ ├── CMakeLists.txt
│ │ ├── fsunlinsol_spfgmr.c
│ │ ├── fsunlinsol_spfgmr.h
│ │ └── sunlinsol_spfgmr.c
│ │ ├── sunlinsol_spgmr
│ │ ├── CMakeLists.txt
│ │ ├── fsunlinsol_spgmr.c
│ │ ├── fsunlinsol_spgmr.h
│ │ └── sunlinsol_spgmr.c
│ │ └── sunlinsol_sptfqmr
│ │ ├── CMakeLists.txt
│ │ ├── fsunlinsol_sptfqmr.c
│ │ ├── fsunlinsol_sptfqmr.h
│ │ └── sunlinsol_sptfqmr.c
└── tclap
│ ├── AUTHORS
│ ├── COPYING
│ ├── ChangeLog
│ ├── INSTALL
│ ├── Makefile.am
│ ├── Makefile.in
│ ├── NEWS
│ ├── README
│ ├── aclocal.m4
│ ├── config
│ ├── Makefile.am
│ ├── Makefile.in
│ ├── ac_cxx_have_long_long.m4
│ ├── ac_cxx_have_sstream.m4
│ ├── ac_cxx_have_strstream.m4
│ ├── ac_cxx_namespaces.m4
│ ├── ac_cxx_warn_effective_cxx.m4
│ ├── bb_enable_doxygen.m4
│ ├── config.h.in
│ ├── depcomp
│ ├── install-sh
│ ├── missing
│ └── mkinstalldirs
│ ├── configure
│ ├── configure.in
│ ├── include
│ ├── Makefile.am
│ ├── Makefile.in
│ └── tclap
│ │ ├── Arg.h
│ │ ├── ArgException.h
│ │ ├── ArgTraits.h
│ │ ├── CmdLine.h
│ │ ├── CmdLineInterface.h
│ │ ├── CmdLineOutput.h
│ │ ├── Constraint.h
│ │ ├── DocBookOutput.h
│ │ ├── HelpVisitor.h
│ │ ├── IgnoreRestVisitor.h
│ │ ├── Makefile.am
│ │ ├── Makefile.in
│ │ ├── MultiArg.h
│ │ ├── MultiSwitchArg.h
│ │ ├── OptionalUnlabeledTracker.h
│ │ ├── StandardTraits.h
│ │ ├── StdOutput.h
│ │ ├── SwitchArg.h
│ │ ├── UnlabeledMultiArg.h
│ │ ├── UnlabeledValueArg.h
│ │ ├── ValueArg.h
│ │ ├── ValuesConstraint.h
│ │ ├── VersionVisitor.h
│ │ ├── Visitor.h
│ │ ├── XorHandler.h
│ │ └── ZshCompletionOutput.h
│ └── tclap.pc.in
├── cmake
└── Modules
│ ├── FindBLAS.cmake
│ ├── FindCADET.cmake
│ ├── FindLAPACK.cmake
│ ├── FindSUNDIALS.cmake
│ ├── FindSuperLU.cmake
│ ├── FindTBB.cmake
│ ├── FindUMFPACK.cmake
│ ├── GetGitRevisionDescription.cmake
│ ├── GetGitRevisionDescription.cmake.in
│ └── MatlabTBBversion.cpp
├── doc
├── Makefile
├── README.md
├── _static
│ ├── cadet_icon.png
│ ├── cadet_logo.png
│ ├── css
│ │ └── custom.css
│ └── sections.png
├── _templates
│ ├── page.html
│ └── versioning.html
├── cadet.doxyfile
├── conf.py
├── developer_guide
│ ├── TemplateBinding.cpp
│ ├── _images
│ │ ├── architecture_libcadet_classes.png
│ │ ├── breakthrough_chromatogram.png
│ │ └── breakthrough_system.png
│ ├── build_options.rst
│ ├── cadet_core_architecture.rst
│ ├── cadet_python.rst
│ ├── debugging.rst
│ ├── examples
│ │ └── breakthrough.py
│ ├── index.rst
│ ├── launch.vs.json
│ ├── model_expansion.rst
│ ├── release_new_version.rst
│ └── testing.rst
├── examples
│ ├── batch_chromatography.rst
│ ├── breakthrough.py
│ ├── index.rst
│ ├── load_wash_elute.rst
│ ├── reaction_cstr.rst
│ └── rtd.rst
├── getting_started
│ ├── build_linux.rst
│ ├── build_osx.rst
│ ├── build_windows.rst
│ ├── index.rst
│ ├── installation_core.rst
│ ├── installation_frontend.rst
│ ├── introduction.rst
│ └── tutorials
│ │ ├── _images
│ │ ├── breakthrough_chromatogram.png
│ │ ├── breakthrough_system.svg
│ │ └── cadet_architecture_overview.png
│ │ └── breakthrough.rst
├── index.rst
├── interface
│ ├── binding
│ │ ├── bi_steric_mass_action.rst
│ │ ├── extended_mobile_phase_modulator_langmuir.rst
│ │ ├── freundlich_ldf.rst
│ │ ├── generalized_ion_exchange.rst
│ │ ├── hic_constant_water_activity.rst
│ │ ├── hic_unified.rst
│ │ ├── hic_water_on_hydrophobic_surfaces.rst
│ │ ├── index.rst
│ │ ├── linear.rst
│ │ ├── mobile_phase_modulator_langmuir.rst
│ │ ├── multi_component_anti_langmuir.rst
│ │ ├── multi_component_bi_langmuir.rst
│ │ ├── multi_component_bi_langmuir_ldf.rst
│ │ ├── multi_component_colloidal.rst
│ │ ├── multi_component_langmuir.rst
│ │ ├── multi_component_langmuir_ldf.rst
│ │ ├── multi_component_langmuir_ldf_liquid_phase.rst
│ │ ├── multi_component_ldf_freundlich.rst
│ │ ├── multi_component_sips.rst
│ │ ├── multi_component_spreading.rst
│ │ ├── multi_state_steric_mass_action.rst
│ │ ├── saska.rst
│ │ ├── self_association.rst
│ │ ├── simplified_multi_state_steric_mass_action.rst
│ │ └── steric_mass_action.rst
│ ├── consistent_initialization.rst
│ ├── file_format_input.png
│ ├── file_format_input_model_unit.png
│ ├── file_format_output.png
│ ├── file_format_structure.png
│ ├── flux_reconstruction.rst
│ ├── index.rst
│ ├── input_group.rst
│ ├── introduction.rst
│ ├── meta_group.rst
│ ├── output_group.rst
│ ├── parameter_dependencies.rst
│ ├── population_balance_model.rst
│ ├── reaction
│ │ ├── index.rst
│ │ ├── mass_action_law.rst
│ │ └── michaelis_menten_kinetics.rst
│ ├── return_data.rst
│ ├── sensitivities.rst
│ ├── solver.rst
│ ├── spatial_discretization_methods.rst
│ ├── system.rst
│ └── unit_operations
│ │ ├── 2d_general_rate_model.rst
│ │ ├── cstr.rst
│ │ ├── general_rate_model.rst
│ │ ├── index.rst
│ │ ├── inlet.rst
│ │ ├── lumped_rate_model_with_pores.rst
│ │ ├── lumped_rate_model_without_pores.rst
│ │ ├── multi_channel_transport_model.rst
│ │ ├── outlet.rst
│ │ └── radial_flow_models.rst
├── license.rst
├── literature.bib
├── logo
│ └── CADET-Doxygen.png
├── modelling
│ ├── binding
│ │ ├── affinity_energy_distribution.rst
│ │ ├── bi_steric_mass_action.rst
│ │ ├── extended_mobile_phase_modulator_langmuir.rst
│ │ ├── freundlich_ldf.rst
│ │ ├── generalized_ion_exchange.rst
│ │ ├── hic_constant_water_activity.rst
│ │ ├── hic_unified.rst
│ │ ├── hic_water_on_hydrophobic_surfaces.rst
│ │ ├── index.rst
│ │ ├── linear.rst
│ │ ├── mobile_phase_modulator_langmuir.rst
│ │ ├── multi_component_anti_langmuir.rst
│ │ ├── multi_component_bi_langmuir.rst
│ │ ├── multi_component_bi_langmuir_ldf.rst
│ │ ├── multi_component_colloidal.rst
│ │ ├── multi_component_langmuir.rst
│ │ ├── multi_component_langmuir_ldf.rst
│ │ ├── multi_component_langmuir_ldf_liquid_phase.rst
│ │ ├── multi_component_ldf_freundlich.rst
│ │ ├── multi_component_sips.rst
│ │ ├── multi_component_spreading.rst
│ │ ├── multi_state_steric_mass_action.rst
│ │ ├── saska.rst
│ │ ├── self_association.rst
│ │ ├── simplified_multi_state_steric_mass_action.rst
│ │ └── steric_mass_action.rst
│ ├── crystallization
│ │ ├── PBM_Part_I.png
│ │ ├── aggregation.rst
│ │ ├── fragmentation.rst
│ │ ├── index.rst
│ │ └── population_balance_model.rst
│ ├── equations.rst
│ ├── index.rst
│ ├── networks.rst
│ ├── reaction
│ │ ├── index.rst
│ │ ├── mass_action_law.rst
│ │ ├── michaelis_menten_kinetics.rst
│ │ ├── rate_constant_distribution_theory.rst
│ │ └── thomas_model.rst
│ └── unit_operations
│ │ ├── 2d_general_rate_model.rst
│ │ ├── column_bead_model.png
│ │ ├── column_bulk_model.png
│ │ ├── column_particle_geometries.png
│ │ ├── cstr.rst
│ │ ├── general_rate_model.rst
│ │ ├── index.rst
│ │ ├── inlet.rst
│ │ ├── lumped_rate_model_with_pores.rst
│ │ ├── lumped_rate_model_without_pores.rst
│ │ ├── mct_variable_areas.png
│ │ ├── multi_channel_transport_model.rst
│ │ ├── multi_channel_transport_model_class.png
│ │ ├── multiple_bound_states.png
│ │ └── outlet.rst
├── publications.rst
├── requirements.txt
├── simulation
│ ├── index.rst
│ ├── sections.png
│ └── time_integration.png
└── zbibliography.rst
├── include
├── ad
│ ├── setfad.hpp
│ ├── sfad-common.hpp
│ └── sfad.hpp
├── cadet
│ ├── Exceptions.hpp
│ ├── ExternalFunction.hpp
│ ├── FactoryFuncs.hpp
│ ├── HashUtil.hpp
│ ├── InletProfile.hpp
│ ├── LibExportImport.hpp
│ ├── LibVersionInfo.hpp
│ ├── Logging.hpp
│ ├── Model.hpp
│ ├── ModelBuilder.hpp
│ ├── ModelSystem.hpp
│ ├── Notification.hpp
│ ├── ParameterId.hpp
│ ├── ParameterProvider.hpp
│ ├── Simulator.hpp
│ ├── SolutionExporter.hpp
│ ├── SolutionRecorder.hpp
│ ├── StringUtil.hpp
│ ├── StrongTypes.hpp
│ ├── cadet.h
│ └── cadet.hpp
├── common
│ ├── CompilerSpecific.hpp
│ ├── Driver.hpp
│ ├── JsonParameterProvider.hpp
│ ├── Logger.hpp
│ ├── LoggerBase.hpp
│ ├── OrderingConverter.hpp
│ ├── ParameterProviderImpl.hpp
│ ├── SolutionRecorderImpl.hpp
│ ├── TclapUtils.hpp
│ └── Timer.hpp
└── io
│ ├── FileIO.hpp
│ ├── IOException.hpp
│ ├── hdf5
│ ├── HDF5Base.hpp
│ ├── HDF5Reader.hpp
│ └── HDF5Writer.hpp
│ └── xml
│ ├── XMLBase.hpp
│ ├── XMLReader.hpp
│ └── XMLWriter.hpp
├── src
├── build-tools
│ ├── CMakeLists.txt
│ └── templateCodeGen.cpp
├── cadet-cli
│ ├── CMakeLists.txt
│ ├── Logging.hpp
│ ├── ProgressBar.cpp
│ ├── ProgressBar.hpp
│ ├── SignalHandler.cpp
│ ├── SignalHandler.hpp
│ └── cadet-cli.cpp
├── io
│ ├── FileIO.cpp
│ └── JsonParameterProvider.cpp
├── libcadet
│ ├── AdUtils.cpp
│ ├── AdUtils.hpp
│ ├── AutoDiff.cpp
│ ├── AutoDiff.hpp
│ ├── Benchmark.hpp
│ ├── BindingModelFactory.cpp
│ ├── BindingModelFactory.hpp
│ ├── CMakeLists.txt
│ ├── CompileTimeConfig.hpp.in
│ ├── ConfigurationHelper.hpp
│ ├── ExchangeModelFactory.cpp
│ ├── ExchangeModelFactory.hpp
│ ├── FactoryFuncs.cpp
│ ├── HighResKoren.hpp
│ ├── LapackInterface.hpp
│ ├── LocalVector.hpp
│ ├── Logging.cpp
│ ├── Logging.hpp
│ ├── LoggingUtils.hpp
│ ├── MathUtil.hpp
│ ├── Memory.hpp
│ ├── ModelBuilderImpl.cpp
│ ├── ModelBuilderImpl.hpp
│ ├── ParallelSupport.hpp
│ ├── ParamIdUtil.hpp
│ ├── ParamReaderHelper.hpp
│ ├── ParamReaderScopes.hpp
│ ├── ParameterDependenceFactory.cpp
│ ├── ParameterDependenceFactory.hpp
│ ├── ReactionModelFactory.cpp
│ ├── ReactionModelFactory.hpp
│ ├── SensParamUtil.hpp
│ ├── SimulatableModel.hpp
│ ├── SimulationTypes.hpp
│ ├── SimulatorImpl.cpp
│ ├── SimulatorImpl.hpp
│ ├── SlicedVector.hpp
│ ├── Stencil.hpp
│ ├── SundialsVector.hpp
│ ├── VersionInfo.cpp.in
│ ├── Weno.cpp
│ ├── Weno.hpp
│ ├── api
│ │ └── CAPIv1.cpp
│ ├── graph
│ │ ├── GraphAlgos.cpp
│ │ └── GraphAlgos.hpp
│ ├── linalg
│ │ ├── ActiveDenseMatrix.hpp
│ │ ├── BandMatrix.cpp
│ │ ├── BandMatrix.hpp
│ │ ├── BandedEigenSparseRowIterator.hpp
│ │ ├── CompressedSparseMatrix.cpp
│ │ ├── CompressedSparseMatrix.hpp
│ │ ├── DenseMatrix.cpp
│ │ ├── DenseMatrix.hpp
│ │ ├── EigenSolverWrapper.cpp
│ │ ├── EigenSolverWrapper.hpp
│ │ ├── Gmres.cpp
│ │ ├── Gmres.hpp
│ │ ├── Norms.hpp
│ │ ├── SparseMatrix.cpp
│ │ ├── SparseMatrix.hpp
│ │ ├── SparseSolverInterface.hpp.in
│ │ ├── Subset.hpp
│ │ ├── SuperLUSparseMatrix.cpp
│ │ ├── SuperLUSparseMatrix.hpp
│ │ ├── UMFPackSparseMatrix.cpp
│ │ └── UMFPackSparseMatrix.hpp
│ ├── model
│ │ ├── BindingModel.hpp
│ │ ├── ExchangeModel.hpp
│ │ ├── ExternalFunctionSupport.hpp
│ │ ├── GeneralRateModel-InitialConditions.cpp
│ │ ├── GeneralRateModel-LinearSolver.cpp
│ │ ├── GeneralRateModel.cpp
│ │ ├── GeneralRateModel.hpp
│ │ ├── GeneralRateModel2D-InitialConditions.cpp
│ │ ├── GeneralRateModel2D-LinearSolver.cpp
│ │ ├── GeneralRateModel2D.cpp
│ │ ├── GeneralRateModel2D.hpp
│ │ ├── GeneralRateModel2DBuilder.cpp
│ │ ├── GeneralRateModelBuilder.cpp
│ │ ├── GeneralRateModelDG-InitialConditions.cpp
│ │ ├── GeneralRateModelDG-LinearSolver.cpp
│ │ ├── GeneralRateModelDG.cpp
│ │ ├── GeneralRateModelDG.hpp
│ │ ├── InletModel.cpp
│ │ ├── InletModel.hpp
│ │ ├── LumpedRateModelWithPores-InitialConditions.cpp
│ │ ├── LumpedRateModelWithPores-LinearSolver.cpp
│ │ ├── LumpedRateModelWithPores.cpp
│ │ ├── LumpedRateModelWithPores.hpp
│ │ ├── LumpedRateModelWithPoresBuilder.cpp
│ │ ├── LumpedRateModelWithPoresDG-InitialConditions.cpp
│ │ ├── LumpedRateModelWithPoresDG-LinearSolver.cpp
│ │ ├── LumpedRateModelWithPoresDG.cpp
│ │ ├── LumpedRateModelWithPoresDG.hpp
│ │ ├── LumpedRateModelWithPoresDG2D-InitialConditions.cpp
│ │ ├── LumpedRateModelWithPoresDG2D-LinearSolver.cpp
│ │ ├── LumpedRateModelWithPoresDG2D.cpp
│ │ ├── LumpedRateModelWithPoresDG2D.hpp
│ │ ├── LumpedRateModelWithoutPores.cpp
│ │ ├── LumpedRateModelWithoutPores.hpp
│ │ ├── LumpedRateModelWithoutPoresBuilder.cpp
│ │ ├── LumpedRateModelWithoutPoresDG.cpp
│ │ ├── LumpedRateModelWithoutPoresDG.hpp
│ │ ├── ModelSystemImpl-Helper.hpp
│ │ ├── ModelSystemImpl-InitialConditions.cpp
│ │ ├── ModelSystemImpl-LinearSolver.cpp
│ │ ├── ModelSystemImpl-Residual.cpp
│ │ ├── ModelSystemImpl.cpp
│ │ ├── ModelSystemImpl.hpp
│ │ ├── ModelUtils.hpp
│ │ ├── MultiChannelTransportModel-InitialConditions.cpp
│ │ ├── MultiChannelTransportModel-LinearSolver.cpp
│ │ ├── MultiChannelTransportModel.cpp
│ │ ├── MultiChannelTransportModel.hpp
│ │ ├── OutletModel.cpp
│ │ ├── OutletModel.hpp
│ │ ├── ParameterDependence.hpp
│ │ ├── ParameterMultiplexing.cpp
│ │ ├── ParameterMultiplexing.hpp
│ │ ├── Parameters.hpp
│ │ ├── ReactionModel.hpp
│ │ ├── StirredTankModel.cpp
│ │ ├── StirredTankModel.hpp
│ │ ├── UnitOperation.hpp
│ │ ├── UnitOperationBase.cpp
│ │ ├── UnitOperationBase.hpp
│ │ ├── binding
│ │ │ ├── AntiLangmuirBinding.cpp
│ │ │ ├── BiLangmuirBinding.cpp
│ │ │ ├── BiLangmuirLDFBinding.cpp
│ │ │ ├── BiStericMassActionBinding.cpp
│ │ │ ├── BindingModelBase.cpp
│ │ │ ├── BindingModelBase.hpp
│ │ │ ├── BindingModelMacros.hpp
│ │ │ ├── ColloidalBinding.cpp
│ │ │ ├── DummyBinding.cpp
│ │ │ ├── ExtendedMobilePhaseModulatorLangmuirBinding.cpp
│ │ │ ├── ExternalFunctionTemplate.cpp
│ │ │ ├── FreundlichLDFBinding.cpp
│ │ │ ├── GeneralizedIonExchangeBinding.cpp
│ │ │ ├── HICConstantWaterActivityBinding.cpp
│ │ │ ├── HICUnifiedBinding.cpp
│ │ │ ├── HICWaterOnHydrophobicSurfacesBinding.cpp
│ │ │ ├── KumarLangmuirBinding.cpp
│ │ │ ├── LangmuirBinding.cpp
│ │ │ ├── LangmuirLDFBinding.cpp
│ │ │ ├── LangmuirLDFCBinding.cpp
│ │ │ ├── LinearBinding.cpp
│ │ │ ├── MobilePhaseModulatorLangmuirBinding.cpp
│ │ │ ├── MultiComponentLDFFreundlichBinding.cpp
│ │ │ ├── MultiComponentSpreadingBinding.cpp
│ │ │ ├── MultiStateStericMassActionBinding.cpp
│ │ │ ├── RefConcentrationSupport.hpp
│ │ │ ├── SaskaBinding.cpp
│ │ │ ├── SelfAssociationBinding.cpp
│ │ │ ├── SimplifiedMultiStateStericMassActionBinding.cpp
│ │ │ ├── SimplifiedMultiStateStericMassActionBinding.hpp
│ │ │ ├── SipsBinding.cpp
│ │ │ └── StericMassActionBinding.cpp
│ │ ├── exchange
│ │ │ └── LinearExchange.cpp
│ │ ├── extfun
│ │ │ ├── LinearInterpolationExternalFunction.cpp
│ │ │ └── PiecewiseCubicPolyExternalFunction.cpp
│ │ ├── inlet
│ │ │ └── PiecewiseCubicPoly.cpp
│ │ ├── paramdep
│ │ │ ├── DummyParameterDependence.cpp
│ │ │ ├── IdentityParameterDependence.cpp
│ │ │ ├── LiquidSaltSolidParameterDependence.cpp
│ │ │ ├── ParameterDependenceBase.cpp
│ │ │ ├── ParameterDependenceBase.hpp
│ │ │ └── PowerLawParameterDependence.cpp
│ │ ├── parts
│ │ │ ├── AxialConvectionDispersionKernel.cpp
│ │ │ ├── AxialConvectionDispersionKernel.hpp
│ │ │ ├── BindingCellKernel.hpp
│ │ │ ├── ConvectionDispersionOperator.cpp
│ │ │ ├── ConvectionDispersionOperator.hpp
│ │ │ ├── ConvectionDispersionOperatorDG.cpp
│ │ │ ├── ConvectionDispersionOperatorDG.hpp
│ │ │ ├── DGToolbox.cpp
│ │ │ ├── DGToolbox.hpp
│ │ │ ├── MultiChannelConvectionDispersionOperator.cpp
│ │ │ ├── MultiChannelConvectionDispersionOperator.hpp
│ │ │ ├── RadialConvectionDispersionKernel.cpp
│ │ │ ├── RadialConvectionDispersionKernel.hpp
│ │ │ ├── TwoDimensionalConvectionDispersionOperator.cpp
│ │ │ ├── TwoDimensionalConvectionDispersionOperator.hpp
│ │ │ ├── TwoDimensionalConvectionDispersionOperatorDG.cpp
│ │ │ └── TwoDimensionalConvectionDispersionOperatorDG.hpp
│ │ └── reaction
│ │ │ ├── CrystallizationReaction.cpp
│ │ │ ├── DummyReaction.cpp
│ │ │ ├── ExternalFunctionTemplate.cpp
│ │ │ ├── MassActionLawReaction.cpp
│ │ │ ├── MichaelisMentenReaction.cpp
│ │ │ ├── ReactionModelBase.cpp
│ │ │ └── ReactionModelBase.hpp
│ └── nonlin
│ │ ├── AdaptiveTrustRegionNewton.cpp
│ │ ├── AdaptiveTrustRegionNewton.hpp
│ │ ├── CompositeSolver.cpp
│ │ ├── CompositeSolver.hpp
│ │ ├── LevenbergMarquardt.cpp
│ │ ├── LevenbergMarquardt.hpp
│ │ ├── Solver.cpp
│ │ └── Solver.hpp
└── tools
│ ├── CMakeLists.txt
│ ├── FormatConverter.cpp
│ ├── FormatConverter.hpp
│ ├── ToolsHelper.hpp
│ ├── convertFile.cpp
│ ├── createConvBenchmark.cpp
│ ├── createLWE.cpp
│ ├── createMCLin.cpp
│ ├── createSCLang.cpp
│ ├── createSCLin.cpp
│ └── createSCLinStep.cpp
├── test
├── AD.cpp
├── Approx.hpp
├── BandMatrix.cpp
├── BindingModelAutoJacobian.cpp
├── BindingModelTests.cpp
├── BindingModelTests.hpp
├── BindingModels.cpp
├── BindingModels.hpp
├── CMakeLists.txt
├── CSTR-Residual.cpp
├── CSTR-Simulation.cpp
├── CellKernelTests.cpp
├── ColumnTests.cpp
├── ColumnTests.hpp
├── ConvectionDispersionOperator.cpp
├── Crystallization.cpp
├── DenseMatrix.cpp
├── Dummies.hpp
├── GeneralRateModel.cpp
├── GeneralRateModel2D.cpp
├── GeneralRateModelDG.cpp
├── Graph.cpp
├── Histogram.cpp
├── JacobianHelper.hpp
├── JsonTestModels.cpp
├── JsonTestModels.hpp
├── LogUtils.cpp
├── LumpedRateModelWithPores.cpp
├── LumpedRateModelWithPoresDG.cpp
├── LumpedRateModelWithPoresDG2D.cpp
├── LumpedRateModelWithoutPores.cpp
├── LumpedRateModelWithoutPoresDG.cpp
├── MatrixHelper.hpp
├── ModelSystem.cpp
├── MultiChannelTransportModel.cpp
├── ParamDepTests.cpp
├── ParamDepTests.hpp
├── ParameterDependencies.cpp
├── ParameterDependencies.hpp
├── ParticleHelper.cpp
├── ParticleHelper.hpp
├── Paths.cpp.in
├── RadialGeneralRateModel.cpp
├── RadialLumpedRateModelWithPores.cpp
├── RadialLumpedRateModelWithoutPores.cpp
├── ReactionModelTests.cpp
├── ReactionModelTests.hpp
├── ReactionModels.cpp
├── SimHelper.cpp
├── SimHelper.hpp
├── SparseFactorizableMatrix.cpp
├── SparseMatrix.cpp
├── StringHashing.cpp
├── Subset.cpp
├── TimeIntegrator.cpp
├── TimeIntegrator.hpp
├── TwoDimConvectionDispersionOperator.cpp
├── UnitOperationTests.cpp
├── UnitOperationTests.hpp
├── Utils.hpp
├── data
│ ├── convergence_GRM_dynLin_1comp_sensbenchmark1.json
│ ├── convergence_GRM_reqSMA_4comp_sensbenchmark1.json
│ ├── convergence_LRMP_dynLin_1comp_sensbenchmark1.json
│ ├── convergence_LRMP_reqSMA_4comp_sensbenchmark1.json
│ ├── convergence_LRM_dynLin_1comp_sensbenchmark1.json
│ ├── convergence_LRM_reqSMA_4comp_sensbenchmark1.json
│ ├── convergence_radGRM_dynLin_1comp_sensbenchmark1.json
│ ├── convergence_radLRMP_dynLin_1comp_sensbenchmark1.json
│ ├── convergence_radLRM_dynLin_1comp_sensbenchmark1.json
│ ├── grm-nonBinding.data
│ ├── grm-pulseBenchmark.data
│ ├── lrm-nonBinding.data
│ ├── lrm-pulseBenchmark.data
│ ├── lrmp-nonBinding.data
│ ├── lrmp-pulseBenchmark.data
│ ├── model_2DLRMP3Zone_noFilmDiff_1Comp_benchmark1.json
│ ├── model_CSTR_MichaelisMenten_benchmark1.json
│ ├── model_CSTR_MichaelisMenten_benchmark2.json
│ ├── model_CSTR_MichaelisMenten_twoInhib_benchmark1.json
│ ├── model_CSTR_MicroKineticsSMA_benchmark1.json
│ ├── model_CSTR_MicroKineticsSMA_twoInhib_benchmark1.json
│ ├── model_CSTR_reacMAL_2comp_sensbenchmark1.json
│ ├── model_GRM_dynLin_1comp_benchmark1.json
│ ├── model_GRM_dynLin_1comp_sensbenchmark2.json
│ ├── model_GRM_reqSMA_4comp_benchmark1.json
│ ├── model_GRMparType2_dynLin_2comp_sensbenchmark1.json
│ ├── model_LRMP2D2parType_bulkTransportRadVar_1comp.json
│ ├── model_LRMP2D_bulkTransportRadVar_1comp.json
│ ├── model_LRMP2D_bulkTransport_1comp.json
│ ├── model_LRMP2D_dynLin_2comp.json
│ ├── model_LRMP_dynLin_1comp_benchmark1.json
│ ├── model_LRMP_reqSMA_4comp_benchmark1.json
│ ├── model_LRM_dynLin_1comp_benchmark1.json
│ ├── model_LRM_noBnd_1comp_MCTbenchmark.json
│ ├── model_LRM_reqSMA_4comp_benchmark1.json
│ ├── model_MCT1ch_noEx_noReac_benchmark1.json
│ ├── model_MCT1ch_noEx_reac_benchmark1.json
│ ├── model_MCT2ch_1comp_benchmark1.json
│ ├── model_MCT2ch_oneWayEx_reac_benchmark1.json
│ ├── model_MCT3ch_twoWayExc_reac_benchmark1.json
│ ├── model_cry_CSTR_PBM_Agg_Frag_benchmark1.json
│ ├── model_cry_CSTR_PBM_growthSizeDep_benchmark1.json
│ ├── model_cry_CSTR_PBM_growth_benchmark1.json
│ ├── model_cry_CSTR_PBM_primaryNucleationAndGrowth_benchmark1.json
│ ├── model_cry_CSTR_PBM_primaryNucleationGrowthGrowthRateDispersion_benchmark1.json
│ ├── model_cry_CSTR_PBM_primarySecondaryNucleationAndGrowth_benchmark1.json
│ ├── model_cry_CSTR_PBM_primarySecondaryNucleationGrowth_benchmark1.json
│ ├── model_cry_CSTR_aggFrag_benchmark1.json
│ ├── model_cry_CSTR_aggregation_benchmark1.json
│ ├── model_cry_CSTR_fragmentation_benchmark1.json
│ ├── model_cry_DPFR_PBM_aggregation_benchmark1.json
│ ├── model_cry_DPFR_PBM_primarySecondaryNucleationGrowth_benchmark1.json
│ ├── model_radGRM_dynLin_1comp_sensbenchmark1.json
│ ├── model_radLRMP_dynLin_1comp_sensbenchmark1.json
│ ├── model_radLRM_dynLin_1comp_sensbenchmark1.json
│ ├── ref_2DLRMP3Zone_noFilmDiff_1Comp_benchmark1.h5
│ ├── ref_CSTR_MichaelisMenten_benchmark2.h5
│ ├── ref_CSTR_reacMAL_2comp_sensbenchmark1.h5
│ ├── ref_GRM_dynLin_1comp_sensbenchmark1_FV_Z1024parZ128.h5
│ ├── ref_GRM_dynLin_1comp_sensbenchmark1_FV_Z32parZ4.h5
│ ├── ref_GRM_dynLin_1comp_sensbenchmark1_cDG_P3Z8_GSM_parP3parZ1.h5
│ ├── ref_GRM_dynLin_1comp_sensbenchmark2_FV_Z32parZ4.h5
│ ├── ref_GRM_dynLin_1comp_sensbenchmark2_cDG_P3Z8_GSM_parP3parZ1.h5
│ ├── ref_GRM_reqSMA_4comp_sensbenchmark1_FV_Z16parZ2.h5
│ ├── ref_GRM_reqSMA_4comp_sensbenchmark1_FV_Z512parZ64.h5
│ ├── ref_GRM_reqSMA_4comp_sensbenchmark1_cDG_P3Z8_GSM_parP3parZ1.h5
│ ├── ref_GRMparType2_dynLin_2comp_sensbenchmark1_FV_Z16parZ8.h5
│ ├── ref_GRMparType2_dynLin_2comp_sensbenchmark1_cDG_P3Z4_DGexInt_parP3parZ2.h5
│ ├── ref_LRMP_dynLin_1comp_sensbenchmark1_DG_P3Z8.h5
│ ├── ref_LRMP_dynLin_1comp_sensbenchmark1_FV_Z32.h5
│ ├── ref_LRMP_dynLin_1comp_sensbenchmark1_FV_Z32768.h5
│ ├── ref_LRMP_reqSMA_4comp_sensbenchmark1_DG_P3Z8.h5
│ ├── ref_LRMP_reqSMA_4comp_sensbenchmark1_FV_Z2048.h5
│ ├── ref_LRMP_reqSMA_4comp_sensbenchmark1_FV_Z32.h5
│ ├── ref_LRM_dynLin_1comp_benchmark2_FV_Z357.h5
│ ├── ref_LRM_dynLin_1comp_sensbenchmark1_DG_P3Z8.h5
│ ├── ref_LRM_dynLin_1comp_sensbenchmark1_FV_Z131072.h5
│ ├── ref_LRM_dynLin_1comp_sensbenchmark1_FV_Z32.h5
│ ├── ref_LRM_noBnd_1comp_MCTbenchmark_FV_Z256.h5
│ ├── ref_LRM_reqSMA_4comp_sensbenchmark1_DG_P3Z8.h5
│ ├── ref_LRM_reqSMA_4comp_sensbenchmark1_FV_Z32.h5
│ ├── ref_LRM_reqSMA_4comp_sensbenchmark1_FV_Z4096.h5
│ ├── ref_MCT1ch_noEx_noReac_benchmark1_FV_Z256.h5
│ ├── ref_MCT1ch_noEx_reac_benchmark1_FV_Z256.h5
│ ├── ref_MCT2ch_oneWayEx_reac_benchmark1_FV_Z256.h5
│ ├── ref_MCT3ch_twoWayExc_reac_benchmark1_FV_Z256.h5
│ ├── ref_cry_CSTR_PBM_Agg_Frag_benchmark1.h5
│ ├── ref_cry_CSTR_PBM_growthSizeDep_benchmark1.h5
│ ├── ref_cry_CSTR_PBM_growth_benchmark1.h5
│ ├── ref_cry_CSTR_PBM_primaryNucleationAndGrowth_benchmark1.h5
│ ├── ref_cry_CSTR_PBM_primaryNucleationGrowthGrowthRateDispersion_benchmark1.h5
│ ├── ref_cry_CSTR_PBM_primarySecondaryNucleationAndGrowth_benchmark1.h5
│ ├── ref_cry_CSTR_PBM_primarySecondaryNucleationGrowth_benchmark1.h5
│ ├── ref_cry_CSTR_aggFrag_benchmark1.h5
│ ├── ref_cry_CSTR_aggregation_benchmark1.h5
│ ├── ref_cry_CSTR_fragmentation_benchmark1.h5
│ ├── ref_cry_DPFR_PBM_aggregation_benchmark1.h5
│ ├── ref_cry_DPFR_PBM_primarySecondaryNucleationGrowth_benchmark1.h5
│ ├── ref_radGRM_dynLin_1comp_sensbenchmark1_FV_Z32parZ4.h5
│ ├── ref_radLRMP_dynLin_1comp_sensbenchmark1_FV_Z32.h5
│ └── ref_radLRM_dynLin_1comp_sensbenchmark1_FV_Z32.h5
├── smaNonlinearProblem.m
├── testAdaptiveTRNewton.cpp
├── testCAPIv1.cpp
├── testCompileTimeMurmur.cpp
├── testLogging.cpp
├── testRadialKernel.cpp
├── testRunner.cpp
└── testSMANonlinearSolve.cpp
├── vcpkg-configuration.json
├── vcpkg.json
└── version.txt
/.codecov.yaml:
--------------------------------------------------------------------------------
1 | coverage:
2 | status:
3 | project:
4 | default:
5 | target: 55%
6 |
7 | ignore:
8 | - ".*ThirdParty.*"
9 | - ".*/test/.*"
10 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | ## Expected Behavior
11 |
12 |
13 | ## Actual Behavior
14 |
15 |
16 | ## Steps to Reproduce the Problem
17 |
18 | 1.
19 | 2.
20 | 3.
21 |
22 | ## Specifications
23 |
24 | - Version:
25 | - Platform:
26 | - Subsystem:
27 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Is your feature request related to a problem? Please describe.**
11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12 |
13 | **Describe the solution you'd like**
14 | A clear and concise description of what you want to happen.
15 |
16 | **Describe alternatives you've considered**
17 | A clear and concise description of any alternative solutions or features you've considered.
18 |
19 | **Additional context**
20 | Add any other context or screenshots about the feature request here.
21 |
22 | **Internal**
23 | For CADET Team members: Please assign a label, an assignee, and a topic in the project.
24 |
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md:
--------------------------------------------------------------------------------
1 | ## Description of the PR
2 |
3 | Please include a summary of the changes made in this pull request. Provide context and describe **why** this change is necessary.
4 |
5 |
6 | Fixes # (issue number)
7 |
8 | ## Type of Change
9 |
10 | Please select the type of change that applies:
11 |
12 | 🔹 **Bug fix** – Fixes an issue without breaking anything
13 | 🔹 **New feature** – Adds new functionality without breaking anything
14 | 🔹 **Documentation update** – Updates documentation
15 |
16 | ## Checklist
17 |
18 | Please ensure you've completed the following tasks. Mark them with an `x` inside the brackets:
19 |
20 | - [ ] I have checked the CADET [Developer Guide](https://cadet.github.io/master/developer_guide)
21 | - [ ] My code follows the project's code style and [RSE guidelines](https://rse-guidelines.readthedocs.io/en/latest/intro.html).
22 | - [ ] I have run relevant tests and verified that my changes do not break existing functionality.
23 | - [ ] I have updated documentation as needed.
24 | - [ ] I have reviewed my code for security considerations and potential vulnerabilities.
25 | - [ ] I have added necessary comments or descriptions for maintainers and reviewers.
26 |
27 | ## Additional Notes
28 |
29 | Include any additional comments or considerations here. Mention other PRs or issues that might be relevant or related.
30 |
31 |
--------------------------------------------------------------------------------
/.github/workflows/cd.yml:
--------------------------------------------------------------------------------
1 | name: CD tests
2 |
3 | on:
4 | workflow_dispatch:
5 | inputs:
6 | ref:
7 | description: 'Commit hash, branch name, or tag to run the CD pipeline for'
8 | required: false
9 | default: 'master'
10 | type: string
11 |
12 |
13 | jobs:
14 | Ubuntu-latest:
15 | runs-on: ubuntu-latest
16 | strategy:
17 | fail-fast: true
18 | defaults:
19 | run:
20 | shell: bash -l {0}
21 | env:
22 | SRC_DIR: ${{ github.workspace }}/src
23 | BUILD_DIR: ${{ github.workspace }}/build
24 | INSTALL_PREFIX: ${{ github.workspace }}/install
25 | BUILD_TYPE: Release
26 | steps:
27 | - uses: actions/checkout@v4
28 | with:
29 | submodules: true
30 | path: src
31 | ref: ${{ github.event.inputs.ref || github.ref }}
32 | - name: Install Dependencies
33 | run: |
34 | sudo apt-get update
35 | sudo apt -y install \
36 | build-essential \
37 | libhdf5-dev \
38 | liblapack-dev \
39 | libblas-dev \
40 | libtbb-dev \
41 | libsuperlu-dev \
42 | libeigen3-dev;
43 | - name: Build and Install
44 | run: |
45 | cmake -E make_directory "${BUILD_DIR}"
46 | cmake -E make_directory "${INSTALL_PREFIX}"
47 | cd "${BUILD_DIR}"
48 | cmake -DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" "${SRC_DIR}" -DENABLE_TESTS=ON -DNUM_MAX_AD_DIRS=1320
49 | make install -j$(nproc)
50 | - name: Check if it runs
51 | run: |
52 | export LD_LIBRARY_PATH=${INSTALL_PREFIX}/lib:$LD_LIBRARY_PATH
53 | ${INSTALL_PREFIX}/bin/cadet-cli --version || true
54 | ${INSTALL_PREFIX}/bin/createLWE
55 | ${INSTALL_PREFIX}/bin/cadet-cli LWE.h5 || true
56 | - name: Run tests
57 | run: |
58 | ${BUILD_DIR}/test/testRunner [ReleaseCI]
59 |
60 |
--------------------------------------------------------------------------------
/.github/workflows/deploy_documentation.yml:
--------------------------------------------------------------------------------
1 | name: "Trigger for dispatching CADET-Website"
2 | on:
3 | push:
4 | branches:
5 | - 'master'
6 |
7 | jobs:
8 | dispatch_docs:
9 | runs-on: ubuntu-latest
10 | steps:
11 | - name: Repository Dispatch
12 | uses: peter-evans/repository-dispatch@v2
13 | with:
14 | token: ${{ secrets.DISPATCH_DOCS }}
15 | repository: modsim/CADET-Website
16 | event-type: build_docs
17 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ### Linux ###
2 | *~
3 |
4 | # temporary files which can be created if a process still has a handle open of a deleted file
5 | .fuse_hidden*
6 |
7 | # KDE directory preferences
8 | .directory
9 |
10 | # Linux trash folder which might appear on any partition or disk
11 | .Trash-*
12 |
13 | # .nfs files are created when an open file is removed but is still being accessed
14 | .nfs*
15 |
16 | ### macOS ###
17 | *.DS_Store
18 | .AppleDouble
19 | .LSOverride
20 |
21 | # Thumbnails
22 | ._*
23 |
24 | ### Windows ###
25 | # Windows thumbnail cache files
26 | Thumbs.db
27 | ehthumbs.db
28 | ehthumbs_vista.db
29 |
30 | # Folder config file
31 | Desktop.ini
32 |
33 | # Recycle Bin used on file shares
34 | $RECYCLE.BIN/
35 |
36 | # Windows shortcuts
37 | *.lnk
38 |
39 |
40 | ### Ignore temporary editor files ###
41 | *.m~
42 | *.asv
43 | *._*
44 | *.*~
45 |
46 | ### Ignore binaries ###
47 | *.mexmaci64
48 | *.mexa64
49 | *.mexw64
50 | *.mexw32
51 | *.dll
52 | *.dylib
53 | *.so
54 |
55 | ### Ignore generated documentation and LaTeX aux files ###
56 | doc/doxy/html
57 | doc/tex/*.aux
58 | doc/tex/*.fdb_latexmk
59 | doc/tex/*.bbl
60 | doc/tex/*.bcf
61 | doc/tex/*.run.xml
62 | doc/tex/*.out
63 | doc/tex/*.blg
64 | doc/tex/*.lot
65 | doc/tex/*.lof
66 | doc/tex/*.toc
67 | doc/tex/*.log
68 | doc/tex/*.idx
69 | doc/tex/*.ind
70 | doc/tex/*.gitinfo
71 | doc/tex/*.synctex.gz
72 | doc/tex/*.pdf
73 | doc/tex/docs/*.aux
74 |
75 | ### Ignore IDE files ###
76 | .vs/
77 | .vscode/
78 | .idea/
79 | *.iws
80 | *.kdev4
81 | .kdev4/
82 | compile_commands.json
83 |
84 | # Ignore build and install directories
85 | build
86 | build_RELEASE
87 | build_RELEASE_with_Debug_Info
88 | build_RELEASE_with_Tests
89 | build_DEBUG
90 | build_DEBUG_with_Tests
91 | install
92 | vcpkg_installed
93 |
--------------------------------------------------------------------------------
/.readthedocs.yaml:
--------------------------------------------------------------------------------
1 | # .readthedocs.yaml
2 | # Read the Docs configuration file
3 | # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4 |
5 | # Required
6 | version: 2
7 |
8 | # Set the version of Python and other tools you might need
9 | build:
10 | os: ubuntu-22.04
11 | tools:
12 | python: "3.11"
13 |
14 | # Build documentation in the docs/ directory with Sphinx
15 | sphinx:
16 | configuration: docs/conf.py
17 |
18 | # We recommend specifying your dependencies to enable reproducible builds:
19 | # https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
20 | python:
21 | install:
22 | - requirements: docs/requirements.txt
23 |
--------------------------------------------------------------------------------
/.zenodo.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "CADET-Core: Version 5.0.3",
3 | "upload_type": "software",
4 | "creators": [
5 | {
6 | "name": "Leweke, Samuel",
7 | "orcid": "0000-0001-9471-4511",
8 | "affiliation": "Forschungszentrum Jülich"
9 | },
10 | {
11 | "name": "Breuer, Jan",
12 | "orcid": "0000-0002-1999-2439",
13 | "affiliation": "Forschungszentrum Jülich"
14 | },
15 | {
16 | "name": "Schmölder, Johannes",
17 | "orcid": "0000-0003-0446-7209",
18 | "affiliation": "Forschungszentrum Jülich"
19 | },
20 | {
21 | "name": "Jäpel, Ronald",
22 | "orcid": "0000-0002-4912-5176",
23 | "affiliation": "Forschungszentrum Jülich"
24 | },
25 | {
26 | "name": "Lanzrath, Hannah",
27 | "orcid": "0000-0002-2675-9002",
28 | "affiliation": "Forschungszentrum Jülich"
29 | },
30 | {
31 | "name": "Rao, Jayghosh",
32 | "orcid": "0000-0002-1216-9394",
33 | "affiliation": "Forschungszentrum Jülich"
34 | },
35 | {
36 | "name": "Hassan, Jazib",
37 | "orcid": "0000-0003-2741-5460",
38 | "affiliation": "Forschungszentrum Jülich"
39 | },
40 | {
41 | "name": "Zhang, Wendi",
42 | "orcid": "0000-0002-6127-1408",
43 | "affiliation": "Rensselaer Polytechnic Institute"
44 | },
45 | {
46 | "name": "Berger, Antonia",
47 | "orcid": "0009-0002-0207-9042",
48 | "affiliation": "Forschungszentrum Jülich"
49 | },
50 | {
51 | "name": "Heymann, William",
52 | "orcid": "0000-0002-5093-0797",
53 | "affiliation": "Forschungszentrum Jülich"
54 | },
55 | {
56 | "name": "von Lieres, Eric",
57 | "orcid": "0000-0002-0309-8408",
58 | "affiliation": "Forschungszentrum Jülich"
59 | }
60 | ],
61 | "license": "GPL-3.0",
62 | "keywords": [
63 | "modeling","simulation", "biotechnology", "process", "chromatography", "CADET", "general rate model", "C++"
64 | ],
65 | "version": "5.0.3",
66 | "access_right": "open",
67 | "communities": [
68 | { "identifier": "open-source" }
69 | ]
70 | }
71 |
--------------------------------------------------------------------------------
/BUILD-LINUX.md:
--------------------------------------------------------------------------------
1 | # Build CADET-Core on Linux
2 |
3 | ## Prerequisites
4 |
5 | * CMake (>= 3.12.0)
6 |
7 | * GCC >= 7.0, Clang >= 3.9, or Intel C++ 18.0
8 | * Optional: Git
9 |
10 | Assumed directory structure:
11 |
12 |
13 | |- CADET-Core
14 | | - src
15 | | - include
16 | | - [...]
17 | | - build
18 | | - install
19 |
20 |
21 | Note that the version numbers of the files and packages below are subject to change and will not always reflect the most
22 | recent version.
23 |
24 | ## Install dependencies
25 |
26 | ```
27 | sudo apt-get update
28 | sudo apt -y install build-essential cmake libhdf5-dev libsuperlu-dev libeigen3-dev
29 | ```
30 |
31 | ### LAPACK
32 |
33 | You can either use a LAPACK implementation provided by your distribution or install the freely available Intel MKL
34 |
35 | for Intel run
36 |
37 | ```
38 | sudo apt -y install intel-mkl
39 | ```
40 |
41 | for distro defaults run
42 |
43 | ```
44 | sudo apt -y install liblapack3 liblapack-dev libblas3 libblas-dev
45 | ```
46 |
47 | ## Build CADET-Core
48 |
49 | - Clone the CADET-Core source code `git clone https://github.com/cadet/cadet-core.git CADET-Core`
50 | - Create the directories `CADET-Core/build` and `CADET-Core/install`
51 |
52 | - Open a terminal and change to `CADET-Core/build`
53 | - If using MKL, execute `export MKLROOT=/opt/intel/mkl`
54 | - To compile:
55 |
56 | - Using standard LAPACK: Execute `cmake -DCMAKE_INSTALL_PREFIX="../install" ../`
57 |
58 | - Using MKL (sequential): Execute `cmake -DCMAKE_INSTALL_PREFIX="../install" -DBLA_VENDOR=Intel10_64lp_seq ../`
59 |
60 | - Using MKL (parallel): Execute `cmake -DCMAKE_INSTALL_PREFIX="../install" -DBLA_VENDOR=Intel10_64lp ../`
61 |
62 | There are further compile flags that can be passed to the above cmake command, please refer to the build options described in the developer guide.
63 |
64 | - To build:
65 | - Execute `make`
66 | - To install:
67 | - Execute `make install`
68 |
--------------------------------------------------------------------------------
/BUILD-OSX.md:
--------------------------------------------------------------------------------
1 | # Build CADET-Core on MacOS
2 |
3 | ## Prerequisites
4 |
5 | * CMake (>= 3.12.0)
6 | * GCC >= 7.0, Clang >= 3.9, or Intel C++ 18.0
7 | * Optional: Git
8 |
9 | Assumed directory structure:
10 |
11 |
12 | |- CADET-Core
13 | | - src
14 | | - include
15 | | - [...]
16 | | - build
17 | | - install
18 |
19 |
20 | Note that the version numbers of the files and packages below are subject to change and will not always reflect the most recent version.
21 |
22 | Also note that you have to use the same compiler for all packages. This is especially important if some of the packages are installed via a package manager such as [Homebrew](http://brew.sh/) which uses the system compiler (Clang).
23 |
24 | ## Build dependencies
25 |
26 | ```
27 | brew update > /dev/null || true
28 | brew install cmake --without-docs
29 | brew install hdf5
30 | brew install tbb
31 | brew install eigen
32 | ```
33 |
34 | ### LAPACK
35 |
36 | You can either use the native LAPACK implementation provided by Mac OS X (vecLib, Accelerate)
37 | or install the freely available [Intel MKL](https://software.intel.com/sites/campaigns/nest/) which is very fast and probably faster than Accelerate.
38 |
39 | ## Build CADET-Core
40 |
41 | - Clone the CADET-Core source code `git clone https://github.com/cadet/cadet-core.git CADET-Core`
42 | - Create the directories `CADET-Core/build` and `CADET-Core/install`
43 |
44 | * If using Intel MKL, execute `export MKLROOT=/opt/intel/mkl`
45 | * Using standard LAPACK: Execute `cmake -DCMAKE_INSTALL_PREFIX="/install" ../`
46 |
47 | Using MKL (sequential): Execute `cmake -DCMAKE_INSTALL_PREFIX="/install" -DBLA_VENDOR=Intel10_64lp_seq ../`
48 |
49 | Using MKL (parallel): Execute `cmake -DCMAKE_INSTALL_PREFIX="/install" -DBLA_VENDOR=Intel10_64lp ../`
50 |
51 | There are further compile flags that can be passed to the above cmake command, please refer to the build options described in the developer guide.
52 |
53 | * Execute `make`
54 | * Execute `make install`
55 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | ## Contributing
2 |
3 | CADET-Core is an open-source project and we are very happy to accept contributions from the community.
4 | Please feel free to open issues or submit patches (preferably as pull requests) any time.
5 | For planned larger contributions, it is often beneficial to get in contact with us first, e.g. through the [CADET forum](https://forum.cadet-web.de/).
6 |
7 | For detailed information on how to contribute, including guidelines, coding standards, and best practices, please refer to our [Developer Guide](https://cadet.github.io/master/developer_guide/index.html).
8 |
9 |
--------------------------------------------------------------------------------
/SECURITY.md:
--------------------------------------------------------------------------------
1 | # Security Policy
2 |
3 | ## 1. No Network Dependencies
4 |
5 | CADET operates entirely offline and does not require any network access, nor does it handle sensitive information such as personal identifiers. This eliminates common attack vectors like network exploits or data breaches.
6 |
7 | ## 2. Code Integrity and Contribution Reviews
8 |
9 | While there are no significant security risks associated with using CADET, we maintain strict controls over our source code. Any external contributions to the project are thoroughly reviewed and must meet our contribution guidelines. All pull requests are checked to ensure they do not introduce vulnerabilities.
10 |
11 | ## 3. Dependency Management
12 |
13 | CADET does not rely on third-party libraries that introduce network or verification components. We carefully manage dependencies to ensure they are up-to-date and secure.
14 |
15 | ## 4. Reporting Vulnerabilities
16 |
17 | Though CADET does not involve typical security risks, we encourage users and contributors to report any unexpected behavior or potential vulnerabilities they may discover. Please contact us via cadet@fz-juelich.de if you believe you've found a security issue.
18 |
--------------------------------------------------------------------------------
/ThirdParty/Catch/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Boost Software License - Version 1.0 - August 17th, 2003
2 |
3 | Permission is hereby granted, free of charge, to any person or organization
4 | obtaining a copy of the software and accompanying documentation covered by
5 | this license (the "Software") to use, reproduce, display, distribute,
6 | execute, and transmit the Software, and to prepare derivative works of the
7 | Software, and to permit third-parties to whom the Software is furnished to
8 | do so, all subject to the following:
9 |
10 | The copyright notices in the Software and this entire statement, including
11 | the above license grant, this restriction and the following disclaimer,
12 | must be included in all copies of the Software, in whole or in part, and
13 | all derivative works of the Software, unless such copies or derivative
14 | works are solely in the form of machine-executable object code generated by
15 | a source language processor.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
20 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
21 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
22 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23 | DEALINGS IN THE SOFTWARE.
24 |
--------------------------------------------------------------------------------
/ThirdParty/Catch/README.md:
--------------------------------------------------------------------------------
1 |
2 | 
3 |
4 | [](https://github.com/catchorg/catch2/releases)
5 | [](https://travis-ci.org/catchorg/Catch2)
6 | [](https://ci.appveyor.com/project/catchorg/catch2)
7 | [](https://codecov.io/gh/catchorg/Catch2)
8 | [](https://wandbox.org/permlink/6O2wo5BOvVeUeKQe)
9 |
10 | The latest version of the single header can be downloaded directly using this link
11 |
12 | ## Catch2 is released!
13 |
14 | If you've been using an earlier version of Catch, please see the
15 | Breaking Changes section of [the release notes](https://github.com/catchorg/Catch2/releases/tag/v2.0.1)
16 | before moving to Catch2. You might also like to read [this blog post](http://www.levelofindirection.com/journal/2017/11/3/catch2-released.html) for more details.
17 |
18 | ## What's the Catch?
19 |
20 | Catch2 stands for C++ Automated Test Cases in a Header and is a
21 | multi-paradigm test framework for C++. which also supports Objective-C
22 | (and maybe C).
23 | It is primarily distributed as a single header file, although certain
24 | extensions may require additional headers.
25 |
26 | ## How to use it
27 | This documentation comprises these three parts:
28 |
29 | * [Why do we need yet another C++ Test Framework?](docs/why-catch.md#top)
30 | * [Tutorial](docs/tutorial.md#top) - getting started
31 | * [Reference section](docs/Readme.md#top) - all the details
32 |
33 | ## More
34 | * Issues and bugs can be raised on the [Issue tracker on GitHub](https://github.com/catchorg/Catch2/issues)
35 | * For discussion or questions please use [the dedicated Google Groups forum](https://groups.google.com/forum/?fromgroups#!forum/catch-forum)
36 | * See [who else is using Catch2](docs/opensource-users.md#top)
37 |
--------------------------------------------------------------------------------
/ThirdParty/Catch/docs/Readme.md:
--------------------------------------------------------------------------------
1 |
2 | # Reference
3 |
4 | To get the most out of Catch2, start with the [tutorial](tutorial.md#top).
5 | Once you're up and running consider the following reference material.
6 |
7 | Writing tests:
8 | * [Assertion macros](assertions.md#top)
9 | * [Matchers](matchers.md#top)
10 | * [Logging macros](logging.md#top)
11 | * [Test cases and sections](test-cases-and-sections.md#top)
12 | * [Test fixtures](test-fixtures.md#top)
13 | * [Reporters](reporters.md#top)
14 | * [Event Listeners](event-listeners.md#top)
15 |
16 | Fine tuning:
17 | * [Supplying your own main()](own-main.md#top)
18 | * [Compile-time configuration](configuration.md#top)
19 | * [String Conversions](tostring.md#top)
20 |
21 | Running:
22 | * [Command line](command-line.md#top)
23 | * [CI and Build system integration](build-systems.md#top)
24 |
25 | FAQ:
26 | * [Why are my tests slow to compile?](slow-compiles.md#top)
27 | * [Known limitations](limitations.md#top)
28 |
29 | Other:
30 | * [Why Catch?](why-catch.md#top)
31 | * [Open Source Projects using Catch](opensource-users.md#top)
32 | * [Contributing](contributing.md#top)
33 | * [Release Notes](release-notes.md#top)
34 |
--------------------------------------------------------------------------------
/ThirdParty/Catch/docs/commercial-users.md:
--------------------------------------------------------------------------------
1 |
2 | # Commercial users of Catch
3 |
4 | As well as [Open Source](opensource-users.md#top) users Catch is widely used within proprietary code bases too.
5 | Many organisations like to keep this information internal, and that's fine,
6 | but if you're more open it would be great if we could list the names of as
7 | many organisations as possible that use Catch somewhere in their codebase.
8 | Enterprise environments often tend to be far more conservative in their tool adoption -
9 | and being aware that other companies are using Catch can ease the path in.
10 |
11 | So if you are aware of Catch usage in your organisation, and are fairly confident there is no issue with sharing this
12 | fact then please let us know - either directly, via a PR or
13 | [issue](https://github.com/philsquared/Catch/issues), or on the [forums](https://groups.google.com/forum/?fromgroups#!forum/catch-forum).
14 |
15 | - Bloomberg
16 | - NASA
17 | - [Inscopix Inc.](https://www.inscopix.com/)
18 |
--------------------------------------------------------------------------------
/ThirdParty/Catch/docs/list-of-examples.md:
--------------------------------------------------------------------------------
1 |
2 | # List of examples
3 |
4 | - Test Case: [Single-file](../examples/010-TestCase.cpp)
5 | - Test Case: [Multiple-file 1](../examples/020-TestCase-1.cpp), [2](../examples/020-TestCase-1.cpp)
6 | - Assertion: [REQUIRE, CHECK](../examples/030-Asn-Require-Check.cpp)
7 | - Assertion: [REQUIRE_THAT and Matchers](../examples/040-Asn-RequireThat.cpp)
8 | - Assertion: [REQUIRE_NO_THROW](../examples/050-Asn-RequireNoThrow.cpp)
9 | - Assertion: [REQUIRE_THROWS](../examples/050-Asn-RequireThrows.cpp)
10 | - Assertion: [REQUIRE_THROWS_AS](../examples/070-Asn-RequireThrowsAs.cpp)
11 | - Assertion: [REQUIRE_THROWS_WITH](../examples/080-Asn-RequireThrowsWith.cpp)
12 | - Assertion: [REQUIRE_THROWS_MATCHES](../examples/090-Asn-RequireThrowsMatches.cpp)
13 | - Fixture: [Sections](../examples/100-Fix-Section.cpp)
14 | - Fixture: [Class-based fixtures](../examples/110-Fix-ClassFixture.cpp)
15 | - BDD: [SCENARIO, GIVEN, WHEN, THEN](../examples/120-Bdd-ScenarioGivenWhenThen.cpp)
16 | - Floating point: [Approx - Comparisons](../examples/130-Fpt-Approx.cpp)
17 | - Logging: [CAPTURE - Capture expression](../examples/140-Log-Capture.cpp)
18 | - Logging: [INFO - Provide information with failure](../examples/150-Log-Info.cpp)
19 | - Logging: [WARN - Issue warning](../examples/160-Log-Warn.cpp)
20 | - Logging: [FAIL, FAIL_CHECK - Issue message and force failure/continue](../examples/170-Log-Fail.cpp)
21 | - Logging: [SUCCEED - Issue message and continue](../examples/180-Log-Succeed.cpp)
22 | - Report: [User-defined type](../examples/190-Rpt-ReportUserDefinedType.cpp)
23 | - Report: [Reporter](../examples/200-Rpt-UserDefinedReporter.cpp)
24 | - Listener: [Listeners](../examples/210-Evt-EventListeners.cpp)
25 | - Configuration: [Provide your own main()](../examples/220-Cfg-OwnMain.cpp)
26 | - Configuration: [Compile-time configuration](../examples/230-Cfg-CompileTimeConfiguration.cpp)
27 | - Configuration: [Run-time configuration](../examples/240-Cfg-RunTimeConfiguration.cpp)
28 |
29 | ---
30 |
31 | [Home](Readme.md#top)
32 |
--------------------------------------------------------------------------------
/ThirdParty/Catch/docs/test-fixtures.md:
--------------------------------------------------------------------------------
1 |
2 | # Test fixtures
3 |
4 | Although Catch allows you to group tests together as sections within a test case, it can still be convenient, sometimes, to group them using a more traditional test fixture. Catch fully supports this too. You define the test fixture as a simple structure:
5 |
6 | ```c++
7 | class UniqueTestsFixture {
8 | private:
9 | static int uniqueID;
10 | protected:
11 | DBConnection conn;
12 | public:
13 | UniqueTestsFixture() : conn(DBConnection::createConnection("myDB")) {
14 | }
15 | protected:
16 | int getID() {
17 | return ++uniqueID;
18 | }
19 | };
20 |
21 | int UniqueTestsFixture::uniqueID = 0;
22 |
23 | TEST_CASE_METHOD(UniqueTestsFixture, "Create Employee/No Name", "[create]") {
24 | REQUIRE_THROWS(conn.executeSQL("INSERT INTO employee (id, name) VALUES (?, ?)", getID(), ""));
25 | }
26 | TEST_CASE_METHOD(UniqueTestsFixture, "Create Employee/Normal", "[create]") {
27 | REQUIRE(conn.executeSQL("INSERT INTO employee (id, name) VALUES (?, ?)", getID(), "Joe Bloggs"));
28 | }
29 | ```
30 |
31 | The two test cases here will create uniquely-named derived classes of UniqueTestsFixture and thus can access the `getID()` protected method and `conn` member variables. This ensures that both the test cases are able to create a DBConnection using the same method (DRY principle) and that any ID's created are unique such that the order that tests are executed does not matter.
32 |
33 | ---
34 |
35 | [Home](Readme.md#top)
36 |
--------------------------------------------------------------------------------
/ThirdParty/inja/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 lbersch
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/ThirdParty/sundials/config/SundialsDeprecated.cmake:
--------------------------------------------------------------------------------
1 | # ---------------------------------------------------------------
2 | # Programmer: David J. Gardner @ LLNL
3 | # ---------------------------------------------------------------
4 | # LLNS Copyright Start
5 | # Copyright (c) 2014, Lawrence Livermore National Security
6 | # This work was performed under the auspices of the U.S. Department
7 | # of Energy by Lawrence Livermore National Laboratory in part under
8 | # Contract W-7405-Eng-48 and in part under Contract DE-AC52-07NA27344.
9 | # Produced at the Lawrence Livermore National Laboratory.
10 | # All rights reserved.
11 | # For details, see the LICENSE file.
12 | # LLNS Copyright End
13 | # ---------------------------------------------------------------
14 | # Print warning is the user sets a deprecated CMake variable and
15 | # copy the value into the correct CMake variable
16 | # ---------------------------------------------------------------
17 |
18 | # SUNDIALS_INDEX_TYPE got new behavior
19 | if(SUNDIALS_INDEX_TYPE)
20 | string(TOUPPER ${SUNDIALS_INDEX_TYPE} tmp)
21 |
22 | if(tmp STREQUAL "INT32_T")
23 | PRINT_WARNING("SUNDIALS_INDEX_TYPE overrides the standard types SUNDIALS looks for."
24 | "Setting SUNDIALS_INDEX_SIZE to 32 and clearing SUNDIALS_INDEX_TYPE.")
25 | FORCE_VARIABLE(SUNDIALS_INDEX_SIZE STRING "SUNDIALS index size" 32)
26 | FORCE_VARIABLE(SUNDIALS_INDEX_TYPE STRING "SUNDIALS index type" "")
27 | elseif(tmp STREQUAL "INT64_T")
28 | PRINT_WARNING("SUNDIALS_INDEX_TYPE overrides the standard types SUNDIALS looks for."
29 | "Setting SUNDIALS_INDEX_SIZE to 64 and clearing SUNDIALS_INDEX_TYPE.")
30 | FORCE_VARIABLE(SUNDIALS_INDEX_SIZE STRING "SUNDIALS index size" 64)
31 | FORCE_VARIABLE(SUNDIALS_INDEX_TYPE STRING "SUNDIALS index type" "")
32 | else()
33 | PRINT_WARNING("SUNDIALS_INDEX_TYPE overrides the standard types SUNDIALS looks for." "")
34 | endif()
35 | endif()
36 |
--------------------------------------------------------------------------------
/ThirdParty/sundials/include/sundials/sundials_fnvector.h:
--------------------------------------------------------------------------------
1 | /*
2 | * -----------------------------------------------------------------
3 | * $Revision$
4 | * $Date$
5 | * -----------------------------------------------------------------
6 | * Programmer(s): Radu Serban and Aaron Collier @ LLNL
7 | * -----------------------------------------------------------------
8 | * LLNS Copyright Start
9 | * Copyright (c) 2014, Lawrence Livermore National Security
10 | * This work was performed under the auspices of the U.S. Department
11 | * of Energy by Lawrence Livermore National Laboratory in part under
12 | * Contract W-7405-Eng-48 and in part under Contract DE-AC52-07NA27344.
13 | * Produced at the Lawrence Livermore National Laboratory.
14 | * All rights reserved.
15 | * For details, see the LICENSE file.
16 | * LLNS Copyright End
17 | * -----------------------------------------------------------------
18 | * This file (companion of nvector.h) contains definitions
19 | * needed for the initialization of vector operations in Fortran.
20 | * -----------------------------------------------------------------
21 | */
22 |
23 |
24 | #ifndef _FNVECTOR_H
25 | #define _FNVECTOR_H
26 |
27 | #ifndef _SUNDIALS_CONFIG_H
28 | #define _SUNDIALS_CONFIG_H
29 | #include
30 | #endif
31 |
32 | #ifdef __cplusplus /* wrapper to enable C++ usage */
33 | extern "C" {
34 | #endif
35 |
36 | /* SUNDIALS solver IDs */
37 |
38 | #define FCMIX_CVODE 1
39 | #define FCMIX_IDA 2
40 | #define FCMIX_KINSOL 3
41 | #define FCMIX_ARKODE 4
42 |
43 | #ifdef __cplusplus
44 | }
45 | #endif
46 |
47 | #endif
48 |
--------------------------------------------------------------------------------
/ThirdParty/sundials/include/sundials/sundials_klu_impl.h:
--------------------------------------------------------------------------------
1 | /*
2 | * -----------------------------------------------------------------
3 | * $Revision$
4 | * $Date$
5 | * -----------------------------------------------------------------
6 | * Programmer(s): Carol S. Woodward @ LLNL
7 | * -----------------------------------------------------------------
8 | * LLNS Copyright Start
9 | * Copyright (c) 2014, Lawrence Livermore National Security
10 | * This work was performed under the auspices of the U.S. Department
11 | * of Energy by Lawrence Livermore National Laboratory in part under
12 | * Contract W-7405-Eng-48 and in part under Contract DE-AC52-07NA27344.
13 | * Produced at the Lawrence Livermore National Laboratory.
14 | * All rights reserved.
15 | * For details, see the LICENSE file.
16 | * LLNS Copyright End
17 | * -----------------------------------------------------------------
18 | * Implementation header file for the Sundials interface to
19 | * the KLU linear solver.
20 | * -----------------------------------------------------------------
21 | */
22 |
23 | #ifndef _SUNKLU_IMPL_H
24 | #define _SUNKLU_IMPL_H
25 |
26 | #ifndef _S_KLU_H
27 | #define _S_KLU_H
28 | #include "klu.h"
29 | #endif
30 |
31 | #ifdef __cplusplus /* wrapper to enable C++ usage */
32 | extern "C" {
33 | #endif
34 |
35 | /*
36 | * -----------------------------------------------------------------
37 | * Definition of KLUData
38 | * -----------------------------------------------------------------
39 | */
40 |
41 | typedef struct KLUDataRec {
42 |
43 | /* Structure for KLU-specific data */
44 |
45 | klu_symbolic *s_Symbolic;
46 | klu_numeric *s_Numeric;
47 | klu_common s_Common;
48 | int s_ordering;
49 | int (*sun_klu_solve)(klu_symbolic*, klu_numeric*, int, int, double*, klu_common*);
50 |
51 | } *KLUData;
52 |
53 | #ifdef __cplusplus
54 | }
55 | #endif
56 |
57 | #endif
58 |
--------------------------------------------------------------------------------
/ThirdParty/sundials/include/sundials/sundials_mpi.h:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------
2 | * Programmer(s): Slaven Peles @ LLNL
3 | * -----------------------------------------------------------------
4 | * LLNS Copyright Start
5 | * Copyright (c) 2014, Lawrence Livermore National Security
6 | * This work was performed under the auspices of the U.S. Department
7 | * of Energy by Lawrence Livermore National Laboratory in part under
8 | * Contract W-7405-Eng-48 and in part under Contract DE-AC52-07NA27344.
9 | * Produced at the Lawrence Livermore National Laboratory.
10 | * All rights reserved.
11 | * For details, see the LICENSE file.
12 | * LLNS Copyright End
13 | * -----------------------------------------------------------------
14 | * This header file contains definitions of MPI data types, which
15 | * are used by MPI parallel vector implementations.
16 | * -----------------------------------------------------------------*/
17 |
18 | #ifndef _SUNDIALS_MPI_H
19 | #define _SUNDIALS_MPI_H
20 |
21 | #include
22 | #include
23 |
24 |
25 | #if SUNDIALS_MPI_ENABLED
26 |
27 | #include
28 | #define SUNMPI_COMM_WORLD MPI_COMM_WORLD
29 |
30 | typedef MPI_Comm SUNMPI_Comm;
31 |
32 | #else
33 |
34 | #define SUNMPI_COMM_WORLD 0
35 |
36 | typedef int SUNMPI_Comm;
37 |
38 | #endif
39 |
40 | #ifdef __cplusplus /* wrapper to enable C++ usage */
41 | extern "C" {
42 | #endif
43 |
44 | SUNDIALS_EXPORT int SUNMPI_Comm_size(SUNMPI_Comm comm, int *size);
45 | SUNDIALS_EXPORT realtype SUNMPI_Allreduce_scalar(realtype d, int op, SUNMPI_Comm comm);
46 | SUNDIALS_EXPORT void SUNMPI_Allreduce(realtype *d, int nvec, int op, SUNMPI_Comm comm);
47 |
48 | #ifdef __cplusplus
49 | }
50 | #endif
51 |
52 |
53 |
54 | #endif /* _SUNDIALS_MPI_H */
55 |
--------------------------------------------------------------------------------
/ThirdParty/sundials/include/sundials/sundials_mpi_types.h:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------
2 | * Programmer(s): Scott Cohen, Alan Hindmarsh, Radu Serban,
3 | * Aaron Collier, and Slaven Peles @ LLNL
4 | * -----------------------------------------------------------------
5 | * LLNS Copyright Start
6 | * Copyright (c) 2014, Lawrence Livermore National Security
7 | * This work was performed under the auspices of the U.S. Department
8 | * of Energy by Lawrence Livermore National Laboratory in part under
9 | * Contract W-7405-Eng-48 and in part under Contract DE-AC52-07NA27344.
10 | * Produced at the Lawrence Livermore National Laboratory.
11 | * All rights reserved.
12 | * For details, see the LICENSE file.
13 | * LLNS Copyright End
14 | * -----------------------------------------------------------------
15 | * This header file contains definitions of MPI data types, which
16 | * are used by MPI parallel vector implementations.
17 | * -----------------------------------------------------------------*/
18 |
19 | #include
20 |
21 | /* define MPI data types */
22 |
23 | #if defined(SUNDIALS_SINGLE_PRECISION)
24 | #define PVEC_REAL_MPI_TYPE MPI_FLOAT
25 | #elif defined(SUNDIALS_DOUBLE_PRECISION)
26 | #define PVEC_REAL_MPI_TYPE MPI_DOUBLE
27 | #elif defined(SUNDIALS_EXTENDED_PRECISION)
28 | #define PVEC_REAL_MPI_TYPE MPI_LONG_DOUBLE
29 | #endif
30 |
31 | #if defined(SUNDIALS_INT64_T)
32 | #define PVEC_INTEGER_MPI_TYPE MPI_INT64_T
33 | #elif defined(SUNDIALS_INT32_T)
34 | #define PVEC_INTEGER_MPI_TYPE MPI_INT32_T
35 | #endif
36 |
37 |
--------------------------------------------------------------------------------
/ThirdParty/sundials/include/sundials/sundials_superlumt_impl.h:
--------------------------------------------------------------------------------
1 | /*
2 | * -----------------------------------------------------------------
3 | * $Revision$
4 | * $Date$
5 | * -----------------------------------------------------------------
6 | * Programmer(s): Carol S. Woodward @ LLNL
7 | * -----------------------------------------------------------------
8 | * LLNS Copyright Start
9 | * Copyright (c) 2014, Lawrence Livermore National Security
10 | * This work was performed under the auspices of the U.S. Department
11 | * of Energy by Lawrence Livermore National Laboratory in part under
12 | * Contract W-7405-Eng-48 and in part under Contract DE-AC52-07NA27344.
13 | * Produced at the Lawrence Livermore National Laboratory.
14 | * All rights reserved.
15 | * For details, see the LICENSE file.
16 | * LLNS Copyright End
17 | * -----------------------------------------------------------------
18 | * Implementation header file for the SUNDIALS interface to the
19 | * SuperLUMT linear solver.
20 | * -----------------------------------------------------------------
21 | */
22 |
23 | #ifndef _SUNSLUMT_IMPL_H
24 | #define _SUNSLUMT_IMPL_H
25 |
26 | #ifndef _SLUMT_H
27 | #define _SLUMT_H
28 | /* #include "pdsp_defs.h" */
29 | #include "slu_mt_ddefs.h"
30 | #endif
31 |
32 | #ifdef __cplusplus /* wrapper to enable C++ usage */
33 | extern "C" {
34 | #endif
35 |
36 | /*
37 | * -----------------------------------------------------------------
38 | * Definition of SLUMTData
39 | * -----------------------------------------------------------------
40 | */
41 |
42 | typedef struct SLUMTDataRec {
43 |
44 | /* Structure for SuperLUMT-specific data */
45 |
46 | SuperMatrix *s_A, *s_AC, *s_L, *s_U, *s_B;
47 | Gstat_t *Gstat;
48 | int *perm_r, *perm_c;
49 | int num_threads;
50 | double diag_pivot_thresh;
51 | superlumt_options_t *superlumt_options;
52 |
53 | int s_ordering;
54 |
55 | } *SLUMTData;
56 |
57 | #ifdef __cplusplus
58 | }
59 | #endif
60 |
61 | #endif
62 |
--------------------------------------------------------------------------------
/ThirdParty/sundials/src/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # ---------------------------------------------------------------
2 | # Programmer: David Gardner and Slaven Peles @ LLNL
3 | # ---------------------------------------------------------------
4 | # LLNS Copyright Start
5 | # Copyright (c) 2014, Lawrence Livermore National Security
6 | # This work was performed under the auspices of the U.S. Department
7 | # of Energy by Lawrence Livermore National Laboratory in part under
8 | # Contract W-7405-Eng-48 and in part under Contract DE-AC52-07NA27344.
9 | # Produced at the Lawrence Livermore National Laboratory.
10 | # All rights reserved.
11 | # For details, see the LICENSE file.
12 | # LLNS Copyright End
13 | # ---------------------------------------------------------------
14 | # src level CMakeLists.txt for SUNDIALS (for cmake build system)
15 | # ---------------------------------------------------------------
16 |
17 | # Always add SUNDIALS provided serial modules
18 | ADD_SUBDIRECTORY(nvec_ser)
19 |
20 | # Always add SUNDIALS provided iterative linear solver modules
21 | ADD_SUBDIRECTORY(sunlinsol_spgmr)
22 | ADD_SUBDIRECTORY(sunlinsol_spfgmr)
23 | ADD_SUBDIRECTORY(sunlinsol_spbcgs)
24 | ADD_SUBDIRECTORY(sunlinsol_sptfqmr)
25 |
26 | # IDAS library
27 | ADD_SUBDIRECTORY(idas)
28 |
--------------------------------------------------------------------------------
/ThirdParty/sundials/src/nvec_ser/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # ---------------------------------------------------------------
2 | # Programmer: Radu Serban @ LLNL
3 | # ---------------------------------------------------------------
4 | # LLNS Copyright Start
5 | # Copyright (c) 2014, Lawrence Livermore National Security
6 | # This work was performed under the auspices of the U.S. Department
7 | # of Energy by Lawrence Livermore National Laboratory in part under
8 | # Contract W-7405-Eng-48 and in part under Contract DE-AC52-07NA27344.
9 | # Produced at the Lawrence Livermore National Laboratory.
10 | # All rights reserved.
11 | # For details, see the LICENSE file.
12 | # LLNS Copyright End
13 | # ---------------------------------------------------------------
14 | # CMakeLists.txt file for the serial NVECTOR library
15 |
16 | # Add variable nvecserial_SOURCES with the sources for the NVECSERIAL lib
17 | SET(nvecserial_SOURCES nvector_serial.c)
18 |
19 | # Add variable shared_SOURCES with the common SUNDIALS sources which will
20 | # also be included in the NVECSERIAL library
21 | SET(shared_SOURCES
22 | ${sundials_SOURCE_DIR}/src/sundials/sundials_math.c
23 | )
24 |
25 | # Add variable nvecserial_HEADERS with the exported NVECSERIAL header files
26 | SET(nvecserial_HEADERS
27 | ${sundials_SOURCE_DIR}/include/nvector/nvector_serial.h
28 | )
29 |
30 | # Add source directory to include directories
31 | INCLUDE_DIRECTORIES(.)
32 |
33 | # Define C preprocessor flag -DBUILD_SUNDIALS_LIBRARY
34 | ADD_DEFINITIONS(-DBUILD_SUNDIALS_LIBRARY)
35 |
36 | # Rules for building and installing the static library:
37 | # - Add the build target for the NVECSERIAL library
38 | # - Set the library name and make sure it is not deleted
39 | # - Install the NVECSERIAL library
40 | ADD_LIBRARY(sundials_nvecserial_static STATIC ${nvecserial_SOURCES} ${shared_SOURCES})
41 | SET_TARGET_PROPERTIES(sundials_nvecserial_static
42 | PROPERTIES OUTPUT_NAME sundials_nvecserial CLEAN_DIRECT_OUTPUT 1)
43 |
--------------------------------------------------------------------------------
/ThirdParty/sundials/src/sundials/sundials_version.c:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------
2 | * Programmer(s): David J. Gardner @ LLNL
3 | * -----------------------------------------------------------------
4 | * LLNS Copyright Start
5 | * Copyright (c) 2014, Lawrence Livermore National Security
6 | * This work was performed under the auspices of the U.S. Department
7 | * of Energy by Lawrence Livermore National Laboratory in part under
8 | * Contract W-7405-Eng-48 and in part under Contract DE-AC52-07NA27344.
9 | * Produced at the Lawrence Livermore National Laboratory.
10 | * All rights reserved.
11 | * For details, see the LICENSE file.
12 | * LLNS Copyright End
13 | * -----------------------------------------------------------------
14 | * This file implements functions for getting SUNDIALS version
15 | * information.
16 | * -----------------------------------------------------------------*/
17 |
18 | #include
19 |
20 | #include
21 |
22 | /* fill string with SUNDIALS version information */
23 | int SUNDIALSGetVersion(char *version, int len)
24 | {
25 | if (strlen(SUNDIALS_VERSION) > len) {
26 | return(-1);
27 | }
28 |
29 | strncpy(version, SUNDIALS_VERSION, len);
30 | return(0);
31 | }
32 |
33 | /* fill integers with SUNDIALS major, minor, and patch release
34 | numbers and fill a string with the release label */
35 | int SUNDIALSGetVersionNumber(int *major, int *minor, int *patch,
36 | char *label, int len)
37 | {
38 | if (strlen(SUNDIALS_VERSION_LABEL) > len) {
39 | return(-1);
40 | }
41 |
42 | *major = SUNDIALS_VERSION_MAJOR;
43 | *minor = SUNDIALS_VERSION_MINOR;
44 | *patch = SUNDIALS_VERSION_PATCH;
45 | strncpy(label, SUNDIALS_VERSION_LABEL, len);
46 |
47 | return(0);
48 | }
49 |
--------------------------------------------------------------------------------
/ThirdParty/sundials/src/sunlinsol_spgmr/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # ---------------------------------------------------------------
2 | # Programmer: Daniel R. Reynolds @ SMU
3 | # ---------------------------------------------------------------
4 | # LLNS/SMU Copyright Start
5 | # Copyright (c) 2017, Southern Methodist University and
6 | # Lawrence Livermore National Security
7 | #
8 | # This work was performed under the auspices of the U.S. Department
9 | # of Energy by Southern Methodist University and Lawrence Livermore
10 | # National Laboratory under Contract DE-AC52-07NA27344.
11 | # Produced at Southern Methodist University and the Lawrence
12 | # Livermore National Laboratory.
13 | #
14 | # All rights reserved.
15 | # For details, see the LICENSE file.
16 | # LLNS/SMU Copyright End
17 | # ---------------------------------------------------------------
18 | # CMakeLists.txt file for the SPGMR SUNLinearSolver library
19 |
20 | # Add variable sunlinsolspgmr_SOURCES with the sources for the SUNLINSOLSPGMR lib
21 | SET(sunlinsolspgmr_SOURCES sunlinsol_spgmr.c)
22 |
23 | # Add variable shared_SOURCES with the common SUNDIALS sources which will
24 | # also be included in the SUNLINSOLSPGMR library
25 | SET(shared_SOURCES
26 | ${sundials_SOURCE_DIR}/src/sundials/sundials_math.c
27 | ${sundials_SOURCE_DIR}/src/sundials/sundials_nvector.c
28 | ${sundials_SOURCE_DIR}/src/sundials/sundials_linearsolver.c
29 | ${sundials_SOURCE_DIR}/src/sundials/sundials_iterative.c
30 | )
31 |
32 | # Add variable sunlinsolspgmr_HEADERS with the exported SUNLINSOLSPGMR header files
33 | SET(sunlinsolspgmr_HEADERS
34 | ${sundials_SOURCE_DIR}/include/sunlinsol/sunlinsol_spgmr.h
35 | )
36 |
37 | # Add source directory to include directories
38 | INCLUDE_DIRECTORIES(.)
39 |
40 | # Define C preprocessor flag -DBUILD_SUNDIALS_LIBRARY
41 | ADD_DEFINITIONS(-DBUILD_SUNDIALS_LIBRARY)
42 |
43 | # Rules for building and installing the static library:
44 | # - Add the build target for the SUNLINSOLSPGMR library
45 | # - Set the library name and make sure it is not deleted
46 | # - Install the SUNLINSOLSPGMR library
47 | ADD_LIBRARY(sundials_sunlinsolspgmr_static STATIC ${sunlinsolspgmr_SOURCES} ${shared_SOURCES})
48 | SET_TARGET_PROPERTIES(sundials_sunlinsolspgmr_static
49 | PROPERTIES OUTPUT_NAME sundials_sunlinsolspgmr CLEAN_DIRECT_OUTPUT 1)
50 |
--------------------------------------------------------------------------------
/ThirdParty/tclap/AUTHORS:
--------------------------------------------------------------------------------
1 |
2 | original author: Michael E. Smoot
3 | invaluable contributions: Daniel Aarno
4 | more contributions: Erik Zeek
5 | more contributions: Fabien Carmagnac (Tinbergen-AM)
6 | outstanding editing: Carol Smoot
7 | minor contributions: Samuel Leweke
8 |
--------------------------------------------------------------------------------
/ThirdParty/tclap/COPYING:
--------------------------------------------------------------------------------
1 |
2 |
3 | Copyright (c) 2003 Michael E. Smoot
4 |
5 | Permission is hereby granted, free of charge, to any person
6 | obtaining a copy of this software and associated documentation
7 | files (the "Software"), to deal in the Software without restriction,
8 | including without limitation the rights to use, copy, modify, merge,
9 | publish, distribute, sublicense, and/or sell copies of the Software,
10 | and to permit persons to whom the Software is furnished to do so,
11 | subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be
14 | included in all copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
18 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
20 | BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
21 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
22 | IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | THE SOFTWARE.
24 |
25 |
26 |
--------------------------------------------------------------------------------
/ThirdParty/tclap/Makefile.am:
--------------------------------------------------------------------------------
1 |
2 | ACLOCAL_AMFLAGS = -I config
3 |
4 | SUBDIRS = include examples docs tests msc config
5 |
6 | pkgconfigdir = $(libdir)/pkgconfig
7 | pkgconfig_DATA = $(PACKAGE).pc
8 | EXTRA_DIST = $(PACKAGE).pc.in
9 |
10 | DISTCLEANFILES = $(PACKAGE).pc
11 |
--------------------------------------------------------------------------------
/ThirdParty/tclap/README:
--------------------------------------------------------------------------------
1 |
2 | TCLAP - Templatized Command Line Argument Parser
3 |
4 | This is a simple C++ library that facilitates parsing command line
5 | arguments in a type independent manner. It doesn't conform exactly
6 | to either the GNU or POSIX standards, although it is close. See
7 | docs/manual.html for descriptions of how things work or look at the
8 | simple examples in the examples dir.
9 |
10 | To find out what the latest changes are read the NEWS file in this directory.
11 |
12 |
13 | Any and all feedback is welcome to: Mike Smoot
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/ThirdParty/tclap/config/Makefile.am:
--------------------------------------------------------------------------------
1 |
2 | EXTRA_DIST = ac_cxx_have_sstream.m4\
3 | ac_cxx_have_strstream.m4\
4 | ac_cxx_namespaces.m4\
5 | bb_enable_doxygen.m4
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ThirdParty/tclap/config/ac_cxx_have_long_long.m4:
--------------------------------------------------------------------------------
1 | dnl @synopsis AC_CXX_HAVE_LONG_LONG
2 | dnl
3 | dnl If the C++ implementation have a long long type
4 | dnl
5 | AC_DEFUN([AC_CXX_HAVE_LONG_LONG],
6 | [AC_LANG_SAVE
7 | AC_LANG_CPLUSPLUS
8 | AC_TRY_COMPILE([],[long long x = 1; return 0;],
9 | ac_cv_cxx_have_long_long=yes, ac_cv_cxx_have_long_long=no)
10 |
11 | if test "$ac_cv_cxx_have_long_long" = yes; then
12 | AC_DEFINE(HAVE_LONG_LONG, 1,
13 | [define if the C++ implementation have long long])
14 | else
15 | AC_DEFINE(HAVE_LONG_LONG, 0,
16 | [define if the C++ implementation have long long])
17 | fi
18 | AC_LANG_RESTORE
19 | ])
20 |
--------------------------------------------------------------------------------
/ThirdParty/tclap/config/ac_cxx_have_sstream.m4:
--------------------------------------------------------------------------------
1 | dnl @synopsis AC_CXX_HAVE_SSTREAM
2 | dnl
3 | dnl If the C++ library has a working stringstream, define HAVE_SSTREAM.
4 | dnl
5 | dnl @author Ben Stanley
6 | dnl @version $Id: ac_cxx_have_sstream.m4,v 1.2 2006/02/22 02:10:28 zeekec Exp $
7 | dnl
8 | AC_DEFUN([AC_CXX_HAVE_SSTREAM],
9 | [AC_REQUIRE([AC_CXX_NAMESPACES])
10 | AC_LANG_SAVE
11 | AC_LANG_CPLUSPLUS
12 | AC_CHECK_HEADERS(sstream)
13 | AC_CACHE_CHECK([whether the STL defines stringstream],
14 | [ac_cv_cxx_have_sstream],
15 | [AC_TRY_COMPILE([#include
16 | #ifdef HAVE_NAMESPACES
17 | using namespace std;
18 | #endif],[stringstream message; message << "Hello"; return 0;],
19 | ac_cv_cxx_have_sstream=yes, ac_cv_cxx_have_sstream=no)
20 | ])
21 | if test "$ac_cv_cxx_have_sstream" = yes; then
22 | AC_DEFINE(HAVE_SSTREAM,1,[define if the compiler has stringstream])
23 | fi
24 | AC_LANG_RESTORE
25 | ])
26 |
--------------------------------------------------------------------------------
/ThirdParty/tclap/config/ac_cxx_have_strstream.m4:
--------------------------------------------------------------------------------
1 | dnl @synopsis AC_CXX_HAVE_STRSTREAM
2 | dnl
3 | dnl If the C++ library has a working strstream, define HAVE_CLASS_STRSTREAM.
4 | dnl
5 | dnl Adapted from ac_cxx_have_sstream.m4 by Steve Robbins
6 | dnl
7 | AC_DEFUN([AC_CXX_HAVE_STRSTREAM],
8 | [AC_REQUIRE([AC_CXX_NAMESPACES])
9 | AC_LANG_SAVE
10 | AC_LANG_CPLUSPLUS
11 | AC_CHECK_HEADERS(strstream)
12 | AC_CACHE_CHECK([whether the STL defines strstream],
13 | [ac_cv_cxx_have_class_strstream],
14 | [AC_TRY_COMPILE([#if HAVE_STRSTREAM
15 | # include
16 | #else
17 | # include
18 | #endif
19 | #ifdef HAVE_NAMESPACES
20 | using namespace std;
21 | #endif],[ostrstream message; message << "Hello"; return 0;],
22 | ac_cv_cxx_have_class_strstream=yes, ac_cv_cxx_have_class_strstream=no)
23 | ])
24 | if test "$ac_cv_cxx_have_class_strstream" = yes; then
25 | AC_DEFINE(HAVE_CLASS_STRSTREAM,1,[define if the library defines strstream])
26 | fi
27 | AC_LANG_RESTORE
28 | ])
29 |
--------------------------------------------------------------------------------
/ThirdParty/tclap/config/ac_cxx_namespaces.m4:
--------------------------------------------------------------------------------
1 | dnl @synopsis AC_CXX_NAMESPACES
2 | dnl
3 | dnl If the compiler can prevent names clashes using namespaces, define
4 | dnl HAVE_NAMESPACES.
5 | dnl
6 | dnl @version $Id: ac_cxx_namespaces.m4,v 1.1.1.1 2003/03/19 02:40:00 mes5k Exp $
7 | dnl @author Luc Maisonobe
8 | dnl
9 | AC_DEFUN([AC_CXX_NAMESPACES],
10 | [AC_CACHE_CHECK(whether the compiler implements namespaces,
11 | ac_cv_cxx_namespaces,
12 | [AC_LANG_SAVE
13 | AC_LANG_CPLUSPLUS
14 | AC_TRY_COMPILE([namespace Outer { namespace Inner { int i = 0; }}],
15 | [using namespace Outer::Inner; return i;],
16 | ac_cv_cxx_namespaces=yes, ac_cv_cxx_namespaces=no)
17 | AC_LANG_RESTORE
18 | ])
19 | if test "$ac_cv_cxx_namespaces" = yes; then
20 | AC_DEFINE(HAVE_NAMESPACES,1,[define to 1 if the compiler implements namespaces])
21 | fi
22 | ])
23 |
--------------------------------------------------------------------------------
/ThirdParty/tclap/config/ac_cxx_warn_effective_cxx.m4:
--------------------------------------------------------------------------------
1 | dnl HAVE_WARN_EFFECTIVE_CXX
2 | dnl ----------------------
3 | dnl
4 | dnl If the C++ compiler accepts the `-Weffc++' flag,
5 | dnl set output variable `WARN_EFFECTIVE_CXX' to `-Weffc++' and
6 | dnl `WARN_NO_EFFECTIVE_CXX' to `-Wno-effc++'. Otherwise,
7 | dnl leave both empty.
8 | dnl
9 | AC_DEFUN([HAVE_WARN_EFFECTIVE_CXX],
10 | [
11 | AC_REQUIRE([AC_PROG_CXX])
12 | AC_MSG_CHECKING([whether the C++ compiler (${CXX}) accepts -Weffc++])
13 | AC_CACHE_VAL([cv_warn_effective_cxx],
14 | [
15 | AC_LANG_SAVE
16 | AC_LANG_CPLUSPLUS
17 | save_cxxflags="$CXXFLAGS"
18 | CXXFLAGS="$CXXFLAGS -Weffc++"
19 | AC_TRY_COMPILE([],[main();],
20 | [cv_warn_effective_cxx=yes], [cv_warn_effective_cxx=no])
21 | CXXFLAGS="$save_cxxflags"
22 | AC_LANG_RESTORE
23 | ])
24 | AC_MSG_RESULT([$cv_warn_effective_cxx])
25 | if test "$cv_warn_effective_cxx" = yes; then
26 | WARN_EFFECTIVE_CXX=-Weffc++
27 | WARN_NO_EFFECTIVE_CXX=-Wno-effc++
28 | fi
29 | AC_SUBST([WARN_EFFECTIVE_CXX])
30 | AC_SUBST([WARN_NO_EFFECTIVE_CXX])
31 | ])
32 |
--------------------------------------------------------------------------------
/ThirdParty/tclap/config/bb_enable_doxygen.m4:
--------------------------------------------------------------------------------
1 | AC_DEFUN([BB_ENABLE_DOXYGEN],
2 | [
3 | AC_ARG_ENABLE(doxygen, [--enable-doxygen enable documentation generation with doxygen (auto)])
4 | if test "x$enable_doxygen" = xno; then
5 | enable_doc=no
6 | else
7 | AC_PATH_PROG(DOXYGEN, doxygen, , $PATH)
8 | if test x$DOXYGEN = x; then
9 | if test "x$enable_doxygen" = xyes; then
10 | AC_MSG_ERROR([could not find doxygen])
11 | fi
12 | enable_doc=no
13 | else
14 | enable_doc=yes
15 | fi
16 | fi
17 | AM_CONDITIONAL(DOC, test x$enable_doc = xyes)
18 | ])
19 |
--------------------------------------------------------------------------------
/ThirdParty/tclap/config/config.h.in:
--------------------------------------------------------------------------------
1 | /* config/config.h.in. Generated from configure.in by autoheader. */
2 |
3 | /* define if the library defines strstream */
4 | #undef HAVE_CLASS_STRSTREAM
5 |
6 | /* Define to 1 if you have the header file. */
7 | #undef HAVE_INTTYPES_H
8 |
9 | /* define if the C++ implementation have long long */
10 | #undef HAVE_LONG_LONG
11 |
12 | /* Define to 1 if you have the header file. */
13 | #undef HAVE_MEMORY_H
14 |
15 | /* define to 1 if the compiler implements namespaces */
16 | #undef HAVE_NAMESPACES
17 |
18 | /* define if the compiler has stringstream */
19 | #undef HAVE_SSTREAM
20 |
21 | /* Define to 1 if you have the header file. */
22 | #undef HAVE_STDINT_H
23 |
24 | /* Define to 1 if you have the header file. */
25 | #undef HAVE_STDLIB_H
26 |
27 | /* Define to 1 if you have the header file. */
28 | #undef HAVE_STRINGS_H
29 |
30 | /* Define to 1 if you have the header file. */
31 | #undef HAVE_STRING_H
32 |
33 | /* Define to 1 if you have the header file. */
34 | #undef HAVE_STRSTREAM
35 |
36 | /* Define to 1 if you have the header file. */
37 | #undef HAVE_SYS_STAT_H
38 |
39 | /* Define to 1 if you have the header file. */
40 | #undef HAVE_SYS_TYPES_H
41 |
42 | /* Define to 1 if you have the header file. */
43 | #undef HAVE_UNISTD_H
44 |
45 | /* Name of package */
46 | #undef PACKAGE
47 |
48 | /* Define to the address where bug reports for this package should be sent. */
49 | #undef PACKAGE_BUGREPORT
50 |
51 | /* Define to the full name of this package. */
52 | #undef PACKAGE_NAME
53 |
54 | /* Define to the full name and version of this package. */
55 | #undef PACKAGE_STRING
56 |
57 | /* Define to the one symbol short name of this package. */
58 | #undef PACKAGE_TARNAME
59 |
60 | /* Define to the version of this package. */
61 | #undef PACKAGE_VERSION
62 |
63 | /* Define to 1 if you have the ANSI C header files. */
64 | #undef STDC_HEADERS
65 |
66 | /* Version number of package */
67 | #undef VERSION
68 |
--------------------------------------------------------------------------------
/ThirdParty/tclap/config/mkinstalldirs:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 | # mkinstalldirs --- make directory hierarchy
3 | # Author: Noah Friedman
4 | # Created: 1993-05-16
5 | # Public domain
6 |
7 | # $Id: mkinstalldirs,v 1.1 2003/04/03 18:13:41 mes5k Exp $
8 |
9 | errstatus=0
10 |
11 | for file
12 | do
13 | set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
14 | shift
15 |
16 | pathcomp=
17 | for d
18 | do
19 | pathcomp="$pathcomp$d"
20 | case "$pathcomp" in
21 | -* ) pathcomp=./$pathcomp ;;
22 | esac
23 |
24 | if test ! -d "$pathcomp"; then
25 | echo "mkdir $pathcomp"
26 |
27 | mkdir "$pathcomp" || lasterr=$?
28 |
29 | if test ! -d "$pathcomp"; then
30 | errstatus=$lasterr
31 | fi
32 | fi
33 |
34 | pathcomp="$pathcomp/"
35 | done
36 | done
37 |
38 | exit $errstatus
39 |
40 | # mkinstalldirs ends here
41 |
--------------------------------------------------------------------------------
/ThirdParty/tclap/configure.in:
--------------------------------------------------------------------------------
1 | AC_INIT(Makefile.am)
2 | #AC_PREREQ(2.50)
3 | AC_CONFIG_AUX_DIR(config)
4 | AM_CONFIG_HEADER(config/config.h)
5 | AM_INIT_AUTOMAKE(tclap,1.2.1)
6 | AC_PROG_CXX
7 | AC_CXX_HAVE_SSTREAM
8 | AC_CXX_HAVE_STRSTREAM
9 | AC_CXX_HAVE_LONG_LONG
10 | AC_CHECK_PROG(DOT,dot,YES,NO)
11 | AC_PROG_RANLIB
12 | AC_PROG_INSTALL
13 | BB_ENABLE_DOXYGEN
14 |
15 | HAVE_WARN_EFFECTIVE_CXX
16 | CXXFLAGS="$CXXFLAGS $WARN_EFFECTIVE_CXX"
17 |
18 | AM_CONDITIONAL([HAVE_GNU_COMPILERS], [test x$ac_cv_cxx_compiler_gnu = xyes])
19 |
20 | AC_OUTPUT([ Makefile \
21 | tclap.pc \
22 | examples/Makefile \
23 | include/Makefile \
24 | include/tclap/Makefile \
25 | config/Makefile \
26 | docs/Makefile \
27 | docs/Doxyfile \
28 | msc/Makefile \
29 | msc/examples/Makefile \
30 | tests/Makefile], \
31 | [chmod a+x $ac_top_srcdir/tests/*.sh])
32 |
--------------------------------------------------------------------------------
/ThirdParty/tclap/include/Makefile.am:
--------------------------------------------------------------------------------
1 | SUBDIRS = tclap
2 |
--------------------------------------------------------------------------------
/ThirdParty/tclap/include/tclap/CmdLineOutput.h:
--------------------------------------------------------------------------------
1 |
2 |
3 | /******************************************************************************
4 | *
5 | * file: CmdLineOutput.h
6 | *
7 | * Copyright (c) 2004, Michael E. Smoot
8 | * All rights reverved.
9 | *
10 | * See the file COPYING in the top directory of this distribution for
11 | * more information.
12 | *
13 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS
14 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
16 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
19 | * DEALINGS IN THE SOFTWARE.
20 | *
21 | *****************************************************************************/
22 |
23 | #ifndef TCLAP_CMDLINEOUTPUT_H
24 | #define TCLAP_CMDLINEOUTPUT_H
25 |
26 | #include
27 | #include
28 | #include
29 | #include
30 | #include
31 | #include
32 |
33 | namespace TCLAP {
34 |
35 | class CmdLineInterface;
36 | class ArgException;
37 |
38 | /**
39 | * The interface that any output object must implement.
40 | */
41 | class CmdLineOutput
42 | {
43 |
44 | public:
45 |
46 | /**
47 | * Virtual destructor.
48 | */
49 | virtual ~CmdLineOutput() {}
50 |
51 | /**
52 | * Generates some sort of output for the USAGE.
53 | * \param c - The CmdLine object the output is generated for.
54 | */
55 | virtual void usage(CmdLineInterface& c)=0;
56 |
57 | /**
58 | * Generates some sort of output for the version.
59 | * \param c - The CmdLine object the output is generated for.
60 | */
61 | virtual void version(CmdLineInterface& c)=0;
62 |
63 | /**
64 | * Generates some sort of output for a failure.
65 | * \param c - The CmdLine object the output is generated for.
66 | * \param e - The ArgException that caused the failure.
67 | */
68 | virtual void failure( CmdLineInterface& c,
69 | ArgException& e )=0;
70 |
71 | };
72 |
73 | } //namespace TCLAP
74 | #endif
75 |
--------------------------------------------------------------------------------
/ThirdParty/tclap/include/tclap/Constraint.h:
--------------------------------------------------------------------------------
1 |
2 | /******************************************************************************
3 | *
4 | * file: Constraint.h
5 | *
6 | * Copyright (c) 2005, Michael E. Smoot
7 | * All rights reverved.
8 | *
9 | * See the file COPYING in the top directory of this distribution for
10 | * more information.
11 | *
12 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS
13 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
15 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
17 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
18 | * DEALINGS IN THE SOFTWARE.
19 | *
20 | *****************************************************************************/
21 |
22 | #ifndef TCLAP_CONSTRAINT_H
23 | #define TCLAP_CONSTRAINT_H
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 | #include
30 | #include
31 |
32 | namespace TCLAP {
33 |
34 | /**
35 | * The interface that defines the interaction between the Arg and Constraint.
36 | */
37 | template
38 | class Constraint
39 | {
40 |
41 | public:
42 | /**
43 | * Returns a description of the Constraint.
44 | */
45 | virtual std::string description() const =0;
46 |
47 | /**
48 | * Returns the short ID for the Constraint.
49 | */
50 | virtual std::string shortID() const =0;
51 |
52 | /**
53 | * The method used to verify that the value parsed from the command
54 | * line meets the constraint.
55 | * \param value - The value that will be checked.
56 | */
57 | virtual bool check(const T& value) const =0;
58 |
59 | /**
60 | * Destructor.
61 | * Silences warnings about Constraint being a base class with virtual
62 | * functions but without a virtual destructor.
63 | */
64 | virtual ~Constraint() { ; }
65 | };
66 |
67 | } //namespace TCLAP
68 | #endif
69 |
--------------------------------------------------------------------------------
/ThirdParty/tclap/include/tclap/HelpVisitor.h:
--------------------------------------------------------------------------------
1 |
2 | /******************************************************************************
3 | *
4 | * file: HelpVisitor.h
5 | *
6 | * Copyright (c) 2003, Michael E. Smoot .
7 | * All rights reverved.
8 | *
9 | * See the file COPYING in the top directory of this distribution for
10 | * more information.
11 | *
12 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS
13 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
15 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
17 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
18 | * DEALINGS IN THE SOFTWARE.
19 | *
20 | *****************************************************************************/
21 |
22 | #ifndef TCLAP_HELP_VISITOR_H
23 | #define TCLAP_HELP_VISITOR_H
24 |
25 | #include
26 | #include
27 | #include
28 |
29 | namespace TCLAP {
30 |
31 | /**
32 | * A Visitor object that calls the usage method of the given CmdLineOutput
33 | * object for the specified CmdLine object.
34 | */
35 | class HelpVisitor: public Visitor
36 | {
37 | private:
38 | /**
39 | * Prevent accidental copying.
40 | */
41 | HelpVisitor(const HelpVisitor& rhs);
42 | HelpVisitor& operator=(const HelpVisitor& rhs);
43 |
44 | protected:
45 |
46 | /**
47 | * The CmdLine the output will be generated for.
48 | */
49 | CmdLineInterface* _cmd;
50 |
51 | /**
52 | * The output object.
53 | */
54 | CmdLineOutput** _out;
55 |
56 | public:
57 |
58 | /**
59 | * Constructor.
60 | * \param cmd - The CmdLine the output will be generated for.
61 | * \param out - The type of output.
62 | */
63 | HelpVisitor(CmdLineInterface* cmd, CmdLineOutput** out)
64 | : Visitor(), _cmd( cmd ), _out( out ) { }
65 |
66 | /**
67 | * Calls the usage method of the CmdLineOutput for the
68 | * specified CmdLine.
69 | */
70 | void visit() { (*_out)->usage(*_cmd); throw ExitException(0); }
71 |
72 | };
73 |
74 | }
75 |
76 | #endif
77 |
--------------------------------------------------------------------------------
/ThirdParty/tclap/include/tclap/IgnoreRestVisitor.h:
--------------------------------------------------------------------------------
1 |
2 | /******************************************************************************
3 | *
4 | * file: IgnoreRestVisitor.h
5 | *
6 | * Copyright (c) 2003, Michael E. Smoot .
7 | * All rights reverved.
8 | *
9 | * See the file COPYING in the top directory of this distribution for
10 | * more information.
11 | *
12 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS
13 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
15 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
17 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
18 | * DEALINGS IN THE SOFTWARE.
19 | *
20 | *****************************************************************************/
21 |
22 |
23 | #ifndef TCLAP_IGNORE_REST_VISITOR_H
24 | #define TCLAP_IGNORE_REST_VISITOR_H
25 |
26 | #include
27 | #include
28 |
29 | namespace TCLAP {
30 |
31 | /**
32 | * A Vistor that tells the CmdLine to begin ignoring arguments after
33 | * this one is parsed.
34 | */
35 | class IgnoreRestVisitor: public Visitor
36 | {
37 | public:
38 |
39 | /**
40 | * Constructor.
41 | */
42 | IgnoreRestVisitor() : Visitor() {}
43 |
44 | /**
45 | * Sets Arg::_ignoreRest.
46 | */
47 | void visit() { Arg::beginIgnoring(); }
48 | };
49 |
50 | }
51 |
52 | #endif
53 |
--------------------------------------------------------------------------------
/ThirdParty/tclap/include/tclap/Makefile.am:
--------------------------------------------------------------------------------
1 |
2 | libtclapincludedir = $(includedir)/tclap
3 |
4 | libtclapinclude_HEADERS = \
5 | CmdLineInterface.h \
6 | ArgException.h \
7 | CmdLine.h \
8 | XorHandler.h \
9 | MultiArg.h \
10 | UnlabeledMultiArg.h \
11 | ValueArg.h \
12 | UnlabeledValueArg.h \
13 | Visitor.h Arg.h \
14 | HelpVisitor.h \
15 | SwitchArg.h \
16 | MultiSwitchArg.h \
17 | VersionVisitor.h \
18 | IgnoreRestVisitor.h \
19 | CmdLineOutput.h \
20 | StdOutput.h \
21 | DocBookOutput.h \
22 | ZshCompletionOutput.h \
23 | OptionalUnlabeledTracker.h \
24 | Constraint.h \
25 | ValuesConstraint.h \
26 | ArgTraits.h \
27 | StandardTraits.h
28 |
29 |
--------------------------------------------------------------------------------
/ThirdParty/tclap/include/tclap/OptionalUnlabeledTracker.h:
--------------------------------------------------------------------------------
1 |
2 |
3 | /******************************************************************************
4 | *
5 | * file: OptionalUnlabeledTracker.h
6 | *
7 | * Copyright (c) 2005, Michael E. Smoot .
8 | * All rights reverved.
9 | *
10 | * See the file COPYING in the top directory of this distribution for
11 | * more information.
12 | *
13 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS
14 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
16 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
19 | * DEALINGS IN THE SOFTWARE.
20 | *
21 | *****************************************************************************/
22 |
23 |
24 | #ifndef TCLAP_OPTIONAL_UNLABELED_TRACKER_H
25 | #define TCLAP_OPTIONAL_UNLABELED_TRACKER_H
26 |
27 | #include
28 |
29 | namespace TCLAP {
30 |
31 | class OptionalUnlabeledTracker
32 | {
33 |
34 | public:
35 |
36 | static void check( bool req, const std::string& argName );
37 |
38 | static void gotOptional() { alreadyOptionalRef() = true; }
39 |
40 | static bool& alreadyOptional() { return alreadyOptionalRef(); }
41 |
42 | private:
43 |
44 | static bool& alreadyOptionalRef() { static bool ct = false; return ct; }
45 | };
46 |
47 |
48 | inline void OptionalUnlabeledTracker::check( bool req, const std::string& argName )
49 | {
50 | if ( OptionalUnlabeledTracker::alreadyOptional() )
51 | throw( SpecificationException(
52 | "You can't specify ANY Unlabeled Arg following an optional Unlabeled Arg",
53 | argName ) );
54 |
55 | if ( !req )
56 | OptionalUnlabeledTracker::gotOptional();
57 | }
58 |
59 |
60 | } // namespace TCLAP
61 |
62 | #endif
63 |
--------------------------------------------------------------------------------
/ThirdParty/tclap/include/tclap/Visitor.h:
--------------------------------------------------------------------------------
1 |
2 | /******************************************************************************
3 | *
4 | * file: Visitor.h
5 | *
6 | * Copyright (c) 2003, Michael E. Smoot .
7 | * All rights reverved.
8 | *
9 | * See the file COPYING in the top directory of this distribution for
10 | * more information.
11 | *
12 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS
13 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
15 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
17 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
18 | * DEALINGS IN THE SOFTWARE.
19 | *
20 | *****************************************************************************/
21 |
22 |
23 | #ifndef TCLAP_VISITOR_H
24 | #define TCLAP_VISITOR_H
25 |
26 | namespace TCLAP {
27 |
28 | /**
29 | * A base class that defines the interface for visitors.
30 | */
31 | class Visitor
32 | {
33 | public:
34 |
35 | /**
36 | * Constructor. Does nothing.
37 | */
38 | Visitor() { }
39 |
40 | /**
41 | * Destructor. Does nothing.
42 | */
43 | virtual ~Visitor() { }
44 |
45 | /**
46 | * Does nothing. Should be overridden by child.
47 | */
48 | virtual void visit() { }
49 | };
50 |
51 | }
52 |
53 | #endif
54 |
--------------------------------------------------------------------------------
/ThirdParty/tclap/tclap.pc.in:
--------------------------------------------------------------------------------
1 | prefix=@prefix@
2 | includedir=@includedir@
3 |
4 | Name: tclap
5 | Description: Templatized C++ Command Line Parser
6 | Version: @VERSION@
7 | Cflags: -I${includedir}
8 |
--------------------------------------------------------------------------------
/cmake/Modules/GetGitRevisionDescription.cmake.in:
--------------------------------------------------------------------------------
1 | #
2 | # Internal file for GetGitRevisionDescription.cmake
3 | #
4 | # Requires CMake 2.6 or newer (uses the 'function' command)
5 | #
6 | # Original Author:
7 | # 2009-2010 Ryan Pavlik
8 | # http://academic.cleardefinition.com
9 | # Iowa State University HCI Graduate Program/VRAC
10 | #
11 | # Copyright Iowa State University 2009-2010.
12 | # Distributed under the Boost Software License, Version 1.0.
13 | # (See accompanying file LICENSE_1_0.txt or copy at
14 | # http://www.boost.org/LICENSE_1_0.txt)
15 | #
16 | # From https://github.com/rpavlik/cmake-modules
17 | #
18 | # Modifications by Samuel Leweke in 2014 in order to cope with
19 | # missing .git/refs/heads/* files. Falls back to calling
20 | # git show-ref --hash ${HEAD_REF}
21 | # in this case.
22 |
23 | set(HEAD_HASH)
24 |
25 | file(READ "@HEAD_FILE@" HEAD_CONTENTS LIMIT 1024)
26 |
27 | string(STRIP "${HEAD_CONTENTS}" HEAD_CONTENTS)
28 | if(HEAD_CONTENTS MATCHES "ref")
29 | # named branch
30 | string(REPLACE "ref: " "" HEAD_REF "${HEAD_CONTENTS}")
31 | if(EXISTS "@GIT_DIR@/${HEAD_REF}")
32 | configure_file("@GIT_DIR@/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY)
33 | else()
34 | execute_process(COMMAND @GIT_EXECUTABLE@ show-ref --hash ${HEAD_REF} WORKING_DIRECTORY "@CMAKE_SOURCE_DIR@" RESULT_VARIABLE res OUTPUT_VARIABLE out ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
35 | set(HEAD_HASH "${out}")
36 | endif()
37 | else()
38 | # detached HEAD
39 | configure_file("@GIT_DIR@/HEAD" "@GIT_DATA@/head-ref" COPYONLY)
40 | endif()
41 |
42 | if(NOT HEAD_HASH)
43 | file(READ "@GIT_DATA@/head-ref" HEAD_HASH LIMIT 1024)
44 | string(STRIP "${HEAD_HASH}" HEAD_HASH)
45 | endif()
46 |
--------------------------------------------------------------------------------
/cmake/Modules/MatlabTBBversion.cpp:
--------------------------------------------------------------------------------
1 | // =============================================================================
2 | // CADET
3 | //
4 | // Copyright © 2008-present: The CADET-Core Authors
5 | // Please see the AUTHORS.md file.
6 | //
7 | // All rights reserved. This program and the accompanying materials
8 | // are made available under the terms of the GNU Public License v3.0 (or, at
9 | // your option, any later version) which accompanies this distribution, and
10 | // is available at http://www.gnu.org/licenses/gpl.html
11 | // =============================================================================
12 |
13 | #include
14 |
15 | extern "C" int TBB_runtime_interface_version();
16 |
17 | int main(int argc, char** argv)
18 | {
19 | std::cout << TBB_runtime_interface_version();
20 | return 0;
21 | }
22 |
--------------------------------------------------------------------------------
/doc/Makefile:
--------------------------------------------------------------------------------
1 | # Minimal makefile for Sphinx documentation
2 | #
3 |
4 | # You can set these variables from the command line, and also
5 | # from the environment for the first two.
6 | SPHINXOPTS ?=
7 | SPHINXBUILD ?= sphinx-multiversion
8 | SOURCEDIR = .
9 | BUILDDIR = build
10 |
11 | # Put it first so that "make" without argument is like "make help".
12 | help:
13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14 |
15 | .PHONY: help Makefile
16 |
17 | clean:
18 | rm -rf $(BUILDDIR)/*
19 |
20 | # Catch-all target: route all unknown targets to Sphinx using the new
21 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
22 | %: Makefile
23 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
24 |
--------------------------------------------------------------------------------
/doc/README.md:
--------------------------------------------------------------------------------
1 | ## CADET Documentation
2 |
3 |
4 | To build the documentation locally, in the `doc` folder, install sphinx and other dependencies by running
5 |
6 | ```
7 | pip install -r requirements.txt
8 |
9 | ```
10 |
11 | Then, in the `doc` folder, run:
12 |
13 | `sphinx-build -b html . build`
14 |
15 | The output is in the `build` directory and can be opened with any browser.
16 |
17 | To build the documentation for all releases and the master branch, run:
18 |
19 | `sphinx-multiversion ./ ./build/`.
20 |
21 | Any changes to the documentation will automatically be pushed to the github-pages repository (https://github.com/cadet/cadet.github.io) using github actions.
22 |
--------------------------------------------------------------------------------
/doc/_static/cadet_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/doc/_static/cadet_icon.png
--------------------------------------------------------------------------------
/doc/_static/cadet_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/doc/_static/cadet_logo.png
--------------------------------------------------------------------------------
/doc/_static/css/custom.css:
--------------------------------------------------------------------------------
1 | /** css/custom.css **/
2 |
3 | /* This line is theme specific - it includes the base theme CSS */
4 | @import '../basic.css'; /* to produce identical results as Alabaster v0.7.16 with Alabaster v1.0.0 */
5 | @import '../alabaster.css'; /* for Alabaster */
6 | /*@import 'theme.css'; /* for the Read the Docs theme */
7 |
8 | div.sphinxsidebar {
9 | height: 100vh;
10 | overflow: auto;
11 | }
12 |
13 |
--------------------------------------------------------------------------------
/doc/_static/sections.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/doc/_static/sections.png
--------------------------------------------------------------------------------
/doc/_templates/page.html:
--------------------------------------------------------------------------------
1 | {% extends "!page.html" %}
2 | {% block body %}
3 | {% if current_version and latest_version and current_version != latest_version %}
4 |
5 |
6 | {% if current_version.is_released %}
7 | You're reading an old version of this documentation.
8 | For the latest released version, please have a look at {{latest_version.name}}.
9 | {% else %}
10 | You're reading the documentation for a development version.
11 | For the latest released version, please have a look at {{latest_version.name}}.
12 | {% endif %}
13 |
14 |
15 | {% endif %}
16 | {{ super() }}
17 | {% endblock %}%
18 |
--------------------------------------------------------------------------------
/doc/_templates/versioning.html:
--------------------------------------------------------------------------------
1 | {% if versions %}
2 | {{ _('Releases') }}
3 |
4 | {%- for item in versions.tags %}
5 | - {{ item.name }}
6 | {%- endfor %}
7 |
8 | {{ _('Branches') }}
9 |
10 | {%- for item in versions.branches %}
11 | - {{ item.name }}
12 | {%- endfor %}
13 |
14 | {% endif %}
15 |
--------------------------------------------------------------------------------
/doc/developer_guide/_images/architecture_libcadet_classes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/doc/developer_guide/_images/architecture_libcadet_classes.png
--------------------------------------------------------------------------------
/doc/developer_guide/_images/breakthrough_chromatogram.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/doc/developer_guide/_images/breakthrough_chromatogram.png
--------------------------------------------------------------------------------
/doc/developer_guide/_images/breakthrough_system.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/doc/developer_guide/_images/breakthrough_system.png
--------------------------------------------------------------------------------
/doc/developer_guide/debugging.rst:
--------------------------------------------------------------------------------
1 | .. _debugging:
2 |
3 | CADET-Core debugging
4 | ====================
5 |
6 | We advice to use an IDE like MS Visual Studio to debug CADET-Core.
7 |
8 | If the debugger does not stop at a breakpoint even though it is set in the correct source file, this might be because a corresponding libcadet file was build and is being run. You can find these files under `build/src/libcadet`. Alternatively, you can set a breakpoint in an early stage, e.g. in the driver file and manually step through the code.
9 |
10 | To run a specific simulation with the Visual Studio debugguer, you can add the launch.vs.json file provided here to the .vs folder
11 |
12 | .. literalinclude:: launch.vs.json
13 | :language: json
14 |
15 | To debug memory related issues, you can compile the code with the address sanitizer ASAN and the undefined behaviour sanitizer UBSAN by enabling the cmake arguments `DENABLE_ASAN` and `DENABLE_UBSAN`.
--------------------------------------------------------------------------------
/doc/developer_guide/index.rst:
--------------------------------------------------------------------------------
1 | .. _developer_guide:
2 |
3 | Developer Guide
4 | ===============
5 |
6 | This developer guide is intended to help expand and maintain CADET-Core and is written to serve developers with diverse backgrounds.
7 |
8 | If you find any gaps or have suggestions for improvement, your input is valuable in refining our documentation for better comprehension by all developers.
9 | Please feel free to open an `issue on GitHub `_ or, even better, write a draft and create a pull request.
10 |
11 | When planning to extend or contribute to CADET-Core, please adhere to our notation style and research software engineering (RSE) best practices.
12 | For detailed guidance, you can e.g. refer to the `RSE guidelines `_.
13 | Since some developers may be new to collaborative software development using Git and GitHub, we specifically recommend consulting the `Git RSE guide `_.
14 |
15 |
16 | .. toctree::
17 | :maxdepth: 2
18 |
19 | cadet_python
20 | cadet_core_architecture
21 | build_options
22 | model_expansion
23 | debugging
24 | testing
25 | release_new_version
26 |
--------------------------------------------------------------------------------
/doc/developer_guide/launch.vs.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "0.2.1",
3 | "defaults": {},
4 | "configurations": [
5 | {
6 | "type": "default",
7 | "project": "CMakeLists.txt",
8 | "projectTarget": "cadet-cli.exe (Install) (bin/cadet-cli.exe)",
9 | "name": "CoreDebug.txt",
10 | "args": [
11 | "path_to_setup_file/model.h5>"
12 | ]
13 | }
14 | ]
15 | }
--------------------------------------------------------------------------------
/doc/developer_guide/release_new_version.rst:
--------------------------------------------------------------------------------
1 | .. _release_new_version:
2 |
3 |
4 | .. include:: ../../.github/ISSUE_TEMPLATE/release_checklist.md
5 |
6 |
--------------------------------------------------------------------------------
/doc/examples/batch_chromatography.rst:
--------------------------------------------------------------------------------
1 | Batch chromatography
2 | ====================
3 |
4 |
--------------------------------------------------------------------------------
/doc/examples/index.rst:
--------------------------------------------------------------------------------
1 | .. _examples:
2 |
3 | Examples
4 | ========
5 |
6 | .. toctree::
7 | :maxdepth: 2
8 |
9 | reaction_cstr
10 | rtd
11 | batch_chromatography
12 | load_wash_elute
13 |
--------------------------------------------------------------------------------
/doc/examples/load_wash_elute.rst:
--------------------------------------------------------------------------------
1 | Load Wash Elute
2 | ===============
3 |
4 |
--------------------------------------------------------------------------------
/doc/examples/reaction_cstr.rst:
--------------------------------------------------------------------------------
1 | Chemical reactions
2 | ==================
3 |
--------------------------------------------------------------------------------
/doc/examples/rtd.rst:
--------------------------------------------------------------------------------
1 | Residence time distributions
2 | ============================
3 |
4 |
--------------------------------------------------------------------------------
/doc/getting_started/build_linux.rst:
--------------------------------------------------------------------------------
1 | .. _build_linux:
2 |
3 | Build for Linux
4 | ===============
5 |
6 | .. include:: ../../BUILD-LINUX.md
7 | :parser: myst_parser.sphinx_
8 |
--------------------------------------------------------------------------------
/doc/getting_started/build_osx.rst:
--------------------------------------------------------------------------------
1 | .. _build_osx:
2 |
3 | Build for OSX
4 | =============
5 |
6 | .. include:: ../../BUILD-OSX.md
7 | :parser: myst_parser.sphinx_
8 |
--------------------------------------------------------------------------------
/doc/getting_started/build_windows.rst:
--------------------------------------------------------------------------------
1 | .. _build_windows:
2 |
3 | Build for MS Windows
4 | ====================
5 |
6 | .. include:: ../../BUILD-WINDOWS.md
7 | :parser: myst_parser.sphinx_
8 |
--------------------------------------------------------------------------------
/doc/getting_started/index.rst:
--------------------------------------------------------------------------------
1 | .. _getting_started:
2 |
3 | Getting started
4 | ===============
5 |
6 | This section details the steps to install CADET, as pre-built binaries or building from scratch, and also provides the series of tutorials that will help in building complete models from scratch in CADET.
7 |
8 | A CADET installation consists of two parts: The CADET-Core simulator and a frontend.
9 |
10 | .. toctree::
11 | :maxdepth: 1
12 |
13 | installation_core
14 |
15 | After the core simulator is installed, you can verify the installation via
16 |
17 | .. code-block:: bash
18 |
19 | createLWE
20 | cadet-cli LWE.h5
21 |
22 | The first command calls the ``createLWE``, which generates an ``h5`` configuration file for a fully configured `Load-Wash-Elute` process (some parameters can be changed, run ``createLWE --help`` for input options). The model is then simulated via the second command.
23 |
24 | Next, in order to build your own model from scratch, we recommend installing a frontend.
25 |
26 | .. toctree::
27 | :maxdepth: 2
28 |
29 | installation_frontend
30 |
31 |
32 | Finally, the following introductory tutorials will guide you through the process of building a complete model from scratch.
33 |
34 | .. toctree::
35 | :maxdepth: 1
36 |
37 | introduction
38 |
--------------------------------------------------------------------------------
/doc/getting_started/installation_core.rst:
--------------------------------------------------------------------------------
1 | .. _installation_core:
2 |
3 | CADET-Core Installation
4 | =======================
5 |
6 | The core simulator can be compiled from source, or you can download pre-built binaries.
7 | If you want to extend or modify CADET-Core (e.g., add a custom binding model), you will need to build CADET-Core from source.
8 |
9 | .. note::
10 |
11 | On macOS ARM64 systems, CADET-Core must be built from source for now; see :ref:`build_osx` for instructions.
12 |
13 | Install pre-built binaries
14 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
15 | CADET-Core can be installed via `conda `_ from the ``conda-forge channel``.
16 |
17 | ``conda install -c conda-forge cadet``
18 |
19 | Install from source
20 | ^^^^^^^^^^^^^^^^^^^
21 |
22 | .. toctree::
23 | :maxdepth: 1
24 |
25 | build_linux
26 | build_windows
27 | build_osx
28 |
--------------------------------------------------------------------------------
/doc/getting_started/installation_frontend.rst:
--------------------------------------------------------------------------------
1 | .. _installation_frontend:
2 |
3 | Frontend Installation
4 | =====================
5 |
6 | CADET provides a Python API, called ``CADET-Python``, which can be used to configure the model according to :ref:`file_format`.
7 | Setting up the model using ``CADET-Python`` can become very tedious, especially for systems, and is outdated now that an actual frontend is available:
8 |
9 | We recommend using the ``CADET-Process`` frontend, which facilitates modeling processes using an object oriented model builder.
10 | This interface layer provides convenient access to all model parameters in the system.
11 | It automatically checks validity of the parameter values and sets reasonable default values where possible.
12 |
13 | Install CADET-Process (recommended for users)
14 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15 |
16 | To install ``CADET-Process``, open an `conda shell` and execute:
17 |
18 | .. code-block:: bash
19 |
20 | pip install CADET-Process
21 |
22 | Install CADET-Python (recommended for CADET-Core developers)
23 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24 |
25 | To install ``CADET-Python``, open an `conda shell` and execute:
26 |
27 | .. code-block:: bash
28 |
29 | pip install CADET-Python
30 |
31 |
32 | Additional Resources
33 | ^^^^^^^^^^^^^^^^^^^^
34 |
35 | - `CADET-Process documentation `_
36 | - `CADET-Process Workshop `_
37 | - `CADET-Python Tutorial `_
--------------------------------------------------------------------------------
/doc/getting_started/introduction.rst:
--------------------------------------------------------------------------------
1 | CADET Introduction
2 | ==================
3 |
4 | Performing a forward simulation comprises several steps:
5 | * Setting up the model including all parameters
6 | * Defining connectivity and dynamic events
7 | * Setting up the simulator and actually running the simulation
8 | * Evaluating results (e.g., plotting)
9 |
10 | For this purpose, we recommend using `CADET-Process `_, an object oriented Python frontend for CADET.
11 | CADET still must be downloaded (or built from source) as explained in the :ref:`installation guide `.
12 |
13 | .. toctree::
14 | :maxdepth: 1
15 |
16 | tutorials/breakthrough
17 |
18 |
19 | CADET-Core developers who might want to test their extensions of the simulator should use CADET-Python, a plain file based API for CADET.
20 |
21 | .. toctree::
22 | :maxdepth: 1
23 |
24 | /../developer_guide/cadet_python
25 |
--------------------------------------------------------------------------------
/doc/getting_started/tutorials/_images/breakthrough_chromatogram.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/doc/getting_started/tutorials/_images/breakthrough_chromatogram.png
--------------------------------------------------------------------------------
/doc/getting_started/tutorials/_images/cadet_architecture_overview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/doc/getting_started/tutorials/_images/cadet_architecture_overview.png
--------------------------------------------------------------------------------
/doc/interface/binding/freundlich_ldf.rst:
--------------------------------------------------------------------------------
1 | .. _freundlich_ldf_config:
2 |
3 | Freundlich LDF
4 | ~~~~~~~~~~~~~~~
5 |
6 | **Group /input/model/unit_XXX/adsorption – ADSORPTION_MODEL = FREUNDLICH_LDF**
7 |
8 | For information on model equations, refer to :ref:`freundlich_ldf_model`.
9 |
10 |
11 | ``IS_KINETIC``
12 | Selects kinetic or quasi-stationary adsorption mode: 1 = kinetic, 0 =
13 | quasi-stationary. If a single value is given, the mode is set for all
14 | bound states. Otherwise, the adsorption mode is set for each bound
15 | state separately.
16 |
17 | =================== ========================= ==================================
18 | **Type:** int **Range:** {0,1} **Length:** 1/NTOTALBND
19 | =================== ========================= ==================================
20 |
21 | ``FLDF_KKIN``
22 | Driving force coefficient for each component
23 |
24 |
25 | **Unit:** :math:`s^{-1}`
26 |
27 | =================== ========================= ==================================
28 | **Type:** double **Range:** :math:`\ge 0` **Length:** 1/NTOTALBND
29 | =================== ========================= ==================================
30 |
31 |
32 | ``FLDF_KF``
33 | Freundlich coefficient for each component
34 |
35 | **Unit:** :math:`m_{MP}^{3/n}~m_{SP}^{-3}~mol^{1-1/n}`
36 |
37 | =================== ========================= ==================================
38 | **Type:** double **Range:** :math:`\ge 0` **Length:** 1/NTOTALBND
39 | =================== ========================= ==================================
40 |
41 | ``FLDF_N``
42 | Freundlich exponent for each component
43 |
44 | **Unit:** [-]
45 |
46 | =================== ========================= ==================================
47 | **Type:** double **Range:** :math:`> 0` **Length:** 1/NTOTALBND
48 | =================== ========================= ==================================
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/doc/interface/binding/linear.rst:
--------------------------------------------------------------------------------
1 | .. _linear_config:
2 |
3 | Linear
4 | ~~~~~~
5 |
6 | **Group /input/model/unit_XXX/adsorption – ADSORPTION_MODEL = LINEAR**
7 |
8 | For information on model equations, refer to :ref:`linear_model`.
9 |
10 |
11 | ``IS_KINETIC``
12 | Selects kinetic or quasi-stationary adsorption mode: 1 = kinetic, 0 =
13 | quasi-stationary. If a single value is given, the mode is set for all
14 | bound states. Otherwise, the adsorption mode is set for each bound
15 | state separately.
16 |
17 | =================== ========================= =========================================
18 | **Type:** int **Range:** {0,1} **Length:** 1/NTOTALBND
19 | =================== ========================= =========================================
20 |
21 | ``LIN_KA``
22 | Adsorption rate constants for each component
23 |
24 |
25 | **Unit:** :math:`m_{MP}^3~m_{SP}^{-3}~s^{-1}`
26 |
27 | =================== ========================= ==================================
28 | **Type:** double **Range:** :math:`\ge 0` **Length:** 1/NTOTALBND
29 | =================== ========================= ==================================
30 |
31 |
32 | ``LIN_KD``
33 | Desorption rate constants for each component
34 |
35 | **Unit:** :math:`s^{-1}`
36 |
37 | =================== ========================= ==================================
38 | **Type:** double **Range:** :math:`\ge 0` **Length:** 1/NTOTALBND
39 | =================== ========================= ==================================
40 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/doc/interface/binding/multi_component_bi_langmuir.rst:
--------------------------------------------------------------------------------
1 | .. _multi_component_bi_langmuir_config:
2 |
3 | Multi Component Bi-Langmuir
4 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 |
6 | **Group /input/model/unit_XXX/adsorption – ADSORPTION_MODEL = MULTI_COMPONENT_BILANGMUIR**
7 |
8 | For information on model equations, refer to :ref:`multi_component_bi_langmuir_model`.
9 |
10 |
11 | ``IS_KINETIC``
12 | Selects kinetic or quasi-stationary adsorption mode: 1 = kinetic, 0 =
13 | quasi-stationary. If a single value is given, the mode is set for all
14 | bound states. Otherwise, the adsorption mode is set for each bound
15 | state separately.
16 |
17 | =================== ========================= =========================================
18 | **Type:** int **Range:** {0,1} **Length:** 1/NTOTALBND
19 | =================== ========================= =========================================
20 |
21 | ``MCBL_KA``
22 | Adsorption rate constants in state-major ordering (see :ref:`ordering_multi_dimensional_data`)
23 |
24 | **Unit:** :math:`m_{MP}^3~mol^{-1}~s^{-1}`
25 |
26 | =================== ========================= =========================================
27 | **Type:** double **Range:** :math:`\ge 0` **Length:** NSTATES :math:`\cdot` NCOMP
28 | =================== ========================= =========================================
29 |
30 | ``MCBL_KD``
31 | Desorption rate constants in state-major ordering
32 |
33 | **Unit:** :math:`s^{-1}`
34 |
35 | =================== ========================= =========================================
36 | **Type:** double **Range:** :math:`\ge 0` **Length:** NSTATES :math:`\cdot` NCOMP
37 | =================== ========================= =========================================
38 |
39 | ``MCBL_QMAX``
40 | Maximum adsorption capacities in state-major ordering
41 |
42 | **Unit:** :math:`mol~m_{SP}^{-3}`
43 |
44 | =================== ========================= =========================================
45 | **Type:** double **Range:** :math:`\ge 0` **Length:** NSTATES :math:`\cdot` NCOMP
46 | =================== ========================= =========================================
47 |
48 |
--------------------------------------------------------------------------------
/doc/interface/binding/multi_component_bi_langmuir_ldf.rst:
--------------------------------------------------------------------------------
1 | .. _multi_component_bi_langmuir_ldf_config:
2 |
3 | Multi Component Bi-Langmuir LDF
4 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 |
6 | **Group /input/model/unit_XXX/adsorption – ADSORPTION_MODEL = MULTI_COMPONENT_BILANGMUIR_LDF**
7 |
8 | For information on model equations, refer to :ref:`multi_component_bi_langmuir_ldf_model`.
9 |
10 |
11 | ``IS_KINETIC``
12 | Selects kinetic or quasi-stationary adsorption mode: 1 = kinetic, 0 =
13 | quasi-stationary. If a single value is given, the mode is set for all
14 | bound states. Otherwise, the adsorption mode is set for each bound
15 | state separately.
16 |
17 | =================== ========================= =========================================
18 | **Type:** int **Range:** {0,1} **Length:** 1/NTOTALBND
19 | =================== ========================= =========================================
20 |
21 | ``MCBLLDF_KEQ``
22 | Equillibrium loading constants in state-major ordering (see :ref:`ordering_multi_dimensional_data`)
23 |
24 | **Unit:** :math:`m_{MP}^3~mol^{-1}`
25 |
26 | =================== ========================= =========================================
27 | **Type:** double **Range:** :math:`\ge 0` **Length:** NCOMP :math:`\cdot` NSTATES
28 | =================== ========================= =========================================
29 |
30 | ``MCBLLDF_KKIN``
31 | Linear driving force coefficients in state-major ordering
32 |
33 | **Unit:** :math:`s^{-1}`
34 |
35 | =================== ========================= =========================================
36 | **Type:** double **Range:** :math:`\ge 0` **Length:** NCOMP :math:`\cdot` NSTATES
37 | =================== ========================= =========================================
38 |
39 | ``MCBLLDF_QMAX``
40 | Maximum adsorption capacities in state-major ordering
41 |
42 | **Unit:** :math:`mol~m_{SP}^{-3}`
43 |
44 | =================== ========================= =========================================
45 | **Type:** double **Range:** :math:`\gt 0` **Length:** NCOMP :math:`\cdot` NSTATES
46 | =================== ========================= =========================================
47 |
--------------------------------------------------------------------------------
/doc/interface/binding/multi_component_langmuir.rst:
--------------------------------------------------------------------------------
1 | .. _multi_component_langmuir_config:
2 |
3 | Multi Component Langmuir
4 | ========================
5 |
6 | **Group /input/model/unit_XXX/adsorption – ADSORPTION_MODEL = MULTI_COMPONENT_LANGMUIR**
7 |
8 | For information on model equations, refer to :ref:`multi_component_langmuir_model`.
9 |
10 |
11 | ``IS_KINETIC``
12 | Selects kinetic or quasi-stationary adsorption mode: 1 = kinetic, 0 =
13 | quasi-stationary. If a single value is given, the mode is set for all
14 | bound states. Otherwise, the adsorption mode is set for each bound
15 | state separately.
16 |
17 | =================== ========================= =========================================
18 | **Type:** int **Range:** {0,1} **Length:** 1/NTOTALBND
19 | =================== ========================= =========================================
20 |
21 | ``MCL_KA``
22 | Adsorption rate constants
23 |
24 | **Unit:** :math:`m_{MP}^3~mol^{-1}~s^{-1}`
25 |
26 | =================== ========================= =========================================
27 | **Type:** double **Range:** :math:`\ge 0` **Length:** NCOMP
28 | =================== ========================= =========================================
29 |
30 | ``MCL_KD``
31 | Desorption rate constants
32 |
33 | **Unit:** :math:`s^{-1}`
34 |
35 | =================== ========================= ==================================
36 | **Type:** double **Range:** :math:`\ge 0` **Length:** NCOMP
37 | =================== ========================= ==================================
38 |
39 | ``MCL_QMAX``
40 | Maximum adsorption capacities
41 |
42 | **Unit:** :math:`mol~m_{SP}^{-3}`
43 |
44 | =================== ========================= ==================================
45 | **Type:** double **Range:** :math:`\gt 0` **Length:** NCOMP
46 | =================== ========================= ==================================
47 |
--------------------------------------------------------------------------------
/doc/interface/binding/multi_component_langmuir_ldf.rst:
--------------------------------------------------------------------------------
1 | .. _multi_component_langmuir_ldf_config:
2 |
3 | Multi Component Langmuir LDF
4 | ============================
5 |
6 | **Group /input/model/unit_XXX/adsorption – ADSORPTION_MODEL = MULTI_COMPONENT_LANGMUIR_LDF**
7 |
8 | For information on model equations, refer to :ref:`multi_component_langmuir_ldf_model`.
9 |
10 |
11 | ``IS_KINETIC``
12 | Selects kinetic or quasi-stationary adsorption mode: 1 = kinetic, 0 =
13 | quasi-stationary. If a single value is given, the mode is set for all
14 | bound states. Otherwise, the adsorption mode is set for each bound
15 | state separately.
16 |
17 | =================== ========================= =========================================
18 | **Type:** int **Range:** {0,1} **Length:** 1/NTOTALBND
19 | =================== ========================= =========================================
20 |
21 | ``MCLLDF_KEQ``
22 | Equillibrium loading constants
23 |
24 | **Unit:** :math:`m_{MP}^3~mol^{-1}`
25 |
26 | =================== ========================= =========================================
27 | **Type:** double **Range:** :math:`\ge 0` **Length:** NCOMP
28 | =================== ========================= =========================================
29 |
30 | ``MCLLDF_KKIN``
31 | Linear driving force coefficients
32 |
33 | **Unit:** :math:`s^{-1}`
34 |
35 | =================== ========================= ==================================
36 | **Type:** double **Range:** :math:`\ge 0` **Length:** NCOMP
37 | =================== ========================= ==================================
38 |
39 | ``MCLLDF_QMAX``
40 | Maximum adsorption capacities
41 |
42 | **Unit:** :math:`mol~m_{SP}^{-3}`
43 |
44 | =================== ========================= ==================================
45 | **Type:** double **Range:** :math:`\gt 0` **Length:** NCOMP
46 | =================== ========================= ==================================
47 |
--------------------------------------------------------------------------------
/doc/interface/binding/multi_component_langmuir_ldf_liquid_phase.rst:
--------------------------------------------------------------------------------
1 | .. _multi_component_langmuir_ldf_liquid_phase_config:
2 |
3 | Multi Component Langmuir LDF Liquid Phase
4 | ==========================================
5 |
6 | **Group /input/model/unit_XXX/adsorption – ADSORPTION_MODEL = MULTI_COMPONENT_LANGMUIR_LDF_LIQUID_PHASE**
7 |
8 | For information on model equations, refer to :ref:`multi_component_langmuir_ldf_liquid_phase_model`.
9 |
10 |
11 | ``IS_KINETIC``
12 | Selects kinetic or quasi-stationary adsorption mode: 1 = kinetic, 0 =
13 | quasi-stationary. If a single value is given, the mode is set for all
14 | bound states. Otherwise, the adsorption mode is set for each bound
15 | state separately.
16 |
17 | =================== ========================= =========================================
18 | **Type:** int **Range:** {0,1} **Length:** 1/NTOTALBND
19 | =================== ========================= =========================================
20 |
21 | ``MCLLDFC_KEQ``
22 | Equillibrium loading constants
23 |
24 | **Unit:** :math:`m_{MP}^3~mol^{-1}`
25 |
26 | =================== ========================= =========================================
27 | **Type:** double **Range:** :math:`\ge 0` **Length:** NCOMP
28 | =================== ========================= =========================================
29 |
30 | ``MCLLDFC_KKIN``
31 | Linear driving force coefficients
32 |
33 | **Unit:** :math:`s^{-1}`
34 |
35 | =================== ========================= ==================================
36 | **Type:** double **Range:** :math:`\ge 0` **Length:** NCOMP
37 | =================== ========================= ==================================
38 |
39 | ``MCLLDFC_QMAX``
40 | Maximum adsorption capacities
41 |
42 | **Unit:** :math:`mol~m_{SP}^{-3}`
43 |
44 | =================== ========================= ==================================
45 | **Type:** double **Range:** :math:`\gt 0` **Length:** NCOMP
46 | =================== ========================= ==================================
47 |
--------------------------------------------------------------------------------
/doc/interface/binding/saska.rst:
--------------------------------------------------------------------------------
1 | .. _saska_config:
2 |
3 | Saska
4 | ~~~~~
5 |
6 | **Group /input/model/unit_XXX/adsorption – ADSORPTION_MODEL = SASKA**
7 |
8 | For information on model equations, refer to :ref:`saska_model`.
9 |
10 |
11 | ``IS_KINETIC``
12 | Selects kinetic or quasi-stationary adsorption mode: 1 = kinetic, 0 =
13 | quasi-stationary. If a single value is given, the mode is set for all
14 | bound states. Otherwise, the adsorption mode is set for each bound
15 | state separately.
16 |
17 | =================== ========================= =========================================
18 | **Type:** int **Range:** {0,1} **Length:** 1/NTOTALBND
19 | =================== ========================= =========================================
20 |
21 |
22 | ``SASKA_H``
23 | Henry coefficient
24 |
25 | **Unit:** :math:`m_{MP}^3~m_{SP}^{-3}~s^{-1}`
26 |
27 | =================== ================================= =========================================
28 | **Type:** double **Range:** :math:`\mathbb {R}` **Length:** NCOMP
29 | =================== ================================= =========================================
30 |
31 |
32 | ``SASKA_K``
33 | Quadratic factors
34 |
35 | **Unit:** :math:`m_{MP}^6~m_{SP}^{-3}~s^{-1}`
36 |
37 | =================== ================================ =========================================
38 | **Type:** double **Range:** :math:`\mathbb {R}` **Length:** :math:`\text{NCOMP}^2`
39 | =================== ================================ =========================================
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/doc/interface/consistent_initialization.rst:
--------------------------------------------------------------------------------
1 | .. _non_consistency_solver_parameters:
2 |
3 | Nonlinear solver for consistent initialization
4 | ===============================================
5 |
6 | Group /input/model/unit_XXX/discretization/consistency_solver - Nonlinear consistency solver paramters
7 | ------------------------------------------------------------------------------------------------------
8 |
9 | ``SOLVER_NAME``
10 |
11 | Name of the solver. Available solvers are ``LEVMAR``, ``ATRN_RES``, ``ATRN_ERR``, and ``COMPOSITE``.
12 |
13 | ================== =======================
14 | **Type:** string **Length:** :math:`1`
15 | ================== =======================
16 |
17 | ``INIT_DAMPING``
18 |
19 | Initial damping factor (default is :math:`0.01`)
20 |
21 | ================ ============================= ==================================
22 | **Type:** double **Range:** :math:`\ge 0` **Length:** :math:`1`
23 | ================ ============================= ==================================
24 |
25 | ``MIN_DAMPING``
26 |
27 | Minimal damping factor (default is :math:`0.0001`; ignored by ``LEVMAR``)
28 |
29 | ================ ============================= ==================================
30 | **Type:** double **Range:** :math:`\ge 0` **Length:** :math:`1`
31 | ================ ============================= ==================================
32 |
33 | ``SUBSOLVERS``
34 |
35 | Vector with names of solvers for the composite solver (only required for composite solver). See ``SOLVER_NAME`` for available solvers.
36 |
37 | ================== ==========================
38 | **Type:** string **Length:** :math:`\gt 1`
39 | ================== ==========================
40 |
--------------------------------------------------------------------------------
/doc/interface/file_format_input.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/doc/interface/file_format_input.png
--------------------------------------------------------------------------------
/doc/interface/file_format_input_model_unit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/doc/interface/file_format_input_model_unit.png
--------------------------------------------------------------------------------
/doc/interface/file_format_output.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/doc/interface/file_format_output.png
--------------------------------------------------------------------------------
/doc/interface/file_format_structure.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/doc/interface/file_format_structure.png
--------------------------------------------------------------------------------
/doc/interface/flux_reconstruction.rst:
--------------------------------------------------------------------------------
1 | .. _flux_reconstruction_methods:
2 |
3 | Flux reconstruction methods
4 | ===========================
5 |
6 | Group /input/model/unit_XXX/discretization/reconstruction = WENO
7 | -----------------------------------------------------------------
8 |
9 | ``BOUNDARY_MODEL``
10 |
11 | Boundary model type:
12 | 0. Lower WENO order (stable)
13 | 1. Zero weights (unstable for small :math:`D_{\mathrm{ax}}`)
14 | 2. Zero weights for :math:`p \neq 0` (less stable)
15 |
16 | ============= ============================== =============
17 | **Type:** int **Range:** :math:`\{0, 1, 2\}` **Length:** 1
18 | ============= ============================== =============
19 |
20 | ``WENO_EPS``
21 |
22 | WENO :math:`\varepsilon`
23 |
24 | ================ ================================== =============
25 | **Type:** double **Range:** :math:`\mathbb{R}^{>0}` **Length:** 1
26 | ================ ================================== =============
27 |
28 | ``WENO_ORDER``
29 |
30 | WENO order, also called WENO :math:`k`:
31 |
32 | 1. Standard upwind scheme (order 1)
33 | 2. WENO 2 (order 3)
34 | 3. WENO 3 (order 5)
35 |
36 | ============= ============================== =============
37 | **Type:** int **Range:** :math:`\{1, 2, 3\}` **Length:** 1
38 | ============= ============================== =============
39 |
40 |
41 | Group /input/model/unit_XXX/discretization/reconstruction = KOREN
42 | -----------------------------------------------------------------
43 |
44 | The Koren scheme implemented in CADET intrinsically uses a van Leer flux limiter. It can reach a maximum order of 2 depending on the smoothness of the solution. The
45 | BOUNDARY_MODEL is intrinsically set to 0 (stable).
46 |
47 | ``KOREN_EPS``
48 |
49 | Set :math:`\varepsilon` in the van Leer flux limiter
50 |
51 | ================ ======================== =============
52 | **Type:** double **Range:** :math:`\qe 0` **Length:** 1
53 | ================ ======================== =============
54 |
--------------------------------------------------------------------------------
/doc/interface/index.rst:
--------------------------------------------------------------------------------
1 | .. _file_format:
2 |
3 | Interface specifications
4 | ========================
5 |
6 | The CADET framework is designed to work on a file format structured into groups and datasets.
7 | This concept may be implemented by different file formats.
8 | At the moment, CADET natively supports HDF5 and XML as file formats.
9 | The choice is not limited to those two formats but can be extended as needed.
10 | In this section the general layout and structure of the file format is described.
11 |
12 | .. topic:: File format versions
13 |
14 | The file format may change and evolve over time as new features are added to the simulator.
15 | This manual describes the most recent file format version that is also set as default value in ``/meta/FILE_FORMAT`` (see Tab. :ref:`FFMeta`).
16 | The simulator assumes that the input file uses the most recent format version and does not update old files to the current standard.
17 |
18 |
19 | .. toctree::
20 | :maxdepth: 3
21 |
22 | introduction
23 | input_group
24 | output_group
25 | meta_group
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/doc/interface/input_group.rst:
--------------------------------------------------------------------------------
1 | .. _FFInput:
2 |
3 | Input Group
4 | ===========
5 |
6 | .. toctree::
7 | :maxdepth: 3
8 |
9 | system
10 | unit_operations/index
11 | binding/index
12 | population_balance_model
13 | reaction/index
14 | flux_reconstruction
15 | consistent_initialization
16 | return_data
17 | sensitivities
18 | solver
19 | parameter_dependencies
20 | spatial_discretization_methods
21 |
22 |
--------------------------------------------------------------------------------
/doc/interface/meta_group.rst:
--------------------------------------------------------------------------------
1 | .. _FFMeta:
2 |
3 | Meta Group
4 | ==========
5 |
6 | ``FILE_FORMAT``
7 |
8 | Version of the file format (defaults to 040000 = 4.0.0 if omitted) with two digits per part (Major.Minor.Patch)
9 |
10 | ================ =========================
11 | **In/out:** In **Type:** int
12 | ================ =========================
13 |
14 | ``CADET_VERSION``
15 |
16 | Version of the executed :math:`\texttt{CADET}` simulator
17 |
18 | ================ =========================
19 | **In/out:** Out **Type:** string
20 | ================ =========================
21 |
22 | ``CADET_COMMIT``
23 |
24 | Git commit SHA1 from which the :math:`\texttt{CADET}` simulator was built
25 |
26 | ================ =========================
27 | **In/out:** Out **Type:** string
28 | ================ =========================
29 |
30 | ``CADET_BRANCH``
31 |
32 | Git branch from which the :math:`\texttt{CADET}` simulator was built
33 |
34 | ================ =========================
35 | **In/out:** Out **Type:** string
36 | ================ =========================
37 |
38 | ``TIME_SIM``
39 |
40 | Time that the time integration took (excluding any preparations and postprocessing)
41 |
42 | **Unit:** :math:`\mathrm{s}`
43 |
44 | ================ =========================
45 | **In/out:** Out **Type:** double
46 | ================ =========================
47 |
--------------------------------------------------------------------------------
/doc/interface/reaction/michaelis_menten_kinetics.rst:
--------------------------------------------------------------------------------
1 | .. _michaelis_menten_kinetics_config:
2 |
3 | Michaelis Menten kinetics
4 | ~~~~~~~~~~~~~~~~~~~~~~~~~
5 |
6 | **Group /input/model/unit_XXX/reaction - REACTION_MODEL = MICHAELIS_MENTEN**
7 |
8 | For information on model equations, refer to :ref:`michaelis_menten_kinetics_model`.
9 |
10 | ``MM_STOICHIOMETRY_BULK``
11 |
12 | Stochiometric matrix :math:`S`.
13 | The substrate component :math:`c_S` is identified by the index of the first negative entry in the stoichiometry of the corresponding reaction.
14 | Input as reaction index major.
15 |
16 | ================ ============================= ========================================================
17 | **Type:** double **Range:** :math:`\mathbb{R}` **Length:** :math:`\texttt{NREACT} \cdot \texttt{NCOMP}`
18 | ================ ============================= ========================================================
19 |
20 | ``MM_VMAX``
21 |
22 | Limiting rate :math:`\mu_{\mathrm{max},j}` at saturation.
23 |
24 | ================ ============================= ===================================
25 | **Type:** double **Range:** :math:`\mathbb{R}` **Length:** :math:`\texttt{NREACT}`
26 | ================ ============================= ===================================
27 |
28 | ``MM_KMM``
29 |
30 | Michaelis constant :math:`k_{\mathrm{MM},j}`.
31 |
32 | ================ ============================= ===================================
33 | **Type:** double **Range:** :math:`\mathbb{R}` **Length:** :math:`\texttt{NREACT}`
34 | ================ ============================= ===================================
35 |
36 | ``MM_KI``
37 |
38 | Inhibition constant :math:`k_{\mathrm{I},j,i}` w.r.t component :math:`i` and reaction :math:`j`. If :math:`k_{\mathrm{I},j,i} <= 0`, the component does not inhibit the reaction.
39 | Input as reaction index major.
40 |
41 | ================ ============================= ========================================================
42 | **Type:** double **Range:** :math:`\mathbb{R}` **Length:** :math:`\texttt{NREACT} \cdot \texttt{NCOMP}`
43 | ================ ============================= ========================================================
44 |
--------------------------------------------------------------------------------
/doc/interface/unit_operations/index.rst:
--------------------------------------------------------------------------------
1 | .. _unit_operation_config:
2 |
3 | Unit Operations
4 | ===============
5 |
6 | .. toctree::
7 | :maxdepth: 2
8 |
9 | inlet
10 | outlet
11 | general_rate_model
12 | lumped_rate_model_with_pores
13 | lumped_rate_model_without_pores
14 | 2d_general_rate_model
15 | cstr
16 | radial_flow_models
17 | multi_channel_transport_model
18 | ../population_balance_model
19 |
20 |
--------------------------------------------------------------------------------
/doc/interface/unit_operations/outlet.rst:
--------------------------------------------------------------------------------
1 | .. _outlet_config:
2 |
3 | Outlet
4 | ======
5 |
6 | Group /input/model/unit_XXX - UNIT-TYPE = OUTLET
7 | ------------------------------------------------
8 |
9 | For information on model equations, refer to :ref:`outlet_model`.
10 |
11 |
12 | ``UNIT_TYPE``
13 |
14 | Specifies the type of unit operation model
15 |
16 |
17 | ================ ================================== =============
18 | **Type:** string **Range:** :math:`\texttt{OUTLET}` **Length:** 1
19 | ================ ================================== =============
20 |
21 | ``NCOMP``
22 |
23 | Number of chemical components in the chromatographic medium
24 |
25 | ============= ========================= =============
26 | **Type:** int **Range:** :math:`\geq 1` **Length:** 1
27 | ============= ========================= =============
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/doc/logo/CADET-Doxygen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/doc/logo/CADET-Doxygen.png
--------------------------------------------------------------------------------
/doc/modelling/binding/extended_mobile_phase_modulator_langmuir.rst:
--------------------------------------------------------------------------------
1 | .. _extended_mobile_phase_modulator_langmuir_model:
2 |
3 | Extended Mobile Phase Modulator Langmuir
4 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 |
6 | This model is an extension of the mobile phase modulator Langmuir model (see Section :ref:`multi_component_langmuir_model`), which allows linear binding of some selected components.
7 | A modifier component :math:`c_{p,\mathrm{mod}}` is selected and the remaining components are divided into the index sets :math:`\mathcal{I}_{\mathrm{lin}}` and :math:`\mathcal{I}_{\mathrm{lang}}`.
8 |
9 | .. math::
10 |
11 | \begin{aligned}
12 | \frac{\mathrm{d} q_i}{\mathrm{d} t} &= k_{a,i} e^{\gamma_i c_{p,\mathrm{mod}}} c_{p,i}\: q_{\text{max},i} \left( 1 - \sum_{j=1}^{N_{\text{comp}} - 1} \frac{q_j}{q_{\text{max},j}} \right) - k_{d,i} \: c_{p,\mathrm{mod}}^{\beta_i} \: q_i && i \in \mathcal{I}_{\mathrm{lang}}, \\
13 | \frac{\mathrm{d} q_i}{\mathrm{d} t} &= k_{a,i} c_{p,i} - k_{d,i} \: q_i && i \in \mathcal{I}_{\mathrm{lin}}.
14 | \end{aligned}
15 |
16 | The modifier component is considered to be inert, therefore either
17 |
18 | .. math::
19 |
20 | \frac{\mathrm{d} q_{\mathrm{mod}}}{\mathrm{d} t} = 0
21 |
22 | is used if the modifier component has a bound state, or it can be used without a bound state.
23 |
24 | The model can also be used without a modifier component.
25 | In this case, the equations are given by
26 |
27 | .. math::
28 |
29 | \begin{aligned}
30 | \frac{\mathrm{d} q_i}{\mathrm{d} t} &= k_{a,i} c_{p,i}\: q_{\text{max},i} \left( 1 - \sum_{j=1}^{N_{\text{comp}} - 1} \frac{q_j}{q_{\text{max},j}} \right) - k_{d,i} \: q_i && i \in \mathcal{I}_{\mathrm{lang}}, \\
31 | \frac{\mathrm{d} q_i}{\mathrm{d} t} &= k_{a,i} c_{p,i} - k_{d,i} \: q_i && i \in \mathcal{I}_{\mathrm{lin}}.
32 | \end{aligned}
33 |
34 | For more information on model parameters required to define in CADET file format, see :ref:`extended_mobile_phase_modulator_langmuir_config`.
35 |
--------------------------------------------------------------------------------
/doc/modelling/binding/hic_constant_water_activity.rst:
--------------------------------------------------------------------------------
1 | .. _hic_constant_water_activity_model:
2 |
3 | HIC Constant Water Activity
4 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 | This model implements the HIC isotherm assuming a constant water activity as described by Jäpel and Buyel :cite:`Jaepel2022`.
6 |
7 | .. math::
8 | \begin{align}
9 | \beta &= \beta_0 e^{c_{p,0}\beta_1} \\
10 | \frac{\mathrm{d}q_i}{\mathrm{d}t} &= k_{a,i} c_{p,i} \left( 1 - \sum_j \frac{q_j}{q_{max,j}} \right)^{\nu_i} - k_{d,i} q_i 0.1^{\nu_i \beta}
11 | \end{align}
12 |
13 | - Component :math:`c_0` is assumed to be salt without a bound state.
14 | - Multiple bound states are not supported.
15 | - Components without bound state (i.e., salt and non-binding components) are supported.
16 |
17 | For more information on model parameters required to define in CADET file format, see :ref:`hic_constant_water_activity_config`.
18 |
19 |
--------------------------------------------------------------------------------
/doc/modelling/binding/hic_unified.rst:
--------------------------------------------------------------------------------
1 | .. _hic_unified_model:
2 |
3 | HIC Unified
4 | ~~~~~~~~~~~
5 | This model implements a unified hydrophobic interaction chromatography (HIC) isotherm as described by Jäpel et al. :cite:`Jaepel2025`.
6 | It combines the isotherms proposed by Mollerup :cite:`Mollerup2006`, Deitcher :cite:`Deitcher2010` and the SWA isotherm by Jäpel et al. into one isotherm.
7 | In addition to the first component :math:`c_{p,0}`, which represents salt, the second component :math:`c_{p,1}` represents another non-binding modifier (e.g., pH).
8 |
9 | .. math::
10 | \begin{align}
11 | k_{a,i} &= k_{a,i,0} \exp\left( k_{a,i,lin} ({c_{p,1}}-{c}_{1,ref})\right)\\
12 | \nu_i &= \nu_{i,0} + \nu_{i,lin} ({c_{p,1}}-{c}_{1,ref})\\
13 | \beta &= \beta_0 \exp\left(\beta_1 c_{p,0}\right) \\
14 | \frac{\mathrm{d}q_i}{\mathrm{d}t} &= k_{a,i} c_{p,i}\exp\left({k_{p,i} c_{p,i}+k_{s,i} c_{p,0}}\right)\left( 1 - \sum_j \frac{q_j}{q_{max,j}} \right)^{\nu_i}
15 | -k_{d,i} q_{p,i}(1+\epsilon q_{p,i}) \exp\left(({\rho c_{p,0}})^{\nu_i \beta} \right)
16 | \end{align}
17 |
18 | Model Assumptions and Limitations:
19 |
20 | - Component :math:`c_0` is assumed to be salt with no bound state.
21 | - Component :math:`c_1` is assumed to be a modifying component with no bound state. It is measured relative to a reference concentration of :math:`c_{1,ref}`, which defaults to 0.0.
22 | - Multiple bound states are not supported.
23 | - Components without bound state (i.e., salt and additional non-binding components) are supported.
24 |
25 | For more information on model parameters required to define in CADET file format, see :ref:`hic_unified_config`.
26 |
27 |
--------------------------------------------------------------------------------
/doc/modelling/binding/hic_water_on_hydrophobic_surfaces.rst:
--------------------------------------------------------------------------------
1 | .. _hic_water_on_hydrophobic_surfaces_model:
2 |
3 | HIC Water on Hydrophobic Surfaces
4 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 |
6 | This model implements a slightly modified version of the HIC isotherm by Wang et al. based on their 2016 paper :cite:`Wang2016`.
7 | A naive multicomponent version was added that reduces to the original formulation if only 1 binding species is present.
8 |
9 | .. math::
10 |
11 | \begin{align}
12 | \beta &= \beta_0 e^{c_{p,0}\beta_1} \\
13 | \frac{\mathrm{d}q_i}{\mathrm{d}t} &= k_{a,i} c_{p,i} \left( 1 - \sum_j \frac{q_j}{q_{max,j}} \right)^{\nu_i} - k_{d,i} q_i \left(\sum_j q_j \right)^{\nu_i \beta}
14 | \end{align}
15 |
16 | - Component :math:`c_0` is assumed to be salt without a bound state.
17 | - Multiple bound states are not supported.
18 | - Components without bound state (i.e., salt and non-binding components) are supported.
19 |
20 | For more information on model parameters required to define in CADET file format, see :ref:`hic_water_on_hydrophobic_surfaces_config`.
21 |
--------------------------------------------------------------------------------
/doc/modelling/binding/linear.rst:
--------------------------------------------------------------------------------
1 | .. _linear_model:
2 |
3 | Linear
4 | ~~~~~~
5 |
6 | A linear binding model, which is often employed for low concentrations or in analytic settings :cite:`Guiochon2006`.
7 |
8 | .. math::
9 |
10 | \begin{aligned}
11 | \frac{\mathrm{d} q_i}{\mathrm{d} t} = k_{a,i} c_{p,i} - k_{d,i} q_i && i = 0, \dots, N_{\text{comp}} - 1.
12 | \end{aligned}
13 |
14 |
15 | For more information on model parameters required to define in CADET file format, see :ref:`linear_config`.
16 |
--------------------------------------------------------------------------------
/doc/modelling/binding/mobile_phase_modulator_langmuir.rst:
--------------------------------------------------------------------------------
1 | .. _mobile_phase_modulator_langmuir_model:
2 |
3 | Mobile Phase Modulator Langmuir
4 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 |
6 | This model is a modified Langmuir model (see Section :ref:`multi_component_langmuir_model`) which can be used to describe hydrophobic interaction chromatography :cite:`Melander1989,Karlsson2004`.
7 | A modulator component (termed “salt”, :math:`c_{p,0}` and :math:`q_0`) influences ad- and desorption processes:
8 |
9 | .. math::
10 |
11 | \begin{aligned}
12 | \frac{\mathrm{d} q_i}{\mathrm{d} t} = k_{a,i} e^{\gamma_i c_{p,0}} c_{p,i}\: q_{\text{max},i} \left( 1 - \sum_{j=1}^{N_{\text{comp}} - 1} \frac{q_j}{q_{\text{max},j}} \right) - k_{d,i} \: c_{p,0}^{\beta_i} \: q_i && i = 1, \dots, N_{\text{comp}} - 1.
13 | \end{aligned}
14 |
15 | where :math:`c_{p,0}` and :math:`q_0` denote the salt concentrations in the liquid and solid phase of the beads respectively.
16 | Salt is considered to be inert, therefore either
17 |
18 | .. math::
19 |
20 | \begin{aligned}
21 | \frac{\mathrm{d} q_0}{\mathrm{d} t} = 0
22 | \end{aligned}
23 |
24 | is used if salt has one bound state, or salt can be used without a bound state.
25 | The parameter :math:`\gamma` describes the hydrophobicity and :math:`\beta` the ion-exchange characteristics.
26 |
27 |
28 | For more information on model parameters required to define in CADET file format, see :ref:`mobile_phase_modulator_langmuir_config`.
29 |
--------------------------------------------------------------------------------
/doc/modelling/binding/multi_component_anti_langmuir.rst:
--------------------------------------------------------------------------------
1 | .. _multi_component_anti_langmuir_model:
2 |
3 | Multi Component Anti-Langmuir
4 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 |
6 | The Anti-Langmuir (or generalized Langmuir) binding model extends the Langmuir model (see Section :ref:`multi_component_langmuir_model`).
7 | The factor :math:`p_j \in \{ -1, 1 \}` determines the shape of the isotherm.
8 | For :math:`p_j = 1` (standard Langmuir) the chromatograms have sharp fronts and a dispersed tail (isotherm is concave).
9 | In case of the Anti-Langmuir (:math:`p_j = -1`) it is the other way around (isotherm is convex).
10 |
11 | .. math::
12 |
13 | \begin{aligned}
14 | \frac{\mathrm{d} q_i}{\mathrm{d} t} = k_{a,i} c_{p,i} q_{\text{max},i} \left( 1 - \sum_{j=0}^{N_{\text{comp}} - 1} p_j \frac{q_j}{q_{\text{max},j}} \right) - k_{d,i} q_i && i = 0, \dots, N_{\text{comp}} - 1.
15 | \end{aligned}
16 |
17 |
18 | For more information on model parameters required to define in CADET file format, see :ref:`multi_component_anti_langmuir_config`.
19 |
--------------------------------------------------------------------------------
/doc/modelling/binding/multi_component_bi_langmuir.rst:
--------------------------------------------------------------------------------
1 | .. _multi_component_bi_langmuir_model:
2 |
3 | Multi Component Bi-Langmuir
4 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 |
6 | The multi component Bi-Langmuir model :cite:`Guiochon2006` adds :math:`M - 1` additional types of binding sites :math:`q_{i,j}` (:math:`0 \leq j \leq M - 1`) to the Langmuir model (see Section :ref:`multi_component_langmuir_model`) without allowing an exchange between the different sites :math:`q_{i,j}` and :math:`q_{i,k}` (:math:`k \neq j`).
7 | Therefore, there are no competitivity effects between the different types of binding sites and they have independent capacities.
8 |
9 | .. math::
10 |
11 | \begin{aligned}
12 | \frac{\mathrm{d} q_{i,j}}{\mathrm{d} t} &= k_{a,i}^{(j)}\: c_{p,i}\: q_{\text{max},i}^{(j)} \left( 1 - \sum_{k=0}^{N_{\text{comp}} - 1} \frac{q_{k,j}}{q_{\text{max},k}^{(j)}}\right) - k_{d,i}^{(j)} q_{i,j} & i = 0, \dots, N_{\text{comp}} - 1, \: j = 0, \dots, M - 1.% (0 \leq i \leq N_{\text{comp}} - 1, \: 0 \leq j \leq M - 1).
13 | \end{aligned}
14 |
15 | Note that all binding components must have exactly the same number of binding site types :math:`M \geq 1`.
16 | See the Section :ref:`multi_component_langmuir_model`.
17 |
18 | Originally, the Bi-Langmuir model is limited to two different binding site types.
19 | Here, the model has been extended to arbitrary many binding site types.
20 |
21 | For more information on model parameters required to define in CADET file format, see :ref:`multi_component_bi_langmuir_config`.
22 |
--------------------------------------------------------------------------------
/doc/modelling/binding/multi_component_bi_langmuir_ldf.rst:
--------------------------------------------------------------------------------
1 | .. _multi_component_bi_langmuir_ldf_model:
2 |
3 | Multi Component Bi-Langmuir LDF
4 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 |
6 | This a linear driving force model variant of the :ref:`multi_component_bi_langmuir_model` model.
7 | It is based on the equilibrium concentration :math:`q^*` for a given liquid phase concentration :math:`c` (see also :ref:`ldf_model`).
8 |
9 | .. math::
10 | \begin{aligned}
11 | q_{i,j}^*=\frac{q_{m,i,j} k_{eq,i,j} c_i}{1 + \sum_{k=1}^{N_{comp}}{k_{eq,k,j} c_k}} && i = 0, \dots, N_{\text{comp}} - 1, \: j = 0, \dots, M - 1.% (0 \leq i \leq N_{\text{comp}} - 1, \: 0 \leq j \leq M - 1).
12 | \end{aligned}
13 |
14 |
15 | For more information on model parameters required to define in CADET file format, see :ref:`multi_component_bi_langmuir_ldf_config`.
16 |
--------------------------------------------------------------------------------
/doc/modelling/binding/multi_component_langmuir.rst:
--------------------------------------------------------------------------------
1 | .. _multi_component_langmuir_model:
2 |
3 | Multi Component Langmuir
4 | ~~~~~~~~~~~~~~~~~~~~~~~~
5 |
6 | The Langmuir binding model includes a saturation term and takes into account the capacity of the resin :cite:`Langmuir1916,Guiochon2006`.
7 | All components compete for the same binding sites.
8 |
9 | .. math::
10 |
11 | \begin{aligned}
12 | \frac{\mathrm{d} q_i}{\mathrm{d} t} = k_{a,i}\: c_{p,i}\: q_{\text{max},i} \left( 1 - \sum_{j=0}^{N_{\text{comp}} - 1} \frac{q_j}{q_{\text{max},j}} \right) - k_{d,i} q_i && i = 0, \dots, N_{\text{comp}} - 1.
13 | \end{aligned}
14 |
15 |
16 | For more information on model parameters required to define in CADET file format, see :ref:`multi_component_langmuir_config`.
17 |
--------------------------------------------------------------------------------
/doc/modelling/binding/multi_component_langmuir_ldf.rst:
--------------------------------------------------------------------------------
1 | .. _multi_component_langmuir_ldf_model:
2 |
3 | Multi Component Langmuir LDF
4 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 |
6 | This a linear driving force model variant of the :ref:`multi_component_langmuir_model` model.
7 | It is based on the equilibrium concentration :math:`q^*` for a given liquid phase concentration :math:`c` (see also :ref:`ldf_model`).
8 |
9 | .. math::
10 |
11 | \begin{aligned}
12 | q_i^*=\frac{q_{m,i} k_{eq,i} c_i}{1 + \sum_{j=1}^{n_{comp}}{k_{eq,j} c_j}} && i = 0, \dots, N_{\text{comp}} - 1.
13 | \end{aligned}
14 |
15 | For more information on model parameters required to define in CADET file format, see :ref:`multi_component_langmuir_ldf_config`.
16 |
--------------------------------------------------------------------------------
/doc/modelling/binding/multi_component_langmuir_ldf_liquid_phase.rst:
--------------------------------------------------------------------------------
1 | .. _multi_component_langmuir_ldf_liquid_phase_model:
2 |
3 | Multi Component Langmuir LDF Liquid Phase
4 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 |
6 | This a linear driving force model variant of the :ref:`multi_component_langmuir_model` model.
7 | It is based on the equilibrium concentration :math:`c^*` for a given solid phase concentration :math:`q` (see also :ref:`ldf_model`).
8 |
9 | .. math::
10 |
11 | \begin{aligned}
12 | c_i^*=\frac{q_{i}}{k_{eq,i} q_{m,i} \left(1 - \sum_{j=1}^{N_{\text{comp}}} \frac{q_j}{q_{m,j}}\right) } && i = 0, \dots, N_{\text{comp}} - 1.
13 | \end{aligned}
14 |
15 |
16 | For more information on model parameters required to define in CADET file format, see :ref:`multi_component_langmuir_ldf_liquid_phase_config`.
17 |
--------------------------------------------------------------------------------
/doc/modelling/binding/multi_component_ldf_freundlich.rst:
--------------------------------------------------------------------------------
1 | .. _multi_component_ldf_freundlich_model:
2 |
3 | Multi Component Linear Driving Force Freundlich
4 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 |
6 | A multi-component extension to the classical Freundlich adsorption model.
7 | A linear driving force approach is applied to obtain a kinetic form.
8 |
9 | .. math::
10 |
11 | \begin{aligned}
12 | \frac{\mathrm{d} q_i}{\mathrm{d} t} &= k_{\text{ldf},i}\: \left(q_i^* - q_i \right) & i = 0, \dots, N_{\text{comp}} - 1 \\
13 | q_i^* &= k_{F,i} c_{p,i} \left( \sum_j a_{ij} c_{p,j} + \tau \right)^{1 / n_i - 1}.
14 | \end{aligned}
15 |
16 | Here, :math:`\tau > 0` is a small constant that ensures numerical stability.
17 |
18 | In a rapid-equilibrium setting with a diagonal matrix (i.e., :math:`a_{ii} = 1` and :math:`a_{ij} = 0` for :math:`j \neq i`), the traditional Freundlich isotherm is recovered.
19 |
20 | For more information on model parameters required to define in CADET file format, see :ref:`multi_component_ldf_freundlich_config`.
21 |
--------------------------------------------------------------------------------
/doc/modelling/binding/multi_component_spreading.rst:
--------------------------------------------------------------------------------
1 | .. _multi_component_spreading_model:
2 |
3 | Multi Component Spreading
4 | ~~~~~~~~~~~~~~~~~~~~~~~~~
5 |
6 | The multi component spreading model adds a second bound state :math:`q_{i,2}` to the Langmuir model (see Section :ref:`multi_component_langmuir_model`) and allows the exchange between the two bound states :math:`q_{i,1}` and :math:`q_{i,2}`.
7 | In the spreading model a second state of the bound molecule (e.g., a different orientation on the surface or a different folding state) is added.
8 | The exchange of molecules between the two states is allowed and, since the molecules can potentially bind in both states at the same binding site, competitivity effects are present.
9 | This is different to the Bi-Langmuir model in which another type of binding sites is added and no exchange between the different bound states is considered (see Section :ref:`multi_component_bi_langmuir_model`).
10 | For all components :math:`i = 0, \dots, N_{\text{comp}} - 1` the equations are given by
11 |
12 | .. math::
13 |
14 | \begin{aligned}
15 | \frac{\mathrm{d} q_{i,1}}{\mathrm{d} t} &= \left( k_a^A\: c_{p,i} - k_{12} q_{i,1} \right) q_{\text{max},i}^A \left( 1 - \sum_{j=0}^{N_{\text{comp}} - 1} \frac{q_j^A}{q_{\text{max},j}^A} - \sum_{j=0}^{N_{\text{comp}} - 1} \frac{q_j^B}{q_{\text{max},j}^B} \right) - k_d^A q_{i,1} + k_{21} q_{i,2}, \\
16 | \frac{\mathrm{d} q_{i,2}}{\mathrm{d} t} &= \left( k_a^B\: c_{p,i} + k_{12} q_{i,1} \right) q_{\text{max},i}^A \left( 1 - \sum_{j=0}^{N_{\text{comp}} - 1} \frac{q_j^A}{q_{\text{max},j}^A} - \sum_{j=0}^{N_{\text{comp}} - 1} \frac{q_j^B}{q_{\text{max},j}^B} \right) - \left( k_d^B + k_{21} \right) q_{i,2}.
17 | \end{aligned}
18 |
19 |
20 | For more information on model parameters required to define in CADET file format, see :ref:`multi_component_spreading_config`.
21 |
--------------------------------------------------------------------------------
/doc/modelling/binding/saska.rst:
--------------------------------------------------------------------------------
1 | .. _saska_model:
2 |
3 | Saska
4 | ~~~~~
5 |
6 | In this binding model an additional quadratic term is added to the linear model :cite:`Saska1992`.
7 | The quadratic term allows to take interactions of liquid phase components into account.
8 |
9 | .. math::
10 |
11 | \begin{aligned}
12 | \frac{\mathrm{d} q_i}{\mathrm{d} t} = H_i c_{p,i} + \sum_{j=0}^{N_{\text{comp}} - 1} k_{ij} c_{p,i} c_{p,j} - q_i && i = 0, \dots, N_{\text{comp}} - 1
13 | \end{aligned}
14 |
15 |
16 | For more information on model parameters required to define in CADET file format, see :ref:`saska_config`.
17 |
--------------------------------------------------------------------------------
/doc/modelling/binding/self_association.rst:
--------------------------------------------------------------------------------
1 | .. _self_association_model:
2 |
3 | Self Association
4 | ~~~~~~~~~~~~~~~~
5 |
6 | This binding model is similar to the steric mass action model (see Section :ref:`steric_mass_action_model`) but is also capable of describing dimerization :cite:`Mollerup2008,Westerberg2012`.
7 | The dimerization, which is the immobilization of protein at some already bound protein, is also termed “self-association”.
8 | It is modeled by adding a quadratic (in :math:`c_{p,i}`) term to the adsorption part of the equation.
9 |
10 | .. math::
11 |
12 | \begin{aligned}
13 | \frac{\mathrm{d} q_i}{\mathrm{d} t} &= c_{p,i}\left( \frac{\bar{q}_0}{q_{\text{ref}}} \right)^{\nu_i} \left[ k_{a,i,1} + k_{a,i,2} c_{p,i} \right] - k_{d,i}\: q_i\: \left(\frac{c_{p,0}}{c_{\text{ref}}}\right)^{\nu_i} && i = 1, \dots, N_{\text{comp}} - 1, \\
14 | q_0 &= \Lambda - \sum_{j=1}^{N_{\text{comp}} - 1} \nu_j q_j,
15 | \end{aligned}
16 |
17 | where the number of available binding sites is given by
18 |
19 | .. math::
20 |
21 | \begin{aligned}
22 | \bar{q}_0 = \Lambda - \sum_{j=1}^{N_{\text{comp}} - 1} \left( \nu_j + \sigma_j \right) q_j = q_0 - \sum_{j=1}^{N_{\text{comp}} - 1} \sigma_j q_j.
23 | \end{aligned}
24 |
25 | The concept of reference concentrations (:math:`c_{\text{ref}}` and :math:`q_{\text{ref}}`) is explained in the respective paragraph in Section :ref:`reference_concentrations`.
26 |
27 |
28 | For more information on model parameters required to define in CADET file format, see :ref:`self_association_config`.
29 |
--------------------------------------------------------------------------------
/doc/modelling/binding/simplified_multi_state_steric_mass_action.rst:
--------------------------------------------------------------------------------
1 | .. _simplified_multi_state_steric_mass_action_model:
2 |
3 | Simplified Multi-State Steric Mass Action
4 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 |
6 | The simplified multi-state steric mass action is the same as the multi-state SMA model described above (see Section :ref:`multi_state_steric_mass_action_model`), but with additional assumptions:
7 |
8 | - Molecules are only exchanged between two adjacent states, that is, no transfer from state :math:`q_{i,1}` to state :math:`q_{i,3}` is allowed.
9 |
10 | - Characteristic charge :math:`\nu_{i,j}` and shielding factor :math:`\sigma_{i,j}` only depend on the index of the state :math:`j`.
11 |
12 | Thus, the exchange parameters :math:`k^{(i)}_{j\ell}`, the characteristic charge :math:`\nu_{i,j}`, and the shielding :math:`\sigma_{i,j}` can be parameterized with few degrees of freedom.
13 | For all :math:`i = 1,\dots,N_{\text{comp}} - 1` and :math:`j,\ell = 0,\dots,M_i - 1` let
14 |
15 | .. math::
16 |
17 | \begin{aligned}
18 | k^{(i)}_{j\ell} &= \begin{cases}
19 | 0, & \text{for } \left\lvert j-\ell\right\rvert \neq 1 \\
20 | K^{(i)}_{ws} + j K^{(i)}_{ws,\text{lin}} - K^{(i)}_{ws,\text{quad}} j(j - M_i+2), & \text{for } \ell = j+1 \\
21 | K^{(i)}_{sw} + \ell K^{(i)}_{sw,\text{lin}} - K^{(i)}_{sw,\text{quad}} \ell(\ell - M_i+2), & \text{for } \ell = j-1, \end{cases}\\
22 | \nu_{i,j} &= \nu_{\text{min},i} + \frac{j}{M_i-1} \left( \nu_{\text{max},i} - \nu_{\text{min},i} \right) - \nu_{\text{quad},i} j (j-M_i+1), \\
23 | \sigma_{i,j} &= \sigma_{\text{min},i} + \frac{j}{M_i-1} \left( \sigma_{\text{max},i} - \sigma_{\text{min},i} \right) - \sigma_{\text{quad},i} j (j-M_i+1).
24 | \end{aligned}
25 |
26 | Note that the characteristic charge :math:`\nu_{i,j}` has to be monotonically non-decreasing in the second index :math:`j` and all other rates and the steric factor :math:`\sigma_{i,j}` have to be non-negative.
27 |
28 |
29 | For more information on model parameters required to define in CADET file format, see :ref:`simplified_multi_state_steric_mass_action_config`.
30 |
--------------------------------------------------------------------------------
/doc/modelling/binding/steric_mass_action.rst:
--------------------------------------------------------------------------------
1 | .. _steric_mass_action_model:
2 |
3 | Steric Mass Action
4 | ~~~~~~~~~~~~~~~~~~
5 |
6 | The steric mass action model takes charges of the molecules into account :cite:`Brooks1992` and is, thus, often used in ion-exchange chromatography.
7 | Each component has a characteristic charge :math:`\nu` that determines the number of available binding sites :math:`\Lambda` (ionic capacity) used up by a molecule.
8 | Due to the molecule’s shape, some additional binding sites (steric shielding factor :math:`\sigma`) may be shielded from other molecules and are not available for binding.
9 |
10 | .. math::
11 |
12 | \begin{aligned}
13 | \frac{\mathrm{d} q_i}{\mathrm{d} t} = k_{a,i} c_{p,i}\left( \frac{\bar{q}_0 }{q_{\text{ref}}} \right)^{\nu_i} - k_{d,i}\: q_i\: \left(\frac{c_{p,0}}{c_{\text{ref}}}\right)^{\nu_i} && i = 1, \dots, N_{\text{comp}} - 1,
14 | \end{aligned}
15 |
16 | where :math:`c_{p,0}` and :math:`q_0` denote the salt concentrations in the liquid and solid phase of the beads, respectively.
17 | The number of free binding sites
18 |
19 | .. math::
20 |
21 | \begin{aligned}
22 | \bar{q}_0 = \Lambda - \sum_{j=1}^{N_{\text{comp}} - 1} \left( \nu_j + \sigma_j \right) q_j = q_0 - \sum_{j=1}^{N_{\text{comp}} - 1} \sigma_j q_j
23 | \end{aligned}
24 |
25 | is calculated from the number of bound counter ions :math:`q_0` by taking steric shielding into account.
26 | In turn, the number of bound counter ions :math:`q_0` (electro-neutrality condition) is given by
27 |
28 | .. math::
29 |
30 | \begin{aligned}
31 | q_0 = \Lambda - \sum_{j=1}^{N_{\text{comp}} - 1} \nu_j q_j,
32 | \end{aligned}
33 |
34 | which also compensates for the missing equation for :math:`\frac{\mathrm{d} q_0}{\mathrm{d}t}`.
35 |
36 | The concept of reference concentrations (:math:`c_{\text{ref}}` and :math:`q_{\text{ref}}`) is explained in the respective paragraph in Section :ref:`reference_concentrations`.
37 |
38 |
39 | For more information on model parameters required to define in CADET file format, see :ref:`steric_mass_action_config`.
40 |
--------------------------------------------------------------------------------
/doc/modelling/crystallization/PBM_Part_I.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/doc/modelling/crystallization/PBM_Part_I.png
--------------------------------------------------------------------------------
/doc/modelling/crystallization/index.rst:
--------------------------------------------------------------------------------
1 | .. _FFCrystallization:
2 |
3 | Crystallization / Precipitation Models
4 | ======================================
5 |
6 | CADET features various crystallization / precipitation mechanisms:
7 |
8 | - :ref:`pbm_model`
9 | - :ref:`aggregation_model`
10 | - :ref:`fragmentation_model`
11 |
12 | Additionally, any combination of these models is featured.
13 | Further, any of these crystallization \ precipitation models can be combined with any of the transport models listed among the :ref:`unit_operation_models`.
14 | To this end, most common use-cases consider a :ref:`cstr_model` or a dispersive plug-flow reactor (which can be modeled with the :ref:`lumped_rate_model_without_pores_model`).
15 |
16 | For detailed information on the crystallization models implemented in CADET, including nucleation, growth, aggregation and fragmentation, please refer to :cite:`Zhang2024` and :cite:`Zhang2025`.
17 |
--------------------------------------------------------------------------------
/doc/modelling/equations.rst:
--------------------------------------------------------------------------------
1 | .. File for the substitution for the declaration in the equations of unit operations.
2 |
3 | .. -----------------------------------------------------------components ------------------------------------------------------------------------------------------------------------
4 | .. |component_li| replace:: :math:`c^\ell_i` concentration of component :math:`i` in the liquid phase.
5 | .. |component_sij| replace:: :math:`c^s_{j,i,m_{j,i}}` concentration of component :math:`i` in the solid phase of particle type :math:`j` and particle type :math:`m_{j,i}`.
6 |
7 | .. ----------------------------------------------------------- flow ------------------------------------------------------------------------------------------------------------
8 | .. |flow_in_out| replace:: :math:`F_{\text{in}}` and :math:`F_{\text{out}}` flow rates of liquid into and out of the tank.
9 |
10 | .. ----------------------------------------------------------- reaction ------------------------------------------------------------------------------------------------------------
11 | .. |reaction| replace:: :math:`f_{\text{react},i}^l\left( c^\ell \right)` and :math:`f_{\text{react},j,i}^s\left( c^\ell, c_j^s \right)` reaction rates of component :math:`i` in the liquid and solid phase.
12 | .. |reaction_ads| replace:: :math:`f_{\text{ads},j}\left( c^\ell, c^s_j\right)` adsorption rate of component :math:`i` in the solid phase of particle type :math:`j` .
13 | .. -----------------------------------------------------------volume_fac ------------------------------------------------------------------------------------------------------------
14 | .. |volume_fac_pat| replace:: :math:`d_j` volume fraction of the different solid volume in the tank.
15 |
16 | .. -----------------------------------------------------------volume ------------------------------------------------------------------------------------------------------------
17 | .. |volume_liquid| replace:: :math:`V^{\ell}` liquid volume in the tank.
18 | .. |volume_solid| replace:: :math:`V^{s}` solid volume in the tank.
19 |
--------------------------------------------------------------------------------
/doc/modelling/index.rst:
--------------------------------------------------------------------------------
1 | .. _modelling:
2 |
3 | Modelling
4 | =========
5 |
6 | This section gives complete information about the supported unit operations, binding and reaction models, and creating a network among all the unit operations in CADET. For details on file format specifications related to define each unit operation in CADET, see section :ref:`file_format`.
7 |
8 | .. toctree::
9 | unit_operations/index
10 | binding/index
11 | reaction/index
12 | networks
13 | crystallization/index
14 |
--------------------------------------------------------------------------------
/doc/modelling/reaction/michaelis_menten_kinetics.rst:
--------------------------------------------------------------------------------
1 | .. _michaelis_menten_kinetics_model:
2 |
3 | Michaelis Menten kinetics
4 | -------------------------
5 |
6 | Implements liquid phase Michaelis-Menten reaction kinetics of the form
7 |
8 | .. math::
9 |
10 | \begin{aligned}
11 | f_\text{react} = S \mathbf{\nu},
12 | \end{aligned}
13 |
14 | where :math:`S` is the stoichiometric matrix and the fluxes are given by
15 |
16 | .. math::
17 |
18 | \begin{aligned}
19 | \nu_j = \frac{\mu_{\mathrm{max},j} \, c_S}{k_{\mathrm{MM},j} + c_S},
20 | \end{aligned}
21 |
22 | where
23 |
24 | - :math:`j` is the reaction index,
25 | - :math:`c_S` is the substrate component,
26 | - :math:`\mu_{\mathrm{max},j}`, is the limiting rate approached by the system at saturation,
27 | - :math:`k_{\mathrm{MM},j}` is the Michaelis constant, which is defined as the concentration of substrate at which the reaction rate is half ov :math:`\mu_{\mathrm{max},j}`.
28 |
29 |
30 | In addition, the reaction might be inhibited by other components.
31 | In this case, the flux has the form
32 |
33 | .. math::
34 |
35 | \begin{aligned}
36 | \nu_j = \frac{\mu_{\mathrm{max},j} c_S}{k_{\mathrm{MM},j} + c_S} \cdot \frac{1}{1 + \sum_i c_{Ii}/k_{I,j,i}}.
37 | \end{aligned}
38 |
39 | Here, :math:`k_{\mathrm{I},j,i}` is the inhibition constant with respect to component :math:`i` in reaction :math:`j`.
40 | If :math:`k_{\mathrm{I},j,i} \leq 0`, component :math:`i` does not act as an inhibitor.
41 |
42 | Note: Currently, the model does not allow substrates to function as inhibitors.
43 |
44 | For more information on model parameters required to define in CADET file format, see :ref:`michaelis_menten_kinetics_config`.
45 |
--------------------------------------------------------------------------------
/doc/modelling/reaction/thomas_model.rst:
--------------------------------------------------------------------------------
1 | .. _thomas_model:
2 |
3 | Thomas Model
4 | ------------
5 |
6 | The so-called Thomas model ignores all mass transfer resistances from the resin bead and treats the beads as a homogeneous binding site which follows a single-component isotherm model.
7 |
8 | The Thomas model reads:
9 |
10 | .. math::
11 |
12 | \begin{aligned}
13 | \frac{\mathrm{d} q}{\mathrm{d} t} = f_{\text{ads}}, \quad \frac{\mathrm{d} c}{\mathrm{d} t} = -\frac{1}{\beta} \frac{\mathrm{d} q}{\mathrm{d} t},
14 | \end{aligned}
15 |
16 | where :math:`\beta = V_{\text{L}} / V_{\text{S}}` is the liquid-solid phase ratio, :math:`f_{\text{ads}}` can be any single-component isotherm model, see :ref:`binding_models`.
17 | The first equation describes adsorption and the second equation accounts for the mass balance of the system.
18 | The classic Thomas model uses an Langmuir isotherm model which follows the mass action law and, therefore, is considered as a reaction model.
19 |
20 | .. math::
21 |
22 | \begin{aligned}
23 | f_{\text{ads}} = k_a c q_{\text{max}} (1 - \frac{q}{q_{\text{max}}}) - k_d q .
24 | \end{aligned}
25 |
26 | The above equations can be solved in CADET using :ref:`cstr_model` and configuring :ref:`multi_component_langmuir_model`.
27 |
28 | The above concept of treating the bead as a binding site can also be applied in other unit operation models.
29 | Note that these unit operation models usually vary in the complexity of describing the mass transfer resistances in the bead.
30 | Since all mass transfer resistances within the beads are ignored in the Thomas model, it is reasonable to choose :ref:`lumped_rate_model_without_pores_model` and assign an isotherm model.
31 |
32 | We note that the Thomas model was successfully applied in simple systems. For more complex systems, more advanced :ref:`reaction_models` should be considered.
--------------------------------------------------------------------------------
/doc/modelling/unit_operations/column_bead_model.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/doc/modelling/unit_operations/column_bead_model.png
--------------------------------------------------------------------------------
/doc/modelling/unit_operations/column_bulk_model.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/doc/modelling/unit_operations/column_bulk_model.png
--------------------------------------------------------------------------------
/doc/modelling/unit_operations/column_particle_geometries.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/doc/modelling/unit_operations/column_particle_geometries.png
--------------------------------------------------------------------------------
/doc/modelling/unit_operations/index.rst:
--------------------------------------------------------------------------------
1 | .. _unit_operation_models:
2 |
3 | Unit operation models
4 | =====================
5 |
6 | A short comparison of the most prominent unit operation model features
7 | is given in :numref:`table_features_unit_operations`.
8 |
9 | .. _table_features_unit_operations:
10 | .. list-table:: Supported features of the different unit operations models
11 | :widths: 30 14 14 14 14 14
12 | :header-rows: 1
13 |
14 | * - Unit operation model
15 | - Radial dispersion
16 | - Pore diffusion
17 | - Film diffusion
18 | - Particle geometries
19 | - Multiple particle types
20 | * - :ref:`general_rate_model_model`
21 | - ×
22 | - ✓
23 | - ✓
24 | - ✓
25 | - ✓
26 | * - :ref:`lumped_rate_model_with_pores_model`
27 | - ×
28 | - ×
29 | - ✓
30 | - ✓
31 | - ✓
32 | * - :ref:`lumped_rate_model_without_pores_model`
33 | - ×
34 | - ×
35 | - ×
36 | - ×
37 | - ×
38 | * - :ref:`2d_general_rate_model_model`
39 | - ✓
40 | - ✓
41 | - ✓
42 | - ✓
43 | - ✓
44 | * - :ref:`cstr_model`
45 | - ×
46 | - ×
47 | - ×
48 | - ×
49 | - ✓
50 | * - :ref:`multi_channel_transport_model_model`
51 | - ×
52 | - ×
53 | - ×
54 | - ×
55 | - ×
56 | * - :ref:`pbm_model`
57 | - ×
58 | - ×
59 | - ×
60 | - ×
61 | - ×
62 |
63 |
64 | Moreover, the pseudo unit operations :ref:`inlet_model`, and :ref:`outlet_model` act as sources and sinks for the system.
65 | We further note that radial flow model variants are available for the LRM, LRMP and GRM.
66 |
67 |
68 | .. toctree::
69 | :hidden:
70 | :glob:
71 |
72 | general_rate_model
73 | lumped_rate_model_without_pores
74 | lumped_rate_model_with_pores
75 | 2d_general_rate_model
76 | multi_channel_transport_model
77 | cstr
78 | inlet
79 | outlet
80 |
--------------------------------------------------------------------------------
/doc/modelling/unit_operations/inlet.rst:
--------------------------------------------------------------------------------
1 | .. _inlet_model:
2 |
3 | Inlet
4 | ~~~~~
5 |
6 | A system inlet unit operation is a pseudo unit operation since there is no physical correspondence.
7 | The inlet serves as a mass source in the network of unit operations.
8 | Consequently, it only possesses an outlet port and no inlet port.
9 | Note that an inlet unit operation can provide arbitrary many components and there can be arbitrary many inlet unit operations in a network.
10 |
11 | An inlet unit operation provides a feed in which the concentration of each component is given by a profile.
12 | The most common profile is a piecewise cubic polynomial, which can both represent discontinuous signals (e.g., pulse or step) and smooth :math:`C^2` signals (cubic spline):
13 |
14 | .. math::
15 |
16 | \begin{aligned}
17 | c_i(t) = \sum_{k = 1}^{N_{\text{sect}}} \mathbb{R}_{\left[t_k, t_{k+1} \right)}(t) \left[ a_{k,i} \left( t - t_k \right)^3 + b_{k,i} \left( t - t_k \right)^2 + d_{k,i} \left( t - t_k \right) + f_{k,i} \right],
18 | \end{aligned}
19 |
20 | where :math:`0 \leq t_1 < t_2 < \dots < t_{N_{\text{sect}} + 1} \leq T_{\text{sim}}` is a decomposition of the simulation time interval :math:`\left[0, T_{\text{sim}}\right]` into pieces :math:`\left[t_k, t_{k+1} \right)`.
21 | On each piece, the profile is given by a cubic (fourth order) polynomial shifted to the beginning :math:`t_k` of the piece.
22 |
23 | For information on model parameters see :ref:`inlet_config`.
24 |
--------------------------------------------------------------------------------
/doc/modelling/unit_operations/mct_variable_areas.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/doc/modelling/unit_operations/mct_variable_areas.png
--------------------------------------------------------------------------------
/doc/modelling/unit_operations/multi_channel_transport_model_class.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/doc/modelling/unit_operations/multi_channel_transport_model_class.png
--------------------------------------------------------------------------------
/doc/modelling/unit_operations/multiple_bound_states.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/doc/modelling/unit_operations/multiple_bound_states.png
--------------------------------------------------------------------------------
/doc/modelling/unit_operations/outlet.rst:
--------------------------------------------------------------------------------
1 | .. _outlet_model:
2 |
3 | Outlet
4 | ~~~~~~
5 |
6 | A system outlet unit operation is a pseudo unit operation since there is no physical correspondence.
7 | The outlet serves as a sink (terminal node) in the network of unit operations.
8 | Since any terminal node in the network is a sink (see Section :ref:`networks`), outlet unit operations are not strictly necessary.
9 | However, in some applications (e.g., SMB) only a certain fraction of a unit operation’s output is taken out of the system and the rest is recycled.
10 | In this case, outlet unit operations are required in order to avoid unbalanced mass flow in the other unit operations.
11 |
12 | Outlets can also be of help if the output of multiple unit operations merges together leaving the network.
13 | Instead of manually adding the streams together in a post-processing step, the unit operations can be connected to the same outlet unit.
14 |
15 | For information on model parameters see :ref:`outlet_config`.
16 |
--------------------------------------------------------------------------------
/doc/publications.rst:
--------------------------------------------------------------------------------
1 | Publications
2 | ============
3 |
4 | As an open-source project, CADET-Core relies on the support and recognition from users and researchers to thrive.
5 | Therefore, we kindly ask that any publications or projects leveraging the capabilities of CADET-Core acknowledge its creators and their contributions by citing an adequate selection of our publications.
6 |
7 |
8 | General CADET-Core publications
9 | -------------------------------
10 |
11 | **Publication of CADET-Core with its current C++ architecture**
12 |
13 | .. bibliography:: literature.bib
14 | :filter: False
15 |
16 | Leweke2018CADET
17 |
18 | **Original Publication of chromatography models and their FV discretization in CADET**
19 |
20 | .. bibliography:: literature.bib
21 | :filter: False
22 |
23 | VonLieres2010a
24 |
25 |
26 | CADET-Core Numerics and Modeling
27 | --------------------------------
28 |
29 | **Publication on DG discretization of axial transport models (GRM, LRMP, LRM) in CADET-Core**
30 |
31 | .. bibliography:: literature.bib
32 | :filter: False
33 |
34 | Breuer2023
35 |
36 | **Publications on Crystallization models and their entropy-preserving FV discretization in CADET-Core**
37 |
38 | .. bibliography:: literature.bib
39 | :filter: False
40 |
41 | Zhang2025
42 | Zhang2024
43 |
44 | **Publications on Parameter sensitivites and (compressed) algorithmic differentiation**
45 |
46 | .. bibliography:: literature.bib
47 | :filter: False
48 |
49 | Puttmann2016
50 | Puttmann2013
51 |
52 |
53 | CADET-Core SELECTED APPLICATIONS AND USE-CASES
54 | ----------------------------------------------
55 |
56 | .. bibliography:: literature.bib
57 | :filter: False
58 |
59 | Lanzrath2024
60 | Heymann2022
61 | Jaepel2022
62 | Schmoelder2020
63 | He2018
64 | Diedrich2017
65 |
--------------------------------------------------------------------------------
/doc/requirements.txt:
--------------------------------------------------------------------------------
1 | sphinx
2 | sphinx-sitemap
3 | sphinxcontrib-bibtex
4 | sphinx_multiversion
5 | myst-parser
6 |
--------------------------------------------------------------------------------
/doc/simulation/sections.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/doc/simulation/sections.png
--------------------------------------------------------------------------------
/doc/simulation/time_integration.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/doc/simulation/time_integration.png
--------------------------------------------------------------------------------
/doc/zbibliography.rst:
--------------------------------------------------------------------------------
1 | Bibliography
2 | ============
3 |
4 | .. bibliography::
5 | :style: unsrt
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/include/cadet/Exceptions.hpp:
--------------------------------------------------------------------------------
1 | // =============================================================================
2 | // CADET
3 | //
4 | // Copyright © 2008-present: The CADET-Core Authors
5 | // Please see the AUTHORS.md file.
6 | //
7 | // All rights reserved. This program and the accompanying materials
8 | // are made available under the terms of the GNU Public License v3.0 (or, at
9 | // your option, any later version) which accompanies this distribution, and
10 | // is available at http://www.gnu.org/licenses/gpl.html
11 | // =============================================================================
12 |
13 | /**
14 | * @file
15 | * Defines exceptions.
16 | */
17 |
18 | #ifndef LIBCADET_EXCEPTIONS_HPP_
19 | #define LIBCADET_EXCEPTIONS_HPP_
20 |
21 | #include
22 |
23 | #include "cadet/LibExportImport.hpp"
24 |
25 | namespace cadet
26 | {
27 |
28 | /**
29 | * @brief Signals invalid parameter or option values
30 | */
31 | class CADET_API InvalidParameterException : public std::domain_error
32 | {
33 | public:
34 | explicit InvalidParameterException(const std::string& what_arg) : std::domain_error(what_arg) { }
35 | explicit InvalidParameterException(const char* what_arg) : std::domain_error(what_arg) { }
36 | };
37 |
38 |
39 | /**
40 | * @brief Signals errors during the time integration process
41 | */
42 | class CADET_API IntegrationException : public std::runtime_error
43 | {
44 | public:
45 | explicit IntegrationException(const std::string& what_arg) : std::runtime_error(what_arg) { }
46 | explicit IntegrationException(const char* what_arg) : std::runtime_error(what_arg) { }
47 | };
48 |
49 |
50 | } // namespace cadet
51 |
52 | #endif // LIBCADET_EXCEPTIONS_HPP_
53 |
--------------------------------------------------------------------------------
/include/cadet/LibExportImport.hpp:
--------------------------------------------------------------------------------
1 | // =============================================================================
2 | // CADET
3 | //
4 | // Copyright © 2008-present: The CADET-Core Authors
5 | // Please see the AUTHORS.md file.
6 | //
7 | // All rights reserved. This program and the accompanying materials
8 | // are made available under the terms of the GNU Public License v3.0 (or, at
9 | // your option, any later version) which accompanies this distribution, and
10 | // is available at http://www.gnu.org/licenses/gpl.html
11 | // =============================================================================
12 |
13 | /**
14 | * @file
15 | * Defines preprocessor macros for importing and exporting symbols from and to dynamic libraries.
16 | */
17 |
18 | #ifndef LIBCADET_LIBEXPORT_HPP_
19 | #define LIBCADET_LIBEXPORT_HPP_
20 |
21 |
22 | // Export and import classes when using MS Visual Studio compiler
23 | #ifndef CADET_API
24 | #ifdef _MSC_VER
25 | #if defined(libcadet_shared_EXPORTS) || defined(libcadet_static_EXPORTS) || defined(libcadet_EXPORTS)
26 | #define CADET_API _declspec(dllexport)
27 | #else
28 | #define CADET_API _declspec(dllimport)
29 | #endif
30 | #else
31 | #define CADET_API __attribute__((visibility("default")))
32 | #endif
33 | #endif
34 |
35 | #endif // LIBCADET_LIBEXPORT_HPP_
36 |
--------------------------------------------------------------------------------
/include/cadet/StrongTypes.hpp:
--------------------------------------------------------------------------------
1 | // =============================================================================
2 | // CADET
3 | //
4 | // Copyright © 2008-present: The CADET-Core Authors
5 | // Please see the AUTHORS.md file.
6 | //
7 | // All rights reserved. This program and the accompanying materials
8 | // are made available under the terms of the GNU Public License v3.0 (or, at
9 | // your option, any later version) which accompanies this distribution, and
10 | // is available at http://www.gnu.org/licenses/gpl.html
11 | // =============================================================================
12 |
13 | /**
14 | * @file
15 | * Defines strong types for interfaces.
16 | */
17 |
18 | #ifndef LIBCADET_STRONGTYPES_HPP_
19 | #define LIBCADET_STRONGTYPES_HPP_
20 |
21 | #include "cadet/cadetCompilerInfo.hpp"
22 |
23 | namespace cadet
24 | {
25 |
26 | namespace model
27 | {
28 |
29 | struct ComponentIndex { unsigned int value; };
30 |
31 | struct AxialCellIndex { unsigned int value; };
32 |
33 | struct ParticleTypeIndex { unsigned int value; };
34 |
35 | struct ParticleIndex { unsigned int value; };
36 |
37 | struct ShellIndex { unsigned int value; };
38 |
39 | } // namespace model
40 | } // namespace cadet
41 |
42 | #endif // LIBCADET_STRONGTYPES_HPP_
43 |
--------------------------------------------------------------------------------
/include/cadet/cadet.hpp:
--------------------------------------------------------------------------------
1 | // =============================================================================
2 | // CADET
3 | //
4 | // Copyright © 2008-present: The CADET-Core Authors
5 | // Please see the AUTHORS.md file.
6 | //
7 | // All rights reserved. This program and the accompanying materials
8 | // are made available under the terms of the GNU Public License v3.0 (or, at
9 | // your option, any later version) which accompanies this distribution, and
10 | // is available at http://www.gnu.org/licenses/gpl.html
11 | // =============================================================================
12 |
13 | /**
14 | * @mainpage CADET
15 | * The library provides a fast and accurate forward simulator for the general rate model of column liquid chromatography
16 | *
17 | * @authors Please refer to CONTRIBUTING.md
18 | * @version 5.0.3
19 | * @date 2008-present
20 | * @copyright GNU General Public License v3.0 (or, at your option, any later version).
21 | */
22 |
23 | /**
24 | * @file
25 | * Main include file for the public interface to CADET.
26 | * @todo Check if all headers are included
27 | */
28 |
29 | #include "cadet/cadetCompilerInfo.hpp"
30 | #include "cadet/LibExportImport.hpp"
31 | #include "cadet/LibVersionInfo.hpp"
32 | #include "cadet/StrongTypes.hpp"
33 | #include "cadet/Exceptions.hpp"
34 | #include "cadet/StringUtil.hpp"
35 | #include "cadet/HashUtil.hpp"
36 | #include "cadet/Logging.hpp"
37 | #include "cadet/ParameterProvider.hpp"
38 | #include "cadet/ParameterId.hpp"
39 | #include "cadet/ExternalFunction.hpp"
40 | #include "cadet/InletProfile.hpp"
41 | #include "cadet/Model.hpp"
42 | #include "cadet/ModelSystem.hpp"
43 | #include "cadet/ModelBuilder.hpp"
44 | #include "cadet/SolutionExporter.hpp"
45 | #include "cadet/SolutionRecorder.hpp"
46 | #include "cadet/Simulator.hpp"
47 | #include "cadet/FactoryFuncs.hpp"
48 | #include "cadet/Notification.hpp"
49 |
--------------------------------------------------------------------------------
/include/io/IOException.hpp:
--------------------------------------------------------------------------------
1 | // =============================================================================
2 | // CADET
3 | //
4 | // Copyright © 2008-present: The CADET-Core Authors
5 | // Please see the AUTHORS.md file.
6 | //
7 | // All rights reserved. This program and the accompanying materials
8 | // are made available under the terms of the GNU Public License v3.0 (or, at
9 | // your option, any later version) which accompanies this distribution, and
10 | // is available at http://www.gnu.org/licenses/gpl.html
11 | // =============================================================================
12 |
13 | #ifndef LIBCADET_IOEXCEPTION_HPP_
14 | #define LIBCADET_IOEXCEPTION_HPP_
15 |
16 | #include
17 | #include
18 |
19 | namespace cadet
20 | {
21 |
22 | namespace io
23 | {
24 |
25 | class IOException : public std::runtime_error
26 | {
27 | public:
28 | IOException(const std::string& message) : std::runtime_error(message) { }
29 | };
30 |
31 |
32 | } // namespace io
33 |
34 | } // namespace cadet
35 |
36 |
37 | #endif /* LIBCADET_IOEXCEPTION_HPP_ */
38 |
--------------------------------------------------------------------------------
/src/build-tools/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # =============================================================================
2 | # CADET
3 | #
4 | # Copyright © 2008-present: The CADET-Core Authors
5 | # Please see the AUTHORS.md file.
6 | #
7 | # All rights reserved. This program and the accompanying materials
8 | # are made available under the terms of the GNU Public License v3.0 (or, at
9 | # your option, any later version) which accompanies this distribution, and
10 | # is available at http://www.gnu.org/licenses/gpl.html
11 | # =============================================================================
12 |
13 | # Name of the current project
14 | project(CadetBuildTools CXX C)
15 |
16 | if (EXTERNAL_TEMPLATE_CODEGEN STREQUAL "")
17 | # Add the template code generator
18 | add_executable(templateCodeGen ${CMAKE_SOURCE_DIR}/src/build-tools/templateCodeGen.cpp)
19 | target_include_directories(templateCodeGen PRIVATE ${CMAKE_SOURCE_DIR}/ThirdParty/json ${CMAKE_SOURCE_DIR}/ThirdParty/inja)
20 | target_compile_features(templateCodeGen PRIVATE cxx_std_23)
21 | set_target_properties(templateCodeGen PROPERTIES CXX_EXTENSIONS OFF)
22 | endif()
23 |
24 | # Info message
25 | message(STATUS "Added build tools")
26 |
27 |
--------------------------------------------------------------------------------
/src/cadet-cli/SignalHandler.hpp:
--------------------------------------------------------------------------------
1 | // =============================================================================
2 | // CADET
3 | //
4 | // Copyright © 2008-present: The CADET-Core Authors
5 | // Please see the AUTHORS.md file.
6 | //
7 | // All rights reserved. This program and the accompanying materials
8 | // are made available under the terms of the GNU Public License v3.0 (or, at
9 | // your option, any later version) which accompanies this distribution, and
10 | // is available at http://www.gnu.org/licenses/gpl.html
11 | // =============================================================================
12 |
13 | /**
14 | * @file
15 | * Signal handling for cadet-cli.
16 | */
17 |
18 | #ifndef CADETCLI_SIGNALHANDLER_HPP_
19 | #define CADETCLI_SIGNALHANDLER_HPP_
20 |
21 | namespace cadet
22 | {
23 | /**
24 | * @brief Installs the signal handler in the OS
25 | * @return @c true if the signal handler was installed successfully, otherwise @c false
26 | */
27 | bool installSignalHandler();
28 |
29 | /**
30 | * @brief Checks whether the user has requested the program to stop
31 | * @details The user can request stopping the execution by pressing CTRL+C or sending SIGINT.
32 | * @return @c true if the user request stopping the program, otherwise @c false
33 | */
34 | bool stopExecutionRequested();
35 |
36 | } // namespace cadet
37 |
38 | #endif // CADETCLI_SIGNALHANDLER_HPP_
39 |
--------------------------------------------------------------------------------
/src/libcadet/AutoDiff.cpp:
--------------------------------------------------------------------------------
1 | // =============================================================================
2 | // CADET
3 | //
4 | // Copyright © 2008-present: The CADET-Core Authors
5 | // Please see the AUTHORS.md file.
6 | //
7 | // All rights reserved. This program and the accompanying materials
8 | // are made available under the terms of the GNU Public License v3.0 (or, at
9 | // your option, any later version) which accompanies this distribution, and
10 | // is available at http://www.gnu.org/licenses/gpl.html
11 | // =============================================================================
12 |
13 | #include
14 | #include
15 | #include
16 | #include "AutoDiff.hpp"
17 |
18 |
19 | #if defined(ACTIVE_SFAD) || defined(ACTIVE_SETFAD)
20 | ACTIVE_INIT
21 | #endif
22 |
23 | namespace cadet
24 | {
25 | namespace ad
26 | {
27 |
28 | #if defined(ACTIVE_SFAD) || defined(ACTIVE_SETFAD)
29 |
30 | #endif
31 |
32 | } // namespace ad
33 | } // namespace cadet
34 |
--------------------------------------------------------------------------------
/src/libcadet/Benchmark.hpp:
--------------------------------------------------------------------------------
1 | // =============================================================================
2 | // CADET
3 | //
4 | // Copyright © 2008-present: The CADET-Core Authors
5 | // Please see the AUTHORS.md file.
6 | //
7 | // All rights reserved. This program and the accompanying materials
8 | // are made available under the terms of the GNU Public License v3.0 (or, at
9 | // your option, any later version) which accompanies this distribution, and
10 | // is available at http://www.gnu.org/licenses/gpl.html
11 | // =============================================================================
12 |
13 | /**
14 | * @file
15 | * Provides benchmark functionality.
16 | */
17 |
18 | #ifndef LIBCADET_BENCHMARK_HPP_
19 | #define LIBCADET_BENCHMARK_HPP_
20 |
21 | #ifdef CADET_BENCHMARK_MODE
22 |
23 | #include "common/Timer.hpp"
24 |
25 | #define BENCH_TIMER(name) mutable ::cadet::Timer name;
26 | #define BENCH_START(name) name.start()
27 | #define BENCH_STOP(name) name.stop()
28 |
29 | /**
30 | * @brief Starts and stops a given timer on construction and desctruction, respectively
31 | */
32 | class BenchmarkScope
33 | {
34 | public:
35 |
36 | BenchmarkScope(::cadet::Timer& timer) : _timer(timer) { _timer.start(); }
37 | ~BenchmarkScope() { _timer.stop(); }
38 |
39 | private:
40 | ::cadet::Timer& _timer;
41 | };
42 |
43 | #define BENCH_SCOPE(name) BenchmarkScope scope##name(name)
44 |
45 | #else
46 |
47 | #define BENCH_TIMER(name)
48 | #define BENCH_START(name)
49 | #define BENCH_STOP(name)
50 | #define BENCH_SCOPE(name)
51 |
52 | #endif
53 |
54 | #endif // LIBCADET_BENCHMARK_HPP_
55 |
--------------------------------------------------------------------------------
/src/libcadet/CompileTimeConfig.hpp.in:
--------------------------------------------------------------------------------
1 | // =============================================================================
2 | // CADET
3 | //
4 | // Copyright © 2008-present: The CADET-Core Authors
5 | // Please see the AUTHORS.md file.
6 | //
7 | // All rights reserved. This program and the accompanying materials
8 | // are made available under the terms of the GNU Public License v3.0 (or, at
9 | // your option, any later version) which accompanies this distribution, and
10 | // is available at http://www.gnu.org/licenses/gpl.html
11 | // =============================================================================
12 |
13 | #ifndef LIBCADET_COMPILETIMECONFIG_HPP_
14 | #define LIBCADET_COMPILETIMECONFIG_HPP_
15 |
16 | #cmakedefine ENABLE_2D_MODELS
17 | #cmakedefine ENABLE_DG
18 |
19 | #define NUM_MAX_AD_DIRS @NUM_MAX_AD_DIRS@
20 |
21 | #endif // LIBCADET_COMPILETIMECONFIG_HPP_
22 |
--------------------------------------------------------------------------------
/src/libcadet/FactoryFuncs.cpp:
--------------------------------------------------------------------------------
1 | // =============================================================================
2 | // CADET
3 | //
4 | // Copyright © 2008-present: The CADET-Core Authors
5 | // Please see the AUTHORS.md file.
6 | //
7 | // All rights reserved. This program and the accompanying materials
8 | // are made available under the terms of the GNU Public License v3.0 (or, at
9 | // your option, any later version) which accompanies this distribution, and
10 | // is available at http://www.gnu.org/licenses/gpl.html
11 | // =============================================================================
12 |
13 | #include "cadet/FactoryFuncs.hpp"
14 | #include "SimulatorImpl.hpp"
15 | #include "ModelBuilderImpl.hpp"
16 |
17 | namespace cadet
18 | {
19 |
20 | IModelBuilder* createModelBuilder()
21 | {
22 | return new ModelBuilder();
23 | }
24 |
25 | void destroyModelBuilder(IModelBuilder* const builder) CADET_NOEXCEPT
26 | {
27 | delete builder;
28 | }
29 |
30 | ISimulator* createSimulator()
31 | {
32 | return new Simulator();
33 | }
34 |
35 | void destroySimulator(ISimulator* const sim) CADET_NOEXCEPT
36 | {
37 | delete sim;
38 | }
39 |
40 | } // namespace cadet
41 |
42 | extern "C"
43 | {
44 | cadet::IModelBuilder* cadetCreateModelBuilder() { return cadet::createModelBuilder(); }
45 |
46 | void cadetDestroyModelBuilder(cadet::IModelBuilder* const builder) { cadet::destroyModelBuilder(builder); }
47 |
48 | cadet::ISimulator* cadetCreateSimulator() { return cadet::createSimulator(); }
49 |
50 | void cadetDestroySimulator(cadet::ISimulator* const sim) { cadet::destroySimulator(sim); }
51 | }
52 |
--------------------------------------------------------------------------------
/src/libcadet/MathUtil.hpp:
--------------------------------------------------------------------------------
1 | // =============================================================================
2 | // CADET
3 | //
4 | // Copyright © 2008-present: The CADET-Core Authors
5 | // Please see the AUTHORS.md file.
6 | //
7 | // All rights reserved. This program and the accompanying materials
8 | // are made available under the terms of the GNU Public License v3.0 (or, at
9 | // your option, any later version) which accompanies this distribution, and
10 | // is available at http://www.gnu.org/licenses/gpl.html
11 | // =============================================================================
12 |
13 | #ifndef LIBCADET_MATHUTIL_HPP_
14 | #define LIBCADET_MATHUTIL_HPP_
15 |
16 | #include
17 |
18 | #include "cadet/cadetCompilerInfo.hpp"
19 |
20 | namespace cadet
21 | {
22 |
23 | /**
24 | * @brief Squares the given value
25 | * @details Calculates @f$ x * x @f$
26 | * @param [in] x Value that is squared
27 | * @return Squared value
28 | */
29 | inline double sqr(const double x) CADET_NOEXCEPT { return x * x; }
30 |
31 | #if defined(ACTIVE_SFAD) || defined(ACTIVE_SETFAD)
32 | #endif
33 |
34 | } // namespace cadet
35 |
36 | #endif // LIBCADET_MATHUTIL_HPP_
37 |
--------------------------------------------------------------------------------
/src/libcadet/SensParamUtil.hpp:
--------------------------------------------------------------------------------
1 | // =============================================================================
2 | // CADET
3 | //
4 | // Copyright © 2008-present: The CADET-Core Authors
5 | // Please see the AUTHORS.md file.
6 | //
7 | // All rights reserved. This program and the accompanying materials
8 | // are made available under the terms of the GNU Public License v3.0 (or, at
9 | // your option, any later version) which accompanies this distribution, and
10 | // is available at http://www.gnu.org/licenses/gpl.html
11 | // =============================================================================
12 |
13 | /**
14 | * @file
15 | * Provides helper functions for entities that can contain sensitive parameters.
16 | */
17 |
18 | #ifndef LIBCADET_SENSPARAMUTIL_HPP_
19 | #define LIBCADET_SENSPARAMUTIL_HPP_
20 |
21 | #include
22 | #include
23 |
24 | namespace cadet
25 | {
26 | template
27 | inline bool contains(const typename std::vector& vec, const Elem_t& item)
28 | {
29 | const typename std::vector::const_iterator it = std::find(vec.begin(), vec.end(), item);
30 | return it != vec.end();
31 | }
32 |
33 | template
34 | inline bool contains(const typename std::unordered_set& set, const Elem_t& item)
35 | {
36 | return set.find(item) != set.end();
37 | }
38 | } // namespace cadet
39 |
40 | #endif // LIBCADET_SENSPARAMUTIL_HPP_
41 |
--------------------------------------------------------------------------------
/src/libcadet/SundialsVector.hpp:
--------------------------------------------------------------------------------
1 | // =============================================================================
2 | // CADET
3 | //
4 | // Copyright © 2008-present: The CADET-Core Authors
5 | // Please see the AUTHORS.md file.
6 | //
7 | // All rights reserved. This program and the accompanying materials
8 | // are made available under the terms of the GNU Public License v3.0 (or, at
9 | // your option, any later version) which accompanies this distribution, and
10 | // is available at http://www.gnu.org/licenses/gpl.html
11 | // =============================================================================
12 |
13 | /**
14 | * @file
15 | * Handles different NVector implementations of SUNDIALS and provides uniform access to them.
16 | * Note that, according to the SUNDIALS manual, the OpenMP implementation only improves performance
17 | * for state vectors of 100.000 entries or more because of threading overhead.
18 | */
19 |
20 | #ifndef LIBCADET_SUNDIALSVECTOR_HPP_
21 | #define LIBCADET_SUNDIALSVECTOR_HPP_
22 |
23 | #ifdef CADET_SUNDIALS_OPENMP
24 | #include
25 | #include
26 |
27 | #define NVEC_DATA(x) NV_DATA_OMP(x)
28 | #define NVEC_LENGTH(x) NV_LENGTH_OMP(x)
29 |
30 | #define NVec_New(x) N_VNew_OpenMP(x, omp_get_max_threads())
31 | #define NVec_Destroy N_VDestroy_OpenMP
32 | #define NVec_DestroyArray N_VDestroyVectorArray_OpenMP
33 | #define NVec_CloneArray N_VCloneVectorArray_OpenMP
34 | #define NVec_NewEmpty(x) N_VNewEmpty_OpenMP(x, omp_get_max_threads())
35 | #define NVec_SetThreads(x, nThreads) NV_NUM_THREADS_OMP(x) = nThreads
36 | #else
37 | #include
38 |
39 | #define NVEC_DATA(x) NV_DATA_S(x)
40 | #define NVEC_LENGTH(x) NV_LENGTH_S(x)
41 |
42 | #define NVec_New(x) N_VNew_Serial(x)
43 | #define NVec_Destroy N_VDestroy_Serial
44 | #define NVec_DestroyArray N_VDestroyVectorArray_Serial
45 | #define NVec_CloneArray N_VCloneVectorArray_Serial
46 | #define NVec_NewEmpty N_VNewEmpty_Serial
47 | #define NVec_SetThreads(x, nThreads)
48 | #endif
49 |
50 | #define NVec_Const N_VConst
51 |
52 | #endif // LIBCADET_SUNDIALSVECTOR_HPP_
53 |
--------------------------------------------------------------------------------
/src/libcadet/Weno.cpp:
--------------------------------------------------------------------------------
1 | // =============================================================================
2 | // CADET
3 | //
4 | // Copyright © 2008-present: The CADET-Core Authors
5 | // Please see the AUTHORS.md file.
6 | //
7 | // All rights reserved. This program and the accompanying materials
8 | // are made available under the terms of the GNU Public License v3.0 (or, at
9 | // your option, any later version) which accompanies this distribution, and
10 | // is available at http://www.gnu.org/licenses/gpl.html
11 | // =============================================================================
12 |
13 | #include "Weno.hpp"
14 |
15 | namespace cadet
16 | {
17 |
18 | // Initialization of static WENO coefficients
19 | const double Weno::_wenoD2[2] = { 2.0/3.0, 1.0/3.0 };
20 |
21 | const double Weno::_wenoC2[2*2] = { 0.5, -0.5,
22 | 0.5, 1.5 };
23 | const double Weno::_wenoJbvv2[2*3*3] =
24 | {0, 2, 0,-2, 0, 0,
25 | 0,-2, 2, 2, -2, 0,
26 | 0, 0, -2, 0, 2, 0};
27 |
28 | const double Weno::_wenoD3[3] = { 0.3, 0.6, 0.1 };
29 |
30 | const double Weno::_wenoC3[3*3] = { 1.0/3.0, -1.0/6.0, 1.0/3.0,
31 | 5.0/6.0, 5.0/6.0, -7.0/6.0,
32 | -1.0/6.0, 1.0/3.0, 11.0/6.0 };
33 | const double Weno::_wenoJbvv3[3*5*5] = // Used to generate Jbv: vec(Jbv) = A*v
34 | {0,0,8.0/3, 0,0,-19.0/3, 0,0,11.0/3, 0,0,0, 0,0,0,
35 | 0,0,-19.0/3, 0,8.0/3,50.0/3, 0,-13.0/3,-31.0/3, 0,5.0/3,0, 0,0,0,
36 | 0,0,11.0/3, 0,-13.0/3,-31.0/3, 20.0/3,26.0/3,20.0/3, -31.0/3,-13.0/3,0, 11.0/3,0,0,
37 | 0,0,0, 0,5.0/3,0, -31.0/3,-13.0/3,0, 50.0/3,8.0/3,0, -19.0/3,0,0,
38 | 0,0,0, 0,0,0, 11.0/3,0,0, -19.0/3,0,0, 8.0/3,0,0};
39 |
40 | } // namespace cadet
41 |
--------------------------------------------------------------------------------
/src/libcadet/linalg/SparseMatrix.cpp:
--------------------------------------------------------------------------------
1 | // =============================================================================
2 | // CADET
3 | //
4 | // Copyright © 2008-present: The CADET-Core Authors
5 | // Please see the AUTHORS.md file.
6 | //
7 | // All rights reserved. This program and the accompanying materials
8 | // are made available under the terms of the GNU Public License v3.0 (or, at
9 | // your option, any later version) which accompanies this distribution, and
10 | // is available at http://www.gnu.org/licenses/gpl.html
11 | // =============================================================================
12 |
13 | #include "linalg/SparseMatrix.hpp"
14 |
15 | #include
16 | #include
17 |
18 | namespace cadet
19 | {
20 |
21 | namespace linalg
22 | {
23 |
24 | std::ostream& operator<<(std::ostream& out, const DoubleSparseMatrix& sm)
25 | {
26 | std::ostringstream cols;
27 | std::ostringstream rows;
28 | std::ostringstream elems;
29 |
30 | cols.copyfmt(out);
31 | rows.copyfmt(out);
32 | elems.copyfmt(out);
33 |
34 | cols << "cols = [";
35 | rows << "rows = [";
36 | elems << "elems = [";
37 |
38 | const std::vector& spRows = sm.rows();
39 | const std::vector& spCols = sm.cols();
40 | const std::vector& spVals = sm.values();
41 |
42 | for (unsigned int i = 0; i < sm.numNonZero(); ++i)
43 | {
44 | if (i > 0)
45 | {
46 | cols << ", ";
47 | rows << ", ";
48 | elems << ", ";
49 | }
50 |
51 | cols << spCols[i] + 1;
52 | rows << spRows[i] + 1;
53 | elems << spVals[i];
54 | }
55 |
56 | cols << "];";
57 | rows << "];";
58 | elems << "];";
59 |
60 | out << cols.str() << "\n";
61 | out << rows.str() << "\n";
62 | out << elems.str();
63 | return out;
64 | }
65 |
66 |
67 | } // namespace linalg
68 |
69 | } // namespace cadet
70 |
--------------------------------------------------------------------------------
/src/libcadet/linalg/SparseSolverInterface.hpp.in:
--------------------------------------------------------------------------------
1 | // =============================================================================
2 | // CADET
3 | //
4 | // Copyright © 2008-present: The CADET-Core Authors
5 | // Please see the AUTHORS.md file.
6 | //
7 | // All rights reserved. This program and the accompanying materials
8 | // are made available under the terms of the GNU Public License v3.0 (or, at
9 | // your option, any later version) which accompanies this distribution, and
10 | // is available at http://www.gnu.org/licenses/gpl.html
11 | // =============================================================================
12 |
13 | /**
14 | * @file
15 | * Interface for the sparse direct solver
16 | */
17 |
18 | #ifndef LIBCADET_SPARSESOLVERINTERFACE_HPP_
19 | #define LIBCADET_SPARSESOLVERINTERFACE_HPP_
20 |
21 | namespace cadet
22 | {
23 |
24 | namespace linalg
25 | {
26 | typedef @SPARSE_INT_TYPE@ sparse_int_t;
27 |
28 | #cmakedefine UMFPACK_FOUND
29 | #cmakedefine SUPERLU_FOUND
30 |
31 | } // namespace linalg
32 |
33 | } // namespace cadet
34 |
35 | #endif // LIBCADET_SPARSESOLVERINTERFACE_HPP_
36 |
--------------------------------------------------------------------------------
/src/libcadet/model/GeneralRateModel2DBuilder.cpp:
--------------------------------------------------------------------------------
1 | #include "model/GeneralRateModel2D.hpp"
2 | //#include "model/GeneralRateModel2DDG.hpp"
3 | #include "cadet/ParameterProvider.hpp"
4 | #include "LoggingUtils.hpp"
5 | #include "Logging.hpp"
6 |
7 |
8 | namespace cadet
9 | {
10 | namespace model
11 | {
12 |
13 | IUnitOperation* selectDiscretizationGRM2D(UnitOpIdx uoId, IParameterProvider& paramProvider)
14 | {
15 | IUnitOperation* model = nullptr;
16 |
17 | paramProvider.pushScope("discretization");
18 |
19 | if (paramProvider.exists("SPATIAL_METHOD")) {
20 |
21 | const std::string discName = paramProvider.getString("SPATIAL_METHOD");
22 |
23 | /*if (discName == "DG")
24 | model = new GeneralRateModel2DDG(uoId);
25 | else*/ if (discName == "FV")
26 | model = new GeneralRateModel2D(uoId);
27 | else
28 | {
29 | LOG(Error) << "Unknown discretization type " << discName << " for unit " << uoId;
30 | }
31 | }
32 | else {
33 | model = new GeneralRateModel2D(uoId);
34 | }
35 |
36 | paramProvider.popScope();
37 |
38 | return model;
39 | }
40 |
41 | void registerGeneralRateModel2D(std::unordered_map>& models)
42 | {
43 |
44 | models[GeneralRateModel2D::identifier()] = selectDiscretizationGRM2D;
45 | models["GRM2D"] = selectDiscretizationGRM2D;
46 |
47 | //models[GeneralRateModel2DDG::identifier()] = selectDiscretizationGRM2D;
48 | //models["GRM2D_DG"] = selectDiscretizationGRM2D;
49 |
50 | }
51 |
52 | } // namespace model
53 |
54 | } // namespace cadet
--------------------------------------------------------------------------------
/src/libcadet/nonlin/CompositeSolver.hpp:
--------------------------------------------------------------------------------
1 | // =============================================================================
2 | // CADET
3 | //
4 | // Copyright © 2008-present: The CADET-Core Authors
5 | // Please see the AUTHORS.md file.
6 | //
7 | // All rights reserved. This program and the accompanying materials
8 | // are made available under the terms of the GNU Public License v3.0 (or, at
9 | // your option, any later version) which accompanies this distribution, and
10 | // is available at http://www.gnu.org/licenses/gpl.html
11 | // =============================================================================
12 |
13 | /**
14 | * @file
15 | * Provides composite solvers that subsequently apply several solvers
16 | */
17 |
18 | #ifndef LIBCADET_COMPOSITESOLVER_HPP_
19 | #define LIBCADET_COMPOSITESOLVER_HPP_
20 |
21 | #include "nonlin/Solver.hpp"
22 | #include
23 |
24 | namespace cadet
25 | {
26 |
27 | namespace nonlin
28 | {
29 |
30 | /**
31 | * @brief Applies multiple solvers subsequently
32 | * @details The CompositeSolver owns all its subsolvers and destroys them when it is destroyed.
33 | */
34 | class CompositeSolver : public Solver
35 | {
36 | public:
37 | CompositeSolver();
38 | virtual ~CompositeSolver();
39 |
40 | static const char* identifier() { return "COMPOSITE"; }
41 | virtual const char* name() const { return CompositeSolver::identifier(); }
42 |
43 | virtual bool configure(IParameterProvider& paramProvider);
44 |
45 | virtual unsigned int workspaceSize(unsigned int problemSize) const;
46 |
47 | virtual unsigned int numTuningParameters() const;
48 |
49 | virtual bool solve(std::function residual, std::function jacobian,
50 | double tol, double* const point, double* const workingMemory, linalg::detail::DenseMatrixBase& jacMatrix, unsigned int size) const;
51 |
52 | virtual void addSubsolver(Solver* const solver);
53 |
54 | protected:
55 | std::vector _solvers;
56 | };
57 |
58 | } // namespace nonlin
59 |
60 | } // namespace cadet
61 |
62 | #endif // LIBCADET_COMPOSITESOLVER_HPP_
63 |
--------------------------------------------------------------------------------
/src/libcadet/nonlin/LevenbergMarquardt.cpp:
--------------------------------------------------------------------------------
1 | // =============================================================================
2 | // CADET
3 | //
4 | // Copyright © 2008-present: The CADET-Core Authors
5 | // Please see the AUTHORS.md file.
6 | //
7 | // All rights reserved. This program and the accompanying materials
8 | // are made available under the terms of the GNU Public License v3.0 (or, at
9 | // your option, any later version) which accompanies this distribution, and
10 | // is available at http://www.gnu.org/licenses/gpl.html
11 | // =============================================================================
12 |
13 | #include "nonlin/LevenbergMarquardt.hpp"
14 | #include "cadet/ParameterProvider.hpp"
15 | #include "linalg/DenseMatrix.hpp"
16 |
17 | namespace cadet
18 | {
19 |
20 | namespace nonlin
21 | {
22 |
23 | LevenbergMarquardtSolver::LevenbergMarquardtSolver() : _initDamping(1e-2), _maxIter(50) { }
24 | LevenbergMarquardtSolver::~LevenbergMarquardtSolver() { }
25 |
26 | bool LevenbergMarquardtSolver::configure(IParameterProvider& paramProvider)
27 | {
28 | if (paramProvider.exists("INIT_DAMPING"))
29 | _initDamping = paramProvider.getDouble("INIT_DAMPING");
30 | if (paramProvider.exists("MAX_ITERATIONS"))
31 | _maxIter = paramProvider.getInt("MAX_ITERATIONS");
32 | return true;
33 | }
34 |
35 | bool LevenbergMarquardtSolver::solve(std::function residual, std::function jacobian,
36 | double tol, double* const point, double* const workingMemory, linalg::detail::DenseMatrixBase& jacMatrix, unsigned int size) const
37 | {
38 | return levenbergMarquardt(residual, jacobian, _maxIter, tol, _initDamping, point, workingMemory, jacMatrix, size);
39 | }
40 |
41 |
42 | } // namespace nonlin
43 |
44 | } // namespace cadet
45 |
--------------------------------------------------------------------------------
/src/libcadet/nonlin/Solver.cpp:
--------------------------------------------------------------------------------
1 | // =============================================================================
2 | // CADET
3 | //
4 | // Copyright © 2008-present: The CADET-Core Authors
5 | // Please see the AUTHORS.md file.
6 | //
7 | // All rights reserved. This program and the accompanying materials
8 | // are made available under the terms of the GNU Public License v3.0 (or, at
9 | // your option, any later version) which accompanies this distribution, and
10 | // is available at http://www.gnu.org/licenses/gpl.html
11 | // =============================================================================
12 |
13 | #include "nonlin/Solver.hpp"
14 | #include "nonlin/AdaptiveTrustRegionNewton.hpp"
15 | #include "nonlin/LevenbergMarquardt.hpp"
16 | #include "nonlin/CompositeSolver.hpp"
17 |
18 | namespace cadet
19 | {
20 |
21 | namespace nonlin
22 | {
23 |
24 | Solver* createSolver(const std::string& name)
25 | {
26 | if (name == AdaptiveTrustRegionNewtonSolver::identifier())
27 | return new AdaptiveTrustRegionNewtonSolver();
28 | if (name == RobustAdaptiveTrustRegionNewtonSolver::identifier())
29 | return new RobustAdaptiveTrustRegionNewtonSolver();
30 | if (name == LevenbergMarquardtSolver::identifier())
31 | return new LevenbergMarquardtSolver();
32 | if (name == CompositeSolver::identifier())
33 | return new CompositeSolver();
34 |
35 | // Default solver
36 | CompositeSolver* cs = new CompositeSolver();
37 | cs->addSubsolver(new RobustAdaptiveTrustRegionNewtonSolver());
38 | cs->addSubsolver(new LevenbergMarquardtSolver());
39 | return cs;
40 | }
41 |
42 | } // namespace nonlin
43 |
44 | } // namespace cadet
45 |
--------------------------------------------------------------------------------
/src/tools/FormatConverter.hpp:
--------------------------------------------------------------------------------
1 | // =============================================================================
2 | // CADET
3 | //
4 | // Copyright © 2008-present: The CADET-Core Authors
5 | // Please see the AUTHORS.md file.
6 | //
7 | // All rights reserved. This program and the accompanying materials
8 | // are made available under the terms of the GNU Public License v3.0 (or, at
9 | // your option, any later version) which accompanies this distribution, and
10 | // is available at http://www.gnu.org/licenses/gpl.html
11 | // =============================================================================
12 |
13 | #ifndef CADETTOOLS_FORMATCONVERTER_HPP_
14 | #define CADETTOOLS_FORMATCONVERTER_HPP_
15 |
16 | #include
17 |
18 | namespace cadet
19 | {
20 | namespace io
21 | {
22 |
23 | class IFileReader;
24 | class IFileWriter;
25 |
26 | } // namespace io
27 | } // namespace cadet
28 |
29 | /**
30 | * @brief Copies a group and all of its content (including subgroups) from reader to writer
31 | * @details Performs a recursive copy operation transferring the content from a reader to a writer object.
32 | * @param [in] rd Reader
33 | * @param [in] wr Writer
34 | * @param [in] path Path to group that is copied
35 | */
36 | void copyGroup(cadet::io::IFileReader& rd, cadet::io::IFileWriter& wr, const std::string& path);
37 |
38 | #endif /* CADETTOOLS_FORMATCONVERTER_HPP_ */
39 |
--------------------------------------------------------------------------------
/test/JsonTestModels.hpp:
--------------------------------------------------------------------------------
1 | // =============================================================================
2 | // CADET
3 | //
4 | // Copyright © 2008-present: The CADET-Core Authors
5 | // Please see the AUTHORS.md file.
6 | //
7 | // All rights reserved. This program and the accompanying materials
8 | // are made available under the terms of the GNU Public License v3.0 (or, at
9 | // your option, any later version) which accompanies this distribution, and
10 | // is available at http://www.gnu.org/licenses/gpl.html
11 | // =============================================================================
12 |
13 | /**
14 | * @file
15 | * Defines a ParameterProvider that uses JSON.
16 | */
17 |
18 | #ifndef CADETTEST_JSONTESTMODELS_HPP_
19 | #define CADETTEST_JSONTESTMODELS_HPP_
20 |
21 | #include "common/JsonParameterProvider.hpp"
22 |
23 | cadet::JsonParameterProvider createColumnWithSMA(const std::string& uoType, const std::string& spatialScheme);
24 | cadet::JsonParameterProvider createColumnWithTwoCompLinearBinding(const std::string& uoType, const std::string& spatialScheme);
25 | cadet::JsonParameterProvider createColumnLinearBenchmark(bool dynamicBinding, bool nonBinding, const std::string& uoType, const std::string& spatialScheme);
26 | nlohmann::json createLWEJson(const std::string& uoType, const std::string& spatialMethod);
27 | cadet::JsonParameterProvider createLWE(const std::string& uoType, const std::string& spatialScheme);
28 | cadet::JsonParameterProvider createPulseInjectionColumn(const std::string& uoType, const std::string& spatialScheme, bool dynamicBinding);
29 | cadet::JsonParameterProvider createLinearBenchmark(bool dynamicBinding, bool nonBinding, const std::string& uoType, const std::string& spatialScheme);
30 | cadet::JsonParameterProvider createCSTR(unsigned int nComp);
31 | cadet::JsonParameterProvider createCSTRBenchmark(unsigned int nSec, double endTime, double interval);
32 |
33 | #endif // CADETTEST_JSONTESTMODELS_HPP_
34 |
--------------------------------------------------------------------------------
/test/LogUtils.cpp:
--------------------------------------------------------------------------------
1 | // =============================================================================
2 | // CADET
3 | //
4 | // Copyright © 2008-present: The CADET-Core Authors
5 | // Please see the AUTHORS.md file.
6 | //
7 | // All rights reserved. This program and the accompanying materials
8 | // are made available under the terms of the GNU Public License v3.0 (or, at
9 | // your option, any later version) which accompanies this distribution, and
10 | // is available at http://www.gnu.org/licenses/gpl.html
11 | // =============================================================================
12 |
13 | #include
14 |
15 | #include "LoggingUtils.hpp"
16 |
17 | #define CADET_LOGGING_DISABLE
18 | #include "Logging.hpp"
19 |
20 | #include
21 | #include
22 |
23 |
24 | TEST_CASE("Log matrix output from linear array", "[Logging]")
25 | {
26 | std::stringstream ss;
27 |
28 | SECTION("Rectangular matrix")
29 | {
30 | SECTION("Row-major")
31 | {
32 | const std::vector data = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11};
33 | ss << cadet::log::MatrixPtr(data.data(), 3, 4, false);
34 | REQUIRE(ss.str() == "[0,1,2,3;4,5,6,7;8,9,10,11]");
35 | }
36 |
37 | SECTION("Column-major")
38 | {
39 | const std::vector data = {0, 4, 8, 1, 5, 9, 2, 6, 10, 3, 7, 11};
40 | ss << cadet::log::MatrixPtr(data.data(), 3, 4, true);
41 | REQUIRE(ss.str() == "[0,1,2,3;4,5,6,7;8,9,10,11]");
42 | }
43 | }
44 |
45 | SECTION("Square matrix")
46 | {
47 | SECTION("Row-major")
48 | {
49 | const std::vector data = {0, 1, 2, 3, 4, 5, 6, 7, 8};
50 | ss << cadet::log::MatrixPtr(data.data(), 3, 3, false);
51 | REQUIRE(ss.str() == "[0,1,2;3,4,5;6,7,8]");
52 | }
53 |
54 | SECTION("Column-major")
55 | {
56 | const std::vector data = {0, 3, 6, 1, 4, 7, 2, 5, 8};
57 | ss << cadet::log::MatrixPtr(data.data(), 3, 3, true);
58 | REQUIRE(ss.str() == "[0,1,2;3,4,5;6,7,8]");
59 | }
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/test/ParameterDependencies.cpp:
--------------------------------------------------------------------------------
1 | // =============================================================================
2 | // CADET
3 | //
4 | // Copyright © 2008-present: The CADET-Core Authors
5 | // Please see the AUTHORS.md file.
6 | //
7 | // All rights reserved. This program and the accompanying materials
8 | // are made available under the terms of the GNU Public License v3.0 (or, at
9 | // your option, any later version) which accompanies this distribution, and
10 | // is available at http://www.gnu.org/licenses/gpl.html
11 | // =============================================================================
12 |
13 | #include
14 |
15 | #include "ParamDepTests.hpp"
16 | #include "ParameterDependencies.hpp"
17 |
18 | CADET_PARAMDEPTEST("LIQUID_SALT_EXPONENTIAL", (1, 0, 2, 1), (1.1, 1.8, 0.9, 1.4, 1.7, 0.8, 2.1, 1.5), \
19 | R"json( "PD_EXPFACTOR": [1.0, 2.0, 1.5, 1.3],
20 | "PD_EXPARGMULT": [0.1, 0.2, 0.3, 0.4]
21 | )json")
22 |
23 | CADET_PARAMDEPTEST("LIQUID_SALT_POWER", (1, 0, 2, 1), (1.1, 1.8, 0.9, 1.4, 1.7, 0.8, 2.1, 1.5), \
24 | R"json( "PD_POWFACTOR": [1.0, 2.0, 1.5, 1.3],
25 | "PD_POWEXP": [0.1, 0.2, 0.3, 0.4]
26 | )json")
27 |
28 | CADET_PARAMDEPTEST("LIQUID_SALT_COLLOIDAL_AFFINITY", (1, 0, 2, 1), (1.1, 1.8, 0.9, 1.4, 1.7, 0.8, 2.1, 1.5), \
29 | R"json( "PD_LOGKEQEXP": [1.0, 2.0, 1.5, 1.3],
30 | "PD_LOGKEQFACTOR": [0.1, 0.2, 0.3, 0.4],
31 | "PD_LOGKEQCONST": [0.8, 1.1, 1.8, 1.6],
32 | "PD_POWFACTOR": [0.9, 1.3, 1.7, 2.2],
33 | "PD_POWEXP": [2.1, 1.9, 0.5, 2.1, 3.3],
34 | "PD_EXPFACTOR": [0.9, 1.1, 1.4, 1.25],
35 | "PD_EXPARGMULT": [1.8, 2.9, 2.2, 1.1]
36 | )json")
37 |
--------------------------------------------------------------------------------
/test/Paths.cpp.in:
--------------------------------------------------------------------------------
1 | // =============================================================================
2 | // CADET
3 | //
4 | // Copyright © 2008-present: The CADET-Core Authors
5 | // Please see the AUTHORS.md file.
6 | //
7 | // All rights reserved. This program and the accompanying materials
8 | // are made available under the terms of the GNU Public License v3.0 (or, at
9 | // your option, any later version) which accompanies this distribution, and
10 | // is available at http://www.gnu.org/licenses/gpl.html
11 | // =============================================================================
12 |
13 | const char* getTestDirectory()
14 | {
15 | return "@CMAKE_SOURCE_DIR@/test";
16 | }
17 |
18 | const char* getLibBinaryPath()
19 | {
20 | return "$";
21 | }
22 |
--------------------------------------------------------------------------------
/test/Subset.cpp:
--------------------------------------------------------------------------------
1 | // =============================================================================
2 | // CADET
3 | //
4 | // Copyright © 2008-present: The CADET-Core Authors
5 | // Please see the AUTHORS.md file.
6 | //
7 | // All rights reserved. This program and the accompanying materials
8 | // are made available under the terms of the GNU Public License v3.0 (or, at
9 | // your option, any later version) which accompanies this distribution, and
10 | // is available at http://www.gnu.org/licenses/gpl.html
11 | // =============================================================================
12 |
13 | #include
14 |
15 | #include
16 | #include
17 | #include
18 |
19 | #include "linalg/Subset.hpp"
20 | #include "linalg/Norms.hpp"
21 |
22 | #include "MatrixHelper.hpp"
23 |
24 | TEST_CASE("Extract subset of BandMatrix", "[BandMatrix],[Subset],[LinAlg]")
25 | {
26 | using cadet::linalg::BandMatrix;
27 | using cadet::linalg::DenseMatrix;
28 |
29 | std::vector maskData{1, 0, 1, 0};
30 | cadet::linalg::ConstMaskArray cma{maskData.data(), static_cast(maskData.size())};
31 |
32 | const BandMatrix bm = cadet::test::createBandMatrix(10, 2, 3);
33 | DenseMatrix dm;
34 | dm.resize(2, 2);
35 |
36 | cadet::linalg::copyMatrixSubset(bm, cma, cma, 0, 0, dm);
37 | cadet::test::checkMatrixAgainstLinearArray(dm.data(), {1.0, 3.0, 10.0, 12.0});
38 |
39 | cadet::linalg::copyMatrixSubset(bm, cma, cma, 0, 1, dm);
40 | cadet::test::checkMatrixAgainstLinearArray(dm.data(), {2.0, 4.0, 11.0, 13.0});
41 |
42 | cadet::linalg::copyMatrixSubset(bm, cma, cma, 1, 0, dm);
43 | cadet::test::checkMatrixAgainstLinearArray(dm.data(), {6.0, 8.0, 16.0, 18.0});
44 |
45 | cadet::linalg::copyMatrixSubset(bm, cma, cma, 1, 1, dm);
46 | cadet::test::checkMatrixAgainstLinearArray(dm.data(), {7.0, 9.0, 17.0, 19.0});
47 | }
48 |
--------------------------------------------------------------------------------
/test/data/grm-nonBinding.data:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/grm-nonBinding.data
--------------------------------------------------------------------------------
/test/data/grm-pulseBenchmark.data:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/grm-pulseBenchmark.data
--------------------------------------------------------------------------------
/test/data/lrm-nonBinding.data:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/lrm-nonBinding.data
--------------------------------------------------------------------------------
/test/data/lrm-pulseBenchmark.data:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/lrm-pulseBenchmark.data
--------------------------------------------------------------------------------
/test/data/lrmp-nonBinding.data:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/lrmp-nonBinding.data
--------------------------------------------------------------------------------
/test/data/lrmp-pulseBenchmark.data:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/lrmp-pulseBenchmark.data
--------------------------------------------------------------------------------
/test/data/ref_2DLRMP3Zone_noFilmDiff_1Comp_benchmark1.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_2DLRMP3Zone_noFilmDiff_1Comp_benchmark1.h5
--------------------------------------------------------------------------------
/test/data/ref_CSTR_MichaelisMenten_benchmark2.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_CSTR_MichaelisMenten_benchmark2.h5
--------------------------------------------------------------------------------
/test/data/ref_CSTR_reacMAL_2comp_sensbenchmark1.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_CSTR_reacMAL_2comp_sensbenchmark1.h5
--------------------------------------------------------------------------------
/test/data/ref_GRM_dynLin_1comp_sensbenchmark1_FV_Z1024parZ128.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_GRM_dynLin_1comp_sensbenchmark1_FV_Z1024parZ128.h5
--------------------------------------------------------------------------------
/test/data/ref_GRM_dynLin_1comp_sensbenchmark1_FV_Z32parZ4.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_GRM_dynLin_1comp_sensbenchmark1_FV_Z32parZ4.h5
--------------------------------------------------------------------------------
/test/data/ref_GRM_dynLin_1comp_sensbenchmark1_cDG_P3Z8_GSM_parP3parZ1.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_GRM_dynLin_1comp_sensbenchmark1_cDG_P3Z8_GSM_parP3parZ1.h5
--------------------------------------------------------------------------------
/test/data/ref_GRM_dynLin_1comp_sensbenchmark2_FV_Z32parZ4.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_GRM_dynLin_1comp_sensbenchmark2_FV_Z32parZ4.h5
--------------------------------------------------------------------------------
/test/data/ref_GRM_dynLin_1comp_sensbenchmark2_cDG_P3Z8_GSM_parP3parZ1.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_GRM_dynLin_1comp_sensbenchmark2_cDG_P3Z8_GSM_parP3parZ1.h5
--------------------------------------------------------------------------------
/test/data/ref_GRM_reqSMA_4comp_sensbenchmark1_FV_Z16parZ2.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_GRM_reqSMA_4comp_sensbenchmark1_FV_Z16parZ2.h5
--------------------------------------------------------------------------------
/test/data/ref_GRM_reqSMA_4comp_sensbenchmark1_FV_Z512parZ64.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_GRM_reqSMA_4comp_sensbenchmark1_FV_Z512parZ64.h5
--------------------------------------------------------------------------------
/test/data/ref_GRM_reqSMA_4comp_sensbenchmark1_cDG_P3Z8_GSM_parP3parZ1.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_GRM_reqSMA_4comp_sensbenchmark1_cDG_P3Z8_GSM_parP3parZ1.h5
--------------------------------------------------------------------------------
/test/data/ref_GRMparType2_dynLin_2comp_sensbenchmark1_FV_Z16parZ8.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_GRMparType2_dynLin_2comp_sensbenchmark1_FV_Z16parZ8.h5
--------------------------------------------------------------------------------
/test/data/ref_GRMparType2_dynLin_2comp_sensbenchmark1_cDG_P3Z4_DGexInt_parP3parZ2.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_GRMparType2_dynLin_2comp_sensbenchmark1_cDG_P3Z4_DGexInt_parP3parZ2.h5
--------------------------------------------------------------------------------
/test/data/ref_LRMP_dynLin_1comp_sensbenchmark1_DG_P3Z8.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_LRMP_dynLin_1comp_sensbenchmark1_DG_P3Z8.h5
--------------------------------------------------------------------------------
/test/data/ref_LRMP_dynLin_1comp_sensbenchmark1_FV_Z32.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_LRMP_dynLin_1comp_sensbenchmark1_FV_Z32.h5
--------------------------------------------------------------------------------
/test/data/ref_LRMP_dynLin_1comp_sensbenchmark1_FV_Z32768.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_LRMP_dynLin_1comp_sensbenchmark1_FV_Z32768.h5
--------------------------------------------------------------------------------
/test/data/ref_LRMP_reqSMA_4comp_sensbenchmark1_DG_P3Z8.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_LRMP_reqSMA_4comp_sensbenchmark1_DG_P3Z8.h5
--------------------------------------------------------------------------------
/test/data/ref_LRMP_reqSMA_4comp_sensbenchmark1_FV_Z2048.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_LRMP_reqSMA_4comp_sensbenchmark1_FV_Z2048.h5
--------------------------------------------------------------------------------
/test/data/ref_LRMP_reqSMA_4comp_sensbenchmark1_FV_Z32.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_LRMP_reqSMA_4comp_sensbenchmark1_FV_Z32.h5
--------------------------------------------------------------------------------
/test/data/ref_LRM_dynLin_1comp_benchmark2_FV_Z357.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_LRM_dynLin_1comp_benchmark2_FV_Z357.h5
--------------------------------------------------------------------------------
/test/data/ref_LRM_dynLin_1comp_sensbenchmark1_DG_P3Z8.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_LRM_dynLin_1comp_sensbenchmark1_DG_P3Z8.h5
--------------------------------------------------------------------------------
/test/data/ref_LRM_dynLin_1comp_sensbenchmark1_FV_Z131072.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_LRM_dynLin_1comp_sensbenchmark1_FV_Z131072.h5
--------------------------------------------------------------------------------
/test/data/ref_LRM_dynLin_1comp_sensbenchmark1_FV_Z32.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_LRM_dynLin_1comp_sensbenchmark1_FV_Z32.h5
--------------------------------------------------------------------------------
/test/data/ref_LRM_noBnd_1comp_MCTbenchmark_FV_Z256.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_LRM_noBnd_1comp_MCTbenchmark_FV_Z256.h5
--------------------------------------------------------------------------------
/test/data/ref_LRM_reqSMA_4comp_sensbenchmark1_DG_P3Z8.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_LRM_reqSMA_4comp_sensbenchmark1_DG_P3Z8.h5
--------------------------------------------------------------------------------
/test/data/ref_LRM_reqSMA_4comp_sensbenchmark1_FV_Z32.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_LRM_reqSMA_4comp_sensbenchmark1_FV_Z32.h5
--------------------------------------------------------------------------------
/test/data/ref_LRM_reqSMA_4comp_sensbenchmark1_FV_Z4096.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_LRM_reqSMA_4comp_sensbenchmark1_FV_Z4096.h5
--------------------------------------------------------------------------------
/test/data/ref_MCT1ch_noEx_noReac_benchmark1_FV_Z256.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_MCT1ch_noEx_noReac_benchmark1_FV_Z256.h5
--------------------------------------------------------------------------------
/test/data/ref_MCT1ch_noEx_reac_benchmark1_FV_Z256.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_MCT1ch_noEx_reac_benchmark1_FV_Z256.h5
--------------------------------------------------------------------------------
/test/data/ref_MCT2ch_oneWayEx_reac_benchmark1_FV_Z256.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_MCT2ch_oneWayEx_reac_benchmark1_FV_Z256.h5
--------------------------------------------------------------------------------
/test/data/ref_MCT3ch_twoWayExc_reac_benchmark1_FV_Z256.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_MCT3ch_twoWayExc_reac_benchmark1_FV_Z256.h5
--------------------------------------------------------------------------------
/test/data/ref_cry_CSTR_PBM_Agg_Frag_benchmark1.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_cry_CSTR_PBM_Agg_Frag_benchmark1.h5
--------------------------------------------------------------------------------
/test/data/ref_cry_CSTR_PBM_growthSizeDep_benchmark1.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_cry_CSTR_PBM_growthSizeDep_benchmark1.h5
--------------------------------------------------------------------------------
/test/data/ref_cry_CSTR_PBM_growth_benchmark1.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_cry_CSTR_PBM_growth_benchmark1.h5
--------------------------------------------------------------------------------
/test/data/ref_cry_CSTR_PBM_primaryNucleationAndGrowth_benchmark1.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_cry_CSTR_PBM_primaryNucleationAndGrowth_benchmark1.h5
--------------------------------------------------------------------------------
/test/data/ref_cry_CSTR_PBM_primaryNucleationGrowthGrowthRateDispersion_benchmark1.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_cry_CSTR_PBM_primaryNucleationGrowthGrowthRateDispersion_benchmark1.h5
--------------------------------------------------------------------------------
/test/data/ref_cry_CSTR_PBM_primarySecondaryNucleationAndGrowth_benchmark1.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_cry_CSTR_PBM_primarySecondaryNucleationAndGrowth_benchmark1.h5
--------------------------------------------------------------------------------
/test/data/ref_cry_CSTR_PBM_primarySecondaryNucleationGrowth_benchmark1.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_cry_CSTR_PBM_primarySecondaryNucleationGrowth_benchmark1.h5
--------------------------------------------------------------------------------
/test/data/ref_cry_CSTR_aggFrag_benchmark1.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_cry_CSTR_aggFrag_benchmark1.h5
--------------------------------------------------------------------------------
/test/data/ref_cry_CSTR_aggregation_benchmark1.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_cry_CSTR_aggregation_benchmark1.h5
--------------------------------------------------------------------------------
/test/data/ref_cry_CSTR_fragmentation_benchmark1.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_cry_CSTR_fragmentation_benchmark1.h5
--------------------------------------------------------------------------------
/test/data/ref_cry_DPFR_PBM_aggregation_benchmark1.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_cry_DPFR_PBM_aggregation_benchmark1.h5
--------------------------------------------------------------------------------
/test/data/ref_cry_DPFR_PBM_primarySecondaryNucleationGrowth_benchmark1.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_cry_DPFR_PBM_primarySecondaryNucleationGrowth_benchmark1.h5
--------------------------------------------------------------------------------
/test/data/ref_radGRM_dynLin_1comp_sensbenchmark1_FV_Z32parZ4.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_radGRM_dynLin_1comp_sensbenchmark1_FV_Z32parZ4.h5
--------------------------------------------------------------------------------
/test/data/ref_radLRMP_dynLin_1comp_sensbenchmark1_FV_Z32.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_radLRMP_dynLin_1comp_sensbenchmark1_FV_Z32.h5
--------------------------------------------------------------------------------
/test/data/ref_radLRM_dynLin_1comp_sensbenchmark1_FV_Z32.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cadet/CADET-Core/45347334a213065a54ee5043cd2b1b827093f50e/test/data/ref_radLRM_dynLin_1comp_sensbenchmark1_FV_Z32.h5
--------------------------------------------------------------------------------
/test/smaNonlinearProblem.m:
--------------------------------------------------------------------------------
1 | function smaNonlinearProblem()
2 |
3 | yCp = [5.8377002519964755e+01, 2.9352296732047269e-03, 1.5061023667222263e-02, 1.3523701213590386e-01];
4 | kA = [0.0, 35.5, 1.59, 7.7];
5 | kD = [0.0, 1000.0, 1000.0, 1000.0];
6 | nu = [0.0, 4.7, 5.29, 3.7];
7 | sigma = [0.0, 11.83, 10.6, 10.0];
8 | lambda = 1.2e3;
9 |
10 | qStart = [1.0485785488181000e+03, 1.1604726694141368e+01, 1.1469542586742687e+01, 9.7852311988018670e+00];
11 |
12 | opts = optimset('Jacobian', 'on', 'MaxIter', 400, 'MaxFunEvals', 400, ...
13 | 'TolFun', 1e-12, 'TolX', 0, 'Display', 'iter', ...
14 | 'Algorithm', {'levenberg-marquardt',.001});
15 | [sol, res] = fsolve(@residual, qStart, opts);
16 |
17 | function [res, J] = residual(x)
18 | res = zeros(size(x));
19 |
20 | q0bar = x(1) - sum(sigma .* x);
21 | res(1) = x(1) - lambda + sum(nu .* x);
22 |
23 | c0powNu = (yCp(1)).^nu;
24 | q0barPowNu = q0bar.^nu;
25 |
26 | res(2:end) = kD(2:end) .* x(2:end) .* c0powNu(2:end) - kA(2:end) .* yCp(2:end) .* q0barPowNu(2:end);
27 |
28 | q0barPowNuM1 = q0bar.^(nu - 1.0);
29 |
30 | J = zeros(length(x));
31 | J(1,:) = [1.0, nu(2:end)];
32 | for i = 2:length(x)
33 | J(i, :) = -kA(i) * yCp(i) * nu(i) * q0barPowNuM1(i) .* [1, -sigma(2:end)];
34 | J(i,i) = J(i,i) + kD(i) * c0powNu(i);
35 | end
36 | end
37 |
38 |
39 | end
40 |
--------------------------------------------------------------------------------
/vcpkg-configuration.json:
--------------------------------------------------------------------------------
1 | {
2 | "default-registry": {
3 | "kind": "git",
4 | "baseline": "638b1588be3a265a9c7ad5b212cef72a1cad336a",
5 | "repository": "https://github.com/microsoft/vcpkg"
6 | },
7 | "registries": [
8 | {
9 | "kind": "artifact",
10 | "location": "https://github.com/microsoft/vcpkg-ce-catalog/archive/refs/heads/main.zip",
11 | "name": "microsoft"
12 | }
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/vcpkg.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": [
3 | "hdf5",
4 | "suitesparse",
5 | "superlu",
6 | "eigen3"
7 | ]
8 | }
9 |
--------------------------------------------------------------------------------
/version.txt:
--------------------------------------------------------------------------------
1 | 5.0.3
2 |
--------------------------------------------------------------------------------