Go to the documentation of this file.
47 <<
"edges already calculated"
60 const label nThreads = 3 * omp_get_num_procs();
67 # pragma omp parallel num_threads(nThreads) if( faces.size() > 1000 )
73 # pragma omp for schedule(static)
77 const face&
f = faces[faceI];
81 const edge fe =
f.faceEdge(pI);
95 const face& of = faces[ofI];
116 nEdgesForThread[omp_get_thread_num()] = edgesHelper.
size();
118 nEdgesForThread[0] = edgesHelper.
size();
122 # pragma omp critical
124 nEdges += edgesHelper.
size();
141 const label threadI = omp_get_thread_num();
143 const label threadI = 0;
145 for(
label i=0;i<threadI;++i)
146 localStart += nEdgesForThread[i];
150 edgesPtr_->operator[](localStart+i) = edgesHelper[i];
162 if( omp_in_parallel() )
165 "const edgeList& polyMeshGenAddressing::edges() const"
166 ) <<
"Calculating addressing inside a parallel region."
void append(const T &e)
Append an element at the end of the list.
#define forAll(list, i)
Loop across all elements in list.
const polyMeshGenCells & mesh_
reference to the mesh
Template functions to aid in the implementation of demand driven data.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
label size() const
Size of the active part of the list.
const faceListPMG & faces() const
access to faces
label which(const label globalIndex) const
Navigation through face vertices.
label end() const
Return end vertex label.
void deleteDemandDrivenData(DataPtr &dataPtr)
const VRWGraph & pointFaces() const
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const VRWGraph & edgeFaces() const
#define forAllRow(graph, rowI, index)
edgeList * edgesPtr_
Edges.
errorManip< error > abort(error &err)
const double e
Elementary charge.
const edgeList & edges() const
Return mesh edges.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
errorManipArg< error, int > exit(error &err, const int errNo=1)
void setSize(const label)
Reset size of List.
void calcEdges() const
During edge calculation, a larger set of data is assembled.
label start() const
Return start vertex label.
label size() const
return the number of used elements
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void append(const label rowI, const label)
Append an element to the given row.
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
A face is a list of labels corresponding to mesh vertices.