Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
35a83e2
-- refactored von mises stress.
manavbhatia Aug 5, 2020
c276270
-- Removing ContextType as template parameter of compute kernel classes.
manavbhatia Aug 5, 2020
06daac7
-- Modifying examples to be consistent with the changes to ContextTyp…
manavbhatia Aug 5, 2020
e6e1154
initial commit of classes for elastoplastic analysis with von Mises y…
manavbhatia Aug 5, 2020
004499f
-- Added unit test for second derivative of vonMises stress
manavbhatia Aug 5, 2020
ef88a9c
-- Minor fixes.
manavbhatia Aug 6, 2020
7fbb168
-- Fixes and refactoring for von Mises yield criterion unit test.
manavbhatia Aug 11, 2020
f89341e
bug-fixes for von-Mises yield criterion
manavbhatia Aug 11, 2020
a3b5f8f
-- minor fixes to von mises criterion unit test.
manavbhatia Aug 11, 2020
3373d7e
adding test to check the material tangent stiffness for elastoplastic…
manavbhatia Aug 11, 2020
665f189
adding additional convergence criteria for return mapping solver.
manavbhatia Aug 11, 2020
d1f6c21
-- Making von Mises yield criterion unit test conditional upon adol-c
manavbhatia Aug 11, 2020
48efbd4
-- bug-fixes for von Mises yield criterion.
manavbhatia Aug 11, 2020
1d5e5ee
-- bug-fix in von Mises plasticity updates the plastic strain.
manavbhatia Aug 12, 2020
f2e25ce
-- minor change in plasticity unit test.
manavbhatia Aug 12, 2020
fedaa76
-- minor changes
manavbhatia Aug 13, 2020
ee2d0d4
-- modifications to enable compilation with adouble and complex.
manavbhatia Aug 13, 2020
d7b5e10
-- modifications to example 4 for compilation with plasticity solution.
manavbhatia Aug 13, 2020
2796703
-- Changing variable names from "property" to more appropriate "yield"
manavbhatia Aug 13, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/structural/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
add_subdirectory(example_1) # membrane extension
add_subdirectory(example_2) # mindlin plate bending
add_subdirectory(example_4) # elastoplastic continuum analysis
add_subdirectory(example_5) # SIMP min-compliance topology
add_subdirectory(example_6) # SIMP min-compliance topology with MPI
20 changes: 10 additions & 10 deletions examples/structural/example_1/example_1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,24 @@

// MAST includes
#include <mast/base/exceptions.hpp>
#include <mast/util/perf_log.hpp>
#include <mast/base/scalar_constant.hpp>
#include <mast/base/assembly/libmesh/residual_and_jacobian.hpp>
#include <mast/base/assembly/libmesh/residual_sensitivity.hpp>
#include <mast/fe/eval/fe_basis_derivatives.hpp>
#include <mast/fe/libmesh/fe_data.hpp>
#include <mast/fe/libmesh/fe_side_data.hpp>
#include <mast/fe/fe_var_data.hpp>
#include <mast/physics/elasticity/isotropic_stiffness.hpp>
#include <mast/base/scalar_constant.hpp>
#include <mast/physics/elasticity/linear_strain_energy.hpp>
#include <mast/physics/elasticity/pressure_load.hpp>
#include <mast/base/assembly/libmesh/residual_and_jacobian.hpp>
#include <mast/base/assembly/libmesh/residual_sensitivity.hpp>
#include <mast/numerics/libmesh/sparse_matrix_initialization.hpp>

// libMesh includes
#include <libmesh/replicated_mesh.h>
#include <libmesh/elem.h>
#include <libmesh/mesh_generation.h>
#include <libmesh/equation_systems.h>
#include <libmesh/nonlinear_implicit_system.h>
#include <libmesh/boundary_info.h>
#include <libmesh/dirichlet_boundaries.h>
#include <libmesh/zero_function.h>
Expand Down Expand Up @@ -94,9 +94,9 @@ class Context {
delete mesh;
}

