From 0ee1513427e725dc8d54d71ab86693ec7aa23301 Mon Sep 17 00:00:00 2001 From: Thomas Helfer Date: Mon, 6 May 2024 10:01:11 +0200 Subject: [PATCH] Fix Issue 548 --- docs/web/release-notes-4.1.2.md | 4 ++++ mfront/src/GenericBehaviourInterface.cxx | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/web/release-notes-4.1.2.md b/docs/web/release-notes-4.1.2.md index 351bfce88..1a0aa6f73 100644 --- a/docs/web/release-notes-4.1.2.md +++ b/docs/web/release-notes-4.1.2.md @@ -19,6 +19,10 @@ eqnPrefixTemplate: "($$i$$)" # Issues fixed +## Issue 548: [generic-interface] Fix initialisation of array of material properties when quantities are used + +For more details, see " << v.name << "[idx] = " << src << "[" << get_offset(o) - << "+idx];\n"; + os << "this->" << v.name << "[idx] = " << v.type << "{" << src << "[" + << get_offset(o) << "+idx]};\n"; } else { os << "this->" << v.name << "[idx] = tfel::math::map<" << v.type << ">(" << src << " + " << get_offset(o) << "+idx * " @@ -1947,8 +1947,8 @@ namespace mfront { } else { for (unsigned short index = 0; index != v.arraySize; ++index) { if (v.isScalar()) { - os << "this->" << v.name << "[" << index << "] = " << src << "[" - << get_offset(o) << "];\n"; + os << "this->" << v.name << "[" << index << "] = " << v.type << "{" + << src << "[" << get_offset(o) << "]};\n"; } else { os << "this->" << v.name << "[" << index << "] = tfel::math::map<" << v.type << ">(" << src << " + " << get_offset(o) << ");\n";