toJson method
Implementation
Map<String, dynamic> toJson() {
Map<String, dynamic> result = {
'Q': Q,
'S': S,
};
if (tensorType == TensorType.stress) {
result.addAll({
'sigma11': sigma11,
'sigma22': sigma22,
'sigma12': sigma12,
});
} else {
result.addAll({
'epsilon11': epsilon11,
'epsilon22': epsilon22,
'gamma12': gamma12,
});
}
return result;
}