Smith  0.1
Smith is an implicit thermal structural mechanics simulation code.
state_advancer.hpp
Go to the documentation of this file.
1 // Copyright (c) Lawrence Livermore National Security, LLC and
2 // other Smith Project Developers. See the top-level LICENSE file for
3 // details.
4 //
5 // SPDX-License-Identifier: (BSD-3-Clause)
6 
13 #pragma once
14 
15 #include <vector>
16 #include "gretl/double_state.hpp"
18 #include "smith/physics/common.hpp"
19 
20 namespace smith {
21 
24  public:
26  virtual ~StateAdvancer() {}
27 
31  virtual std::pair<std::vector<FieldState>, std::vector<ReactionState>> advanceState(
32  const TimeInfo& time_info, const FieldState& shape_disp, const std::vector<FieldState>& states,
33  const std::vector<FieldState>& params) const = 0;
34 };
35 
41 inline TimeInfo create_time_info(DoubleState t, DoubleState dt, size_t cycle)
42 {
43  return TimeInfo(t.get(), dt.get(), cycle);
44 }
45 
46 } // namespace smith
Base state advancer class, allows specification for quasi-static solve strategies,...
virtual ~StateAdvancer()
destructor
virtual std::pair< std::vector< FieldState >, std::vector< ReactionState > > advanceState(const TimeInfo &time_info, const FieldState &shape_disp, const std::vector< FieldState > &states, const std::vector< FieldState > &params) const =0
interface method to advance the states from a given cycle and time, to the next cycle (cycle+1) and t...
A file defining some enums and structs that are used by the different physics modules.
Accelerator functionality.
Definition: smith.cpp:36
gretl::State< double, double > DoubleState
typedef
Definition: field_state.hpp:25
gretl::State< FEFieldPtr, FEDualPtr > FieldState
typedef
Definition: field_state.hpp:22
TimeInfo create_time_info(DoubleState t, DoubleState dt, size_t cycle)
creates a time info struct from gretl::State<double>
struct storing time and timestep information
Definition: common.hpp:18