~njansson/dolfin/hpc

« back to all changes in this revision

Viewing changes to src/kernel/ode/MultiAdaptiveNewtonSolver.cpp

  • Committer: logg
  • Date: 2005-06-16 07:41:55 UTC
  • Revision ID: devnull@localhost-20050616074155-xd23q7rttw048a2a
Tailorized "2005-06-16 02:41:54 by logg"
Added computation of multi-adaptive efficiency index (maximum theoretical
speedup for multi-adaptive solver).

Also added the script meshindex.m to compute an approximate efficiency
index for a given mesh. Turns out that it's a little tricky to create
a mesh with an efficiency index >> 1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
//-----------------------------------------------------------------------------
27
27
MultiAdaptiveNewtonSolver::~MultiAdaptiveNewtonSolver()
28
28
{
 
29
  // Compute multi-adaptive efficiency index
 
30
  const real alpha = num_elements_mono / static_cast<real>(num_elements);
 
31
  dolfin_info("Multi-adaptive efficiency index: %.3f.", alpha);
 
32
  
29
33
  // Delete local array
30
34
  if ( f ) delete [] f;
31
 
 
 
35
}
 
36
//-----------------------------------------------------------------------------
 
37
void MultiAdaptiveNewtonSolver::end()
 
38
{
 
39
  num_elements += ts.ne;
 
40
  num_elements_mono += ts.length() / ts.kmin * static_cast<real>(ts.ode.size());
32
41
}
33
42
//-----------------------------------------------------------------------------
34
43
void MultiAdaptiveNewtonSolver::start()