22#ifdef DEAL_II_HAVE_UNISTD_H
45 std::lock_guard<std::mutex> lock(mutex);
50 <<
"---------------------------------------------------------"
52 <<
"In one of the sub-threads of this program, an exception\n"
53 <<
"was thrown and not caught. Since exceptions do not\n"
54 <<
"propagate to the main thread, the library has caught it.\n"
55 <<
"The information carried by this exception is given below.\n"
57 <<
"---------------------------------------------------------"
59 std::cerr <<
"Exception message: " << std::endl
60 <<
" " << exc.what() << std::endl
61 <<
"Exception type: " << std::endl
62 <<
" " <<
typeid(exc).name() << std::endl;
63 std::cerr <<
"Aborting!" << std::endl
64 <<
"---------------------------------------------------------"
84 std::lock_guard<std::mutex> lock(mutex);
89 <<
"---------------------------------------------------------"
91 <<
"In one of the sub-threads of this program, an exception\n"
92 <<
"was thrown and not caught. Since exceptions do not\n"
93 <<
"propagate to the main thread, the library has caught it.\n"
95 <<
"---------------------------------------------------------"
97 std::cerr <<
"Type of exception is unknown, but not std::exception.\n"
98 <<
"No additional information is available.\n"
99 <<
"---------------------------------------------------------"
108 std::vector<std::pair<unsigned int, unsigned int>>
110 const unsigned int end,
111 const unsigned int n_intervals)
115 const unsigned int n_elements =
end -
begin;
116 const unsigned int n_elements_per_interval = n_elements / n_intervals;
117 const unsigned int residual = n_elements % n_intervals;
119 std::vector<std::pair<unsigned int, unsigned int>> return_values(
122 return_values[0].first =
begin;
123 for (
unsigned int i = 0; i < n_intervals; ++i)
125 if (i != n_intervals - 1)
127 return_values[i].second =
128 (return_values[i].first + n_elements_per_interval);
134 ++return_values[i].second;
135 return_values[i + 1].first = return_values[i].second;
138 return_values[i].second =
end;
140 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)
VectorType::value_type * end(VectorType &V)
VectorType::value_type * begin(VectorType &V)
void abort(const ExceptionBase &exc) noexcept