[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Getfem-commits] [getfem-commits] branch master updated: Correction for
From: |
Yves Renard |
Subject: |
[Getfem-commits] [getfem-commits] branch master updated: Correction for RT0 element |
Date: |
Fri, 10 Feb 2023 09:54:49 -0500 |
This is an automated email from the git hooks/post-receive script.
renard pushed a commit to branch master
in repository getfem.
The following commit(s) were added to refs/heads/master by this push:
new 789efd32 Correction for RT0 element
new b8db396a Merge branch 'master' of ssh://git.sv.gnu.org:/srv/git/getfem
789efd32 is described below
commit 789efd327f7dfcc3b048e244466d8d41e1590a3b
Author: Renard Yves <yves.renard@insa-lyon.fr>
AuthorDate: Fri Feb 10 15:53:24 2023 +0100
Correction for RT0 element
---
src/getfem_fem.cc | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/getfem_fem.cc b/src/getfem_fem.cc
index 041d7d48..a37191b1 100644
--- a/src/getfem_fem.cc
+++ b/src/getfem_fem.cc
@@ -1816,8 +1816,8 @@ namespace getfem {
bgeot::base_small_vector n(nc);
gmm::mult(gmm::transposed(K), cvr->normals()[i], n);
- M(i,i) = gmm::vect_norm2(n);
- n /= M(i,i);
+ M(i,i) = scalar_type(1)/gmm::vect_norm2(n);
+ n *= M(i,i);
scalar_type ps = gmm::vect_sp(n, norient);
if (ps < 0) M(i, i) *= scalar_type(-1);
if (gmm::abs(ps) < 1E-8)
@@ -1848,7 +1848,7 @@ namespace getfem {
for (size_type i = 0; i <= nc; ++i) {
base_[i+j*(nc+1)] = base_poly(nc, 1, short_type(j));
if (i-1 == j) base_[i+j*(nc+1)] -= bgeot::one_poly(nc);
- if (i == 0) base_[i+j*(nc+1)] *= sqrt(opt_long_scalar_type(nc));
+ if (i == 0) base_[i+j*(nc+1)] /= sqrt(opt_long_scalar_type(nc));
}
base_node pt(nc);
@@ -1913,8 +1913,8 @@ namespace getfem {
bgeot::base_small_vector n(nc);
gmm::mult(gmm::transposed(K), cvr->normals()[i], n);
- M(i,i) = gmm::vect_norm2(n);
- n /= M(i,i);
+ M(i,i) = scalar_type(1)/gmm::vect_norm2(n);
+ n *= M(i,i);
scalar_type ps = gmm::vect_sp(n, norient);
if (ps < 0) M(i, i) *= scalar_type(-1);
if (gmm::abs(ps) < 1E-8)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Getfem-commits] [getfem-commits] branch master updated: Correction for RT0 element,
Yves Renard <=