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

Now defines symmetry BC according to the string name of the boundary (hard coded)

parent 362adc02
No related branches found
No related tags found
No related merge requests found
......@@ -227,13 +227,18 @@ int main(int argc, char *argv[])
{ // quite dirty!
for (size_t i_boundary=0; i_boundary<mesh.connectivity().numberOfNodeBoundaries(); ++i_boundary) {
ConnectivityType::NodesBoundary nodes_boundary = mesh.connectivity().nodesBoundary(i_boundary);
unsigned int ref = nodes_boundary.first;
const RefId& ref = nodes_boundary.first;
TinyVector<2> normal(0,0);
if ((ref == 5) or (ref == 6)) {
std::cout << "imposing BC on " << ref.tagName() << '\n';
if ((ref.tagName()== std::string("XMIN")) or (ref.tagName()=="XMAX")) {
normal = TinyVector<2>(1,0);
} else if ((ref.tagName()=="YMIN") or (ref.tagName()=="YMAX")) {
normal = TinyVector<2>(0,1);
} else {
normal = TinyVector<2>(1,0);
std::cout << rang::fg::red << "ignoring " << ref << rang::style::reset << '\n';
break;
}
const Kokkos::View<const unsigned int*> nodes_ids = nodes_boundary.second;
std::vector<unsigned int> node_boundary_vector(nodes_ids.extent(0));
for (size_t r=0; r<nodes_ids.extent(0); ++r) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment