toJson method
Implementation
Map<String, double> toJson() {
Map<String, double> result = {};
if (tensorType == TensorType.stress) {
result.addAll({
'N11': N11,
'N22': N22,
'N12': N12,
'M11': M11,
'M22': M22,
'M12': M12,
});
} else {
result.addAll({
'epsilon11': epsilon11,
'epsilon22': epsilon22,
'epsilon12': epsilon12,
'kappa11': kappa11,
'kappa22': kappa22,
'kappa12': kappa12,
});
}
return result;
}