File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -508,8 +508,52 @@ std::vector<std::vector<FP>> const DirichletProblemSolver<GridType::Regular>::so
508508 }
509509 std::cout << " General error: " << approximation_error << std::endl;
510510
511+ std::vector<std::vector<FP>> res (n + 1 , std::vector<FP>(m + 1 , 0 ));
512+
513+ for (size_t j = m / 2 ; j <= m; ++j)
514+ {
515+ res[0 ][j] = mu1 (start_y + static_cast <FP>(j) * k);
516+ }
517+ for (size_t j = 0 ; j <= m / 2 ; ++j)
518+ {
519+ res[n / 2 ][j] = mu2 (start_y + static_cast <FP>(j) * k);
520+ }
521+ for (size_t j = 0 ; j <= m; ++j)
522+ {
523+ res[n][j] = mu3 (start_y + static_cast <FP>(j) * k);
524+ }
525+
526+ for (size_t i = n / 2 + 1 ; i < n; ++i)
527+ {
528+ res[i][0 ] = mu4 (start_x + static_cast <FP>(i) * h);
529+ }
530+ for (size_t i = 1 ; i < n / 2 ; ++i)
531+ {
532+ res[i][m / 2 ] = mu5 (start_x + static_cast <FP>(i) * h);
533+ }
534+ for (size_t i = 1 ; i < n; ++i)
535+ {
536+ res[i][m] = mu6 (start_x + static_cast <FP>(i) * h);
537+ }
538+
539+ size_t index = 0 ;
540+ for (size_t j = 1 ; j <= m / 2 ; ++j)
541+ {
542+ for (size_t i = n / 2 + 1 ; i < n; ++i)
543+ {
544+ res[i][j] = solution[index++];
545+ }
546+ }
547+ for (size_t j = m / 2 + 1 ; j < m; ++j)
548+ {
549+ for (size_t i = 1 ; i < n; ++i)
550+ {
551+ res[i][j] = solution[index++];
552+ }
553+ }
554+
511555 // Placeholder
512- return std::vector<std::vector<FP>>() ;
556+ return res ;
513557 }
514558
515559
You can’t perform that action at this time.
0 commit comments