Skip to content
Snippets Groups Projects
Commit 67fc93c3 authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Add symmetry treatment for DiscreteFunctionP0Vector of TinyVector

parent effbab6b
No related branches found
No related tags found
1 merge request!205High-order polynomial reconstruction
......@@ -1085,10 +1085,32 @@ PolynomialReconstruction::_build(
for (size_t i_symmetry = 0; i_symmetry < stencil_array.symmetryBoundaryStencilArrayList().size();
++i_symmetry) {
if constexpr (DataType::Dimension == MeshType::Dimension) {
auto& ghost_stencil = stencil_array.symmetryBoundaryStencilArrayList()[i_symmetry].stencilArray();
auto ghost_cell_list = ghost_stencil[cell_j_id];
if (ghost_cell_list.size() > 0) {
throw NotImplementedError("TinyVector symmetries for reconstruction of DiscreteFunctionP0Vector");
const Rd& normal = symmetry_normal_list[i_symmetry];
for (size_t i = 0; i < ghost_cell_list.size(); ++i, ++index) {
const CellId cell_i_id = ghost_cell_list[i];
for (size_t l = 0; l < qj_vector.size(); ++l) {
const DataType& qj = qj_vector[l];
const DataType& qi = discrete_function[cell_i_id][l];
const DataType& qi_qj = symmetrize_vector(normal, qi) - qj;
for (size_t kB = column_begin + l * DataType::Dimension, k = 0; k < DataType::Dimension;
++k, ++kB) {
B(index, kB) = qi_qj[k];
}
}
}
} else {
// LCOV_EXCL_START
std::stringstream error_msg;
error_msg << "cannot symmetrize vectors of dimension " << DataType::Dimension
<< " using a mesh of dimension " << MeshType::Dimension;
throw UnexpectedError(error_msg.str());
// LCOV_EXCL_STOP
}
}
} else if constexpr (is_tiny_matrix_v<DataType>) {
......
......@@ -275,7 +275,7 @@ add_executable (mpi_unit_tests
test_OFStream.cpp
test_ParallelChecker_read.cpp
test_Partitioner.cpp
test_PolynomialReconstruction.cpp
test_PolynomialReconstruction_degree_1.cpp
test_PolynomialReconstructionDescriptor.cpp
test_RandomEngine.cpp
test_StencilBuilder_cell2cell.cpp
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment