#include <LAROMANCE6DInterpolation.h>
Public Types | |
enum | TransformEnum { TransformEnum::COMPRESS, TransformEnum::DECOMPRESS, TransformEnum::LOG10BOUNDED, TransformEnum::EXP10BOUNDED, TransformEnum::MINMAX } |
Public Member Functions | |
LAROMANCE6DInterpolation (const OptionSet &options) | |
void | request_AD () override |
Static Public Member Functions | |
static OptionSet | expected_options () |
Protected Member Functions | |
void | set_value (bool, bool, bool) override |
Private Member Functions | |
std::pair< Scalar, Scalar > | findLeftIndexAndFraction (const Scalar &grid, const Scalar &interp_points) const |
find index of input point More... | |
Scalar | interpolate_and_transform () const |
compute interpolated value and transform results More... | |
Scalar | transform_data (const Scalar &data, const std::vector< double > ¶m, TransformEnum transform_type) const |
transform data More... | |
std::string | json_to_string (const std::string &key) const |
read in json axes transform name More... | |
std::vector< double > | json_to_vector (const std::string &key) const |
read in json axes transform constants More... | |
Scalar | json_6Dvector_to_torch (const std::string &key) const |
read 6D grid date from json and store in Torch tensor More... | |
Scalar | json_vector_to_torch (const std::string &key) const |
read 1D vector of grid points from json and store in Torch tensor More... | |
Scalar | compute_interpolation (const std::vector< std::pair< Scalar, Scalar >> index_and_fraction, const Scalar grid_values) const |
compute interpolated value More... | |
TransformEnum | get_transform_enum (const std::string &name) const |
Scalar | transform_compress (const Scalar &data, const std::vector< double > ¶ms) const |
LAROMANCE transforms for input axes and output axis. More... | |
Scalar | transform_decompress (const Scalar &data, const std::vector< double > ¶ms) const |
Scalar | transform_log10_bounded (const Scalar &data, const std::vector< double > ¶ms) const |
Scalar | transform_exp10_bounded (const Scalar &data, const std::vector< double > ¶ms) const |
Scalar | transform_min_max (const Scalar &data, const std::vector< double > ¶ms) const |
Private Attributes | |
Scalar | _stress_grid |
grid for interpolation More... | |
Scalar | _temperature_grid |
Scalar | _plastic_strain_grid |
Scalar | _cell_grid |
Scalar | _wall_grid |
Scalar | _env_grid |
Scalar | _grid_values |
grid values being interpolated More... | |
nlohmann::json | _json |
JSON object containing interpolation grid and values. More... | |
TransformEnum | _stress_transform_enum |
input transform enums More... | |
TransformEnum | _temperature_transform_enum |
TransformEnum | _plastic_strain_transform_enum |
TransformEnum | _cell_transform_enum |
TransformEnum | _wall_transform_enum |
TransformEnum | _env_transform_enum |
std::vector< double > | _stress_transform_values |
input transform values More... | |
std::vector< double > | _temperature_transform_values |
std::vector< double > | _plastic_strain_transform_values |
std::vector< double > | _cell_transform_values |
std::vector< double > | _wall_transform_values |
std::vector< double > | _env_transform_values |
std::string | _output_rate_name |
output transform rate name More... | |
std::vector< double > | _output_transform_values |
output transform values More... | |
TransformEnum | _output_transform_enum |
output transform enum More... | |
const Variable< Scalar > & | _vm_stress |
Model input for interpolation. More... | |
const Variable< Scalar > & | _temperature |
Temperature. More... | |
const Variable< Scalar > & | _ep_strain |
The creep strain. More... | |
const Variable< Scalar > & | _cell_dd |
cell dislocation density More... | |
const Variable< Scalar > & | _wall_dd |
wall dislocation density More... | |
const Variable< Scalar > & | _env_fac |
environmental factor More... | |
Variable< Scalar > & | _output_rate |
Model output. More... | |
Definition at line 19 of file LAROMANCE6DInterpolation.h.
|
strong |
Enumerator | |
---|---|
COMPRESS | |
DECOMPRESS | |
LOG10BOUNDED | |
EXP10BOUNDED | |
MINMAX |
Definition at line 28 of file LAROMANCE6DInterpolation.h.
neml2::LAROMANCE6DInterpolation::LAROMANCE6DInterpolation | ( | const OptionSet & | options | ) |
Definition at line 56 of file LAROMANCE6DInterpolation.C.
|
private |
compute interpolated value
Definition at line 179 of file LAROMANCE6DInterpolation.C.
Referenced by interpolate_and_transform().
|
static |
Definition at line 30 of file LAROMANCE6DInterpolation.C.
|
private |
find index of input point
Definition at line 160 of file LAROMANCE6DInterpolation.C.
Referenced by interpolate_and_transform().
|
private |
Definition at line 143 of file LAROMANCE6DInterpolation.C.
Referenced by LAROMANCE6DInterpolation().
|
private |
compute interpolated value and transform results
compute interpolated value
Definition at line 216 of file LAROMANCE6DInterpolation.C.
Referenced by set_value().
|
private |
read 6D grid date from json and store in Torch tensor
Definition at line 372 of file LAROMANCE6DInterpolation.C.
Referenced by LAROMANCE6DInterpolation().
|
private |
read in json axes transform name
Definition at line 342 of file LAROMANCE6DInterpolation.C.
Referenced by LAROMANCE6DInterpolation().
|
private |
read in json axes transform constants
Definition at line 352 of file LAROMANCE6DInterpolation.C.
Referenced by LAROMANCE6DInterpolation().
|
private |
read 1D vector of grid points from json and store in Torch tensor
Definition at line 362 of file LAROMANCE6DInterpolation.C.
Referenced by LAROMANCE6DInterpolation().
|
override |
Definition at line 125 of file LAROMANCE6DInterpolation.C.
|
overrideprotected |
Definition at line 136 of file LAROMANCE6DInterpolation.C.
|
private |
LAROMANCE transforms for input axes and output axis.
Definition at line 274 of file LAROMANCE6DInterpolation.C.
Referenced by transform_data().
|
private |
transform data
Definition at line 247 of file LAROMANCE6DInterpolation.C.
Referenced by interpolate_and_transform().
|
private |
Definition at line 286 of file LAROMANCE6DInterpolation.C.
Referenced by transform_data().
|
private |
Definition at line 314 of file LAROMANCE6DInterpolation.C.
Referenced by transform_data().
|
private |
|
private |
Definition at line 329 of file LAROMANCE6DInterpolation.C.
Referenced by transform_data().
|
private |
cell dislocation density
Definition at line 61 of file LAROMANCE6DInterpolation.h.
Referenced by interpolate_and_transform().
|
private |
Definition at line 45 of file LAROMANCE6DInterpolation.h.
Referenced by interpolate_and_transform(), and LAROMANCE6DInterpolation().
|
private |
Definition at line 111 of file LAROMANCE6DInterpolation.h.
Referenced by interpolate_and_transform(), and LAROMANCE6DInterpolation().
|
private |
Definition at line 119 of file LAROMANCE6DInterpolation.h.
Referenced by interpolate_and_transform(), and LAROMANCE6DInterpolation().
|
private |
environmental factor
Definition at line 65 of file LAROMANCE6DInterpolation.h.
Referenced by interpolate_and_transform().
|
private |
Definition at line 47 of file LAROMANCE6DInterpolation.h.
Referenced by interpolate_and_transform(), and LAROMANCE6DInterpolation().
|
private |
Definition at line 113 of file LAROMANCE6DInterpolation.h.
Referenced by interpolate_and_transform(), and LAROMANCE6DInterpolation().
|
private |
Definition at line 121 of file LAROMANCE6DInterpolation.h.
Referenced by interpolate_and_transform(), and LAROMANCE6DInterpolation().
|
private |
The creep strain.
Definition at line 59 of file LAROMANCE6DInterpolation.h.
Referenced by interpolate_and_transform().
|
private |
grid values being interpolated
Definition at line 50 of file LAROMANCE6DInterpolation.h.
Referenced by interpolate_and_transform(), and LAROMANCE6DInterpolation().
|
private |
JSON object containing interpolation grid and values.
Definition at line 75 of file LAROMANCE6DInterpolation.h.
Referenced by json_6Dvector_to_torch(), json_to_string(), json_to_vector(), json_vector_to_torch(), and LAROMANCE6DInterpolation().
|
private |
Model output.
output rate
Definition at line 71 of file LAROMANCE6DInterpolation.h.
Referenced by request_AD(), and set_value().
|
private |
output transform rate name
Definition at line 124 of file LAROMANCE6DInterpolation.h.
Referenced by LAROMANCE6DInterpolation(), and request_AD().
|
private |
output transform enum
Definition at line 128 of file LAROMANCE6DInterpolation.h.
Referenced by interpolate_and_transform(), and LAROMANCE6DInterpolation().
|
private |
output transform values
Definition at line 126 of file LAROMANCE6DInterpolation.h.
Referenced by interpolate_and_transform(), and LAROMANCE6DInterpolation().
|
private |
Definition at line 44 of file LAROMANCE6DInterpolation.h.
Referenced by interpolate_and_transform(), and LAROMANCE6DInterpolation().
|
private |
Definition at line 110 of file LAROMANCE6DInterpolation.h.
Referenced by interpolate_and_transform(), and LAROMANCE6DInterpolation().
|
private |
Definition at line 118 of file LAROMANCE6DInterpolation.h.
Referenced by interpolate_and_transform(), and LAROMANCE6DInterpolation().
|
private |
grid for interpolation
Definition at line 42 of file LAROMANCE6DInterpolation.h.
Referenced by interpolate_and_transform(), and LAROMANCE6DInterpolation().
|
private |
input transform enums
Definition at line 108 of file LAROMANCE6DInterpolation.h.
Referenced by interpolate_and_transform(), and LAROMANCE6DInterpolation().
|
private |
input transform values
Definition at line 116 of file LAROMANCE6DInterpolation.h.
Referenced by interpolate_and_transform(), and LAROMANCE6DInterpolation().
|
private |
Temperature.
Definition at line 57 of file LAROMANCE6DInterpolation.h.
Referenced by compute_interpolation(), and interpolate_and_transform().
|
private |
Definition at line 43 of file LAROMANCE6DInterpolation.h.
Referenced by interpolate_and_transform(), and LAROMANCE6DInterpolation().
|
private |
Definition at line 109 of file LAROMANCE6DInterpolation.h.
Referenced by interpolate_and_transform(), and LAROMANCE6DInterpolation().
|
private |
Definition at line 117 of file LAROMANCE6DInterpolation.h.
Referenced by interpolate_and_transform(), and LAROMANCE6DInterpolation().
|
private |
Model input for interpolation.
The von Mises stress
Definition at line 55 of file LAROMANCE6DInterpolation.h.
Referenced by interpolate_and_transform(), and request_AD().
|
private |
wall dislocation density
Definition at line 63 of file LAROMANCE6DInterpolation.h.
Referenced by interpolate_and_transform().
|
private |
Definition at line 46 of file LAROMANCE6DInterpolation.h.
Referenced by interpolate_and_transform(), and LAROMANCE6DInterpolation().
|
private |
Definition at line 112 of file LAROMANCE6DInterpolation.h.
Referenced by interpolate_and_transform(), and LAROMANCE6DInterpolation().
|
private |
Definition at line 120 of file LAROMANCE6DInterpolation.h.
Referenced by interpolate_and_transform(), and LAROMANCE6DInterpolation().