~njansson/dolfin/hpc

« back to all changes in this revision

Viewing changes to src/kernel/fem/NewFEM.cpp

  • Committer: logg
  • Date: 2005-02-01 08:45:39 UTC
  • Revision ID: devnull@localhost-20050201084539-iipfjc00b32la5qc
Tailorized "2005-02-01 02:45:39 by logg"
Updates for new version of FFC, including work on functions (coefficients).
The remaining showstopper is getting FFC to correctly count and number
the coefficients of a form.

For testing, see the Poisson module. To get functions working, Form needs
to be initialized with the correct number of functions and each function
needs to be added (in the correct order) using Form::add(). This will
create a coupling between functions and coefficients.

Show diffs side-by-side

added added

removed removed

Lines of Context:
117
117
 
118
118
    // Compute mapping from local to global degrees of freedom
119
119
    for (unsigned int i = 0; i < n; i++)
120
 
      dofs[i] = element.dof(i, *cell);
 
120
      dofs[i] = element.dof(i, *cell, mesh);
121
121
    
122
122
    // Add element matrix to global matrix
123
123
    A.add(block, dofs, n, dofs, n);
200
200
 
201
201
    // Compute mapping from local to global degrees of freedom
202
202
    for (unsigned int i = 0; i < n; i++)
203
 
      dofs[i] = element.dof(i, *cell);
 
203
      dofs[i] = element.dof(i, *cell, mesh);
204
204
    
205
205
    // Add element matrix to global matrix
206
206
    A.add(block, dofs, n, dofs, n);
254
254
 
255
255
    // Compute mapping from local to global degrees of freedom
256
256
    for (unsigned int i = 0; i < n; i++)
257
 
      dofs[i] = element.dof(i, *cell);
 
257
      dofs[i] = element.dof(i, *cell, mesh);
258
258
    
259
259
    // Add element matrix to global matrix
260
260
    b.add(block, dofs, n);
282
282
  {
283
283
    for (uint i = 0; i < element.spacedim(); i++)
284
284
    {
285
 
      uint dof = element.dof(i, *cell);
 
285
      uint dof = element.dof(i, *cell, mesh);
286
286
      if ( dof > dofmax )
287
287
        dofmax = dof;
288
288
    }