From b63e32b0a110800511b1321cc6286d32ad243c03 Mon Sep 17 00:00:00 2001 From: Manuel Weberndorfer <manuel.weberndorfer@id.ethz.ch> Date: Thu, 2 Jun 2022 13:26:02 +0000 Subject: [PATCH] adapt example to updates in Mesh - topological dimension no longer required - add const --- examples/CantileverBeam.cc | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/examples/CantileverBeam.cc b/examples/CantileverBeam.cc index 72db39c8..5c36975f 100644 --- a/examples/CantileverBeam.cc +++ b/examples/CantileverBeam.cc @@ -41,8 +41,7 @@ using BoundaryCondition = cpppetsc::MeshBoundaryCondition<Mesh>; constexpr auto number_of_vertices_per_element = Mesh::size_type{2}; constexpr auto number_of_elements = Mesh::size_type{2}; constexpr auto number_of_vertices = Mesh::size_type{2}; -constexpr auto coordinate_dimension = Mesh::CoordinateDimension{3}; -constexpr auto topological_dimension = Mesh::TopologicalDimension{1}; +constexpr auto coordinate_dimension = Mesh::size_type{3}; constexpr auto dof_per_vertex = Mesh::size_type{6}; constexpr auto dof_per_element = Mesh::size_type{0}; @@ -121,21 +120,21 @@ int main(int argc, char **argv) { // Let's create the mesh and an assembler. - const auto mesh = Mesh::fromConnectivity( - topological_dimension, coordinate_dimension, connectivity, - number_of_vertices, dof_per_vertex, 0); + const auto mesh = + Mesh::fromConnectivity(coordinate_dimension, connectivity, + number_of_vertices, dof_per_vertex, 0); auto assembler = GroupAssembler(); auto &element_assembler = assembler.get<0>(); auto &force_assembler = assembler.get<1>(); - Properties properties = {young_modulus, - shear_modulus, - shear_correction_factor, - shear_correction_factor, - area, - area_moment, - area_moment, - polar_moment}; + const Properties properties = {young_modulus, + shear_modulus, + shear_correction_factor, + shear_correction_factor, + area, + area_moment, + area_moment, + polar_moment}; // Depending on whether we use MPI, our mesh may be distributed and not all // elements are present on this computational node. -- GitLab