Skip to content

Conversation

manavbhatia
Copy link
Member

-- Added a new example (structural example 8) that uses the homogenized level-set based for topology optimization.
-- Modified Nastran example to be enabled only if ENABLE_NASTRANIO is set.

…intersection with level set boundary and add new elements to the mesh inside each subelement.
…ear implicit assembly.

-- Modifications in elem operation classes to support this.
…an independent file and making the driver functions in the example templated so that the models can be easily switched out.
…o 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.
…example

-- Added problem_type to level-set topology optimization example.
…tion 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.
-- added supporting methods in level-set boundary velocity object and mesh function.
…tion now uses the geometric filter information to improve the computational efficiency.
-- Modified the element modulus function in example 7 to use a penalty parameter similar to SIMP.
…ation 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.
…n of mast with pynastran

-- Modified upper/lower limit of level-set in example 8 to +/- 10
…ese are created by cython during each compilation.
@manavbhatia manavbhatia merged commit 04f3389 into master Jan 30, 2020
@manavbhatia manavbhatia deleted the level_set_elem_refinement branch January 30, 2020 00:23
@manavbhatia
Copy link
Member Author

@jdeaton This influences mast_config.h here. I put this in since I wanted to be able to compile Mast without NastranIO support (which needs python).
So, if we are disabling this feature, then the respective source/header files and example7 becomes conditional, which uses this variable from mast_config.in exclude the NastranIO class: nastran_io.h, nastran_io.cpp.

@jdeaton
Copy link
Member

jdeaton commented Feb 5, 2020

I must be missing something. When -DENABLE_NASTRANIO=OFF at the CMake level (which is default), because of the guards around the NastranIO/Python parts in src/mesh/CMakeLists.txt and examples/structural/example_7/CMakeLists.txt, that is maintained without ever seeing MAST_ENABLE_NASTRAN. CMake is taking care of it instead of using the preprocessor. The source files just never get added to the target.

@jdeaton
Copy link
Member

jdeaton commented Feb 5, 2020

The problem I'm seeing is that Doxygen has some sort of its own pre-processor that isn't smart enough to get through #if MAST_ENABLE_NASTRANIO == 1 in nastran_io.h without stripping everything off the NastranIO class. If I turn that Doxygen feature off, it makes it through, but unfortunately causes a bunch of other miscellaneous stuff to be included in the documentation (most of which looks like it comes from Cython in pynastran_io.h/cpp).

@manavbhatia
Copy link
Member Author

I see your points. I just tried to comment all occurrences of MAST_ENABLE_NASTRANIO and rebuilt the code with and without nastran support and both seem to have worked.

I added this conditional to address some problem that I was facing while building the code without nastran support a few days ago. Unfortunately, I do not remember what that problem was and given that the code is building fine in either configuration, it would make sense to remove it and revisit if necessary in future.

@jdeaton
Copy link
Member

jdeaton commented Feb 5, 2020

Yea, I may go in and remove those parts. It needs documented in the installation, but the way it's currently setup if ENABLE_NASTRANIO=OFF, nothing with NastranIO/Python/Cython should get built.

Also, I saw you made some changes and then reverted stuff, but I may need to go verify the Cython part. With pynastran_io.cpp/.h remaining in the repository, you can build support for NastranIO with ENABLE_NASTRANIO=ON and ENABLE_CYTHON=OFF without running Cython. The only time that ENABLE_CYTHON=ON currently should be if changes are made in src/mesh/pynastran_io.pyx and new header/source needs regenerated by Cython.

@manavbhatia
Copy link
Member Author

Yes, I figured that by reading through the Cmake documentation. During my very first implementation with cython (about 3 year ago) I was rebuilding these file each time and needed cython. As a result, I did not need the pynastran_io.* files in my implementation since these were always regenerated. So, initially I removed these files (thinking that you may not have been deliberate about it), but this change did not go through the CI since you have set them up without cython. Then, reading through the Cmake files, it became apparent that this was a deliberate choice and I ended up undoing those changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants