29#include "neml2/drivers/ModelDriver.h"
102 virtual torch::nn::ModuleDict
result()
const;
115 void output_pt(
const std::filesystem::path & out)
const;
ModelDriver(const OptionSet &options)
A custom map-like data structure. The keys are strings, and the values can be nonhomogeneously typed.
Definition OptionSet.h:54
Scalar.
Definition Scalar.h:38
const VariableName _time_name
VariableName for the time.
Definition TransientDriver.h:73
std::vector< ValueMap > _result_in
Inputs from all time steps.
Definition TransientDriver.h:82
virtual void postprocess()
Postprocess the output of the current time step.
std::vector< Tensor > _driving_forces
Definition TransientDriver.h:88
virtual void apply_ic()
Apply the initial conditions.
TransientDriver(const OptionSet &options)
bool run() override
Let the driver run, return true upon successful completion, and return false otherwise.
Scalar _time
The current time.
Definition TransientDriver.h:75
virtual void output() const
Save the results into the destination file/path.
virtual torch::nn::ModuleDict result() const
The results (input and output) from all time steps.
virtual void update_forces()
Update the driving forces for the current time step.
virtual void solve_step()
Perform the constitutive update for the current time step.
const Size _nsteps
Total number of steps.
Definition TransientDriver.h:79
std::vector< ValueMap > _result_out
Outputs from all time steps.
Definition TransientDriver.h:84
Size _step_count
The current step count.
Definition TransientDriver.h:77
std::string _save_as
The destination file name or file path.
Definition TransientDriver.h:111
virtual std::string save_as_path() const
The destination file/path to save the results.
void setup() override
Setup this object.
void diagnose() const override
Check for common problems.
static OptionSet expected_options()
virtual void advance_step()
Advance in time: the state becomes old state, and forces become old forces.
std::vector< VariableName > _driving_force_names
Driving forces (other than time).
Definition TransientDriver.h:87
virtual bool solve()
Solve the initial value problem.
Definition DiagnosticsInterface.h:31
int64_t Size
Definition types.h:71
std::string VariableName
Definition types.h:75
Definition TransientDriver.h:32