22#ifdef DEAL_II_HAVE_UNISTD_H
46 std::lock_guard<std::mutex> lock(mutex);
51 <<
"---------------------------------------------------------"
53 <<
"In one of the sub-threads of this program, an exception\n"
54 <<
"was thrown and not caught. Since exceptions do not\n"
55 <<
"propagate to the main thread, the library has caught it.\n"
56 <<
"The information carried by this exception is given below.\n"
58 <<
"---------------------------------------------------------"
60 std::cerr <<
"Exception message: " << std::endl
61 <<
" " << exc.what() << std::endl
62 <<
"Exception type: " << std::endl
63 <<
" " <<
typeid(exc).name() << std::endl;
64 std::cerr <<
"Aborting!" << std::endl
65 <<
"---------------------------------------------------------"
86 std::lock_guard<std::mutex> lock(mutex);
91 <<
"---------------------------------------------------------"
93 <<
"In one of the sub-threads of this program, an exception\n"
94 <<
"was thrown and not caught. Since exceptions do not\n"
95 <<
"propagate to the main thread, the library has caught it.\n"
97 <<
"---------------------------------------------------------"
99 std::cerr <<
"Type of exception is unknown, but not std::exception.\n"
100 <<
"No additional information is available.\n"
101 <<
"---------------------------------------------------------"
110 std::vector<std::pair<unsigned int, unsigned int>>
112 const unsigned int end,
113 const unsigned int n_intervals)
117 const unsigned int n_elements = end - begin;
118 const unsigned int n_elements_per_interval = n_elements / n_intervals;
119 const unsigned int residual = n_elements % n_intervals;
121 std::vector<std::pair<unsigned int, unsigned int>> return_values(
124 return_values[0].first = begin;
125 for (
unsigned int i = 0; i < n_intervals; ++i)
127 if (i != n_intervals - 1)
129 return_values[i].second =
130 (return_values[i].first + n_elements_per_interval);
136 ++return_values[i].second;
137 return_values[i + 1].first = return_values[i].second;
140 return_values[i].second = end;
142 return return_values;
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define Assert(cond, exc)
static ::ExceptionBase & ExcInternalError()
std::vector< std::pair< unsigned int, unsigned int > > split_interval(const unsigned int begin, const unsigned int end, const unsigned int n_intervals)
void handle_unknown_exception()
void handle_std_exception(const std::exception &exc)