[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Getfem-commits] (no subject)
From: |
Konstantinos Poulios |
Subject: |
[Getfem-commits] (no subject) |
Date: |
Fri, 12 Apr 2024 10:17:14 -0400 (EDT) |
branch: master
commit 9e3d4ec635fdadf84c744c66f622a5e7ad0b6040
Author: Konstantinos Poulios <logari81@gmail.com>
AuthorDate: Fri Apr 12 16:12:27 2024 +0200
Variables renaming and typo fixes
---
src/getfem_generic_assembly_compile_and_exec.cc | 22 +++++++++++-----------
src/getfem_generic_assembly_tree.cc | 2 +-
src/gmm/gmm_arch_config.h.in | 2 +-
tests/test_interpolation.cc | 6 ++----
4 files changed, 15 insertions(+), 17 deletions(-)
diff --git a/src/getfem_generic_assembly_compile_and_exec.cc
b/src/getfem_generic_assembly_compile_and_exec.cc
index 7ae88cb6..15857c0e 100644
--- a/src/getfem_generic_assembly_compile_and_exec.cc
+++ b/src/getfem_generic_assembly_compile_and_exec.cc
@@ -1873,20 +1873,20 @@ namespace getfem {
struct ga_instruction_transpose : public ga_instruction { // To be optimized
base_tensor &t;
const base_tensor &tc1;
- size_type n1, n2, nn;
+ size_type J, K, I;
virtual int exec() {
GA_DEBUG_INFO("Instruction: transpose");
GA_DEBUG_ASSERT(t.size() == tc1.size(), "Wrong sizes");
- size_type n0 = tc1.size() / (n1*n2*nn);
+ size_type L = tc1.size() / (J*K*I);
auto it = t.begin();
- for (size_type i = 0; i < nn; ++i) {
- size_type s1 = i*n1*n2*n0;
- for (size_type j = 0; j < n1; ++j) {
- size_type s2 = s1 + j*n0;
- for (size_type k = 0; k < n2; ++k) {
- size_type s3 = s2 + k*n1*n0;
- for (size_type l = 0; l < n0; ++l, ++it)
+ for (size_type i = 0; i < I; ++i) {
+ size_type s1 = i*J*K*L;
+ for (size_type j = 0; j < J; ++j) {
+ size_type s2 = s1 + j*L;
+ for (size_type k = 0; k < K; ++k) {
+ size_type s3 = s2 + k*J*L;
+ for (size_type l = 0; l < L; ++l, ++it)
*it = tc1[s3+l];
}
}
@@ -1895,8 +1895,8 @@ namespace getfem {
return 0;
}
ga_instruction_transpose(base_tensor &t_, const base_tensor &tc1_,
- size_type n1_, size_type n2_, size_type nn_)
- : t(t_), tc1(tc1_), n1(n1_), n2(n2_), nn(nn_) {}
+ size_type J_, size_type K_, size_type I_)
+ : t(t_), tc1(tc1_), J(J_), K(K_), I(I_) {}
};
struct ga_instruction_swap_indices : public ga_instruction {// To be
optimized
diff --git a/src/getfem_generic_assembly_tree.cc
b/src/getfem_generic_assembly_tree.cc
index 3dee62a8..0450930f 100644
--- a/src/getfem_generic_assembly_tree.cc
+++ b/src/getfem_generic_assembly_tree.cc
@@ -1713,7 +1713,7 @@ namespace getfem {
if (t_type != GA_NAME)
ga_throw_error(expr, pos,
"First argument of Interpolate should the "
- "interpolate transformtion name ");
+ "interpolate transformation name ");
tree.current_node->interpolate_name_der
= std::string(&((*expr)[token_pos]), token_length);
t_type = ga_get_token(*expr, pos, token_pos, token_length);
diff --git a/src/gmm/gmm_arch_config.h.in b/src/gmm/gmm_arch_config.h.in
index 2dd8f0f0..3e656c3a 100644
--- a/src/gmm/gmm_arch_config.h.in
+++ b/src/gmm/gmm_arch_config.h.in
@@ -9,7 +9,7 @@
/* defined if GMM is linked to a lapack library */
#undef GMM_USES_LAPACK
-/* defined if GMM is linked to a lapack library */
+/* defined if GMM is used when building the Matlab interface */
#undef GMM_MATLAB_INTERFACE
/* defined if GMM uses MPI */
diff --git a/tests/test_interpolation.cc b/tests/test_interpolation.cc
index 99ea0692..6199a2d4 100644
--- a/tests/test_interpolation.cc
+++ b/tests/test_interpolation.cc
@@ -242,8 +242,7 @@ void test_same_mesh(int mat_version, size_type N, size_type
NX, size_type K, siz
/* force evaluation of a number of things which are not part of
interpolation */
size_type d = mf1.nb_dof(); d -= mf2.nb_dof();
double err = 0.;
- for (int i=0; i<3; ++i) { /* pour amortir/cout de la construction du
maillage, et de divers trucs
- (�a a un gros impact) */
+ for (int i=0; i<3; ++i) { /* To mitigate the cost of mesh generation etc.
(has a significant impact). */
c.init().tic();
double err2 = interpolate_check(mf1, mf2, i, mat_version);
if (i==0 || (mat_version > 0 && i == 1)) err = err2;
@@ -269,8 +268,7 @@ void test_different_mesh(int mat_version, size_type dim,
size_type N, size_type
/* force evaluation of a number of things which are not part of
interpolation */
size_type d = mf1.nb_dof(); d -= mf2.nb_dof();
double err = 0;
- for (int i=0; i<3; ++i) { /* pour amortir/cout de la construction du
maillage, et de divers trucs
- (�a a un gros impact) */
+ for (int i=0; i<3; ++i) { /* To mitigate the cost of mesh generation etc.
(has a significant impact). */
c.init().tic();
double err2 = interpolate_check(mf1, mf2, i, mat_version);
if (i==0 || (mat_version > 0 && i == 1)) err = err2;
- [Getfem-commits] [getfem-commits] master updated (77d406e1 -> 9216a7ac), Konstantinos Poulios, 2024/04/12
- [Getfem-commits] (no subject), Konstantinos Poulios, 2024/04/12
- [Getfem-commits] (no subject), Konstantinos Poulios, 2024/04/12
- [Getfem-commits] (no subject), Konstantinos Poulios, 2024/04/12
- [Getfem-commits] (no subject),
Konstantinos Poulios <=
- [Getfem-commits] (no subject), Konstantinos Poulios, 2024/04/12
- [Getfem-commits] (no subject), Konstantinos Poulios, 2024/04/12