[MOAB-dev] commit/MOAB: rajeeja: o Update Doxygen Comments and add make rule for TestExodusII example
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Tue Apr 9 15:05:49 CDT 2013
1 new commit in MOAB:
https://bitbucket.org/fathomteam/moab/commits/b898fc1830f0/
Changeset: b898fc1830f0
Branch: master
User: rajeeja
Date: 2013-04-09 22:04:36
Summary: o Update Doxygen Comments and add make rule for TestExodusII example
Affected #: 5 files
diff --git a/.gitignore b/.gitignore
index 52cd4d2..6d29b5e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,11 @@
MOABConfig.cmake
+moab.files
+config/test-driver
moab.config
+moab.includes
+moab.creator*
+*.ccm
+*.cub
aclocal.m4
autom4te.cache/
config.h
@@ -68,6 +74,7 @@ share/*
bin/*
*~
examples/HelloMoabPar
+examples/TestExodusII
itaps/igeom/FBiGeom_protos.h
itaps/igeom/testSmooth2
itaps/igeom/testSmoothGeom
diff --git a/examples/HelloMoabPar.cpp b/examples/HelloMoabPar.cpp
index cf308a7..a5a71aa 100644
--- a/examples/HelloMoabPar.cpp
+++ b/examples/HelloMoabPar.cpp
@@ -1,18 +1,18 @@
/** @example HelloMoabPar.cpp \n
* \brief Read mesh into MOAB in parallel \n
- * This example shows the simplest way of telling MOAB to read in parallel. \n
+ * This example shows the simplest way of telling MOAB to read in parallel.
*
- * 0. Initialize MPI and get the rank and number of processors \n
- * 1. Process arguments (file name and options for parallel read) \n
- * 2. Initialize MOAB \n
- * 3. Load a partitioned file in parallel; \n
- * 4. retrieve shared entities on each processor \n
- * 5. Filter owned entities among shared ones on each processor \n
- * 6. Exchange ghost layers, and repeat the reports \n
+ * -# Initialize MPI and get the rank and number of processors \n
+ * -# Process arguments (file name and options for parallel read) \n
+ * -# Initialize MOAB \n
+ * -# Load a partitioned file in parallel; \n
+ * -# retrieve shared entities on each processor \n
+ * -# Filter owned entities among shared ones on each processor \n
+ * -# Exchange ghost layers, and repeat the reports \n
*
- * To compile: \n
+ * <b>To compile</b>: \n
* make HelloMoabPar MOAB_DIR=<installdir> \n
- * To run: mpiexec -np 4 HelloMoabPar \n
+ * <b>To run</b>: mpiexec -np 4 HelloMoabPar \n
* (depending on your configuration, LD_LIBRARY_PATH may need to contain <hdf5>/lib folder)
*
*/
diff --git a/examples/ReduceExchangeTags.cpp b/examples/ReduceExchangeTags.cpp
index 4fb657b..6c2e7de 100644
--- a/examples/ReduceExchangeTags.cpp
+++ b/examples/ReduceExchangeTags.cpp
@@ -1,27 +1,27 @@
-/** \example ReduceExchangeTags ReduceExchangeTags.cpp
+/** @example ReduceExchangeTags.cpp
* \brief Example program that shows the use case for performing tag data exchange
* between parallel processors in order to sync data on shared entities. The reduction
* operation on tag data is also shown where the user can perform any of the actions supported
- * by MPI_Op on data residing on shared entities.
+ * by MPI_Op on data residing on shared entities. \n
*
- * This example:
- * 0. Initialize MPI and instantiate MOAB
- * 1. Get user options: Input mesh file name, tag name (default: USERTAG), tag value (default: 1.0)
- * 2. Create the root and partition sets
- * 3. Instantiate ParallelComm and read the mesh file in parallel using appropriate options
- * 4. Create two tags: USERTAG_EXC (exchange) and USERTAG_RED (reduction)
- * 5. Set tag data and exchange shared entity information between processors
- * 5a. Get entities in all dimensions and set local (current rank, dimension) dependent data for
+ * <b>This example </b>:
+ * -# Initialize MPI and instantiate MOAB
+ * -# Get user options: Input mesh file name, tag name (default: USERTAG), tag value (default: 1.0)
+ * -# Create the root and partition sets
+ * -# Instantiate ParallelComm and read the mesh file in parallel using appropriate options
+ * -# Create two tags: USERTAG_EXC (exchange) and USERTAG_RED (reduction)
+ * -# Set tag data and exchange shared entity information between processors
+ * -# Get entities in all dimensions and set local (current rank, dimension) dependent data for
* exchange tag (USERTAG_EXC)
- * 5b. Perform exchange of tag data so that data on shared entities are synced via ParallelCommunicator.
- * 6. Set tag data and reduce shared entity information between processors using MPI_SUM
- * 6a. Get higher dimensional entities in the current partition and set local (current rank)
+ * -# Perform exchange of tag data so that data on shared entities are synced via ParallelCommunicator.
+ * -# Set tag data and reduce shared entity information between processors using MPI_SUM
+ * -# Get higher dimensional entities in the current partition and set local (current rank)
* dependent data for reduce tag (USERTAG_EXC)
- * 6b. Perform the reduction operation (MPI_SUM) on shared entities via ParallelCommunicator.
- * 7. Destroy the MOAB instance and finalize MPI
+ * -# Perform the reduction operation (MPI_SUM) on shared entities via ParallelCommunicator.
+ * -# Destroy the MOAB instance and finalize MPI
*
- * To run: mpiexec -n 2 ./ReduceExchangeTags <mesh_file><tag_name><tag_value>
- * Example: mpiexec -n 2 ./ReduceExchangeTags ../MeshFiles/unittest/64bricks_1khex.h5m USERTAG 100
+ * <b>To run:</b> \n mpiexec -n 2 ./ReduceExchangeTags <mesh_file><tag_name><tag_value> \n
+ * <b>Example:</b> \n mpiexec -n 2 ./ReduceExchangeTags ../MeshFiles/unittest/64bricks_1khex.h5m USERTAG 100 \n
*
*/
diff --git a/examples/TestExodusII.cpp b/examples/TestExodusII.cpp
index d353117..c425f66 100644
--- a/examples/TestExodusII.cpp
+++ b/examples/TestExodusII.cpp
@@ -1,9 +1,28 @@
/** @example TestExodusII.cpp
- * TestExodusII example demonstrates how to retrieve material, dirichlet and neumann sets from an Exodus file
- * Sets are traversed to find out the number of entities contained in each set.
- * The entities contained in each set are retrieved, using a Boolean flag to indicate that any contained sets
- * should be traversed recursively to include non-set entities in the results. */
-
+ * This example demonstrates how to retrieve material, dirichlet and neumann sets
+ * from an ExodusII file. \n
+ * Sets in MOAB contain entities and have a tag on them to give meaning to the entities.
+ * Tag names: MATERIAL_SET", "DIRICHLET_SET" and "NEUMANN_SET" are reserved and
+ * are associated with their corresponding entity sets.
+ * Sets are traversed to find out the type number of entities contained in each set. \n
+ *
+ * <b>Steps in this example </b>:
+ * -# Instantiate MOAB
+ * -# Get input mesh file name and load it.
+ * -# Loop over the three sets: material, dirichlet and neumann
+ * -# Get TagHandle and EntitySet(corresponding to the TagHandle)
+ * -# Loop thru all the EntitySet's
+ * -# Get the set id and entities in this set
+ * -# Destroy the MOAB instance
+ *
+ *
+ * <b> To compile: </b>
+ * make TestExodusII MOAB_DIR=<installdir> \n
+ *
+ * <b> To run: </b>
+ * -# TestExodusII <mesh-file> \n
+ * -# TestExodusII (This uses the default <mesh-file>: <MOAB_SRC_DIR>/MeshFiles/unittest/mbtest2.g)
+ */
#include <iostream>
// Include header for MOAB instance and range
@@ -15,7 +34,7 @@ int main(int argc, char **argv) {
moab::Interface *mb = new moab::Core();
// If no input is specified load ../MeshFiles/unittest/mbtest2.g
- const char* test_file_name = std::string("../MeshFiles/unittest/mbtest2.g");
+// const char* test_file_name = "../MeshFiles/unittest/mbtest2.g";
// get the material set tag handle
moab::Tag mtag;
@@ -25,11 +44,12 @@ int main(int argc, char **argv) {
if (argc == 1) {
std::cout << "Running default case, loading ../MeshFiles/unittest/mbtest2.g" << std::endl;
- std::cout << "Usage: " << argv[0] << " <filename>" << std::endl;
+ std::cout << "Usage: " << argv[0] << " <filename>\n" << std::endl;
rval = mb->load_file("../MeshFiles/unittest/mbtest2.g");
}
else{
rval = mb->load_file(argv[argc-1]);
+ std::cout << "Loaded mesh file: " << argv[argc-1] << std::endl;
}
// loop over set types
@@ -59,15 +79,11 @@ int main(int argc, char **argv) {
std::cout << tag_nms[i] << " " << set_id << " has "
<< set_ents.size() << " entities:" << std::endl;
+
+ // print the entities contained in this set
set_ents.print(" ");
set_ents.clear();
}
}
-
- // do the same for all sets
- sets.clear();
- rval = mb->get_entities_by_type(0, moab::MBENTITYSET, sets);
- if (moab::MB_SUCCESS != rval) return 1;
-
delete mb;
}
diff --git a/examples/makefile b/examples/makefile
index e1b8ef0..dcf7029 100644
--- a/examples/makefile
+++ b/examples/makefile
@@ -17,6 +17,9 @@ ReduceExchangeTags : ReduceExchangeTags.o
HelloMoabPar: HelloMoabPar.o
${MOAB_CXX} -o $@ $< ${MOAB_LIBS_LINK}
+
+TestExodusII: TestExodusII.o
+ ${MOAB_CXX} -o $@ $< ${MOAB_LIBS_LINK}
.cpp.o :
${MOAB_CXX} ${MOAB_CXXFLAGS} ${MOAB_INCLUDES} -DMESH_DIR=\"${MESH_DIR}\" -c $<
Repository URL: https://bitbucket.org/fathomteam/moab/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the moab-dev
mailing list