~njansson/dolfin/hpc

« back to all changes in this revision

Viewing changes to dolfin/mesh/MeshOrdering.cpp

  • Committer: Johannes Ring
  • Date: 2008-03-05 22:43:06 UTC
  • Revision ID: johannr@simula.no-20080305224306-2npsdyhfdpl2esji
The BIG commit!

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright (C) 2007 Anders Logg.
 
2
// Licensed under the GNU LGPL Version 2.1.
 
3
//
 
4
// First added:  2007-01-30
 
5
// Last changed: 2007-05-16
 
6
 
 
7
#include <dolfin/log/log.h>
 
8
#include "Mesh.h"
 
9
#include "Cell.h"
 
10
#include "MeshOrdering.h"
 
11
 
 
12
using namespace dolfin;
 
13
 
 
14
//-----------------------------------------------------------------------------
 
15
void MeshOrdering::order(Mesh& mesh)
 
16
{
 
17
  message("Ordering mesh entities...");
 
18
 
 
19
  // Get cell type
 
20
  const CellType& cell_type = mesh.type();
 
21
 
 
22
  // Iterate over all cells and order the mesh entities locally
 
23
  for (CellIterator cell(mesh); !cell.end(); ++cell)
 
24
  {
 
25
    cell_type.orderEntities(*cell);
 
26
  }
 
27
}
 
28
//-----------------------------------------------------------------------------