uint_t elem_dim() const {return elem->dim();}
uint_t n_nodes() const {return elem->n_nodes();}
real_t nodal_coord(uint_t nd, uint_t c) const {return elem->point(nd)(c);}
inline uint_t elem_dim() const {return elem->dim();}
inline uint_t n_nodes() const {return elem->n_nodes();}
inline real_t nodal_coord(uint_t nd, uint_t c) const {return elem->point(nd)(c);}
inline bool elem_is_quad() const {return (elem->type() == libMesh::QUAD4 ||
elem->type() == libMesh::QUAD8 ||
elem->type() == libMesh::QUAD9);}
Expand Down Expand Up @@ -133,9 +133,9 @@ struct Traits {
using nu_t = typename MAST::Base::ScalarConstant<SolScalarType>;
using press_t = typename MAST::Base::ScalarConstant<SolScalarType>;
using area_t = typename MAST::Base::ScalarConstant<SolScalarType>;
using prop_t = typename MAST::Physics::Elasticity::IsotropicMaterialStiffness<SolScalarType, Dim, modulus_t, nu_t, Context>;
using energy_t = typename MAST::Physics::Elasticity::LinearContinuum::StrainEnergy<fe_var_t, prop_t, Dim, Context>;
using press_load_t = typename MAST::Physics::Elasticity::SurfacePressureLoad<fe_var_t, press_t, area_t, Dim, Context>;
using prop_t = typename MAST::Physics::Elasticity::IsotropicMaterialStiffness<SolScalarType, Dim, modulus_t, nu_t>;
using energy_t = typename MAST::Physics::Elasticity::LinearContinuum::StrainEnergy<fe_var_t, prop_t, Dim>;
using press_load_t = typename MAST::Physics::Elasticity::SurfacePressureLoad<fe_var_t, press_t, area_t, Dim>;
using element_vector_t = Eigen::Matrix<scalar_t, Eigen::Dynamic, 1>;
using element_matrix_t = Eigen::Matrix<scalar_t, Eigen::Dynamic, Eigen::Dynamic>;
using assembled_vector_t = Eigen::Matrix<scalar_t, Eigen::Dynamic, 1>;
Expand Down
21 changes: 10 additions & 11 deletions examples/structural/example_2/example_2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,16 @@

// MAST includes
#include <mast/base/exceptions.hpp>
#include <mast/util/perf_log.hpp>
#include <mast/base/scalar_constant.hpp>
#include <mast/base/assembly/libmesh/residual_and_jacobian.hpp>
#include <mast/base/assembly/libmesh/residual_sensitivity.hpp>
#include <mast/fe/eval/fe_basis_derivatives.hpp>
#include <mast/fe/libmesh/fe_data.hpp>
#include <mast/fe/fe_var_data.hpp>
#include <mast/physics/elasticity/isotropic_stiffness.hpp>
#include <mast/base/scalar_constant.hpp>
#include <mast/physics/elasticity/mindlin_plate_strain_energy.hpp>
#include <mast/physics/elasticity/plate_bending_section_property.hpp>
#include <mast/physics/elasticity/shell_face_pressure_load.hpp>
#include <mast/base/assembly/libmesh/residual_and_jacobian.hpp>
#include <mast/base/assembly/libmesh/residual_sensitivity.hpp>
#include <mast/numerics/libmesh/sparse_matrix_initialization.hpp>

// libMesh includes
Expand Down Expand Up @@ -95,9 +94,9 @@ class Context {
delete mesh;
}

uint_t elem_dim() const {return elem->dim();}
uint_t n_nodes() const {return elem->n_nodes();}
real_t nodal_coord(uint_t nd, uint_t c) const {return elem->point(nd)(c);}
inline uint_t elem_dim() const {return elem->dim();}
inline uint_t n_nodes() const {return elem->n_nodes();}
inline real_t nodal_coord(uint_t nd, uint_t c) const {return elem->point(nd)(c);}
inline bool elem_is_quad() const {return (elem->type() == libMesh::QUAD4 ||
elem->type() == libMesh::QUAD8 ||
elem->type() == libMesh::QUAD9);}
Expand Down Expand Up @@ -130,10 +129,10 @@ struct Traits {
using nu_t = typename MAST::Base::ScalarConstant<SolScalarType>;
using press_t = typename MAST::Base::ScalarConstant<SolScalarType>;
using thickness_t = typename MAST::Base::ScalarConstant<SolScalarType>;
using material_t = typename MAST::Physics::Elasticity::IsotropicMaterialStiffness<SolScalarType, 2, modulus_t, nu_t, Context>;
using section_t = typename MAST::Physics::Elasticity::PlateBendingSectionProperty<SolScalarType, material_t, thickness_t, Context>;
using energy_t = typename MAST::Physics::Elasticity::MindlinPlate::StrainEnergy<fe_var_t, section_t, Context>;
using press_load_t = typename MAST::Physics::Elasticity::ShellFacePressureLoad<fe_var_t, press_t, Context>;
using material_t = typename MAST::Physics::Elasticity::IsotropicMaterialStiffness<SolScalarType, 2, modulus_t, nu_t>;
using section_t = typename MAST::Physics::Elasticity::PlateBendingSectionProperty<SolScalarType, material_t, thickness_t>;
using energy_t = typename MAST::Physics::Elasticity::MindlinPlate::StrainEnergy<fe_var_t, section_t>;
using press_load_t = typename MAST::Physics::Elasticity::ShellFacePressureLoad<fe_var_t, press_t>;
using element_vector_t = Eigen::Matrix<scalar_t, Eigen::Dynamic, 1>;
using element_matrix_t = Eigen::Matrix<scalar_t, Eigen::Dynamic, Eigen::Dynamic>;
using assembled_vector_t = Eigen::Matrix<scalar_t, Eigen::Dynamic, 1>;
Expand Down
25 changes: 25 additions & 0 deletions examples/structural/example_4/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
add_executable(structural_example_4
example_4.cpp)

target_include_directories(structural_example_4 PRIVATE
${PROJECT_SOURCE_DIR}/include)

target_link_libraries(structural_example_4 mast)

install(TARGETS structural_example_4
RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/examples)

# Test on single processor, PETSc built-in LU direct linear solver (sequential).
add_test(NAME structural_example_4
COMMAND $<TARGET_FILE:structural_example_4> -ksp_type preonly -pc_type lu -options_view)
set_tests_properties(structural_example_4
PROPERTIES
LABELS "SHORT;SEQ")

# Test multiple processors, parallel direct linear solver using external MUMPS package.
#add_test(NAME structural_example_4_mpi
# COMMAND ${MPIEXEC_EXECUTABLE} -np 2 $<TARGET_FILE:structural_example_4>
# -ksp_type preonly -pc_type lu -pc_factor_mat_solver_package mumps -options_view)
#set_tests_properties(structural_example_4_mpi
# PROPERTIES
# LABELS "SHORT;MPI")
Loading