[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Getfem-commits] r5249 - in /trunk/getfem: src/ src/gmm/ tests/
From: |
Yves . Renard |
Subject: |
[Getfem-commits] r5249 - in /trunk/getfem: src/ src/gmm/ tests/ |
Date: |
Tue, 15 Mar 2016 14:45:03 -0000 |
Author: renard
Date: Tue Mar 15 15:45:03 2016
New Revision: 5249
URL: http://svn.gna.org/viewcvs/getfem?rev=5249&view=rev
Log:
minor changes
Modified:
trunk/getfem/src/getfem_mesh_fem.cc
trunk/getfem/src/gmm/gmm_precond_ildlt.h
trunk/getfem/src/gmm/gmm_precond_ildltt.h
trunk/getfem/tests/gmm_torture20_iterative_solvers.cc
Modified: trunk/getfem/src/getfem_mesh_fem.cc
URL:
http://svn.gna.org/viewcvs/getfem/trunk/getfem/src/getfem_mesh_fem.cc?rev=5249&r1=5248&r2=5249&view=diff
==============================================================================
--- trunk/getfem/src/getfem_mesh_fem.cc (original)
+++ trunk/getfem/src/getfem_mesh_fem.cc Tue Mar 15 15:45:03 2016
@@ -473,8 +473,9 @@
return *this;
}
- mesh_fem::mesh_fem(const mesh &me, dim_type Q, bool is_consistent_with_mesh)
:
- is_consistent_with_mesh{is_consistent_with_mesh}
+ mesh_fem::mesh_fem(const mesh &me, dim_type Q,
+ bool is_consistent_with_mesh_) :
+ is_consistent_with_mesh(is_consistent_with_mesh_)
{ linked_mesh_ = 0; init_with_mesh(me, Q); }
mesh_fem::mesh_fem(void)
@@ -733,8 +734,10 @@
bool is_consistent_with_mesh;
const mesh *pmesh;
dim_type order, qdim;
- mf__key_(const mesh &msh, dim_type o, dim_type q, bool
is_consistent_with_mesh)
- : pmesh(&msh), order(o), qdim(q),
is_consistent_with_mesh(is_consistent_with_mesh)
+ mf__key_(const mesh &msh, dim_type o, dim_type q,
+ bool is_consistent_with_mesh_)
+ : is_consistent_with_mesh(is_consistent_with_mesh_),
+ pmesh(&msh), order(o), qdim(q)
{ add_dependency(msh); }
bool operator <(const mf__key_ &a) const {
if (pmesh < a.pmesh) return true;
Modified: trunk/getfem/src/gmm/gmm_precond_ildlt.h
URL:
http://svn.gna.org/viewcvs/getfem/trunk/getfem/src/gmm/gmm_precond_ildlt.h?rev=5249&r1=5248&r2=5249&view=diff
==============================================================================
--- trunk/getfem/src/gmm/gmm_precond_ildlt.h (original)
+++ trunk/getfem/src/gmm/gmm_precond_ildlt.h Tue Mar 15 15:45:03 2016
@@ -235,51 +235,6 @@
{ copy(v1, v2); gmm::lower_tri_solve(gmm::conjugated(P.U), v2, true); }
-
- // for compatibility with old versions
-
- template <typename Matrix>
- struct cholesky_precond : public ildlt_precond<Matrix> {
- cholesky_precond(const Matrix& A) : ildlt_precond<Matrix>(A) {}
- cholesky_precond(void) {}
- } IS_DEPRECATED;
-
- template <typename Matrix, typename V1, typename V2> inline
- void mult(const cholesky_precond<Matrix>& P, const V1 &v1, V2 &v2) {
- gmm::copy(v1, v2);
- gmm::lower_tri_solve(gmm::conjugated(P.U), v2, true);
- for (size_type i = 0; i < mat_nrows(P.U); ++i) v2[i] /= P.D(i);
- gmm::upper_tri_solve(P.U, v2, true);
- }
-
- template <typename Matrix, typename V1, typename V2> inline
- void transposed_mult(const cholesky_precond<Matrix>& P,const V1 &v1,V2 &v2)
- { mult(P, v1, v2); }
-
- template <typename Matrix, typename V1, typename V2> inline
- void left_mult(const cholesky_precond<Matrix>& P, const V1 &v1, V2 &v2) {
- copy(v1, v2);
- gmm::lower_tri_solve(gmm::conjugated(P.U), v2, true);
- for (size_type i = 0; i < mat_nrows(P.U); ++i) v2[i] /= P.D(i);
- }
-
- template <typename Matrix, typename V1, typename V2> inline
- void right_mult(const cholesky_precond<Matrix>& P, const V1 &v1, V2 &v2)
- { copy(v1, v2); gmm::upper_tri_solve(P.U, v2, true); }
-
- template <typename Matrix, typename V1, typename V2> inline
- void transposed_left_mult(const cholesky_precond<Matrix>& P, const V1 &v1,
- V2 &v2) {
- copy(v1, v2);
- gmm::upper_tri_solve(P.U, v2, true);
- for (size_type i = 0; i < mat_nrows(P.U); ++i) v2[i] /= P.D(i);
- }
-
- template <typename Matrix, typename V1, typename V2> inline
- void transposed_right_mult(const cholesky_precond<Matrix>& P, const V1 &v1,
- V2 &v2)
- { copy(v1, v2); gmm::lower_tri_solve(gmm::conjugated(P.U), v2, true); }
-
}
#endif
Modified: trunk/getfem/src/gmm/gmm_precond_ildltt.h
URL:
http://svn.gna.org/viewcvs/getfem/trunk/getfem/src/gmm/gmm_precond_ildltt.h?rev=5249&r1=5248&r2=5249&view=diff
==============================================================================
--- trunk/getfem/src/gmm/gmm_precond_ildltt.h (original)
+++ trunk/getfem/src/gmm/gmm_precond_ildltt.h Tue Mar 15 15:45:03 2016
@@ -168,52 +168,6 @@
V2 &v2)
{ copy(v1, v2); gmm::lower_tri_solve(gmm::conjugated(P.U), v2, true); }
-
- // for compatibility with old versions
-
- template <typename Matrix>
- struct choleskyt_precond : public ildltt_precond<Matrix>{
- choleskyt_precond(const Matrix& A, int k_, double eps_)
- : ildltt_precond<Matrix>(A, k_, eps_) {}
- choleskyt_precond(void) {}
- } IS_DEPRECATED;
-
- template <typename Matrix, typename V1, typename V2> inline
- void mult(const choleskyt_precond<Matrix>& P, const V1 &v1, V2 &v2) {
- gmm::copy(v1, v2);
- gmm::lower_tri_solve(gmm::conjugated(P.U), v2, true);
- for (size_type i = 0; i < P.indiag.size(); ++i) v2[i] *= P.indiag[i];
- gmm::upper_tri_solve(P.U, v2, true);
- }
-
- template <typename Matrix, typename V1, typename V2> inline
- void transposed_mult(const choleskyt_precond<Matrix>& P,const V1 &v1, V2 &v2)
- { mult(P, v1, v2); }
-
- template <typename Matrix, typename V1, typename V2> inline
- void left_mult(const choleskyt_precond<Matrix>& P, const V1 &v1, V2 &v2) {
- copy(v1, v2);
- gmm::lower_tri_solve(gmm::conjugated(P.U), v2, true);
- for (size_type i = 0; i < P.indiag.size(); ++i) v2[i] *= P.indiag[i];
- }
-
- template <typename Matrix, typename V1, typename V2> inline
- void right_mult(const choleskyt_precond<Matrix>& P, const V1 &v1, V2 &v2)
- { copy(v1, v2); gmm::upper_tri_solve(P.U, v2, true); }
-
- template <typename Matrix, typename V1, typename V2> inline
- void transposed_left_mult(const choleskyt_precond<Matrix>& P, const V1 &v1,
- V2 &v2) {
- copy(v1, v2);
- gmm::upper_tri_solve(P.U, v2, true);
- for (size_type i = 0; i < P.indiag.size(); ++i) v2[i] *= P.indiag[i];
- }
-
- template <typename Matrix, typename V1, typename V2> inline
- void transposed_right_mult(const choleskyt_precond<Matrix>& P, const V1 &v1,
- V2 &v2)
- { copy(v1, v2); gmm::lower_tri_solve(gmm::conjugated(P.U), v2, true); }
-
}
#endif
Modified: trunk/getfem/tests/gmm_torture20_iterative_solvers.cc
URL:
http://svn.gna.org/viewcvs/getfem/trunk/getfem/tests/gmm_torture20_iterative_solvers.cc?rev=5249&r1=5248&r2=5249&view=diff
==============================================================================
--- trunk/getfem/tests/gmm_torture20_iterative_solvers.cc (original)
+++ trunk/getfem/tests/gmm_torture20_iterative_solvers.cc Tue Mar 15
15:45:03 2016
@@ -252,8 +252,8 @@
gmm::copy(m1, m3);
gmm::add(gmm::conjugated(m1), m3);
gmm::copy(m2, m1);
- gmm::cholesky_precond<MAT1> P6(m1);
- gmm::choleskyt_precond<MAT1> P7(m1, 10, prec);
+ gmm::ildlt_precond<MAT1> P6(m1);
+ gmm::ildltt_precond<MAT1> P7(m1, 10, prec);
if (!is_hermitian(m1, prec*R(100)))
GMM_ASSERT1(false, "The matrix is not hermitian");
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Getfem-commits] r5249 - in /trunk/getfem: src/ src/gmm/ tests/,
Yves . Renard <=