[MOAB-dev] r5841 - in MOAB/trunk: src/io tools/mbcoupler

Iulian Grindeanu iulian at mcs.anl.gov
Tue Oct 30 10:59:51 CDT 2012


Hi Tim, 
How was Boulder trip? 
I think that this portion of the code assumes that NP=4 (so, the spectral order is 3) 
... 
// read connectivity into that space 
if (!spectral_mesh) 
std::copy(&tmp_conn[start_idx], &tmp_conn[start_idx+4*num_fine_quads], conn_arr); 
else { 
const unsigned int permute_array[] = 
{0, 25, 34, 11, // corner nodes 
1, 13, 26, 30, 22, 23, 8, 4, // edge nodes 
15, 17, 18, 19 // interior nodes 
}; 
int f = start_idx; 
for (int c = 0; c < num_coarse_quads; c++) { 
for (int i = 0; i < verts_per_quad; i++) 
conn_arr[i] = tmp_conn[f+permute_array[i]]; 
f += 4*spectral_unit; 
conn_arr += verts_per_quad; 
} 
conn_arr -= 4*spectral_unit*num_coarse_quads; 
} 

I think they use 4 most of the time, but should it be more general or not? 

So should I work with coarse or fine grid, for ACES4BGC ? 

Iulian 


----- Original Message -----

| Author: tautges

| Date: 2012-10-30 10:20:17 -0500 (Tue, 30 Oct 2012)

| New Revision: 5841


| Modified:

| MOAB/trunk/src/io/ReadNC.cpp

| MOAB/trunk/src/io/ReadNC.hpp

| MOAB/trunk/tools/mbcoupler/Coupler.cpp

| MOAB/trunk/tools/mbcoupler/Coupler.hpp

| Log:

| Backing up some changes in ReadNC towards an option to create coarse,

| true spectral elements, instead of fine linear hexes from a spectral
| mesh.


| In Coupler, some fixes for locate_points that I'd made some time back
| but

| hadn't committed.


| Passes make check, serial and parallel.




| Modified: MOAB/trunk/src/io/ReadNC.cpp

| ===================================================================

| --- MOAB/trunk/src/io/ReadNC.cpp 2012-10-30 05:50:06 UTC (rev 5840)

| +++ MOAB/trunk/src/io/ReadNC.cpp 2012-10-30 15:20:17 UTC (rev 5841)

| @@ -34,8 +34,9 @@


| ReadNC::ReadNC(Interface* impl) :

| mbImpl(impl), CPU_WORD_SIZE(-1), IO_WORD_SIZE(-1), fileId(-1),
| tMin(-1), tMax(-1), iDim(-1), jDim(-1), tDim(-1), iCDim(-1),

| - jCDim(-1), numUnLim(-1), mCurrentMeshHandle(0), startVertex(0),
| startElem(0), mGlobalIdTag(0), max_line_length(-1),

| - max_str_length(-1), vertexOffset(0), dbgOut(stderr),
| isParallel(false), partMethod(-1), ucdMesh(false), npMesh(false)

| + jCDim(-1), numUnLim(-1), mCurrentMeshHandle(0), startVertex(0),
| startElem(0), mGlobalIdTag(0), max_line_length(-1),

| + max_str_length(-1), vertexOffset(0), dbgOut(stderr),
| isParallel(false), partMethod(-1), camType(NOT_CAM), isCf(false),

| + spectralOrder(-1), npMesh(false)


| #ifdef USE_MPI

| , myPcomm(NULL)

| @@ -80,8 +81,6 @@

| dbgOut = stderr;

| mCurrentMeshHandle = 0;

| vertexOffset = 0;

| - ucdMesh = false;

| - npMesh = false;


| #ifdef USE_MPI

| myPcomm = NULL;

| @@ -112,9 +111,9 @@

| return rval;

| }


| - bool nomesh = false, novars = false;

| + bool nomesh = false, novars = false, spectral_mesh = false;

| std::string partition_tag_name;

| - rval = parse_options(opts, var_names, tstep_nums, tstep_vals,
| nomesh, novars, partition_tag_name);

| + rval = parse_options(opts, var_names, tstep_nums, tstep_vals,
| nomesh, novars, spectral_mesh, partition_tag_name);

| ERRORR(rval, "Trouble parsing option string.");


| // Open the file

| @@ -155,27 +154,6 @@

| rval = read_header();

| ERRORR(rval, " ");


| - // check if CF convention is being followed

| - std::string attname;

| - std::map<std::string, AttData>::iterator attIt =
| globalAtts.find("conventions");

| - if (attIt == globalAtts.end()) {

| - attIt = globalAtts.find("Conventions");

| - attname = std::string("Conventions");

| - }

| - else

| - attname = std::string("conventions");

| - if (attIt == globalAtts.end())



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/moab-dev/attachments/20121030/bf5fbbfb/attachment.html>


More information about the moab-dev mailing list