~njansson/dolfin/hpc

« back to all changes in this revision

Viewing changes to src/demo/solvers/ode/wave/main.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:
206
206
{
207
207
  dolfin_set("method", "mcg");
208
208
  dolfin_set("fixed time step", true);
209
 
  dolfin_set("save solution", false);
 
209
  dolfin_set("save solution", true);
210
210
  dolfin_set("monitor convergence", true);
211
211
  dolfin_set("partitioning threshold", 0.5);
212
212
 
213
213
  //UnitSquare mesh(32, 32);
214
 
  //Mesh mesh("cylinder.xml.gz");
 
214
  Mesh mesh("cylinder.xml.gz");
 
215
  
 
216
  /*
 
217
  for (unsigned int i = 0; i < 3; i++)
 
218
  {
 
219
    mesh.cell(0).mark();
 
220
    mesh.refine();
 
221
  }
 
222
  */
 
223
 
215
224
  //mesh.refineUniformly();
216
 
  Mesh mesh("cylinder_small.xml");
217
 
  WaveEquation ode(mesh);
 
225
  //Mesh mesh("cylinder_small.xml");
 
226
  //WaveEquation ode(mesh);
218
227
  
219
 
  ode.solve();
 
228
  File file("mesh.m");
 
229
  file << mesh;
 
230
 
 
231
  //ode.solve();
220
232
 
221
233
  return 0;
222
234
}