Closed solin closed 13 years ago
Sometimes, I also get this error (at random):
I ---- Adaptivity step 2: I Projecting previous fine mesh solution to obtain initial vector on new fine mesh. E Meshes not compatible in Traverse::begin().
Also 22, 23 and 24 have a similar problem. There seems to be something wrong with Solution::copy(), see below.
This application uses Hermes.
Hermes is a C++ library for rapid
development of adaptive FEM and hp-FEM solvers developed by the hp-FEM group at UNR and distributed under the GPL license.
I ndof = 49. I Projecting initial condition to obtain initial vector for the Newton's method. I Solving on coarse mesh: I ---- Newton iter 1, ndof 49, res. l2 norm 2.03959 I ---- Newton iter 2, ndof 49, res. l2 norm 0.00424856 I Time step 1, adaptivity step 1: I Projecting coarse mesh solution to obtain coefficient vector on new fine mesh. I Solving on fine mesh: I ---- Newton iter 1, ndof 529, res. l2 norm 0.646282 I ---- Newton iter 2, ndof 529, res. l2 norm 0.000874644 I Projecting reference solution on coarse mesh. I Calculating error estimate. I ndof: 49, ref_ndof: 529, err_est_rel: 45.6363% I Adapting the coarse mesh. I Projecting fine mesh solution on new coarse mesh. I Time step 1, adaptivity step 2: I Projecting previous fine mesh solution to obtain coefficient vector on new fine mesh. I Solving on fine mesh: I ---- Newton iter 1, ndof 769, res. l2 norm 0.0106566 I Projecting reference solution on coarse mesh. I Calculating error estimate. I ndof: 89, ref_ndof: 769, err_est_rel: 4.86199% I Projecting fine mesh solution on new coarse mesh. terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc
Abort caught. Printing stacktrace:
Traceback (most recent call last):
File unknown, in _start()
File unknown, in libc_start_main()
File "/home/pavel/hermes/hermes2d/tutorial/24-newton-timedep-gp-adapt/main.cpp", line 362, in main()
sln_prev_time.copy(&refsln);
File "/home/pavel/hermes/hermes2d/src/solution.cpp", line 250, in Solution::copy(Solution const)
mesh->copy(sln->mesh);
File "/home/pavel/hermes/hermes2d/src/mesh.cpp", line 916, in Mesh::copy(Mesh const)
HashTable::copy(mesh);
File "/home/pavel/hermes/hermes2d/src/hash.cpp", line 62, in HashTable::copy(HashTable const)
nodes.copy(ht->nodes);
File "/home/pavel/hermes/hermes2d/src/array.h", line 62, in Array
Done. Aborted
Example ns-timedep-adapt joints the list:
W None of the elements selected for refinement could be refined. Adaptivity step not successful, returning 'true'. terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc
Abort caught. Printing stacktrace:
Traceback (most recent call last):
File unknown, in _start()
File unknown, in libc_start_main()
File "/home/pavel/hermes/hermes2d/examples/ns-timedep-adapt/main.cpp", line 370, in main()
xvel_prev_time.copy(&xvel_refsln);
File "/home/pavel/hermes/hermes2d/src/solution.cpp", line 250, in Solution::copy(Solution const)
mesh->copy(sln->mesh);
File "/home/pavel/hermes/hermes2d/src/mesh.cpp", line 916, in Mesh::copy(Mesh const)
HashTable::copy(mesh);
File "/home/pavel/hermes/hermes2d/src/hash.cpp", line 62, in HashTable::copy(HashTable const)
nodes.copy(ht->nodes);
File "/home/pavel/hermes/hermes2d/src/array.h", line 62, in Array
Done. Aborted
Example richards-seepage-adapt also fails, with a bit different stacktrace:
This application uses Hermes.
Hermes is a C++ library for rapid
development of adaptive FEM and hp-FEM solvers developed by the hp-FEM group at UNR and distributed under the GPL license.
I ndof = 33. I Mesh adaptivity to an exact function: I Step 1, ndof 33, proj_error 1.9602e-12% I Projecting initial condition to obtain coefficient vector for Newton on coarse mesh. I ---- Time step 1: I ---- Time step 1, adaptivity step 1: I Projecting coarse mesh solution to obtain initial vector on new fine mesh. I Solving nonlinear problem: I ---- Newton iter 1, ndof 420, res. l2 norm 0.102447 I ---- Newton iter 2, ndof 420, res. l2 norm 0.000714751 I ---- Newton iter 3, ndof 420, res. l2 norm 3.43189e-08 I Projecting fine mesh solution on coarse mesh for error calculation. I Calculating error estimate. I ndof_coarse: 33, ndof_fine: 420, space_err_est_rel: 2.12241% I Adapting coarse mesh. I ---- Time step 1, adaptivity step 2: I Projecting previous fine mesh solution to obtain initial vector on new fine mesh.
Segfault caught. Printing stacktrace:
Traceback (most recent call last):
File unknown, in _start()
File unknown, in libc_start_main()
File "/home/pavel/hermes/hermes2d/examples/richards-seepage-adapt/main.cpp", line 339, in main()
OGProjection::project_global(ref_space, &ref_sln, coeff_vec, matrix_solver);
File "/home/pavel/hermes/hermes2d/src/ogprojection.cpp", line 95, in OGProjection::projectglobal(Tuple<Space>, Tuple<MeshFunction>, double, MatrixSolverType, Tuple
Done. Exiting the program. Aborted
Example richards-tracy-adapt fails with
E Meshes not compatible in Traverse::begin().
Yes, I already fixed everything described here.
Thanks. I tried to close this issue but I only see a "Comment" button, not "Comment and Close".
I closed it I think.
The error message is:
E Invalid element ID 0, current range: [0; 0]