Test cases for new implementation of domain mappings of elements, nodes and dofs that avoid the GLOBAL_TO_LOCAL_MAP. See Opencmiss iron issue #111.
dark green: internal elements/nodes light green: ghost elements/nodes red: boundary nodes
2 Processes, 1 field variable with 2 components, 2x node based dofs
2 Processes, 1 field variable with 3 components, 2x node based dofs, 1x element based dofs
3 Processes, 1 field variable with 2 components, 2x node based dofs
3 Processes, 1 field variable with 3 components, 2x node based dofs, 1x element based dofs
4 Processes
This example solves the weak form of the standard Laplace equation,
using the Galerkin Finite Element method. is a spatially varying scalar field (e.g. potential). and are 'nabla' (divergence operator) and 'laplacian' (laplace operator) respectively and given by,
The generalised Laplace equation,
where is the rank two, positive definite and symmetric conductivity tensor, can be reduced to the standard Laplace equation by setting (identity tensor).
Only Dirichlet boundary conditions are prescribed in this example.
The fortran version of the example can be configured and built with CMake:
git clone https://github.com/OpenCMISS-Examples/laplace_equation mkdir laplace_equation-build cd laplace_equation-build cmake -DOpenCMISSLibs_DIR=/path/to/opencmisslib/install ../laplace_equation make
This will create the example executable "laplace_equation" in ./src/fortran/ directory.
Fortran version:
cd ./src/fortran/ ./laplace_equation
Python version:
cd ./laplace_equation/src/python source /path/to/opencmisslibs/install/.../.../virtualenvironments/oclibs_pyXY_release/bin/activate python laplace_equation.py Note: If the above fails, try the following. cd ./laplace_equation/src/python PYTHONPATH="/path/to/opencmisslibs/install/.../.../Release/opencmiss.iron" python laplace_equation.py
Results can be visualised by running visualise.cmgui with the Cmgui visualiser.
The following figure shows the finite element mesh (computational domain) and solutions ( and ).
Figure 1. (a) Finite element mesh (b) Primary variable solution (c) Secondary variable solution
The expected results from this example are available in expected_results folder.
There are no additional input files required for this example as it is self-contained.
License applicable to this example is described in LICENSE.