Kratos是一款开源跨平台的多物理场有限元框架。本文记录在Windows下编译Kratos的流程。
Ref. from Kratos
KRATOS Multiphysics ("Kratos") is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
Ref. from A Framework for Developing Finite Element Codes for Multi-Disciplinary Applications
The objective of this work is to design and implement a framework for building multi-disciplinary finite element programs. This framework is called Kratos and will help to build a wide variety of finite element programs from the simplest formulation, for example a heat conduction problem , to the most complex ones, like multi-disciplinary optimization techniques. From one side it will provide a complete set of flexible tools for fast implementation of experimentalacademic algorithms and form the other side it must be fast and efficient to be used for real industrial analysis.
零、环境
| 操作系统 | Windows 11 |
| Visual Studio | Visual Studio Community 2022 |
| CMake | CMake 3.24.2 |
| Git | Git version 2.45.2.windows.1 |
| Boost | Boost 1.80.0 |
一、下载代码与依赖
1.1 下载代码
git.exe clone --progress --recursive -v https://github.com/KratosMultiphysics/Kratos.git
cd ./Kratos/
git checkout -b Kratos-v9.5 v9.5
1.2 依赖
下载并安装boost_1_80_0-msvc-14.3-64.exe。
二、编译
按照下表配置CMake,
| Where is the source code | D:/CaeFrameworks/Kratos/Kratos |
| Where to build the binaries | D:/CaeFrameworks/Kratos/BUILD/Kratos-v9.5 |
| CMAKE_INSTALL_PREFIX | D:/CaeFrameworks/Kratos/INSTALL/Kratos-v9.5 |
| Boost_INCLUDE_DIR | D:/CaeFrameworks/Boost/boost_1_80_0 |
在VS中右键"ALL_BUILD"完成编译,然后右键"INSTALL"完成安装。
参考资料
- Pooyan Dadvand. A Framework for Developing Finite Element Codes for Multi-Disciplinary Applications. Monograph CIMNE, January 2008.
- W. Bangerth. Concepts for Object-oriented finite element software - the deal Ⅱ library. 1999.
网络资料
Kratos