Replace centroid() with vertex_average(). Refs #1914

This commit is contained in:
aprilnovak 2021-11-22 15:20:01 -06:00
parent 6549067c43
commit 4d321bc98b
4 changed files with 5 additions and 5 deletions

View file

@ -17,5 +17,5 @@ endif()
include(FindPkgConfig)
set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${LIBMESH_PC}")
set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH True)
pkg_check_modules(LIBMESH REQUIRED ${LIBMESH_PC_FILE}>=1.6.0 IMPORTED_TARGET)
pkg_get_variable(LIBMESH_PREFIX ${LIBMESH_PC_FILE} prefix)
pkg_check_modules(LIBMESH REQUIRED ${LIBMESH_PC_FILE}>=1.7.0 IMPORTED_TARGET)
pkg_get_variable(LIBMESH_PREFIX ${LIBMESH_PC_FILE} prefix)

View file

@ -13,7 +13,7 @@ if(@OPENMC_USE_LIBMESH@)
include(FindPkgConfig)
list(APPEND CMAKE_PREFIX_PATH @LIBMESH_PREFIX@)
set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH True)
pkg_check_modules(LIBMESH REQUIRED @LIBMESH_PC_FILE@>=1.6.0 IMPORTED_TARGET)
pkg_check_modules(LIBMESH REQUIRED @LIBMESH_PC_FILE@>=1.7.0 IMPORTED_TARGET)
endif()
find_package(PNG)

View file

@ -2393,7 +2393,7 @@ void LibMesh::initialize()
Position LibMesh::centroid(int bin) const
{
const auto& elem = this->get_element_from_bin(bin);
auto centroid = elem.centroid();
auto centroid = elem.vertex_average();
return {centroid(0), centroid(1), centroid(2)};
}

View file

@ -5,7 +5,7 @@ set -ex
# libMESH install
pushd $HOME
mkdir LIBMESH && cd LIBMESH
git clone https://github.com/libmesh/libmesh -b v1.6.0 --recurse-submodules
git clone https://github.com/libmesh/libmesh -b v1.7.0 --recurse-submodules
mkdir build && cd build
export METHODS="opt"