diff --git a/CMakeLists.txt b/CMakeLists.txt index a6686cc92..ab5981472 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,7 +25,7 @@ else() OUTPUT_STRIP_TRAILING_WHITESPACE) endif() -message(STATUS "Building GooseFEM ${GOOSEFEM_VERSION}") +message(STATUS "Building ${PROJECT_NAME} ${GOOSEFEM_VERSION}") # Set target # ========== diff --git a/docs/changelog.rst b/docs/changelog.rst index 30745d368..3460662d8 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -29,6 +29,12 @@ Deprecating in next version * Mesh::Renumber::get * Mesh::Reordered::get +New functions +------------- + +* VectorPartitioned::dofs_is_u +* VectorPartitioned::dofs_is_p + Changes under the hood ---------------------- diff --git a/docs/examples/CMakeLists.txt b/docs/examples/CMakeLists.txt index fa3fe0571..142254a9f 100644 --- a/docs/examples/CMakeLists.txt +++ b/docs/examples/CMakeLists.txt @@ -17,7 +17,7 @@ find_package(HighFive REQUIRED) find_package(XDMFWrite_HighFive REQUIRED) find_package(GMatElastic REQUIRED) find_package(GMatElastoPlastic REQUIRED) -# find_package(GMatElastoPlasticFiniteStrainSimo REQUIRED) +find_package(GMatElastoPlasticFiniteStrainSimo REQUIRED) find_package(GMatNonLinearElastic REQUIRED) add_library(libraries INTERFACE IMPORTED) @@ -28,7 +28,7 @@ target_link_libraries(libraries INTERFACE XDMFWrite_HighFive GMatElastic GMatElastoPlastic - # GMatElastoPlasticFiniteStrainSimo + GMatElastoPlasticFiniteStrainSimo GMatNonLinearElastic) if(SIMD) @@ -74,34 +74,34 @@ add_test(NAME ${exec} COMMAND ${exec}) # create executable -# set(exec "statics_Periodic_ElastoPlastic_main") -# set(source "statics/Periodic_ElastoPlastic/main.cpp") -# add_executable(${exec} ${source}) -# target_link_libraries(${exec} PRIVATE libraries) -# add_test(NAME ${exec} COMMAND ${exec}) +set(exec "statics_Periodic_ElastoPlastic_main") +set(source "statics/Periodic_ElastoPlastic/main.cpp") +add_executable(${exec} ${source}) +target_link_libraries(${exec} PRIVATE libraries) +add_test(NAME ${exec} COMMAND ${exec}) # create executable -# set(exec "statics_Periodic_ElastoPlasticFiniteStrainSimo_main") -# set(source "statics/Periodic_ElastoPlasticFiniteStrainSimo/main.cpp") -# add_executable(${exec} ${source}) -# target_link_libraries(${exec} PRIVATE libraries) -# add_test(NAME ${exec} COMMAND ${exec}) +set(exec "statics_Periodic_ElastoPlasticFiniteStrainSimo_main") +set(source "statics/Periodic_ElastoPlasticFiniteStrainSimo/main.cpp") +add_executable(${exec} ${source}) +target_link_libraries(${exec} PRIVATE libraries) +add_test(NAME ${exec} COMMAND ${exec}) # create executable -# set(exec "statics_Periodic_LinearElastic_main") -# set(source "statics/Periodic_LinearElastic/main.cpp") -# add_executable(${exec} ${source}) -# target_link_libraries(${exec} PRIVATE libraries) -# add_test(NAME ${exec} COMMAND ${exec}) +set(exec "statics_Periodic_LinearElastic_main") +set(source "statics/Periodic_LinearElastic/main.cpp") +add_executable(${exec} ${source}) +target_link_libraries(${exec} PRIVATE libraries) +add_test(NAME ${exec} COMMAND ${exec}) # create executable -# set(exec "statics_Periodic_NonLinearElastic_main") -# set(source "statics/Periodic_NonLinearElastic/main.cpp") -# add_executable(${exec} ${source}) -# target_link_libraries(${exec} PRIVATE libraries) -# add_test(NAME ${exec} COMMAND ${exec}) +set(exec "statics_Periodic_NonLinearElastic_main") +set(source "statics/Periodic_NonLinearElastic/main.cpp") +add_executable(${exec} ${source}) +target_link_libraries(${exec} PRIVATE libraries) +add_test(NAME ${exec} COMMAND ${exec}) diff --git a/docs/examples/statics/Periodic_ElastoPlasticFiniteStrainSimo/main.cpp b/docs/examples/statics/Periodic_ElastoPlasticFiniteStrainSimo/main.cpp index 3b98d98e9..73415f9f1 100644 --- a/docs/examples/statics/Periodic_ElastoPlasticFiniteStrainSimo/main.cpp +++ b/docs/examples/statics/Periodic_ElastoPlasticFiniteStrainSimo/main.cpp @@ -82,8 +82,8 @@ int main() // material model // even though the problem is 2-d, the material model is 3-d, plane strain is implicitly assumed - GM::Matrix mat(nelem, nip); - size_t tdim = mat.ndim(); + GM::Array<2> mat({nelem, nip}); + size_t tdim = 3; // some artificial material definition xt::xtensor ehard = xt::ravel(xt::view(elmat, xt::range(0, 2), xt::range(0, 2))); @@ -137,7 +137,9 @@ int main() F += I2; // stress & tangent - mat.tangent(F, Sig, C); + mat.setDefGrad(F); + mat.stress(Sig); + mat.tangent(C); // internal force elem.int_gradN_dot_tensor2_dV(Sig, fe); @@ -194,7 +196,7 @@ int main() disp += du; // update shape functions - elem.update_x(vector.AsElement(coor + disp)); + elem.update_x(vector.AsElement(xt::eval(coor + disp))); } // post-process @@ -203,7 +205,8 @@ int main() elem0.gradN_vector_T(ue, F); F += I2; GM::strain(F, Eps); - mat.stress(F, Sig); + mat.setDefGrad(F); + mat.stress(Sig); // - integration point volume xt::xtensor dV = elem.AsTensor<2>(elem.dV()); // - element average stress @@ -215,8 +218,8 @@ int main() // - write to output-file: increment numbers H5::dump(file, "/stored", inc, {inc}); // - write to output-file: macroscopic response - H5::dump(file, "/macroscopic/sigeq", GM::Sigeq(Sigbar), {inc}); - H5::dump(file, "/macroscopic/epseq", GM::Epseq(Epsbar), {inc}); + H5::dump(file, "/macroscopic/sigeq", GM::Sigeq(Sigbar)(), {inc}); + H5::dump(file, "/macroscopic/epseq", GM::Epseq(Epsbar)(), {inc}); // - write to output-file: element quantities H5::dump(file, "/sigeq/" + std::to_string(inc), GM::Sigeq(Sigelem)); H5::dump(file, "/epseq/" + std::to_string(inc), GM::Epseq(Epselem));