mirror of
https://codeberg.org/vcbferreira/NuFI_deal.ii
synced 2026-08-12 14:33:18 +02:00
limited grid to be have a small diffence in refinement for neighbour cells
This commit is contained in:
Binary file not shown.
+2
-2
@@ -13,7 +13,7 @@ constexpr double X_DOMAIN_RIGHT = 4 * M_PI;
|
||||
constexpr double LX = std::abs(X_DOMAIN_RIGHT - X_DOMAIN_LEFT);
|
||||
constexpr double LX_INV = 1 / LX;
|
||||
|
||||
constexpr size_t CALC_NX = 128;
|
||||
constexpr size_t CALC_NX = 256;
|
||||
constexpr double CALC_DX = LX / CALC_NX;
|
||||
|
||||
constexpr double V_DOMAIN_LEFT = -10.;
|
||||
@@ -25,7 +25,7 @@ constexpr double DV = std::abs(V_DOMAIN_RIGHT - V_DOMAIN_LEFT) / NV;
|
||||
// deal.ii options
|
||||
constexpr unsigned int GLOBAL_REFINEMENT = 6;
|
||||
constexpr unsigned int FE_DEGREE = 2;
|
||||
constexpr unsigned int CONVERGENCE_ITERATIONS = 10000;
|
||||
constexpr unsigned int CONVERGENCE_ITERATIONS = 15000;
|
||||
constexpr double CONVERGENCE_LIMIT = 1e-8;
|
||||
|
||||
constexpr double EPS = 0.01;
|
||||
|
||||
@@ -131,7 +131,8 @@ void PoissonProblem<dim>::set_rhs_function(
|
||||
|
||||
template <int dim>
|
||||
PoissonProblem<dim>::PoissonProblem(unsigned int degree)
|
||||
: fe(degree), dof_handler(triangulation), mapping(degree) {}
|
||||
: triangulation(Triangulation<dim>::limit_level_difference_at_vertices),
|
||||
fe(degree), dof_handler(triangulation), mapping(degree) {}
|
||||
|
||||
template <int dim>
|
||||
std::vector<double>
|
||||
@@ -416,7 +417,8 @@ void PoissonProblem<dim>::coarse_and_refine_grid(
|
||||
|
||||
constraints.distribute(solution);
|
||||
|
||||
cell_locator.rebuild(dof_handler, triangulation);
|
||||
// cell_locator.rebuild(dof_handler, triangulation); // No need to be called
|
||||
// again because its in setup_system();
|
||||
|
||||
std::cout << "Refinement Finished" << "\n";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user