97 static std::vector<chi_math::SpatialDiscretizationPtr>
sdm_stack;
120 static int InitPetSc(
int argc,
char** argv);
135 : std::runtime_error(std::string(
"RecoverableException: ") +
136 std::string(message))
140 : std::runtime_error(std::string(
"RecoverableException: ") + message)
144 : std::runtime_error(prefix + message)
158 static
int RunBatch(
int argc,
char** argv);
159 static
int Initialize(
int argc,
char** argv, MPI_Comm communicator);
161 static
void Exit(
int error_code);
182 template <class R, class T>
185 const std::
string& calling_function_name = "Unknown")
189 std::shared_ptr<T>& item = stack.at(handle);
190 std::shared_ptr<R> ret_item = std::dynamic_pointer_cast<R>(item);
192 throw std::logic_error(
"chi::GetStackItem: Invalid return type used. "
193 "Calling function: " +
194 calling_function_name);
197 catch (
const std::out_of_range& oor)
199 throw std::out_of_range(
"chi::GetStackItem: Invalid handle used. "
200 "Calling function: " +
201 calling_function_name);
218 template <
class T,
class P>
219 static std::shared_ptr<T>
222 const std::string& calling_function_name =
"Unknown")
224 std::shared_ptr<P> item_type_P;
227 item_type_P = stack.at(handle);
229 catch (
const std::out_of_range& oor)
231 throw std::out_of_range(
"chi::GetStackItem: Invalid handle used. "
232 "Calling function: " +
233 calling_function_name);
236 auto item_type_T = std::dynamic_pointer_cast<T>(item_type_P);
238 throw std::logic_error(calling_function_name +
239 "Failed to cast to requested type");
257 static std::shared_ptr<T>&
260 const std::string& calling_function_name =
"Unknown")
264 std::shared_ptr<T>& item = stack.at(handle);
267 catch (
const std::out_of_range& oor)
269 throw std::out_of_range(
"chi::GetStackItem: Invalid handle used. "
270 "Calling function: " +
271 calling_function_name);
std::shared_ptr< ChiObject > ChiObjectPtr
RecoverableException(const std::string &message)
RecoverableException(const char *message)
~RecoverableException() noexcept override=default
RecoverableException(const std::string &prefix, const std::string &message)
static bool termination_posted_
run_time operator=(const run_time &)=delete
static void ParseArguments(int argc, char **argv)
static bool supress_beg_end_timelog_
static bool sim_option_interactive_
static bool dump_registry_
static const std::string command_line_help_string_
run_time(const run_time &)=delete
static bool allow_petsc_error_handler_
static int InitPetSc(int argc, char **argv)
static std::string input_file_name_
static bool suppress_color_
static int RunBatch(int argc, char **argv)
static R & GetStackItem(std::vector< std::shared_ptr< T > > &stack, const size_t handle, const std::string &calling_function_name="Unknown")
static std::vector< chi_mesh::FFInterpPtr > field_func_interpolation_stack
static std::vector< chi_physics::MaterialPtr > material_stack
static std::vector< chi_physics::FieldFunctionPtr > field_function_stack
static chi::Timer program_timer
static std::vector< chi_physics::MultiGroupXSPtr > multigroup_xs_stack
static std::vector< chi_mesh::MeshHandlerPtr > meshhandler_stack
static std::vector< chi_math::AngularQuadraturePtr > angular_quadrature_stack
static std::vector< chi_mesh::UnpartMeshPtr > unpartitionedmesh_stack
static void Exit(int error_code)
static std::vector< ChiObjectPtr > object_stack
static int RunInteractive(int argc, char **argv)
static chi::RegistryStatuses GetStatusOfRegistries()
static std::shared_ptr< T > GetStackItemPtrAsType(std::vector< std::shared_ptr< P > > &stack, const size_t handle, const std::string &calling_function_name="Unknown")
static const size_t SIZE_T_INVALID
static std::vector< chi_mesh::SurfaceMeshPtr > surface_mesh_stack
static std::shared_ptr< T > & GetStackItemPtr(std::vector< std::shared_ptr< T > > &stack, const size_t handle, const std::string &calling_function_name="Unknown")
static std::string GetVersionStr()
static int Initialize(int argc, char **argv, MPI_Comm communicator)
static int current_mesh_handler
static std::vector< chi_math::SpatialDiscretizationPtr > sdm_stack
static chi::MPI_Info & mpi
static chi::Console & console
static std::vector< chi::PostProcessorPtr > postprocessor_stack
std::shared_ptr< AngularQuadrature > AngularQuadraturePtr
std::shared_ptr< SpatialDiscretization > SpatialDiscretizationPtr
std::shared_ptr< MeshHandler > MeshHandlerPtr
FieldFunctionInterpolation FFInterp
std::shared_ptr< UnpartitionedMesh > UnpartitionedMeshPtr
std::shared_ptr< FFInterp > FFInterpPtr
std::shared_ptr< SurfaceMesh > SurfaceMeshPtr
UnpartitionedMeshPtr UnpartMeshPtr
std::shared_ptr< FieldFunction > FieldFunctionPtr
std::shared_ptr< MultiGroupXS > MultiGroupXSPtr
std::shared_ptr< Material > MaterialPtr
std::shared_ptr< PostProcessor > PostProcessorPtr
std::vector< std::string > console_lua_func_keys_
std::vector< std::string > objfactory_keys_
std::vector< std::string > console_lua_wrapper_keys_