Skip to content

Commit 04f3389

Browse files
authored
Topology optimization with homogenized level set (#58)
* -- Added two classes for subelement refinement that look for element intersection with level set boundary and add new elements to the mesh inside each subelement. * -- Bug-fixes for sub element refinement. * -- Modifying the behavior of if_elem_has_positive_phi_region() in level set elem intersection. * -- Bug-fix for stress assembly. * removing commented code from level set nonlinear implicit assembly class. * -- Bug-fixes for sub element refinement. * -- Modified example 5 to use the sub-element refinement class. * -- Added methods to compute topology sensitivity callable from nonlinear implicit assembly. -- Modifications in elem operation classes to support this. * -- Added nanoFlann KD-tree based geometry filter initialization * -- Added iteration counter to function evaluation. * -- Minor fix * -- refactored topology optimization examples by moving each model to an independent file and making the driver functions in the example templated so that the models can be easily switched out. * -- Added reference volume calculation to the topology models. * -- Added structural null-space vector to SIMP topology optimization so that AMG solvers can be used. -- Added problem_type in SIM topology optimization example so that objective/constraint function can be modified using user options. * -- Added null space vector object to level-set topology optimization example -- Added problem_type to level-set topology optimization example. * -- Removed unnecessary output call from FunctionEvaluation::evaluate * Removing errors introduced during merging of master. * Added a dof-constraint for the hanging node created with element intersection. * -- Bug-fix for sub-element hanging node constraint. * -- Added ability to specify element subdomain ids that will be excluded in the global assembly routines. * Added level-set interface point search and normal computation at a point on level-set function. * -- Minor fixes. * -- Added traction shifted boundary condition to all topology optimization examples -- Added method in level-set topology optimization example to mark shifted boundaries for application of traction boundary condition. -- Added traction boundary condition in structural analysis. Currently only implemented for 2D inplane structural analysis. -- Added a shifted boundary application of traction boundary condition. Currently only implemented for 2D inplane structural analysis. -- Added option for computation of second order spatial derivative for side integration. -- Damped the Newton-step for identification of point on shifted boundary. -- Added method in level-set element intersection class to identify the sides of the element on material. -- Bug-fixes in sub-element mesh refinement class. * -- Minor fixes. * -- added methods to compute sensitivity of shifted boundary traction. -- added supporting methods in level-set boundary velocity object and mesh function. * -- Added sensitivity of shifted boundary traction residual for 2D elements. * -- Bug-fix for volume sensitivity in compliance minimization part of example 5 * -- bug-fix * -- Bug-fixes for example 5. * Minor edit in example 5. * Minor fix in structural element 2D. * Added damping factor to boundary point search. * -- Changed Node to Point in plot utility. * The level set boundary point search can lack convergence in regions of high curvature when the searched point moves from one element to another since the gradient of the level-set function can be very different between the two adjacent elements. In this case the point is searched starting from the most recent unconverged point. This is allowed only once. * -- bug-fix for sensitivity of surface normal on level set boundary. * -- bug-fixes in topology optimization examples. * -- Bug-fixes for 2d structural elem. * -- Added methods to remove side and volume loads in physics discipline. * -- Bug-fixes in example 5. * -- Bug-fix in sensitivity of boundary normal computed in level set boundary velocity class -- Added a Hessian approximation in interface point search to improve robustness of point search when the search point ends up in a different element with jump in slope (in regions of high curvature). * -- Added the ability to obtain nearest intersection points on an element based on the intersection computed on an element. * Removing shifted boundary initializations from example 5. * -- Removed _assembly as a member of the ElemBase class. * -- Added classes to compute homogenized element volume fraction from level set function. * added example 7 for homogenized level-set based topology optimization * various bug-fixes for homogenized level-set-based topology optimization. * Fixes for memory errors in example 7. * -- Level-set-based Homogenized volume fraction sensitivity initialization now uses the geometric filter information to improve the computational efficiency. * -- Bug-fix in heaviside function based homogenization -- Modified the element modulus function in example 7 to use a penalty parameter similar to SIMP. * -- Updated example 7 for homogenized level-set-based topology optimization with different penalization of modulus of elasticity for static analysis and stress analysis. -- Updated smoothing width for approximate Heaviside to 0.1. -- Minor fixes for compatibility with libMesh changes to parallel communicator API. * integrating homogenized level-set topology optimization example as example 8 * reintegrated commits lost during rebase. Nastran example is enabled only if NastranIO is enabled. * commiting files missed in previous commit * -- Minor changes to the topology example titles. * adding fix for timpi * -- Bug-fixes for compilation of nastranIO with conditional compilation of mast with pynastran -- Modified upper/lower limit of level-set in example 8 to +/- 10 * removing pynastran_io.cpp and pynastran_io.h from repository since these are created by cython during each compilation. * undoing the previous change of removing the pynastran_io* files in src/mesh. * -- Fixes for backwards compatibility to libMesh. * -- Fix for lib mesh backwards compatibility. * -- More fixes for backwards compatibility.
1 parent e33b692 commit 04f3389

File tree

110 files changed

+10665
-3420
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+10665
-3420
lines changed

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ if (ENABLE_NASTRANIO)
104104
else()
105105
message(STATUS " Numpy package found")
106106
endif()
107+
108+
set (MAST_ENABLE_NASTRANIO 1)
109+
else()
110+
set (MAST_ENABLE_NASTRANIO 0)
107111
endif()
108112

109113
# THIRD PARTY/CONTRIB

cmake/FindlibMesh.cmake

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,35 @@ find_library(libMesh_dbg_LIBRARY
1919
NAMES mesh_dbg
2020
HINTS ${libMesh_DIR}/lib)
2121

22+
find_library(timpi_opt_LIBRARY
23+
NAMES timpi_opt
24+
HINTS ${libMesh_DIR}/lib)
25+
26+
find_library(timpi_dbg_LIBRARY
27+
NAMES timpi_dbg
28+
HINTS ${libMesh_DIR}/lib)
29+
30+
if (NOT timpi_opt_LIBRARY)
31+
find_library(timpi_opt_LIBRARY
32+
NAMES mesh_opt
33+
HINTS ${libMesh_DIR}/lib)
34+
endif()
35+
36+
if (NOT timpi_dbg_LIBRARY)
37+
find_library(timpi_dbg_LIBRARY
38+
NAMES mesh_dbg
39+
HINTS ${libMesh_DIR}/lib)
40+
endif()
41+
2242
# If debug library is not available then set it to the optimized library
2343
if(NOT libMesh_dbg_LIBRARY)
2444
message("-- WARN: Did not find libmesh_dbg using libmesh_opt for debug version.")
2545
find_library(libMesh_dbg_LIBRARY
2646
NAMES mesh_opt
2747
HINTS ${libMesh_DIR}/lib)
48+
find_library(timpi_dbg_LIBRARY
49+
NAMES timpi_opt
50+
HINTS ${libMesh_DIR}/lib)
2851
endif()
2952

3053

@@ -52,15 +75,24 @@ endif()
5275
# Set variables.
5376
include(FindPackageHandleStandardArgs)
5477
find_package_handle_standard_args(libMesh
55-
REQUIRED_VARS libMesh_dbg_LIBRARY libMesh_opt_LIBRARY libMesh_INCLUDE_DIR
78+
REQUIRED_VARS
79+
libMesh_dbg_LIBRARY
80+
libMesh_opt_LIBRARY
81+
timpi_dbg_LIBRARY
82+
timpi_opt_LIBRARY
83+
libMesh_INCLUDE_DIR
5684
VERSION_VAR libMesh_VERSION)
5785

5886
mark_as_advanced(libMesh_INCLUDE_DIR
5987
libMesh_dbg_LIBRARY
6088
libMesh_opt_LIBRARY
89+
timpi_dbg_LIBRARY
90+
timpi_opt_LIBRARY
6191
libMesh_VERSION
6292
libMesh_FOUND)
6393

6494
set(libMesh_dbg_LIBRARIES ${libMesh_dbg_LIBRARY})
6595
set(libMesh_opt_LIBRARIES ${libMesh_opt_LIBRARY})
96+
set(timpi_dbg_LIBRARIES ${timpi_dbg_LIBRARY})
97+
set(timpi_opt_LIBRARIES ${timpi_opt_LIBRARY})
6698
set(libMesh_INCLUDE_DIRS ${libMesh_INCLUDE_DIR})

doc/tutorials.dox

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
- \subpage structural_example_4
1313
- \subpage structural_example_5
1414
- \subpage structural_example_6
15+
- \subpage structural_example_8
1516
- \subpage structural_example_7
1617
- \subpage fluid_example_1
1718
- \subpage fsi_example_1

examples/structural/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ add_subdirectory(example_1) # bar extension
22
add_subdirectory(example_2) # continuation solver
33
add_subdirectory(example_3) # thermoelastic plate bending
44
add_subdirectory(example_4) # tie-constraints
5-
add_subdirectory(example_5) # 2D topology optimization
6-
add_subdirectory(example_6) # 2D SIMP topology optimization
5+
add_subdirectory(example_5) # topology optimization
6+
add_subdirectory(example_6) # SIMP topology optimization
77
add_subdirectory(example_7) # NastranIO input for Nastran BDF mesh
8+
add_subdirectory(example_8) # Homogenized level-set topology optimization

0 commit comments

Comments
 (0)