diff --git a/test/test_model/test_structural_mechanics_model/CMakeLists.txt b/test/test_model/test_structural_mechanics_model/CMakeLists.txt index c2a5981c7..e8b9a4555 100644 --- a/test/test_model/test_structural_mechanics_model/CMakeLists.txt +++ b/test/test_model/test_structural_mechanics_model/CMakeLists.txt @@ -1,76 +1,76 @@ #=============================================================================== # @file CMakeLists.txt # # @author Fabian Barras # # @date creation: Fri Sep 03 2010 # @date last modification: Mon Dec 07 2015 # # @brief Structural Mechanics Model Tests # # @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 . # #=============================================================================== -register_gtest_sources( - SOURCES test_structural_mechanics_model_bernoulli_beam_2_exemple_1_1.cc - PACKAGE implicit structural_mechanics - ) +# register_gtest_sources( +# SOURCES test_structural_mechanics_model_bernoulli_beam_2_exemple_1_1.cc +# PACKAGE implicit structural_mechanics +# ) -register_gtest_test(test_structural_mechanics) +# register_gtest_test(test_structural_mechanics) -# register_test(test_structural_mechanics_model_bernoulli_beam_2_exemple_1_1_y -# test_structural_mechanics_model_bernoulli_beam_2_exemple_1_1_y.cc -# PACKAGE structural_mechanics -# ) +register_test(test_structural_mechanics_model_bernoulli_beam_2_exemple_1_1 + test_structural_mechanics_model_bernoulli_beam_2_exemple_1_1.cc + PACKAGE structural_mechanics +) # register_test(test_structural_mechanics_model_bernoulli_beam_3_exemple_1_1_xy # test_structural_mechanics_model_bernoulli_beam_3_exemple_1_1_xy.cc # PACKAGE structural_mechanics # ) # register_test(test_structural_mechanics_model_bernoulli_beam_3_exemple_1_1_zy # test_structural_mechanics_model_bernoulli_beam_3_exemple_1_1_zy.cc # PACKAGE structural_mechanics # ) # register_test(test_structural_mechanics_model_bernoulli_beam_3_exercice_12_10_13 # test_structural_mechanics_model_bernoulli_beam_3_exercice_12_10_13.cc # PACKAGE structural_mechanics # ) # register_test(test_structural_mechanics_model_bernoulli_beam_dynamics # test_structural_mechanics_model_bernoulli_beam_dynamics.cc # PACKAGE structural_mechanics # ) # register_test(test_structural_mechanics_model_kirchhoff_shell_patch_test_4_5_5 # test_structural_mechanics_model_kirchhoff_shell_patch_test_4_5_5.cc # PACKAGE structural_mechanics # ) # add_mesh(complicated_mesh complicated.geo 1 1) # register_test(test_structural_mechanics_model_bernoulli_beam_2_complicated # test_structural_mechanics_model_bernoulli_beam_2_complicated.cc # DEPENDS complicated_mesh # PACKAGE structural_mechanics # ) diff --git a/test/test_model/test_structural_mechanics_model/test_structural_mechanics_model_bernoulli_beam_2_complicated.verified b/test/test_model/test_structural_mechanics_model/test_structural_mechanics_model_bernoulli_beam_2_complicated.verified deleted file mode 100644 index 026043e7f..000000000 --- a/test/test_model/test_structural_mechanics_model/test_structural_mechanics_model_bernoulli_beam_2_complicated.verified +++ /dev/null @@ -1,2 +0,0 @@ - x1 = 6.50788e-06 - x2 = 5.39678e-06 diff --git a/test/test_model/test_structural_mechanics_model/test_structural_mechanics_model_bernoulli_beam_2_exemple_1_1.cc b/test/test_model/test_structural_mechanics_model/test_structural_mechanics_model_bernoulli_beam_2_exemple_1_1.cc index fba5e0f5d..a9b201de6 100644 --- a/test/test_model/test_structural_mechanics_model/test_structural_mechanics_model_bernoulli_beam_2_exemple_1_1.cc +++ b/test/test_model/test_structural_mechanics_model/test_structural_mechanics_model_bernoulli_beam_2_exemple_1_1.cc @@ -1,172 +1,48 @@ /** * @file test_structural_mechanics_model_bernoulli_beam_2_exemple_1_1.cc * * @author Fabian Barras * * @date creation: Fri Jul 15 2011 * @date last modification: Sun Oct 19 2014 * * @brief Computation of the analytical exemple 1.1 in the TGC vol 6 * * @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 . * */ /* -------------------------------------------------------------------------- */ -#include -#include - -/* -------------------------------------------------------------------------- */ -#include "test_structural_mechanics_model_fixture.hh" - #include "aka_common.hh" #include "mesh.hh" -#include "mesh_io.hh" -#include "mesh_io_msh.hh" #include "structural_mechanics_model.hh" -#include "material.hh" /* -------------------------------------------------------------------------- */ -#define TYPE _bernoulli_beam_2 - using namespace akantu; -namespace { - -//Linear load function -// static void lin_load(double * position, double * load, -// __attribute__ ((unused)) Real * normal, -// __attribute__ ((unused)) UInt surface_id){ -// memset(load,0,sizeof(Real)*3); -// if (position[0]<=10){ -// load[1]= -6000; -// } -// } - -void test_body(StructuralMechanicsModel & model, Mesh & beams){ - /* -------------------------------------------------------------------------- */ - // Defining the mesh - - UInt nb_nodes=3; - UInt nb_nodes_1=1; - UInt nb_nodes_2=nb_nodes-nb_nodes_1 - 1; - UInt nb_element=nb_nodes-1; - - Array & nodes = const_cast &>(beams.getNodes()); - nodes.resize(nb_nodes); - - beams.addConnectivityType(_bernoulli_beam_2); - Array & connectivity = const_cast &>(beams.getConnectivity(_bernoulli_beam_2)); - connectivity.resize(nb_element); - - for(UInt i=0; i & forces = model.getExternalForce(); - Array & displacement = model.getDisplacement(); - Array & boundary = model.getBlockedDOFs(); - const Array & N_M = model.getStress(_bernoulli_beam_2); - - Array & element_material = model.getElementMaterial(_bernoulli_beam_2); - - forces.clear(); - displacement.clear(); - - for (UInt i = 0; i < nb_nodes_2; ++i) { - element_material(i+nb_nodes_1)=1; - } - - - forces(nb_nodes-1,2) += M; - -#if 0 - model.computeForcesFromFunction<_bernoulli_beam_2>(lin_load, akantu::_bft_traction); -#endif - - /* -------------------------------------------------------------------------- */ - // Defining the boundary conditions - - boundary(0,0) = true; - boundary(0,1) = true; - boundary(0,2) = true; - boundary(nb_nodes_1,1) = true; - boundary(nb_nodes-1,1) = true; - /* -------------------------------------------------------------------------- */ - // Solve - - model.assembleStiffnessMatrix(); - model.solveStep(); - - /* -------------------------------------------------------------------------- */ - // Post-Processing - model.computeStresses(); - std::cout<< " d1 = " << displacement(nb_nodes_1,2) << std::endl; - std::cout<< " d2 = " << displacement(nb_nodes-1,2) << std::endl; - std::cout<< " M1 = " << N_M(0,1) << std::endl; - std::cout<< " M2 = " << N_M(2*(nb_nodes-2),1) << std::endl; -} - -TEST_F(TestStructuralFixtureBeam2, TestBernouilli) { - test_body(*(this->model), *(this->mesh)); + return 0; } - -} // namespace diff --git a/test/test_model/test_structural_mechanics_model/test_structural_mechanics_model_bernoulli_beam_2_exemple_1_1.verified b/test/test_model/test_structural_mechanics_model/test_structural_mechanics_model_bernoulli_beam_2_exemple_1_1.verified deleted file mode 100644 index 52410d8de..000000000 --- a/test/test_model/test_structural_mechanics_model/test_structural_mechanics_model_bernoulli_beam_2_exemple_1_1.verified +++ /dev/null @@ -1,4 +0,0 @@ - d1 = 0.00116667 - d2 = -0.000770833 - M1 = 13854.8 - M2 = -17674.5 diff --git a/test/test_model/test_structural_mechanics_model/test_structural_mechanics_model_bernoulli_beam_2_exemple_1_1_y.verified b/test/test_model/test_structural_mechanics_model/test_structural_mechanics_model_bernoulli_beam_2_exemple_1_1_y.verified deleted file mode 100644 index 52410d8de..000000000 --- a/test/test_model/test_structural_mechanics_model/test_structural_mechanics_model_bernoulli_beam_2_exemple_1_1_y.verified +++ /dev/null @@ -1,4 +0,0 @@ - d1 = 0.00116667 - d2 = -0.000770833 - M1 = 13854.8 - M2 = -17674.5 diff --git a/test/test_model/test_structural_mechanics_model/test_structural_mechanics_model_bernoulli_beam_3_exemple_1_1_xy.verified b/test/test_model/test_structural_mechanics_model/test_structural_mechanics_model_bernoulli_beam_3_exemple_1_1_xy.verified deleted file mode 100644 index f442d24c7..000000000 --- a/test/test_model/test_structural_mechanics_model/test_structural_mechanics_model_bernoulli_beam_3_exemple_1_1_xy.verified +++ /dev/null @@ -1,11 +0,0 @@ -Initialisation -Mesh definition -Material Definition -Force Definition -BC Definition -Assemble Done -Matrix saved - d1 = 0.00116667 - d2 = -0.000770833 - M1 = 13854.8 - M2 = -17674.5 diff --git a/test/test_model/test_structural_mechanics_model/test_structural_mechanics_model_bernoulli_beam_3_exemple_1_1_zy.verified b/test/test_model/test_structural_mechanics_model/test_structural_mechanics_model_bernoulli_beam_3_exemple_1_1_zy.verified deleted file mode 100644 index f442d24c7..000000000 --- a/test/test_model/test_structural_mechanics_model/test_structural_mechanics_model_bernoulli_beam_3_exemple_1_1_zy.verified +++ /dev/null @@ -1,11 +0,0 @@ -Initialisation -Mesh definition -Material Definition -Force Definition -BC Definition -Assemble Done -Matrix saved - d1 = 0.00116667 - d2 = -0.000770833 - M1 = 13854.8 - M2 = -17674.5 diff --git a/test/test_model/test_structural_mechanics_model/test_structural_mechanics_model_bernoulli_beam_3_exercice_12_10_13.verified b/test/test_model/test_structural_mechanics_model/test_structural_mechanics_model_bernoulli_beam_3_exercice_12_10_13.verified deleted file mode 100644 index 8cd9ed1e2..000000000 --- a/test/test_model/test_structural_mechanics_model/test_structural_mechanics_model_bernoulli_beam_3_exercice_12_10_13.verified +++ /dev/null @@ -1,9 +0,0 @@ -Initialisation -Mesh definition -Material Definition -Force Definition -BC Definition -Assemble Done -Matrix saved - wA = -0.103713 - TethayB = 0.0940764 diff --git a/test/test_model/test_structural_mechanics_model/test_structural_mechanics_model_bernoulli_beam_dynamics.verified b/test/test_model/test_structural_mechanics_model/test_structural_mechanics_model_bernoulli_beam_dynamics.verified deleted file mode 100644 index 8e14e393b..000000000 --- a/test/test_model/test_structural_mechanics_model/test_structural_mechanics_model_bernoulli_beam_dynamics.verified +++ /dev/null @@ -1,65 +0,0 @@ -Time | Mid-Span Displacement -0.01 | 0.000132234 -0.02 | 0.000374537 -0.03 | 0.000705039 -0.04 | 0.00106737 -0.05 | 0.00138423 -0.06 | 0.00183446 -0.07 | 0.00237726 -0.08 | 0.00309144 -0.09 | 0.00396872 -0.1 | 0.00484179 -0.11 | 0.00575559 -0.12 | 0.00658857 -0.13 | 0.00742112 -0.14 | 0.00836997 -0.15 | 0.00937467 -0.16 | 0.010519 -0.17 | 0.0116208 -0.18 | 0.0126192 -0.19 | 0.0135506 -0.2 | 0.0143601 -0.21 | 0.0152345 -0.22 | 0.0161267 -0.23 | 0.0170114 -0.24 | 0.0178768 -0.25 | 0.0185411 -0.26 | 0.0190885 -0.27 | 0.0194919 -0.28 | 0.0198172 -0.29 | 0.0201946 -0.3 | 0.0204978 -0.31 | 0.0207512 -0.32 | 0.0208189 -0.33 | 0.0206586 -0.34 | 0.0204124 -0.35 | 0.0200535 -0.36 | 0.0197284 -0.37 | 0.0193797 -0.38 | 0.0189136 -0.39 | 0.0183583 -0.4 | 0.0175855 -0.41 | 0.016724 -0.42 | 0.0158288 -0.43 | 0.0149275 -0.44 | 0.0141238 -0.45 | 0.0132508 -0.46 | 0.0123099 -0.47 | 0.0112626 -0.48 | 0.0101097 -0.49 | 0.0090478 -0.5 | 0.00804006 -0.51 | 0.00715525 -0.52 | 0.00633017 -0.53 | 0.00543977 -0.54 | 0.00456716 -0.55 | 0.00365313 -0.56 | 0.00283621 -0.57 | 0.00219057 -0.58 | 0.001662 -0.59 | 0.00130407 -0.6 | 0.000943178 -0.61 | 0.0005852 -0.62 | 0.000281259 -0.63 | 4.17935e-05 -0.64 | 4.64946e-05 diff --git a/test/test_model/test_structural_mechanics_model/test_structural_mechanics_model_kirchhoff_shell_patch_test_4_5_5.verified b/test/test_model/test_structural_mechanics_model/test_structural_mechanics_model_kirchhoff_shell_patch_test_4_5_5.verified deleted file mode 100644 index 5ab93fbd7..000000000 --- a/test/test_model/test_structural_mechanics_model/test_structural_mechanics_model_kirchhoff_shell_patch_test_4_5_5.verified +++ /dev/null @@ -1,12 +0,0 @@ -Initialisation -Mesh definition -Material Definition -BC Definition -Assemble Done -Matrix saved -u = 0 -v = 0 -w5 = -337.5 -betax = -22.5 -betay = -22.5 -betaz = 0