branch: master commit 4487cec1aa40728704bf4e4f18b342809944ee0d Author: Yves Renard <yves.ren...@insa-lyon.fr> Date: Wed Feb 27 10:51:47 2019 +0100
two small fixes --- src/getfem_generic_assembly_interpolation.cc | 4 ++-- src/getfem_plasticity.cc | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/getfem_generic_assembly_interpolation.cc b/src/getfem_generic_assembly_interpolation.cc index 08ad1e8..1bac776 100644 --- a/src/getfem_generic_assembly_interpolation.cc +++ b/src/getfem_generic_assembly_interpolation.cc @@ -640,9 +640,9 @@ namespace getfem { ga_interpolation_single_point_exec(local_gis, local_workspace, ctx_x, Normal, m); - GMM_ASSERT1(local_workspace.assembled_tensor().size() == m.dim(), + GMM_ASSERT1(local_workspace.assembled_tensor().size()==target_mesh.dim(), "Wrong dimension of the transformation expression"); - P.resize(m.dim()); + P.resize(target_mesh.dim()); gmm::copy(local_workspace.assembled_tensor().as_vector(), P); *m_t = &target_mesh; diff --git a/src/getfem_plasticity.cc b/src/getfem_plasticity.cc index ee0688b..a0248ce 100644 --- a/src/getfem_plasticity.cc +++ b/src/getfem_plasticity.cc @@ -331,8 +331,11 @@ namespace getfem { struct Ball_projection_operator : public ga_nonlinear_operator { bool result_size(const arg_list &args, bgeot::multi_index &sizes) const { if (args.size() != 2 || args[0]->sizes().size() > 2 - || args[0]->sizes().size() < 1 || args[1]->size() != 1) return false; - if (args[0]->sizes().size() == 1) + || (args[0]->sizes().size() < 1 && args[0]->size() != 1) + || args[1]->size() != 1) return false; + if (args[0]->sizes().size() < 1) + ga_init_scalar(sizes); + else if (args[0]->sizes().size() == 1) ga_init_vector(sizes, args[0]->sizes()[0]); else ga_init_matrix(sizes, args[0]->sizes()[0], args[0]->sizes()[1]);