AMDiS (Adaptive MultiDimensional Simulations) is a C++ library to solve a broad class of partial differential equations (PDE) using adaptive finite elements. Here you will find some information and tutorials about AMDiS usage/installation/extension...
Installation of AMDiS
Tutorial
The objective of this tutorial is to introduce the user into the main AMDiS features by giving some application examples.
For every example the following aspects are described:
- Abstract problem description: In the header of each example section, the abstract problem definition is given. Sometimes, some solution strategies on a high abstraction level are mentioned, also.
- Source code: In the source code section, the listing of the example source code is explained.
- Parameter file: In this section, the parameter file is described. The parameter file contains parameters which are read be the application at runtime. The name of the parameter file is usually passed to the the application as a command line argument.
- Macro file: In the macro file section, the definition of the coarse macro mesh is shown, which is the basis for adaptive refinements.
- Output: The AMDiS results are written to output files that contain the final mesh and the problem solution on this mesh. The output can be visualized with ParaView. In the output section, the visualized problem results are shown and discussed.
To avoid unnecessary repetitions, not every aspect of every example is described, but only those aspects that have not appeared in previous examples.
Available examples:
- Stationary problem with Dirichlet boundary condition
- Time dependent problem
- Systems of PDEs
- Neumann boundary conditions
- Periodic boundary conditions
- Projections
- Parametric elements
Tutorial (using expressions syntax)
The new expressions syntax is applied to the AMDiS demos to see the advantage over the old syntax and how to use it in real-world examples.
Available examples:
Expressions
In order to write a differential equation in a mathematical natural way we have developed an expression framework, that allowes exacly this. Instead of adding abstract operator-classes to the problem definition we implement the coefficient functions of the operators using mathematical operators. An example is the following bilinearform
Assume that φ represents a DOFVector, i.e. a discrete representation of a function in a function-space, that is known in advance, or given by an iterative solution procedure from the last iteration. Here we use a solution component of the problem prob
:
DOFVector<double>* phi = prob->getSolution(0);
The bilinearform consists of two individual parts, a term of zeroth derivative order (ZOT) and a term that contains two derivatives, of c and ϑ, i.e. of the trial and test function. We have to implement the corresponding coefficient functions of these two terms individually and add the term using the functions addZOT
, respective addSOT
to the operator. Lets assume the trial and test functions are in the finite element spacefeSpace
given as the first space of the problem, then we can define the bilinearform as
const FiniteElemSpace* feSpace = prob->getFeSpace(0);
Operator *op = new Operator(feSpace, feSpace);
addZOT(op, (1.0/epsilon) * (pow<2>(valueOf(phi)) - 1.0) );
addSOT(op, max(1.e-5, valueOf(phi) + 1.0) )
prob->addMatrixOperator(*op, 0, 0);
the keyword valueOf
indicates that we want to evaluate the values of the DOFVector
at the corresponding quadrature points during assembling. One could als evaluate the gradient, or partial derivative of a DOFVector
, using the functions gradientOf(DV)
, or derivativeOf(DV, comp)
, respectively.
For details see the AMDiS-Expressions reference page.
Initfile Manual
AMDiS is equipped with a parser for parameter files to control simulations, e.g. set material parameters, define the timestep length, set meshes for each problem and configure the number of global refinements. These parameter files (or init-files) are simple text files in a special syntax, that is described here.
For details see the AMDiS-Initfile reference page.
AMDiS extensions
Many things can be realized using AMDiS today, but some things are really complicated to implement. Other common tasks need a lot of coding to be solved.
In the ''AMDiS-Extensions'' a lot of standard task are realized and implemented. This manual should give you a short introduction to some of the features. The extensions are work in progress, so the signature and interface of the methods and classes can change from one version to the next. Nevertheless it builds a set of very useful tools are used in every day work by several projects today.
The manual still not covers all features of the AMDiS-Extensions. But it should give you enough information to get started.
- Introduction
- Handling data on unstructured grids|Handling data on unstructured grids
- Mesh refinement tools
- Boundary conditions
- Base Problems
Visualization
AMDiS provides a list of different output formats. We recommend to use ParaView as visualization tool. Therefore we have implemented a VTU-writer for stationary solutions and a PVD writer for animated data, respective time series. Also writers for other formats are provided and can be configurated. Read here how to deal with output data...
For details see the AMDiS-Visualization page.