14

One library to consider is BoxLib. Its key features (from the website) are: Support for block-structured AMR with optional subcycling in time Support for cell-centered, face-centered and node-centered data Support for hyperbolic, parabolic and elliptic solves on hierarchical grid structure C++ and Fortran90 versions Supports hybrid programming model with ...


11

The Finite Element Method (FEM) is the parent method which has inspired many, many other methods and methods which are actually FEM but pretend not to be. In the finite element method, "shape functions" are used to provide an approximation space so that the solution can be represented by a vector. In the classical FEM, these shape functions are polynomials. ...


10

I worked on a problem similar to this a while back. I think the main difference between between our implementations is that I was choosing where to add points based on the triangles, not the edges. I also choose new points inside the triangles instead of on the edges. I have the feeling that adding points inside the triangles would make it more efficient ...


9

You should also look at libMesh. It's targeted at finite element methods, but other than that, I think it checks most of your boxes. Unlike BoxLib, it's a fully unstructured, mixed element type library, which is to stay that it supports tets, pyramids, prisms, and hexahedra in the same mesh. It also has one of the largest sets of integration rules for high-...


8

deal.II keeps the entire coarse mesh on every processor, but of course we cannot do that with the actual mesh after many refinement steps. It is true that this somewhat limits the size of problems we can solve to maybe a few hundred thousand coarse mesh cells on typically-sized cluster nodes. However, this is plenty for most realistic cases for a reasonable ...


8

The decision whether to do p- or h- adaptivity is to achieve faster, potentially exponential convergence rate. In other words to get a solution with given error with minimal computational effort. Limiting considerations to elliptic problems. The approximate solution can converge to exact solution if you do h- or p- adaptivity. If the exact solution is ...


7

Both Mike's answer and Jed's one describe well the XFEM/FEM dichotomy and correctly point out that the most important area of application is 3D Fracture Mechanics, where you have a crack, i.e. a displacement discontinuity across a surface inside your domain. Cracks are hard to model in classical FEM for two reasons: The mesh has to be congruent across the ...


7

As a general rule, finite element solutions are more accurate on meshes with cells that (i) deviate less from the optimal shape (which for triangles are equilateral triangles and for rectangles are squares), and (ii) have local symmetries. Symmetries in a quadrilateral mesh would, for example, mean that four cells come together at every vertex where the four ...


6

