[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Getfem-commits] r4539 - in /trunk/getfem/contrib: xfem_contact/xfem_dir
From: |
logari81 |
Subject: |
[Getfem-commits] r4539 - in /trunk/getfem/contrib: xfem_contact/xfem_dirichlet.cc xfem_stab_unilat_contact/xfem_stab_unilat_contact.cc |
Date: |
Fri, 14 Mar 2014 23:25:20 -0000 |
Author: logari81
Date: Sat Mar 15 00:25:20 2014
New Revision: 4539
URL: http://svn.gna.org/viewcvs/getfem?rev=4539&view=rev
Log:
fix few mistakes from recent metis migration
Modified:
trunk/getfem/contrib/xfem_contact/xfem_dirichlet.cc
trunk/getfem/contrib/xfem_stab_unilat_contact/xfem_stab_unilat_contact.cc
Modified: trunk/getfem/contrib/xfem_contact/xfem_dirichlet.cc
URL:
http://svn.gna.org/viewcvs/getfem/trunk/getfem/contrib/xfem_contact/xfem_dirichlet.cc?rev=4539&r1=4538&r2=4539&view=diff
==============================================================================
--- trunk/getfem/contrib/xfem_contact/xfem_dirichlet.cc (original)
+++ trunk/getfem/contrib/xfem_contact/xfem_dirichlet.cc Sat Mar 15 00:25:20 2014
@@ -467,8 +467,9 @@
cout<<"ratio size beween mesh and coarse mesh= "<< ratio_size <<endl;
+ int nparts = 1;
#if GETFEM_HAVE_METIS
- int nparts = int(size_of_crack/(ratio_size*h));
+ nparts = int(size_of_crack/(ratio_size*h));
# ifdef GETFEM_HAVE_METIS_OLD_API
std::vector<int> adjwgt(k); // actually Metis would also accept NULL instead
of an empty array
int wgtflag = 2, numflag = 0, edgecut;
@@ -487,7 +488,7 @@
int options[METIS_NOPTIONS] = { 0 };
METIS_SetDefaultOptions(options);
METIS_PartGraphRecursive(&ne, &ncon, &(xadj[0]), &(adjncy[0]), &(vwgt[0]),
0, 0,
- &nparts, 0, 0, options, &edgecut, &(npart[0]));
+ &nparts, 0, 0, options, &edgecut, &(part[0]));
# endif
//cout<<"size_of_mesh="<<h<<endl;
//cout<<"size_of_crack="<< size_of_crack <<endl;
@@ -880,8 +881,9 @@
scalar_type ratio_size = PARAM.real_value("RATIO_GR_MESH", "ratio size
between mesh and patches");
cout<<"ratio size beween mesh and coarse mesh= "<< ratio_size <<endl;
+ int nparts = 1;
#if GETFEM_HAVE_METIS
- int nparts=int(size_of_crack/(ratio_size*h));
+ nparts = int(size_of_crack/(ratio_size*h));
# ifdef GETFEM_HAVE_METIS_OLD_API
std::vector<int> adjwgt(k); // actually Metis would also accept NULL
instead of an empty array
int wgtflag = 2, numflag = 0, edgecut;
@@ -896,11 +898,11 @@
METIS_PartGraphRecursive(&ne, &(xadj[0]), &(adjncy[0]), &(vwgt[0]),
&(adjwgt[0]), &wgtflag,
&numflag, &nparts, options, &edgecut,
&(part[0]));
# else
- int ncon = 1, edgcut;
+ int ncon = 1, edgecut;
int options[METIS_NOPTIONS] = { 0 };
METIS_SetDefaultOptions(options);
METIS_PartGraphRecursive(&ne, &ncon, &(xadj[0]), &(adjncy[0]),
&(vwgt[0]), 0, 0,
- &nparts, 0, 0, options, &edgecut, &(npart[0]));
+ &nparts, 0, 0, options, &edgecut, &(part[0]));
# endif
//cout<<"size_of_mesh="<<h<<endl;
//cout<<"size_of_crack="<< size_of_crack <<endl;
Modified:
trunk/getfem/contrib/xfem_stab_unilat_contact/xfem_stab_unilat_contact.cc
URL:
http://svn.gna.org/viewcvs/getfem/trunk/getfem/contrib/xfem_stab_unilat_contact/xfem_stab_unilat_contact.cc?rev=4539&r1=4538&r2=4539&view=diff
==============================================================================
--- trunk/getfem/contrib/xfem_stab_unilat_contact/xfem_stab_unilat_contact.cc
(original)
+++ trunk/getfem/contrib/xfem_stab_unilat_contact/xfem_stab_unilat_contact.cc
Sat Mar 15 00:25:20 2014
@@ -521,7 +521,7 @@
int options[METIS_NOPTIONS] = { 0 };
METIS_SetDefaultOptions(options);
METIS_PartGraphRecursive(&ne, &ncon, &(xadj[0]), &(adjncy[0]), &(vwgt[0]),
0, 0,
- &nparts, 0, 0, options, &edgecut, &(npart[0]));
+ &nparts, 0, 0, options, &edgecut, &(part[0]));
# endif
//cout<<"size_of_mesh="<<h<<endl;
cout<<"size_of_crack="<< size_of_crack <<endl;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Getfem-commits] r4539 - in /trunk/getfem/contrib: xfem_contact/xfem_dirichlet.cc xfem_stab_unilat_contact/xfem_stab_unilat_contact.cc,
logari81 <=