namespace internal
{
- const std::array<std::string, 4> default_list_separator {{"," , ";" , "|" , "%"}};
- const std::array<std::string, 4> default_map_separator {{":" , "=" , "@" , "#"}};
+ const std::array<std::string, 4> default_list_separator {{",", ";", "|", "%"}};
+ const std::array<std::string, 4> default_map_separator {{":", "=", "@", "#"}};
//specialize a type for all of the STL containers and maps
template <typename T> struct is_list_compatible : std::false_type {};
* Move assignment operator. This assigns a new value to the table entry at the
* current row and column coordinates.
*/
- const Accessor<T, false> &operator = (T&&) const;
+ const Accessor<T, false> &operator = (T &&) const;
/**
* Since we overload value() we have to explicitly use the base class
template<typename ADNumberType>
static void
independent_variable(const ScalarType &in,
- const unsigned int ,
- const unsigned int ,
+ const unsigned int,
+ const unsigned int,
ADNumberType &out)
{
out = in;
template<typename ScalarType>
static void
independent_variable(const ScalarType &in,
- const unsigned int ,
- const unsigned int ,
+ const unsigned int,
+ const unsigned int,
ADNumberType &out)
{
AssertThrow(false, ExcMessage("Marking for complex numbers has not yet been implemented."));
*/
static void
independent_variable(const scalar_type &in,
- const unsigned int ,
- const unsigned int ,
+ const unsigned int,
+ const unsigned int,
ADNumberType &out)
{
out <<= in;
static void
independent_variable(const scalar_type &in,
const unsigned int index,
- const unsigned int ,
+ const unsigned int,
ADNumberType &out)
{
// It is important that the tapeless variables have their values set
/* --- Complex double --- */
template <>
- struct ProductTypeImpl<std::complex<double> ,std::complex<adouble> >
+ struct ProductTypeImpl<std::complex<double>,std::complex<adouble> >
{
typedef std::complex<adouble> type;
};
};
template <>
- struct ProductTypeImpl<std::complex<adub> ,std::complex<adouble> >
+ struct ProductTypeImpl<std::complex<adub>,std::complex<adouble> >
{
typedef std::complex<adouble> type;
};
/* --- Complex float --- */
template <>
- struct ProductTypeImpl<std::complex<float> ,std::complex<adouble> >
+ struct ProductTypeImpl<std::complex<float>,std::complex<adouble> >
{
typedef std::complex<adouble> type;
};
Number *gradients_quad,
Number *hessians_quad,
Number *,
- const bool ,
+ const bool,
const bool evaluate_gradients,
const bool evaluate_hessians)
{
*src[comp], values_dofs[comp],
vector_selector);
else
- operation.process_dofs_vectorized_transpose(data->dofs_per_component_on_cell*
+ operation.process_dofs_vectorized_transpose(data->dofs_per_component_on_cell *
n_components,
dof_indices, *src[0],
&values_dofs[0][0],
if (update_flags & update_quadrature_points)
face_data_by_cells[my_q].quadrature_points.
- resize_fast(cell_type.size()*GeometryInfo<dim>::faces_per_cell*
+ resize_fast(cell_type.size()*GeometryInfo<dim>::faces_per_cell *
face_data_by_cells[my_q].descriptor[0].n_q_points);
}
template <int dim, typename VectorStruct, typename Number>
void update_ghost_values_start_block (const VectorStruct &,
- const unsigned int ,
+ const unsigned int,
std::integral_constant<bool,false>,
VectorDataExchange<dim,Number> &)
{}
{}
template <int dim, typename VectorStruct, typename Number>
void update_ghost_values_finish_block (const VectorStruct &,
- const unsigned int ,
+ const unsigned int,
std::integral_constant<bool,false>,
VectorDataExchange<dim,Number> &)
{}
template <int dim, typename VectorStruct, typename Number>
void compress_start_block (const VectorStruct &,
- const unsigned int ,
+ const unsigned int,
std::integral_constant<bool,false>,
VectorDataExchange<dim,Number> &)
{}
template <int dim, typename VectorStruct, typename Number>
void compress_finish_block (const VectorStruct &,
- const unsigned int ,
+ const unsigned int,
std::integral_constant<bool,false>,
VectorDataExchange<dim,Number> &)
{}
face_info.faces[f].cells_interior[v] != numbers::invalid_unsigned_int; ++v)
{
AssertIndexRange(face_info.faces[f].cells_interior[v],
- n_macro_cells_before*
+ n_macro_cells_before *
VectorizedArray<Number>::n_array_elements);
if (dof_info[no].index_storage_variants[internal::MatrixFreeFunctions::DoFInfo::dof_access_face_exterior][f] >=
internal::MatrixFreeFunctions::DoFInfo::IndexStorageVariants::contiguous
for (unsigned int j=0; j<n_q_points_1d; ++j)
if (std::abs(get_first_array_element(shape_values[i*n_q_points_1d+j] -
shape_values[(n_dofs_1d-i)*n_q_points_1d-j-1])) >
- std::max(zero_tol, zero_tol*
+ std::max(zero_tol, zero_tol *
std::abs(get_first_array_element(shape_values[i*n_q_points_1d+j]))))
return false;
* A typedef for the actual KDTree object.
*/
typedef
- typename nanoflann::KDTreeSingleIndexAdaptor<nanoflann::L2_Simple_Adaptor<double, PointCloudAdaptor> ,
+ typename nanoflann::KDTreeSingleIndexAdaptor<nanoflann::L2_Simple_Adaptor<double, PointCloudAdaptor>,
PointCloudAdaptor, dim, unsigned int>
NanoFlannKDTree;
// initialize unit support points (this makes it possible to assign initial
// values to FE_FaceQ)
- this->unit_support_points.resize(GeometryInfo<dim>::faces_per_cell*
+ this->unit_support_points.resize(GeometryInfo<dim>::faces_per_cell *
this->unit_face_support_points.size());
const unsigned int n_face_dofs = this->unit_face_support_points.size();
for (unsigned int i=0; i<n_face_dofs; ++i)
const Point<spacedim> &p,
const std::vector<std::set<typename MeshType<dim,spacedim>::active_cell_iterator > > &vertex_to_cells,
const std::vector<std::vector<Tensor<1,spacedim> > > &vertex_to_cell_centers,
- const typename MeshType<dim, spacedim>::active_cell_iterator &cell_hint ,
+ const typename MeshType<dim, spacedim>::active_cell_iterator &cell_hint,
const std::vector<bool> &marked_vertices)
{
std::pair<typename MeshType<dim, spacedim>::active_cell_iterator, Point<dim> > cell_and_position;
// invalid cell, then query for the closest global vertex
if (current_cell.state() == IteratorState::valid)
{
- const unsigned int closest_vertex = find_closest_vertex_of_cell<dim,spacedim>(current_cell , p);
+ const unsigned int closest_vertex = find_closest_vertex_of_cell<dim,spacedim>(current_cell, p);
vertex_to_point = p - current_cell ->vertex(closest_vertex);
closest_vertex_index = current_cell ->vertex_index(closest_vertex);
}
const auto &other_owned_idx = std::get<1>(guessed_points);
std::map<
unsigned int,
- std::pair< std::vector<Point<spacedim>> , std::vector<unsigned int > > >
+ std::pair< std::vector<Point<spacedim>>, std::vector<unsigned int > > >
other_owned_pts;
for (const auto &indices: other_owned_idx)
SparsityPattern *graph = reinterpret_cast<SparsityPattern *>(data);
*ierr = ZOLTAN_OK;
- Assert( globalID != nullptr , ExcInternalError() );
- Assert( localID != nullptr , ExcInternalError() );
+ Assert( globalID != nullptr, ExcInternalError() );
+ Assert( localID != nullptr, ExcInternalError() );
//set global degrees of freedom
auto n_dofs = graph->n_rows();
*ierr = ZOLTAN_OK;
- Assert ( numEdges != nullptr , ExcInternalError() );
+ Assert ( numEdges != nullptr, ExcInternalError() );
for (int i=0; i<num_obj; ++i)
{
//Ignore diagonal entries. Not needed for partitioning.
if ( i != col->column() )
{
- Assert( nextNborGID != nullptr , ExcInternalError() );
- Assert( nextNborProc != nullptr , ExcInternalError() );
+ Assert( nextNborGID != nullptr, ExcInternalError() );
+ Assert( nextNborProc != nullptr, ExcInternalError() );
*nextNborGID++ = col->column();
*nextNborProc++ = 0; //All the vertices on processor 0
(void)rc;
//check for error code in partitioner
- Assert( rc == ZOLTAN_OK , ExcInternalError() );
+ Assert( rc == ZOLTAN_OK, ExcInternalError() );
//By default, all indices belong to part 0. After zoltan partition
//some are migrated to different part ID, which is stored in export_to_part array.
(void) rc;
//Check for error code
- Assert (rc == ZOLTAN_OK ,
+ Assert (rc == ZOLTAN_OK,
ExcInternalError());
//Allocate and assign color indices
tbb::task *execute () override
{
- tbb::empty_task *root = new( tbb::task::allocate_root() )tbb::empty_task;
+ tbb::empty_task *root = new ( tbb::task::allocate_root() )tbb::empty_task;
const unsigned int evens = task_info.partition_evens[partition];
const unsigned int odds = task_info.partition_odds[partition];
const unsigned int n_blocked_workers =
root->set_ref_count(evens+1);
for (unsigned int j=0; j<evens; j++)
{
- worker[j] = new(root->allocate_child())
+ worker[j] = new (root->allocate_child())
CellWork(function, task_info.
partition_row_index[partition]+2*j,
task_info, false);
if (j>0)
{
worker[j]->set_ref_count(2);
- blocked_worker[j-1]->dummy = new(worker[j]->allocate_child())
+ blocked_worker[j-1]->dummy = new (worker[j]->allocate_child())
tbb::empty_task;
worker[j-1]->spawn(*blocked_worker[j-1]);
}
worker[j]->set_ref_count(1);
if (j<evens-1)
{
- blocked_worker[j] = new(worker[j]->allocate_child())
+ blocked_worker[j] = new (worker[j]->allocate_child())
CellWork(function, task_info.
partition_row_index
[partition] + 2*j+1, task_info, true);
{
if (odds==evens)
{
- worker[evens] = new(worker[j]->allocate_child())
+ worker[evens] = new (worker[j]->allocate_child())
CellWork(function, task_info.
partition_row_index[partition]+2*j+1,
task_info, false);
}
else
{
- tbb::empty_task *child = new(worker[j]->allocate_child())
+ tbb::empty_task *child = new (worker[j]->allocate_child())
tbb::empty_task();
worker[j]->spawn(*child);
}
funct.zero_dst_vector_range(numbers::invalid_unsigned_int);
if (scheme == partition_partition)
{
- tbb::empty_task *root = new( tbb::task::allocate_root() )
+ tbb::empty_task *root = new ( tbb::task::allocate_root() )
tbb::empty_task;
root->set_ref_count(evens+1);
std::vector<partition::PartitionWork *> worker(n_workers);
std::vector<partition::PartitionWork *>
blocked_worker(n_blocked_workers);
MPICommunication *worker_compr =
- new(root->allocate_child())MPICommunication(funct, true);
+ new (root->allocate_child())MPICommunication(funct, true);
worker_compr->set_ref_count(1);
for (unsigned int j=0; j<evens; j++)
{
if (j>0)
{
- worker[j] = new(root->allocate_child())
+ worker[j] = new (root->allocate_child())
partition::PartitionWork (funct,2*j,*this,false);
worker[j]->set_ref_count(2);
- blocked_worker[j-1]->dummy = new(worker[j]->allocate_child())
+ blocked_worker[j-1]->dummy = new (worker[j]->allocate_child())
tbb::empty_task;
if (j>1)
worker[j-1]->spawn(*blocked_worker[j-1]);
}
else
{
- worker[j] = new(worker_compr->allocate_child())
+ worker[j] = new (worker_compr->allocate_child())
partition::PartitionWork (funct,2*j,*this,false);
worker[j]->set_ref_count(2);
MPICommunication *worker_dist =
}
if (j<evens-1)
{
- blocked_worker[j] = new(worker[j]->allocate_child())
+ blocked_worker[j] = new (worker[j]->allocate_child())
partition::PartitionWork(funct,2*j+1,*this,true);
}
else
{
if (odds==evens)
{
- worker[evens] = new(worker[j]->allocate_child())
+ worker[evens] = new (worker[j]->allocate_child())
partition::PartitionWork(funct,2*j+1,*this,false);
worker[j]->spawn(*worker[evens]);
}
else
{
- tbb::empty_task *child = new(worker[j]->allocate_child())
+ tbb::empty_task *child = new (worker[j]->allocate_child())
tbb::empty_task();
worker[j]->spawn(*child);
}
// tree of partitions
if (odds > 0)
{
- tbb::empty_task *root = new( tbb::task::allocate_root() ) tbb::empty_task;
+ tbb::empty_task *root = new ( tbb::task::allocate_root() ) tbb::empty_task;
root->set_ref_count(evens+1);
const unsigned int n_blocked_workers = odds-(odds+evens+1)%2;
const unsigned int n_workers = cell_partition_data.size()-1-
{
const unsigned int spawn_index_new = worker_index;
if (part == 0)
- worker[worker_index] = new(worker_compr->allocate_child())
+ worker[worker_index] = new (worker_compr->allocate_child())
color::PartitionWork(funct,slice_index,*this,false);
else
- worker[worker_index] = new(root->allocate_child())
+ worker[worker_index] = new (root->allocate_child())
color::PartitionWork(funct,slice_index,*this,false);
slice_index++;
for (; slice_index<partition_row_index[part+1]; slice_index++)
{
if (part<partition_row_index.size()-2)
{
- blocked_worker[part/2] = new(worker[worker_index-1]->allocate_child())
+ blocked_worker[part/2] = new (worker[worker_index-1]->allocate_child())
color::PartitionWork(funct,slice_index,*this,true);
slice_index++;
if (slice_index<partition_row_index[part+1])
{
blocked_worker[part/2]->set_ref_count(1);
- worker[worker_index] = new(blocked_worker[part/2]->allocate_child())
+ worker[worker_index] = new (blocked_worker[part/2]->allocate_child())
color::PartitionWork(funct,slice_index,*this,false);
slice_index++;
}
for (unsigned int color=0; color < partition_row_index[1]; ++color)
{
- tbb::empty_task *root = new( tbb::task::allocate_root() ) tbb::empty_task;
+ tbb::empty_task *root = new ( tbb::task::allocate_root() ) tbb::empty_task;
root->set_ref_count(2);
color::PartitionWork *worker =
new (root->allocate_child())color::PartitionWork(funct,color,*this,false);
const unsigned int shift = internal::MGTransfer::compute_shift_within_children<dim>
(parent_child_connect[from_level-1][cell+v].second,
fe_degree+1-element_is_continuous, fe_degree);
- AssertIndexRange(parent_child_connect[from_level-1][cell+v].first*
+ AssertIndexRange(parent_child_connect[from_level-1][cell+v].first *
n_child_cell_dofs+n_child_cell_dofs-1,
level_dof_indices[from_level-1].size());
const unsigned int *indices = &level_dof_indices[from_level-1][parent_child_connect[from_level-1][cell+v].first*n_child_cell_dofs+shift];
kinsol_mem = KINCreate();
- int status = KINInit(kinsol_mem, t_kinsol_function<VectorType> , solution);
+ int status = KINInit(kinsol_mem, t_kinsol_function<VectorType>, solution);
(void) status;
AssertKINSOL(status);
for (unsigned int j = 0; j < size; ++j)
{
const NumberType diff = A(i,j) + a * v(i) * v(j) - B(i,j);
- AssertThrow(std::abs(diff) < 1e-10 * std::abs(B(i,j)) ,
+ AssertThrow(std::abs(diff) < 1e-10 * std::abs(B(i,j)),
ExcMessage("diff="+ std::to_string(diff)));
}
coarse_matrix = &matrix;
}
- virtual void operator() (const unsigned int ,
+ virtual void operator() (const unsigned int,
parallel::distributed::Vector<double> &dst,
const parallel::distributed::Vector<double> &src) const
{
coarse_matrix = &matrix;
}
- virtual void operator() (const unsigned int ,
+ virtual void operator() (const unsigned int,
parallel::distributed::Vector<double> &dst,
const parallel::distributed::Vector<double> &src) const
{
return 0;
};
- time_stepper.setup_jacobian = [&](const double ,
+ time_stepper.setup_jacobian = [&](const double,
const VectorType &,
const VectorType &,
const double alpha) ->int
return 0;
};
- time_stepper.solver_should_restart = [](const double ,
+ time_stepper.solver_should_restart = [](const double,
VectorType &,
VectorType &) ->bool
{
return 0;
};
- time_stepper.setup_jacobian = [&](const double ,
+ time_stepper.setup_jacobian = [&](const double,
const VectorType &,
const VectorType &,
const double alpha) ->int
SparsityPattern sp_graph;
sp_graph.copy_from(dynamic_sparse_graph);
- Assert( num_indices == sp_graph.n_rows() , ExcInternalError() );
+ Assert( num_indices == sp_graph.n_rows(), ExcInternalError() );
std::vector<unsigned int> color_indices;
unsigned int num_colors;
SparsityPattern sp_graph;
sp_graph.copy_from(dynamic_sparse_graph);
- Assert( num_indices == sp_graph.n_rows() , ExcInternalError() );
+ Assert( num_indices == sp_graph.n_rows(), ExcInternalError() );
std::vector<unsigned int> color_indices;
unsigned int num_colors;
SparsityPattern sp_graph;
sp_graph.copy_from(dynamic_sparse_graph);
- Assert( num_indices == sp_graph.n_rows() , ExcInternalError() );
+ Assert( num_indices == sp_graph.n_rows(), ExcInternalError() );
std::vector<unsigned int> color_indices;
unsigned int num_colors;