[MOAB-dev] r4072 - MOAB/trunk/tools/mbcoupler
smithrm at mcs.anl.gov
smithrm at mcs.anl.gov
Wed Aug 4 16:05:29 CDT 2010
Author: smithrm
Date: 2010-08-04 16:05:28 -0500 (Wed, 04 Aug 2010)
New Revision: 4072
Added:
MOAB/trunk/tools/mbcoupler/ssn_test.cpp
Modified:
MOAB/trunk/tools/mbcoupler/Coupler.cpp
MOAB/trunk/tools/mbcoupler/Coupler.hpp
MOAB/trunk/tools/mbcoupler/Makefile.am
Log:
Initial version of subset normalization.
- Skeleton for full normalization function
- Subset selection method done
The method signatures will be updated before the final version is complete.
Modified: MOAB/trunk/tools/mbcoupler/Coupler.cpp
===================================================================
--- MOAB/trunk/tools/mbcoupler/Coupler.cpp 2010-08-02 16:25:12 UTC (rev 4071)
+++ MOAB/trunk/tools/mbcoupler/Coupler.cpp 2010-08-04 21:05:28 UTC (rev 4072)
@@ -4,6 +4,7 @@
#include "moab/GeomUtil.hpp"
#include "ElemUtil.hpp"
#include "moab/CN.hpp"
+#include "iMesh_extensions.h"
#include "iostream"
extern "C"
@@ -19,8 +20,13 @@
#include "assert.h"
+#define ERROR(a) {if (iBase_SUCCESS != err) std::cerr << a << std::endl;}
+#define ERRORR(a,b) {if (iBase_SUCCESS != err) {std::cerr << a << std::endl; return b;}}
+
namespace moab {
+bool debug = false;
+
Coupler::Coupler(Interface *impl,
ParallelComm *pc,
Range &local_elems,
@@ -90,7 +96,11 @@
result = myTree->get_tree_box(localRoot, &allBoxes[6*my_rank], &allBoxes[6*my_rank+3]);
// now communicate to get all boxes
- int mpi_err = MPI_Allgather(&allBoxes[6*my_rank], 6, MPI_DOUBLE,
+// int mpi_err = MPI_Allgather(&allBoxes[6*my_rank], 6, MPI_DOUBLE,
+// &allBoxes[0], 6, MPI_DOUBLE,
+// myPc->proc_config().proc_comm());
+ // Change to use "in place" option
+ int mpi_err = MPI_Allgather(MPI_IN_PLACE, 0, MPI_DATATYPE_NULL,
&allBoxes[0], 6, MPI_DOUBLE,
myPc->proc_config().proc_comm());
@@ -509,4 +519,449 @@
return MB_SUCCESS;
}
-} // namespace moab
+// Normalize a field over the subset of entities identified by the tags and values passed
+int Coupler::normalize_subset(iBase_EntitySetHandle &m1_root_set,
+ iBase_EntitySetHandle &m2_root_set,
+ const char *norm_tag,
+ const char **tag_names,
+ int num_tags,
+ const char **tag_values,
More information about the moab-dev
mailing list