OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

USERD_get_part_node_ids.H

Go to the documentation of this file.
00001 int USERD_get_part_node_ids
00002 (
00003     int part_number,
00004     int *nodeid_array
00005 )
00006 {
00007 #ifdef ENSIGHTDEBUG
00008     Info << "Entering: USERD_get_part_node_ids" << endl 
00009         << "part_number = " << part_number << endl 
00010         << flush;
00011 #endif
00012 
00013     if (part_number == 1)
00014     {
00015         for (label indx=0; indx<Num_global_nodes; indx++)
00016         {
00017             nodeid_array[indx] = indx + 1;
00018         }
00019     }
00020     else if  (part_number < nPatches+2)
00021     {
00022 
00023         label patchi = part_number-2;
00024         const polyBoundaryMesh& bMesh = meshPtr->boundaryMesh();
00025         const vectorField& points = bMesh[patchi].points();
00026 
00027         label nPoints = points.size();
00028         
00029         for (label indx=0; indx<nPoints; indx++)
00030         {
00031             nodeid_array[indx] = indx + 1;
00032         }
00033 
00034     }
00035     else if  (part_number == nPatches+2)
00036     {
00037         label indx = 0;
00038         for
00039         (
00040             Cloud<passiveParticle>::iterator elmnt = sprayPtr->begin();
00041             elmnt != sprayPtr->end();
00042             ++elmnt
00043         )
00044         {
00045              nodeid_array[indx] = indx + 1;
00046              indx++;
00047         }
00048     }
00049     else
00050     {
00051         return Z_ERR;
00052     }
00053 
00054 #ifdef ENSIGHTDEBUG
00055     Info << "Leaving: USERD_get_part_node_ids" << endl 
00056         << flush;
00057 #endif
00058 
00059     return Z_OK;
00060 }
Copyright © 2000-2009 OpenCFD Ltd