mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Make sure openmc_properties_export/import appear in global namespace
This commit is contained in:
parent
7a4e32f7d5
commit
d6f483d36f
3 changed files with 23 additions and 18 deletions
|
|
@ -145,13 +145,13 @@ extern "C" {
|
|||
//! \param[in] meshtyally_id id of CMFD Mesh Tally
|
||||
//! \param[in] cmfd_indices indices storing spatial and energy dimensions of CMFD problem
|
||||
//! \param[in] norm CMFD normalization factor
|
||||
extern "C" void openmc_initialize_mesh_egrid(const int meshtally_id, const int* cmfd_indices,
|
||||
const double norm);
|
||||
void openmc_initialize_mesh_egrid(const int meshtally_id, const int* cmfd_indices,
|
||||
const double norm);
|
||||
|
||||
//! Sets the mesh and energy grid for CMFD reweight
|
||||
//! \param[in] feedback whether or not to run CMFD feedback
|
||||
//! \param[in] cmfd_src computed CMFD source
|
||||
extern "C" void openmc_cmfd_reweight(const bool feedback, const double* cmfd_src);
|
||||
void openmc_cmfd_reweight(const bool feedback, const double* cmfd_src);
|
||||
|
||||
//! Sets the fixed variables that are used for CMFD linear solver
|
||||
//! \param[in] indptr CSR format index pointer array of loss matrix
|
||||
|
|
@ -162,10 +162,10 @@ extern "C" {
|
|||
//! \param[in] spectral spectral radius of CMFD matrices and tolerances
|
||||
//! \param[in] map coremap for problem, storing accelerated regions
|
||||
//! \param[in] use_all_threads whether to use all threads when running CMFD solver
|
||||
extern "C" void openmc_initialize_linsolver(const int* indptr, int len_indptr,
|
||||
const int* indices, int n_elements,
|
||||
int dim, double spectral,
|
||||
const int* map, bool use_all_threads);
|
||||
void openmc_initialize_linsolver(const int* indptr, int len_indptr,
|
||||
const int* indices, int n_elements,
|
||||
int dim, double spectral,
|
||||
const int* map, bool use_all_threads);
|
||||
|
||||
//! Runs a Gauss Seidel linear solver to solve CMFD matrix equations
|
||||
//! linear solver
|
||||
|
|
@ -174,9 +174,19 @@ extern "C" {
|
|||
//! \param[out] x unknown vector
|
||||
//! \param[in] tol tolerance on final error
|
||||
//! \return number of inner iterations required to reach convergence
|
||||
extern "C" int openmc_run_linsolver(const double* A_data, const double* b,
|
||||
int openmc_run_linsolver(const double* A_data, const double* b,
|
||||
double* x, double tol);
|
||||
|
||||
//! Export physical properties for model
|
||||
//! \param[in] filename Filename to write to
|
||||
//! \return Error code
|
||||
int openmc_properties_export(const char* filename);
|
||||
|
||||
//! Import physical properties for model
|
||||
//! \param[in] filename Filename to read from
|
||||
// \return Error code
|
||||
int openmc_properties_import(const char* filename);
|
||||
|
||||
// Error codes
|
||||
extern int OPENMC_E_UNASSIGNED;
|
||||
extern int OPENMC_E_ALLOCATE;
|
||||
|
|
|
|||
|
|
@ -11,16 +11,6 @@ void write_nuclides(hid_t file);
|
|||
void write_geometry(hid_t file);
|
||||
void write_materials(hid_t file);
|
||||
|
||||
//! Export physical properties for model
|
||||
//! \param[in] filename Filename to write to
|
||||
//! \return Error code
|
||||
extern "C" int openmc_properties_export(const char* filename);
|
||||
|
||||
//! Import physical properties for model
|
||||
//! \param[in] filename Filename to read from
|
||||
// \return Error code
|
||||
extern "C" int openmc_properties_import(const char* filename);
|
||||
|
||||
}
|
||||
|
||||
#endif // OPENMC_SUMMARY_H
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include <fmt/core.h>
|
||||
|
||||
#include "openmc/capi.h"
|
||||
#include "openmc/cell.h"
|
||||
#include "openmc/file_utils.h"
|
||||
#include "openmc/hdf5_interface.h"
|
||||
|
|
@ -136,6 +137,10 @@ void write_materials(hid_t file)
|
|||
close_group(materials_group);
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
// C API
|
||||
//==============================================================================
|
||||
|
||||
extern "C" int openmc_properties_export(const char* filename)
|
||||
{
|
||||
// Set a default filename if none was passed
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue