NimbleSM
NimbleSM is a solid mechanics simulation code for dynamic systems
Loading...
Searching...
No Matches
nimble.h
Go to the documentation of this file.
1/*
2// @HEADER
3// ************************************************************************
4//
5// NimbleSM
6// Copyright 2018
7// National Technology & Engineering Solutions of Sandia, LLC (NTESS)
8//
9// Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government
10// retains certain rights in this software.
11//
12// Redistribution and use in source and binary forms, with or without
13// modification, are permitted provided that the following conditions are
14// met:
15//
16// 1. Redistributions of source code must retain the above copyright
17// notice, this list of conditions and the following disclaimer.
18//
19// 2. Redistributions in binary form must reproduce the above copyright
20// notice, this list of conditions and the following disclaimer in the
21// documentation and/or other materials provided with the distribution.
22//
23// 3. Neither the name of the Corporation nor the names of the
24// contributors may be used to endorse or promote products derived from
25// this software without specific prior written permission.
26//
27// THIS SOFTWARE IS PROVIDED BY NTESS "AS IS" AND ANY EXPRESS OR IMPLIED
28// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
29// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
30// NO EVENT SHALL NTESS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
31// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
32// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
33// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
34// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37//
38// Questions? Contact David Littlewood (djlittl@sandia.gov)
39//
40// ************************************************************************
41// @HEADER
42*/
43
44#ifndef NIMBLE_H
45#define NIMBLE_H
46
47#include <memory>
48
49namespace nimble {
50class Parser;
55class IntegratorBase;
56class DataManager;
57class GenesisMesh;
58
60{
61 public:
66
67 NimbleApplication &operator=( const NimbleApplication & ) = delete;
68 NimbleApplication &operator=( NimbleApplication && ) noexcept;
69
70 int Run(int argc, char **argv);
71
72 int Rank() const noexcept;
73 int NumRanks() const noexcept;
74
75 std::shared_ptr< ContactInterface > GetContactInterface();
77
78 private:
79
80 struct impl;
81
82 virtual std::unique_ptr< Parser > CreateParser();
83 virtual std::unique_ptr< CommandLineConfiguration > CreateCLI(int argc, char **argv);
84 virtual std::unique_ptr< MaterialFactoryBase > CreateMaterialFactory();
85 virtual std::unique_ptr< BlockMaterialInterfaceFactoryBase > CreateBlockMaterialInterfaceFactory();
86 virtual std::unique_ptr< ContactInterface > CreateContactInterface();
87 virtual std::unique_ptr< IntegratorBase > CreateIntegrator(DataManager &data_manager,
88 GenesisMesh &mesh);
89
90 void InitializeSubsystems();
91 void FinalizeSubsystems();
92 int ExecMain();
93 int MainLoop();
94
95 std::unique_ptr< impl > impl_;
96};
97} // namespace nimble
98
99#endif // NIMBLE_H
Definition nimble_block_material_interface_factory_base.h:60
Definition nimble_cli.h:52
Definition nimble_contact_interface.h:94
Definition nimble_data_manager.h:70
Definition nimble_genesis_mesh.h:59
Definition integrator_base.h:54
Definition nimble_material_factory_base.h:61
Parser & GetParser()
Definition nimble.cc:171
int NumRanks() const noexcept
Definition nimble.cc:159
std::shared_ptr< ContactInterface > GetContactInterface()
Definition nimble.cc:165
int Run(int argc, char **argv)
Definition nimble.cc:106
NimbleApplication(const NimbleApplication &)=delete
NimbleApplication()
Definition nimble.cc:92
int Rank() const noexcept
Definition nimble.cc:153
NimbleApplication(NimbleApplication &&) noexcept
Definition nimble_parser.h:107
Definition kokkos_contact_manager.h:49
Definition nimble.cc:75