ConditionalOStream pcout(std::cout,
(Utilities::MPI::this_mpi_process(MPI_COMM_WORLD)
== 0));
deallog.depth_console (0);
seventh_grid ();
pcout<<"Complete"<<std::endl;
}
A rough outline: on cycle 0, set up triangulation and second_triangulation, and solve on triangulation.
for cycle 1..n,
coarsen and refine triangulation. Solve on this new mesh. Then interpolate backwards to the previous mesh, which is held in second_triangulation.
coarsen and refine second_triangulation to now match triangulation.
end for
This works for me (8.3.pre) on a single process, but on two processes gives me
7th Starting
Cycle 0:
Cycle 1:
Number of active cells: 4
Number of degrees of freedom: 25
Solved in 1 iterations.
libc++abi.dylib: terminating with uncaught exception of type int
libc++abi.dylib: terminating with uncaught exception of type int
[host-119-96:18807] *** Process received signal ***
[host-119-96:18806] *** Process received signal ***
[host-119-96:18806] Signal: Abort trap: 6 (6)
[host-119-96:18806] Signal code: (0)
[host-119-96:18807] Signal: Abort trap: 6 (6)
[host-119-96:18807] Signal code: (0)
[host-119-96:18807] [ 0] 2 libsystem_platform.dylib 0x00007fff8f57ff1a _sigtramp + 26
[host-119-96:18807] [ 1] 3 ??? 0x00007fff5fbfc658 0x0 + 140734799791704
[host-119-96:18807] [ 2] 4 libsystem_c.dylib 0x00007fff8e6adb53 abort + 129
[host-119-96:18807] [ 3] 5 libc++abi.dylib 0x00007fff8ac48a21 __cxa_bad_cast + 0
[host-119-96:18807] [ 4] 6 libc++abi.dylib 0x00007fff8ac709d1 _ZL26default_unexpected_handlerv + 0
[host-119-96:18807] [ 5] 7 libobjc.A.dylib 0x00007fff847457eb _ZL15_objc_terminatev + 124
[host-119-96:18807] [ 6] 8 libc++abi.dylib 0x00007fff8ac6e0a1 _ZSt11__terminatePFvvE + 8
[host-119-96:18807] [ 7] 9 libc++abi.dylib 0x00007fff8ac6db30 _ZN10__cxxabiv1L22exception_cleanup_funcE19_Unwind_Reason_CodeP17_Unwind_Exception + 0
[host-119-96:18807] [ 8] 10 libepetra.11.dylib 0x0000000105853d15 _ZN15Epetra_BlockMap21ConstructUserVariableIiEEvT_iPKS1_PKiS1_RK11Epetra_Commb + 3845
[host-119-96:18807] [ 9] 11 libepetra.11.dylib 0x000000010584c49f _ZN15Epetra_BlockMapC1EiiPKiS1_iRK11Epetra_Comm + 111
[host-119-96:18807] [10] 12 libepetra.11.dylib 0x00000001058b6452 _ZN15Epetra_FEVector28createNonlocalMapAndExporterIiEEvv + 178
[host-119-96:18807] [11] 13 libepetra.11.dylib 0x00000001058b5953 _ZN15Epetra_FEVector14GlobalAssembleIiEEi18Epetra_CombineModeb + 99
[host-119-96:18807] [12] 14 libepetra.11.dylib 0x00000001058b4a6a _ZN15Epetra_FEVector14GlobalAssembleE18Epetra_CombineModeb + 58
[host-119-96:18807] [13] 15 libdeal_II.8.3.pre.dylib 0x000000010259e578 _ZN6dealii16TrilinosWrappers10VectorBase8compressENS_15VectorOperation6valuesE + 168
[host-119-96:18807] [14] 16 libdeal_II.8.3.pre.dylib 0x000000010230a3f1 _ZNK6dealii16ConstraintMatrix10distributeINS_16TrilinosWrappers3MPI6VectorEEEvRT_ + 1409
[host-119-96:18807] [15] 17 libdeal_II.8.3.pre.dylib 0x000000010123277b _ZN6dealii11VectorTools29interpolate_to_different_meshILi2ELi2ENS_10DoFHandlerENS_16TrilinosWrappers3MPI6VectorEEEvRKNS_12InterGridMapIT1_IXT_EXT0_EEEERKT2_RKNS_16ConstraintMatrixERSB_ + 667
[host-119-96:18807] [16] 18 libdeal_II.8.3.pre.dylib 0x0000000101231ffa _ZN6dealii11VectorTools29interpolate_to_different_meshILi2ELi2ENS_10DoFHandlerENS_16TrilinosWrappers3MPI6VectorEEEvRKT1_IXT_EXT0_EERKT2_S8_RS9_ + 314
[host-119-96:18807] [17] 19 step-32 0x0000000100005119 _ZN14SeventhProblemILi2EE3runEj + 1193
[host-119-96:18807] [18] 20 step-32 0x0000000100002a69 _Z12seventh_gridv + 329
[host-119-96:18807] [19] 21 step-32 0x0000000100002bbc main + 124
[host-119-96:18807] [20] 22 libdyld.dylib 0x00007fff83ac75c9 start + 1
[host-119-96:18807] [21] 23 ??? 0x0000000000000001 0x0 + 1
[host-119-96:18807] *** End of error message ***
[host-119-96:18806] [ 0] 2 libsystem_platform.dylib 0x00007fff8f57ff1a _sigtramp + 26
[host-119-96:18806] [ 1] 3 ??? 0x00007fff5fbfc658 0x0 + 140734799791704
[host-119-96:18806] [ 2] 4 libsystem_c.dylib 0x00007fff8e6adb53 abort + 129
[host-119-96:18806] [ 3] 5 libc++abi.dylib 0x00007fff8ac48a21 __cxa_bad_cast + 0
[host-119-96:18806] [ 4] 6 libc++abi.dylib 0x00007fff8ac709d1 _ZL26default_unexpected_handlerv + 0
[host-119-96:18806] [ 5] 7 libobjc.A.dylib 0x00007fff847457eb _ZL15_objc_terminatev + 124
[host-119-96:18806] [ 6] 8 libc++abi.dylib 0x00007fff8ac6e0a1 _ZSt11__terminatePFvvE + 8
[host-119-96:18806] [ 7] 9 libc++abi.dylib 0x00007fff8ac6db30 _ZN10__cxxabiv1L22exception_cleanup_funcE19_Unwind_Reason_CodeP17_Unwind_Exception + 0
[host-119-96:18806] [ 8] 10 libepetra.11.dylib 0x0000000105853d15 _ZN15Epetra_BlockMap21ConstructUserVariableIiEEvT_iPKS1_PKiS1_RK11Epetra_Commb + 3845
[host-119-96:18806] [ 9] 11 libepetra.11.dylib 0x000000010584c49f _ZN15Epetra_BlockMapC1EiiPKiS1_iRK11Epetra_Comm + 111
[host-119-96:18806] [10] 12 libepetra.11.dylib 0x00000001058b6452 _ZN15Epetra_FEVector28createNonlocalMapAndExporterIiEEvv + 178
[host-119-96:18806] [11] 13 libepetra.11.dylib 0x00000001058b5953 _ZN15Epetra_FEVector14GlobalAssembleIiEEi18Epetra_CombineModeb + 99
[host-119-96:18806] [12] 14 libepetra.11.dylib 0x00000001058b4a6a _ZN15Epetra_FEVector14GlobalAssembleE18Epetra_CombineModeb + 58
[host-119-96:18806] [13] 15 libdeal_II.8.3.pre.dylib 0x000000010259e578 _ZN6dealii16TrilinosWrappers10VectorBase8compressENS_15VectorOperation6valuesE + 168
[host-119-96:18806] [14] 16 libdeal_II.8.3.pre.dylib 0x000000010230a3f1 _ZNK6dealii16ConstraintMatrix10distributeINS_16TrilinosWrappers3MPI6VectorEEEvRT_ + 1409
[host-119-96:18806] [15] 17 libdeal_II.8.3.pre.dylib 0x000000010123277b _ZN6dealii11VectorTools29interpolate_to_different_meshILi2ELi2ENS_10DoFHandlerENS_16TrilinosWrappers3MPI6VectorEEEvRKNS_12InterGridMapIT1_IXT_EXT0_EEEERKT2_RKNS_16ConstraintMatrixERSB_ + 667
[host-119-96:18806] [16] 18 libdeal_II.8.3.pre.dylib 0x0000000101231ffa _ZN6dealii11VectorTools29interpolate_to_different_meshILi2ELi2ENS_10DoFHandlerENS_16TrilinosWrappers3MPI6VectorEEEvRKT1_IXT_EXT0_EERKT2_S8_RS9_ + 314
[host-119-96:18806] [17] 19 step-32 0x0000000100005119 _ZN14SeventhProblemILi2EE3runEj + 1193
[host-119-96:18806] [18] 20 step-32 0x0000000100002a69 _Z12seventh_gridv + 329
[host-119-96:18806] [19] 21 step-32 0x0000000100002bbc main + 124
[host-119-96:18806] [20] 22 libdyld.dylib 0x00007fff83ac75c9 start + 1
[host-119-96:18806] [21] 23 ??? 0x0000000000000001 0x0 + 1
[host-119-96:18806] *** End of error message ***
--------------------------------------------------------------------------
orterun noticed that process rank 0 with PID 18806 on node
host-119-96.eduroam-local.wifi.le.ac.uk exited on signal 6 (Abort trap: 6).
--------------------------------------------------------------------------
Hence my question about whether interpolate_to_different_mesh() will work with p::d::Triangulation on multiple processes!
Thanks,
Sam