diff --git a/packages/implicit.cmake b/packages/implicit.cmake index c6e2b43a4..0a4f8d64c 100644 --- a/packages/implicit.cmake +++ b/packages/implicit.cmake @@ -1,70 +1,65 @@ #=============================================================================== # @file implicit.cmake # # @author Nicolas Richart # # @date creation: Tue Oct 16 2012 # @date last modification: Fri Aug 21 2015 # # @brief package description for the implicit solver # # @section LICENSE # # Copyright (©) 2010-2012, 2014, 2015 EPFL (Ecole Polytechnique Fédérale de # Lausanne) Laboratory (LSMS - Laboratoire de Simulation en Mécanique des # Solides) # # Akantu is free software: you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 3 of the License, or (at your option) any # later version. # # Akantu is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License # along with Akantu. If not, see . # #=============================================================================== package_declare(implicit META DESCRIPTION "Add support for implicit time scheme") -package_declare_sources(implicit - model/common/non_linear_solver/non_linear_solver_linear.cc - model/common/non_linear_solver/non_linear_solver_linear.hh - model/common/non_linear_solver/non_linear_solver_newton_raphson.cc - model/common/non_linear_solver/non_linear_solver_newton_raphson.hh - ) - set(AKANTU_IMPLICIT_SOLVER "Mumps" CACHE STRING "Solver activated in Akantu") set_property(CACHE AKANTU_IMPLICIT_SOLVER PROPERTY STRINGS Mumps PETSc Mumps+PETSc ) if(AKANTU_IMPLICIT_SOLVER MATCHES "Mumps") package_add_dependencies(implicit PRIVATE Mumps) else() package_remove_dependencies(implicit Mumps) + set(AKANTU_USE_MUMPS OFF CACHE BOOL "" FORCE) endif() if(AKANTU_IMPLICIT_SOLVER MATCHES "PETSc") package_add_dependencies(implicit PRIVATE PETSc) else() package_remove_dependency(implicit PETSc) + set(AKANTU_USE_PETSC OFF CACHE BOOL "" FORCE) endif() package_declare_documentation(implicit "This package activates the sparse solver necessary to solve implicitely static/dynamic" "finite element problems." "It depends on:" "\\begin{itemize}" " \\item \\href{http://mumps.enseeiht.fr/}{MUMPS}, a parallel sparse direct solver." " \\item \\href{http://www.labri.fr/perso/pelegrin/scotch/}{Scotch}, a graph partitioner." "\\end{itemize}" ) diff --git a/packages/mumps.cmake b/packages/mumps.cmake index d41953e93..e2967178a 100644 --- a/packages/mumps.cmake +++ b/packages/mumps.cmake @@ -1,110 +1,114 @@ #=============================================================================== # @file mumps.cmake # # @author Nicolas Richart # # @date creation: Mon Nov 21 2011 # @date last modification: Mon Jan 18 2016 # # @brief package description for mumps support # # @section LICENSE # # Copyright (©) 2010-2012, 2014, 2015 EPFL (Ecole Polytechnique Fédérale de # Lausanne) Laboratory (LSMS - Laboratoire de Simulation en Mécanique des # Solides) # # Akantu is free software: you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 3 of the License, or (at your option) any # later version. # # Akantu is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License # along with Akantu. If not, see . # #=============================================================================== package_declare(Mumps EXTERNAL DESCRIPTION "Add Mumps support in akantu" SYSTEM ON ) package_declare_sources(Mumps + model/common/non_linear_solver/non_linear_solver_linear.cc + model/common/non_linear_solver/non_linear_solver_linear.hh + model/common/non_linear_solver/non_linear_solver_newton_raphson.cc + model/common/non_linear_solver/non_linear_solver_newton_raphson.hh solver/sparse_solver_mumps.cc solver/sparse_solver_mumps.hh ) set(_mumps_float_type ${AKANTU_FLOAT_TYPE}) if(AKANTU_FLOAT_TYPE STREQUAL "float" OR AKANTU_FLOAT_TYPE STREQUAL "double") set(_mumps_components ${AKANTU_FLOAT_TYPE}) else() if(DEFINED AKANTU_FLOAT_TYPE) message(FATAL_ERROR "MUMPS doea not support floating point type \"${AKANTU_FLOAT_TYPE}\"") endif() endif() package_get_option_name(parallel _par_option) if(${_par_option}) package_set_find_package_extra_options(Mumps ARGS COMPONENTS "parallel" ${_mumps_components}) package_add_third_party_script_variable(Mumps MUMPS_TYPE "par") package_set_package_system_dependency(Mumps deb libmumps) package_set_package_system_dependency(Mumps deb-src libmumps-dev) else() package_set_find_package_extra_options(Mumps ARGS COMPONENTS "sequential" ${_mumps_components}) package_add_third_party_script_variable(Mumps MUMPS_TYPE "seq") package_set_package_system_dependency(Mumps deb libmumps-seq) package_set_package_system_dependency(Mumps deb-src libmumps-seq-dev) endif() package_use_system(Mumps _use_system) if(NOT _use_system) enable_language(Fortran) set(AKANTU_USE_MUMPS_VERSION "4.10.0" CACHE STRING "Default Mumps version to compile") mark_as_advanced(AKANTU_USE_MUMPS_VERSION) set_property(CACHE AKANTU_USE_MUMPS_VERSION PROPERTY STRINGS "4.9.2" "4.10.0" "5.0.0") package_get_option_name(MPI _mpi_option) if(${_mpi_option}) package_add_dependencies(Mumps ScaLAPACK MPI) endif() package_add_dependencies(Mumps Scotch BLAS) endif() package_declare_documentation(Mumps "This package enables the \\href{http://mumps.enseeiht.fr/}{MUMPS} parallel direct solver for sparce matrices." "This is necessary to solve static or implicit problems." "" "Under Ubuntu (14.04 LTS) the installation can be performed using the commands:" "" "\\begin{command}" " > sudo apt-get install libmumps-seq-dev # for sequential" " > sudo apt-get install libmumps-dev # for parallel" "\\end{command}" "" "Under Mac OS X the installation requires the following steps:" "\\begin{command}" " > sudo port install mumps" "\\end{command}" "" "If you activate the advanced option AKANTU\\_USE\\_THIRD\\_PARTY\\_MUMPS the make system of akantu can automatically compile MUMPS. For this you will have to download MUMPS from \\url{http://mumps.enseeiht.fr/} or \\url{http://graal.ens-lyon.fr/MUMPS} and place it in \\shellcode{/third-party}" ) package_declare_extra_files_to_package(MUMPS PROJECT third-party/MUMPS_4.10.0_make.inc.cmake third-party/MUMPS_5.0.0.patch third-party/MUMPS_4.10.0.patch third-party/MUMPS_4.9.2_make.inc.cmake third-party/cmake/mumps.cmake cmake/Modules/FindMumps.cmake ) diff --git a/src/model/common/dof_manager/dof_manager_default.cc b/src/model/common/dof_manager/dof_manager_default.cc index 3b9087c3b..ed6933bf6 100644 --- a/src/model/common/dof_manager/dof_manager_default.cc +++ b/src/model/common/dof_manager/dof_manager_default.cc @@ -1,485 +1,485 @@ /** * @file dof_manager_default.cc * * @author Nicolas Richart * * @date creation: Tue Aug 18 2015 * @date last modification: Thu Feb 08 2018 * * @brief Implementation of the default DOFManager * * @section LICENSE * * Copyright (©) 2015-2018 EPFL (Ecole Polytechnique Fédérale de Lausanne) * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides) * * Akantu is free software: you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License as published by the Free * Software Foundation, either version 3 of the License, or (at your option) any * later version. * * Akantu is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. * * You should have received a copy of the GNU Lesser General Public License * along with Akantu. If not, see . * */ /* -------------------------------------------------------------------------- */ #include "dof_manager_default.hh" #include "communicator.hh" #include "dof_synchronizer.hh" #include "element_group.hh" #include "non_linear_solver_default.hh" #include "periodic_node_synchronizer.hh" #include "solver_vector_default.hh" #include "solver_vector_distributed.hh" #include "sparse_matrix_aij.hh" #include "time_step_solver_default.hh" /* -------------------------------------------------------------------------- */ #include #include #include #include /* -------------------------------------------------------------------------- */ namespace akantu { /* -------------------------------------------------------------------------- */ DOFManagerDefault::DOFManagerDefault(const ID & id, const MemoryID & memory_id) : DOFManager(id, memory_id), synchronizer(nullptr) { residual = std::make_unique( *this, std::string(id + ":residual")); solution = std::make_unique( *this, std::string(id + ":solution")); data_cache = std::make_unique( *this, std::string(id + ":data_cache")); } /* -------------------------------------------------------------------------- */ DOFManagerDefault::DOFManagerDefault(Mesh & mesh, const ID & id, const MemoryID & memory_id) : DOFManager(mesh, id, memory_id), synchronizer(nullptr) { if (this->mesh->isDistributed()) { this->synchronizer = std::make_unique( *this, this->id + ":dof_synchronizer", this->memory_id); residual = std::make_unique( *this, std::string(id + ":residual")); solution = std::make_unique( *this, std::string(id + ":solution")); data_cache = std::make_unique( *this, std::string(id + ":data_cache")); } else { residual = std::make_unique( *this, std::string(id + ":residual")); solution = std::make_unique( *this, std::string(id + ":solution")); data_cache = std::make_unique( *this, std::string(id + ":data_cache")); } } /* -------------------------------------------------------------------------- */ DOFManagerDefault::~DOFManagerDefault() = default; /* -------------------------------------------------------------------------- */ void DOFManagerDefault::makeConsistentForPeriodicity(const ID & dof_id, SolverVector & array) { auto & dof_data = this->getDOFDataTyped(dof_id); if (dof_data.support_type != _dst_nodal) return; if (not mesh->isPeriodic()) return; this->mesh->getPeriodicNodeSynchronizer() .reduceSynchronizeWithPBCSlaves( aka::as_type(array).getVector()); } /* -------------------------------------------------------------------------- */ template void DOFManagerDefault::assembleToGlobalArray( const ID & dof_id, const Array & array_to_assemble, Array & global_array, T scale_factor) { AKANTU_DEBUG_IN(); auto & dof_data = this->getDOFDataTyped(dof_id); AKANTU_DEBUG_ASSERT(dof_data.local_equation_number.size() == array_to_assemble.size() * array_to_assemble.getNbComponent(), "The array to assemble does not have a correct size." << " (" << array_to_assemble.getID() << ")"); if (dof_data.support_type == _dst_nodal and mesh->isPeriodic()) { for (auto && data : zip(dof_data.local_equation_number, dof_data.associated_nodes, make_view(array_to_assemble))) { auto && equ_num = std::get<0>(data); auto && node = std::get<1>(data); auto && arr = std::get<2>(data); global_array(equ_num) += scale_factor * (arr) * (not this->mesh->isPeriodicSlave(node)); } } else { for (auto && data : zip(dof_data.local_equation_number, make_view(array_to_assemble))) { auto && equ_num = std::get<0>(data); auto && arr = std::get<1>(data); global_array(equ_num) += scale_factor * (arr); } } AKANTU_DEBUG_OUT(); } /* -------------------------------------------------------------------------- */ void DOFManagerDefault::assembleToGlobalArray( const ID & dof_id, const Array & array_to_assemble, SolverVector & global_array_v, Real scale_factor) { assembleToGlobalArray( dof_id, array_to_assemble, aka::as_type(global_array_v).getVector(), scale_factor); } /* -------------------------------------------------------------------------- */ DOFManagerDefault::DOFDataDefault::DOFDataDefault(const ID & dof_id) : DOFData(dof_id) {} /* -------------------------------------------------------------------------- */ auto DOFManagerDefault::getNewDOFData(const ID & dof_id) -> std::unique_ptr { return std::make_unique(dof_id); } /* -------------------------------------------------------------------------- */ std::tuple DOFManagerDefault::registerDOFsInternal(const ID & dof_id, Array & dofs_array) { auto ret = DOFManager::registerDOFsInternal(dof_id, dofs_array); // update the synchronizer if needed if (this->synchronizer) this->synchronizer->registerDOFs(dof_id); return ret; } /* -------------------------------------------------------------------------- */ SparseMatrix & DOFManagerDefault::getNewMatrix(const ID & id, const MatrixType & matrix_type) { return this->registerSparseMatrix(*this, id, matrix_type); } /* -------------------------------------------------------------------------- */ SparseMatrix & DOFManagerDefault::getNewMatrix(const ID & id, const ID & matrix_to_copy_id) { return this->registerSparseMatrix(id, matrix_to_copy_id); } /* -------------------------------------------------------------------------- */ SolverVector & DOFManagerDefault::getNewLumpedMatrix(const ID & id) { return this->registerLumpedMatrix(*this, id); } /* -------------------------------------------------------------------------- */ SparseMatrixAIJ & DOFManagerDefault::getMatrix(const ID & id) { auto & matrix = DOFManager::getMatrix(id); return aka::as_type(matrix); } /* -------------------------------------------------------------------------- */ NonLinearSolver & DOFManagerDefault::getNewNonLinearSolver(const ID & id, const NonLinearSolverType & type) { switch (type) { -#if defined(AKANTU_IMPLICIT) +#if defined(AKANTU_USE_MUMPS) case NonLinearSolverType::_newton_raphson: /* FALLTHRU */ /* [[fallthrough]]; un-comment when compiler will get it */ case NonLinearSolverType::_newton_raphson_modified: { return this->registerNonLinearSolver( *this, id, type); } case NonLinearSolverType::_linear: { return this->registerNonLinearSolver(*this, id, type); } #endif case NonLinearSolverType::_lumped: { return this->registerNonLinearSolver(*this, id, type); } default: AKANTU_EXCEPTION("The asked type of non linear solver is not supported by " "this dof manager"); } } /* -------------------------------------------------------------------------- */ TimeStepSolver & DOFManagerDefault::getNewTimeStepSolver( const ID & id, const TimeStepSolverType & type, NonLinearSolver & non_linear_solver, SolverCallback & solver_callback) { return this->registerTimeStepSolver( *this, id, type, non_linear_solver, solver_callback); } /* -------------------------------------------------------------------------- */ template void DOFManagerDefault::getArrayPerDOFs(const ID & dof_id, const Array & global_array, Array & local_array) const { AKANTU_DEBUG_IN(); const Array & equation_number = this->getLocalEquationsNumbers(dof_id); UInt nb_degree_of_freedoms = equation_number.size(); local_array.resize(nb_degree_of_freedoms / local_array.getNbComponent()); auto loc_it = local_array.begin_reinterpret(nb_degree_of_freedoms); auto equ_it = equation_number.begin(); for (UInt d = 0; d < nb_degree_of_freedoms; ++d, ++loc_it, ++equ_it) { (*loc_it) = global_array(*equ_it); } AKANTU_DEBUG_OUT(); } /* -------------------------------------------------------------------------- */ void DOFManagerDefault::getArrayPerDOFs(const ID & dof_id, const SolverVector & global_array, Array & local_array) { getArrayPerDOFs(dof_id, aka::as_type(global_array).getVector(), local_array); } /* -------------------------------------------------------------------------- */ void DOFManagerDefault::assembleLumpedMatMulVectToResidual( const ID & dof_id, const ID & A_id, const Array & x, Real scale_factor) { const Array & A = this->getLumpedMatrix(A_id); auto & cache = aka::as_type(*this->data_cache); cache.clear(); this->assembleToGlobalArray(dof_id, x, cache.getVector(), scale_factor); for (auto && data : zip(make_view(A), make_view(cache.getVector()), make_view(this->getResidualArray()))) { const auto & A = std::get<0>(data); const auto & x = std::get<1>(data); auto & r = std::get<2>(data); r += A * x; } } /* -------------------------------------------------------------------------- */ void DOFManagerDefault::assembleElementalMatricesToMatrix( const ID & matrix_id, const ID & dof_id, const Array & elementary_mat, const ElementType & type, const GhostType & ghost_type, const MatrixType & elemental_matrix_type, const Array & filter_elements) { this->addToProfile(matrix_id, dof_id, type, ghost_type); auto & A = getMatrix(matrix_id); DOFManager::assembleElementalMatricesToMatrix_( A, dof_id, elementary_mat, type, ghost_type, elemental_matrix_type, filter_elements); } /* -------------------------------------------------------------------------- */ void DOFManagerDefault::assemblePreassembledMatrix( const ID & dof_id_m, const ID & dof_id_n, const ID & matrix_id, const TermsToAssemble & terms) { auto & A = getMatrix(matrix_id); DOFManager::assemblePreassembledMatrix_(A, dof_id_m, dof_id_n, terms); } /* -------------------------------------------------------------------------- */ void DOFManagerDefault::assembleMatMulVectToArray(const ID & dof_id, const ID & A_id, const Array & x, Array & array, Real scale_factor) { if (mesh->isDistributed()) { DOFManager::assembleMatMulVectToArray_( dof_id, A_id, x, array, scale_factor); } else { DOFManager::assembleMatMulVectToArray_( dof_id, A_id, x, array, scale_factor); } } /* -------------------------------------------------------------------------- */ void DOFManagerDefault::addToProfile(const ID & matrix_id, const ID & dof_id, const ElementType & type, const GhostType & ghost_type) { AKANTU_DEBUG_IN(); const auto & dof_data = this->getDOFData(dof_id); if (dof_data.support_type != _dst_nodal) return; auto mat_dof = std::make_pair(matrix_id, dof_id); auto type_pair = std::make_pair(type, ghost_type); auto prof_it = this->matrix_profiled_dofs.find(mat_dof); if (prof_it != this->matrix_profiled_dofs.end() && std::find(prof_it->second.begin(), prof_it->second.end(), type_pair) != prof_it->second.end()) return; auto nb_degree_of_freedom_per_node = dof_data.dof->getNbComponent(); const auto & equation_number = this->getLocalEquationsNumbers(dof_id); auto & A = this->getMatrix(matrix_id); A.resize(system_size); auto size = A.size(); auto nb_nodes_per_element = Mesh::getNbNodesPerElement(type); const auto & connectivity = this->mesh->getConnectivity(type, ghost_type); auto cbegin = connectivity.begin(nb_nodes_per_element); auto cit = cbegin; auto nb_elements = connectivity.size(); UInt * ge_it = nullptr; if (dof_data.group_support != "__mesh__") { const auto & group_elements = this->mesh->getElementGroup(dof_data.group_support) .getElements(type, ghost_type); ge_it = group_elements.storage(); nb_elements = group_elements.size(); } UInt size_mat = nb_nodes_per_element * nb_degree_of_freedom_per_node; Vector element_eq_nb(size_mat); for (UInt e = 0; e < nb_elements; ++e) { if (ge_it) cit = cbegin + *ge_it; this->extractElementEquationNumber( equation_number, *cit, nb_degree_of_freedom_per_node, element_eq_nb); std::transform( element_eq_nb.storage(), element_eq_nb.storage() + element_eq_nb.size(), element_eq_nb.storage(), [&](auto & local) { return this->localToGlobalEquationNumber(local); }); if (ge_it) ++ge_it; else ++cit; for (UInt i = 0; i < size_mat; ++i) { UInt c_irn = element_eq_nb(i); if (c_irn < size) { for (UInt j = 0; j < size_mat; ++j) { UInt c_jcn = element_eq_nb(j); if (c_jcn < size) { A.add(c_irn, c_jcn); } } } } } this->matrix_profiled_dofs[mat_dof].push_back(type_pair); AKANTU_DEBUG_OUT(); } /* -------------------------------------------------------------------------- */ Array & DOFManagerDefault::getSolutionArray() { return dynamic_cast(this->solution.get())->getVector(); } /* -------------------------------------------------------------------------- */ const Array & DOFManagerDefault::getResidualArray() const { return dynamic_cast(this->residual.get())->getVector(); } /* -------------------------------------------------------------------------- */ Array & DOFManagerDefault::getResidualArray() { return dynamic_cast(this->residual.get())->getVector(); } /* -------------------------------------------------------------------------- */ void DOFManagerDefault::onNodesAdded(const Array & nodes_list, const NewNodesEvent & event) { DOFManager::onNodesAdded(nodes_list, event); if (this->synchronizer) this->synchronizer->onNodesAdded(nodes_list); } /* -------------------------------------------------------------------------- */ void DOFManagerDefault::resizeGlobalArrays() { DOFManager::resizeGlobalArrays(); this->global_blocked_dofs.resize(this->local_system_size, true); this->previous_global_blocked_dofs.resize(this->local_system_size, true); matrix_profiled_dofs.clear(); } /* -------------------------------------------------------------------------- */ void DOFManagerDefault::updateGlobalBlockedDofs() { DOFManager::updateGlobalBlockedDofs(); if (this->global_blocked_dofs_release == this->previous_global_blocked_dofs_release) return; global_blocked_dofs_uint.resize(local_system_size); global_blocked_dofs_uint.set(false); for (const auto & dof : global_blocked_dofs) { global_blocked_dofs_uint[dof] = true; } } /* -------------------------------------------------------------------------- */ Array & DOFManagerDefault::getBlockedDOFs() { return global_blocked_dofs_uint; } /* -------------------------------------------------------------------------- */ const Array & DOFManagerDefault::getBlockedDOFs() const { return global_blocked_dofs_uint; } /* -------------------------------------------------------------------------- */ // register in factory // static bool default_dof_manager_is_registered [[gnu::unused]] = // DefaultDOFManagerFactory::getInstance().registerAllocator( // "default", // [](const ID & id, // const MemoryID & mem_id) -> std::unique_ptr { // return std::make_unique(id, mem_id); // }); static bool dof_manager_is_registered [[gnu::unused]] = DOFManagerFactory::getInstance().registerAllocator( "default", [](Mesh & mesh, const ID & id, const MemoryID & mem_id) -> std::unique_ptr { return std::make_unique(mesh, id, mem_id); }); static bool dof_manager_is_registered_mumps [[gnu::unused]] = DOFManagerFactory::getInstance().registerAllocator( "mumps", [](Mesh & mesh, const ID & id, const MemoryID & mem_id) -> std::unique_ptr { return std::make_unique(mesh, id, mem_id); }); } // namespace akantu diff --git a/src/model/common/non_linear_solver/non_linear_solver_default.hh b/src/model/common/non_linear_solver/non_linear_solver_default.hh index 7cc1f2b53..8072f751a 100644 --- a/src/model/common/non_linear_solver/non_linear_solver_default.hh +++ b/src/model/common/non_linear_solver/non_linear_solver_default.hh @@ -1,45 +1,45 @@ /** * @file non_linear_solver_default.hh * * @author Nicolas Richart * * @date creation: Fri Jun 18 2010 * @date last modification: Wed Jan 31 2018 * * @brief Include for the default non linear solvers * * @section LICENSE * * Copyright (©) 2010-2018 EPFL (Ecole Polytechnique Fédérale de Lausanne) * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides) * * Akantu is free software: you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License as published by the Free * Software Foundation, either version 3 of the License, or (at your option) any * later version. * * Akantu is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. * * You should have received a copy of the GNU Lesser General Public License * along with Akantu. If not, see . * */ /* -------------------------------------------------------------------------- */ #include "aka_common.hh" /* -------------------------------------------------------------------------- */ #ifndef __AKANTU_NON_LINEAR_SOLVER_DEFAULT_HH__ #define __AKANTU_NON_LINEAR_SOLVER_DEFAULT_HH__ -#if defined(AKANTU_IMPLICIT) +#if defined(AKANTU_USE_MUMPS) #include "non_linear_solver_linear.hh" #include "non_linear_solver_newton_raphson.hh" #endif #include "non_linear_solver_lumped.hh" #endif /* __AKANTU_NON_LINEAR_SOLVER_DEFAULT_HH__ */ diff --git a/test/test_model/test_solid_mechanics_model/test_materials/CMakeLists.txt b/test/test_model/test_solid_mechanics_model/test_materials/CMakeLists.txt index 62be306b0..165703efa 100644 --- a/test/test_model/test_solid_mechanics_model/test_materials/CMakeLists.txt +++ b/test/test_model/test_solid_mechanics_model/test_materials/CMakeLists.txt @@ -1,108 +1,107 @@ #=============================================================================== # @file CMakeLists.txt # # @author Guillaume Anciaux # # @date creation: Fri Oct 22 2010 # @date last modification: Mon Jan 29 2018 # # @brief configuration for materials tests # # @section LICENSE # # Copyright (©) 2010-2018 EPFL (Ecole Polytechnique Fédérale de Lausanne) # Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides) # # Akantu is free software: you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 3 of the License, or (at your option) any # later version. # # Akantu is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with Akantu. If not, see . # # @section DESCRIPTION # #=============================================================================== #add_mesh(test_local_material_barre_trou_mesh barre_trou.geo 2 2) add_mesh(test_local_material_barre_trou_mesh mesh_section_gap.geo 2 2) register_test(test_local_material SOURCES test_local_material.cc local_material_damage.cc EXTRA_FILES local_material_damage.hh local_material_damage_inline_impl.cc DEPENDS test_local_material_barre_trou_mesh FILES_TO_COPY material.dat DIRECTORIES_TO_CREATE paraview PACKAGE core ) # ============================================================================== add_mesh(test_interpolate_stress_mesh interpolation.geo 3 2) register_test(test_interpolate_stress test_interpolate_stress.cc FILES_TO_COPY material_interpolate.dat DEPENDS test_interpolate_stress_mesh DIRECTORIES_TO_CREATE paraview PACKAGE lapack core ) #=============================================================================== add_mesh(test_material_orthotropic_square_mesh square.geo 2 1) register_test(test_material_orthotropic SOURCES test_material_orthotropic.cc DEPENDS test_material_orthotropic_square_mesh FILES_TO_COPY orthotropic.dat DIRECTORIES_TO_CREATE paraview PACKAGE core lapack ) #=============================================================================== register_test(test_material_mazars SOURCES test_material_mazars.cc FILES_TO_COPY material_mazars.dat DIRECTORIES_TO_CREATE paraview PACKAGE core lapack UNSTABLE ) # ============================================================================== add_akantu_test(test_material_viscoelastic "test the visco elastic materials") add_akantu_test(test_material_non_local "test the non-local materials") add_akantu_test(test_material_elasto_plastic_linear_isotropic_hardening "test the elasto plastic with linear isotropic hardening materials") add_akantu_test(test_material_viscoelastic_maxwell "test the viscoelastic maxwell material") # ============================================================================== add_mesh(test_multi_material_elastic_mesh test_multi_material_elastic.geo 2 1) register_test(test_multi_material_elastic SOURCES test_multi_material_elastic.cc FILES_TO_COPY test_multi_material_elastic.dat DEPENDS test_multi_material_elastic_mesh PACKAGE implicit) # ============================================================================== # Material unit tests # ============================================================================== add_mesh(test_finite_deformation_mesh cube.geo 3 1) -register_gtest_sources(test_finite_deformation - SOURCES test_finite_deformation.cc +register_gtest_sources(SOURCES test_finite_deformation.cc FILES_TO_COPY material_finite_deformation.dat 1_tetrahedron.msh DEPENDS test_finite_deformation_mesh PACKAGE implicit) register_gtest_sources(SOURCES test_elastic_materials.cc PACKAGE core) register_gtest_sources(SOURCES test_finite_def_materials.cc PACKAGE core) register_gtest_sources(SOURCES test_damage_materials.cc PACKAGE core python_interface LINK_LIBRARIES pyakantu FILES_TO_COPY py_mazars.py) register_gtest_sources(SOURCES test_plastic_materials.cc PACKAGE core) register_gtest_sources(SOURCES test_material_thermal.cc PACKAGE core) register_gtest_test(test_material)