pdelab / modular-pnp

This repository contains a modularized implementation of the PNP solver in which functionalities are organized into Newton solver techniques, conversion methods between FEniCS and FASP, as well as geometric and parameter functionalities. An additional library specific to strictly PNP functionalities is also within.
https://thepnpsolver.github.io/
4 stars 0 forks source link

Mesh Adaptivity based on entropy of computed solution #74

Closed maximilianmetti closed 7 years ago

maximilianmetti commented 7 years ago

This PR contains a new feature that allows for mesh adaptivity based on the entropy of the computed solution.

The benchmark problem in benchmarks/pnp_refine_exact/ uses the new feature. Although, it's admittedly a silly example since the artificially chosen exact solution has non-zero entropy (due to the drift-diffusion source terms). A new benchmark with more physical relevance should be put together to verify that the mesh refinement focuses on the regions of largest entropy.

arthbous commented 7 years ago

Which function apply the refinement ?

I see total charge that compute the charge but that's it.

maximilianmetti commented 7 years ago

I think there might be a bug 🐜... it seems to work well, but there may be a problem transferring the solution across the mesh after multiple refinements... I need to investigate.

The refinement is that line to 225 of main.cpp. The code is also been re-factored to pull the Newton solve outside of the main function. We might consider doing that for all of our files in the future.

Sent from my iPhone

On Dec 18, 2016, at 7:44 PM, Arthur Bousquet notifications@github.com wrote:

Which function apply the refinement ?

I see total charge that compute the charge but that's it.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

maximilianmetti commented 7 years ago

@arthbous I'd recommend looking at the good-diode PR #75 instead of this one, as it has better mesh adaptivity. That PR is up-to-date with my local branch.

I'm happy to close this PR so that we can merge PR #75 instead.

arthbous commented 7 years ago

So can we merge this guy ? Or should we merge the Diiode ?

maximilianmetti commented 7 years ago

Let's merge the diode instead