44#ifndef NIMBLE_PARSER_H
45#define NIMBLE_PARSER_H
52#ifdef NIMBLE_HAVE_DARMA
60#ifdef NIMBLE_HAVE_TRILINOS
61#include <Tpetra_Core.hpp>
70 std::string
const& serial_name,
71 std::string
const& extension,
72 std::string
const& label = std::string(),
78 char const*
const serial_file_name,
79 char const*
const extension,
80 char const*
const label,
85 char*
const file_name);
92#ifdef NIMBLE_HAVE_DARMA
93 template <
typename ArchiveType>
95 serialize(ArchiveType& ar)
145 "\n**** Error in Parser::TimeIntegrationScheme(), invalid "
146 "integration scheme " +
148 throw std::invalid_argument(msg);
199 return visualize_contact;
218 std::string none_str(
"none");
224 return material_props;
237 block_id = entry.first;
245 std::vector<std::string>
const&
256 "\n**** Error in Parser::GetOutputFieldString(), output fields not "
257 "found (possible input deck error?).";
258 throw std::invalid_argument(msg);
350#ifdef NIMBLE_HAVE_TRILINOS
352 ResetTpetraScope(Tpetra::ScopeGuard* ptr_scope)
354 tpetra_scope_.reset(ptr_scope);
358#ifdef NIMBLE_HAVE_BVH
360 ContactDicing() const noexcept
362 return contact_dicing_;
366 ContactSplitting() const noexcept
368 return contact_splitting_;
374 UqModelString()
const
376 return uq_model_string_;
378 std::map<std::string, std::string>
const&
379 UqParamsStrings()
const
381 return uq_parameters_strings_;
387 if (uq_model_string_.size() == 0 || uq_parameters_strings_.size() == 0)
422#ifdef NIMBLE_HAVE_BVH
423 int contact_dicing_ = 1;
424 std::string contact_splitting_ =
"geom_axis";
428 std::map<std::string, std::string> uq_parameters_strings_;
429 std::string uq_model_string_;
455#ifdef NIMBLE_HAVE_TRILINOS
456 std::unique_ptr<Tpetra::ScopeGuard> tpetra_scope_ =
nullptr;
double NonlinearSolverRelativeTolerance() const
Definition nimble_parser.h:154
double nonlinear_solver_relative_tolerance_
Definition nimble_parser.h:405
virtual ~Parser()=default
bool visualize_contact_entities_
Definition nimble_parser.h:414
int nonlinear_solver_max_iterations_
Definition nimble_parser.h:406
bool use_tpetra_
Boolean setting the usage of Tpetra.
Definition nimble_parser.h:444
std::string contact_string_
Definition nimble_parser.h:412
std::string TimeIntegrationScheme() const
Definition nimble_parser.h:141
bool write_timing_data_file_
Definition nimble_parser.h:404
std::string ContactVisualizationFileName() const
Definition nimble_parser.h:203
double initial_time_
Definition nimble_parser.h:408
std::string ExodusFileName() const
Definition nimble_parser.h:123
void SetNumRanks(int nrank)
Set the number of ranks.
Definition nimble_parser.h:330
void SetToUseUQ()
Set that UQ is used for the simulation.
Definition nimble_parser.h:276
int output_frequency_
Definition nimble_parser.h:411
bool ContactVisualization() const
Definition nimble_parser.h:196
double FinalTime() const
Definition nimble_parser.h:172
int num_load_steps_
Definition nimble_parser.h:410
std::string GetModelMaterialParameters(int block_id) const
Definition nimble_parser.h:215
bool HasContact() const
Definition nimble_parser.h:190
std::vector< std::string > boundary_condition_strings_
Definition nimble_parser.h:419
void SetToUseVT()
Set that VT is used for the simulation.
Definition nimble_parser.h:286
std::vector< std::string > const & GetBoundaryConditionStrings() const
Definition nimble_parser.h:246
std::string genesis_file_name_
Definition nimble_parser.h:401
void SetToUseTpetra()
Set that Tpetra is used for the simulation.
Definition nimble_parser.h:268
virtual void ParseKeyValue(const std::string &k, const std::string &v)
Definition nimble_parser.cc:239
bool WriteTimingDataFile() const
Definition nimble_parser.h:135
bool UseUQ() const
Indicate whether UQ is used for the simulation.
Definition nimble_parser.h:300
void Initialize()
Definition nimble_parser.cc:191
int GetNumRanks() const
Get the number of ranks.
Definition nimble_parser.h:337
int NumLoadSteps() const
Definition nimble_parser.h:178
int NonlinearSolverMaxIterations() const
Definition nimble_parser.h:160
double final_time_
Definition nimble_parser.h:409
void SetInputFilename(const std::string &name)
Set the string for the input file.
Definition nimble_parser.h:345
void ReadFile()
Definition nimble_parser.cc:197
int num_ranks_
Number of ranks when running with MPI.
Definition nimble_parser.h:453
bool use_vt_
Boolean setting the usage of VT.
Definition nimble_parser.h:441
std::map< std::string, std::string > material_strings_
Definition nimble_parser.h:417
std::string file_name_
Filename for input file to read.
Definition nimble_parser.h:438
bool UseTpetra() const
Indicate whether Tpetra is used for the simulation.
Definition nimble_parser.h:293
bool use_two_level_mesh_decomposition_
Definition nimble_parser.h:403
int GetBlockIdFromMaterial(const std::string &material_key) const
Definition nimble_parser.h:228
std::string contact_visualization_file_name_
Definition nimble_parser.h:416
bool visualize_contact_bounding_boxes_
Definition nimble_parser.h:415
std::string contact_backend_string_
Definition nimble_parser.h:413
std::string ContactString() const
Definition nimble_parser.h:209
double InitialTime() const
Definition nimble_parser.h:166
std::string exodus_file_name_
Definition nimble_parser.h:402
bool env_set_
Boolean indicating whether the environment has been set.
Definition nimble_parser.h:435
void SetRankID(int myrank)
Set the rank index.
Definition nimble_parser.h:315
Parser()
Definition nimble_parser.cc:171
int my_rank_
Rank ID when running with MPI.
Definition nimble_parser.h:450
bool UseTwoLevelMeshDecomposition() const
Definition nimble_parser.h:129
std::string GetOutputFieldString() const
Definition nimble_parser.h:252
int OutputFrequency() const
Definition nimble_parser.h:184
std::string GenesisFileName() const
Definition nimble_parser.h:117
bool UseVT() const
Indicate whether VT is used.
Definition nimble_parser.h:307
int GetRankID() const
Get the rank index.
Definition nimble_parser.h:322
std::map< int, BlockProperties > model_blocks_
Definition nimble_parser.h:418
bool use_uq_
Boolean setting the usage of UQ.
Definition nimble_parser.h:447
std::string output_field_string_
Definition nimble_parser.h:420
std::string time_integration_scheme_
Definition nimble_parser.h:407
Definition kokkos_contact_manager.h:49
std::string IOFileName(std::string const &serial_name, std::string const &extension, std::string const &label, int my_rank, int num_ranks)
Definition nimble_parser.cc:58
constexpr int MAX_C_STR_SIZE
Definition nimble_parser.h:66
void IOFileNameThreadSafe(char const *const serial_file_name, char const *const extension, char const *const label, int my_mpi_rank, int mpi_num_ranks, int my_thread_rank, int num_threads, char *const file_name)
Definition nimble_parser.cc:91
Definition nimble_parser.h:88
std::string material_key_
Definition nimble_parser.h:103
BlockProperties()
Definition nimble_parser.h:89
int block_id_
Definition nimble_parser.h:102
std::string block_name_
Definition nimble_parser.h:101