FEM is a subset of XFEM. XFEM is a methodology for enriching finite-element spaces to handle problems with discontinuities (such as fracture). With classical FEM, attaining similar accuracy typically requires complicated conformal meshing and adaptive refinement, where as XFEM does it with a single mesh, moving that geometric complexity into the elements (...


6

Every major class of discretization is "open-ended" in the sense that there are decisions with no obviously/provably correct answer in the general case, so some decisions are made based on how they perform for the target problem. Additionally, each major class has active research on new extensions. AMR has more choices than static-grid discretizations, so ...


6

For the how part referred to in the previous answer, conforming Quad or Hex mesh refinement is most likely going to use an algorithm based on the work of R. Schneiders' 2- and 3- refinement algorithms. These methods are used in mesh generation. Two papers that I happen to have that do adaptive conforming quad refinement are: "A new fast hybrid adaptive grid ...


6

There are no such operators so that $V2C(C2V)=I$ and $C2V(V2C)=I$ simultaneously. This is already easy to see if you only have a 1d situation with 2 vertices and 1 cell. In that case, $C2V$ is a $2 \times 1$ matrix, and $V2C$ is a $1 \times 2$ matrix. It is easy to verify that you can't find entries for these two matrices that satisfy the criteria you ask. ...


6

Adaptive mesh refinement is a very useful technique for improving accuracy around shocks, since any method will be at most first order accurate near solution discontinuities. The downside of implementing AMR is that it will add substantial complexity to your code and thus require significant additional development and maintenance time. I would only do the ...


5

I'd say Gmsh. I used it for a few finite element projects, and it was mostly easy to work with. The mesh output formats are very parseable, and there's at least one third-party parser (MeshPy) that can parse the output. It also has a C++ API, and the mailing list gets enough traffic (probably 10-20 messages a week) that your questions might be answered (in ...


4

From the comments above, I understand that you want to avoid to copy the vector when you add more cells. The easiest approach is to reserve space for the maximum number of cells that you might want to have: std::vector<YourCellType> myVectorOfCells; vectorOfCells.reserve(maxNoCells); Your vector has allocated space for creating maxNoCells cells but ...


4

I would try SAMRAI I know at least one code that uses it with success — IBAMR, an Immersed Boundary Method code for Fluid-Structure Interaction with AMR.


4

An adaptive grid is a grid network that automatically clusters grid points in regions of high flow field gradients; it uses the solution of the flow field properties to locate the grid points in the physical plane. The adaptive grid evolves in steps of time in conjunction with a time-dependent solution of the governing flow field equations, which computes ...


4

This would call for adaptive finite element methods, and if you are only interested in specific regions, for the use of goal oriented error estimators to drive the adaptive mesh refinement. The problem you want to solve is a pretty standard one and you can find my own contribution to this in the step-6 tutorial program of the deal.II library for the general ...


4

Since you are a computer science major, let me posit the following analogy: "adaptive mesh refinement" is a set of techniques for solving partial differential equations in mathematics; this is in the same spirit as "image processing" is a set of techniques to transform and improve images. Both fields have many different aspects, so there are no fixed ...


4

If you want the simplest possible numerical scheme working for Burger's equation that has your suggested form then you should prefer the so called Lax-Friedrichs method. If you have the book of LeVeque on Finite Volume Methods for Hyperbolic Problems, look for a very simple formula 4.20 (or a little bit more complex 4.21, but in your suggested form). With ...


4

I'll try to answer your questions one-by-one, though I'm afraid that they are so basic that these answers alone won't be able to help you very much in the long run: 1/ No, one can run AMR on any starting mesh. It doesn't have to be a square. A few examples of adaptive meshes on other domains are here: https://github.com/dealii/dealii/wiki/Gallery 2/ Cell-...


4

It's important to realize that the original velocity field $\mathbf v_0$ is also not divergence free in a pointwise sense. Rather, it is only divergence free when tested with the pressure test functions, i.e., $(\nabla\cdot\mathbf v_0,q)=0$ for all $q\in P_1(T_0)$ where $T_0$ is the original mesh. What you want to achieve is to get a velocity field $\mathbf ...


4

Marsha has made quite a bit of her source code available over the years. Some of it is no longer supported, but given that she is the Berger in Berger and Oliger, checking her website and the clawpack website (which also has her code and given that its a collaboration between her, Randy and others), seems like a good start. https://cs.nyu.edu/berger/


3

@Peter Frolkovic's answer is a good one, but @Daniel Ruprecht's comment also deserves to be highlighted: the scheme you are using (centered in space, forward in time) is unstable for any time step size. It's straightforward to see this if you consider instead the advection equation and do a standard von Neumann or method of lines stability analysis. This ...


3

It is difficult to assess the correctness of a code for only a single value of the mesh sizes $h$, $H$. Rather, one typically evaluates the accuracy for a sequence of mesh sizes $h,H \rightarrow 0$ by comparing against the exact solution to which your numerical approximations have to converge.


3

Here a most likely incomplete list. But maybe others can help extend it. Bisection methods can be applied to simplicial meshes and have the advantage that they are always conforming. Refinement into similar objects can be applied to triangles, quadrilaterals and hexahedra. To tetrahedra with some modifications. It allows for particularly simple setup of ...


3

I was (still am) looking for good answers for this. I work with multi-level adaptive grids where I use some sort of criterion for refinement. Folks doing FEM enjoy, rather cheap (computationally), rigorous error estimates that they use as refinement criterion. For us doing FDM/FVM, I have not had luck finding any such estimates. In this context, if you want ...


3

This is not a complete answer but based on my own experience with mesh refinement I felt compelled to write of few ideas/thoughts which would be too long for a comment. One idea that I don't think you mentioned would be too refine the top percentage of the elements with greatest error and then also coarsen the bottom percentage of elements with lowest error....


3

You will need to estimate the error on all cells, including transition cells. You may then wish to refine these differently, if necessary -- see for example the Red-Green Strategy (which I explain in more detail in lecture 15 at http://www.math.tamu.edu/~bangerth/videos.html).


3

You may want to take a look at the arXiv preprint of B. Keith, A. V. Astaneh, and L. Demkowicz, "Goal-oriented adaptive mesh refinement for non-symmetric functional setting." In this article, the authors motivate and present a new duality theory for FEM. Some overview of dual-weighted residual is also given (Section 5). It also links to the very widely ...


Only top voted, non community-wiki answers of a minimum length are eligible