Skip to content

Commit

Permalink
Restructuring to use_cases (#74)
Browse files Browse the repository at this point in the history
Co-authored-by: Rahul Kikkeri Nagaraja <[email protected]>
  • Loading branch information
RahulKikkeriNagaraja and Rahul Kikkeri Nagaraja authored Oct 3, 2020
1 parent 73b209d commit a3329b2
Show file tree
Hide file tree
Showing 95 changed files with 6,570 additions and 6,570 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ Unit tests should *not* be uploaded to this repository. Please put them in the `
## Shape Optimization

**Use cases**
- [Multi Constraint Optimization 3D Hook](shape_optimization/10_Multi_Constraint_Optimization_3D_Hook)
- [Smooth Surface Wrapping - Stanford Bunny](shape_optimization/11_Shape_Update_Optimization_Stanford_Bunny)
- [Strain Energy Minimization - 3D Shell](shape_optimization/02_Strain_Energy_Minimization_3D_Shell)
- [Bead Optimization Plate](shape_optimization/06_bead_optimization_plate)
- [Multi Constraint Optimization 3D Hook](shape_optimization/use_cases/10_Multi_Constraint_Optimization_3D_Hook)
- [Smooth Surface Wrapping - Stanford Bunny](shape_optimization/use_cases/11_Shape_Update_Optimization_Stanford_Bunny)
- [Strain Energy Minimization - 3D Shell](shape_optimization/use_cases/02_Strain_Energy_Minimization_3D_Shell)
- [Bead Optimization Plate](shape_optimization/use_cases/06_bead_optimization_plate)
22 changes: 11 additions & 11 deletions shape_optimization/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ This folder contains examples related to Shape Optimization in Kratos.
They are realized using the **ShapeOptimizationApplication**

#### Main Examples
- [Multi Constraint Optimization 3D Hook](10_Multi_Constraint_Optimization_3D_Hook)
- [Shape Update Response Optimization - Stanford Bunny](11_Shape_Update_Optimization_Stanford_Bunny)
- [Strain Energy Minimization - 3D Shell](02_Strain_Energy_Minimization_3D_Shell)
- [Bead Optimization Plate](06_bead_optimization_plate)
- [Multi Constraint Optimization 3D Hook](use_cases/10_Multi_Constraint_Optimization_3D_Hook)
- [Shape Update Response Optimization - Stanford Bunny](use_cases/11_Shape_Update_Optimization_Stanford_Bunny)
- [Strain Energy Minimization - 3D Shell](use_cases/02_Strain_Energy_Minimization_3D_Shell)
- [Bead Optimization Plate](use_cases/06_bead_optimization_plate)

#### Other Examples
- [Strain Energy Minimization - 3D Hook](01_Strain_Energy_Minimization_3D_Hook)
- [Mesh Independent Optimization - 3D Shell](03_mesh_independent_optimization_3D_Shell)
- [Eigen Frequency Maximization - 3D Cantilever](04_Eigenfrequency_Maximization_3D_Cantilever)
- [Constrained Shell Optimization](05_Constrained_Shell_Opt)
- [Optimization Plate with Step Adaption](07_optimization_plate_with_step_adaption)
- [Optimization 3D Hook with Plane Constraint](08_Optimization_3D_Hook_plane_constraint)
- [Packaging - 3D Shell](09_Packaging_3D_Shell)
- [Strain Energy Minimization - 3D Hook](use_cases/01_Strain_Energy_Minimization_3D_Hook)
- [Mesh Independent Optimization - 3D Shell](use_cases/03_mesh_independent_optimization_3D_Shell)
- [Eigen Frequency Maximization - 3D Cantilever](use_cases/04_Eigenfrequency_Maximization_3D_Cantilever)
- [Constrained Shell Optimization](use_cases/05_Constrained_Shell_Opt)
- [Optimization Plate with Step Adaption](use_cases/07_optimization_plate_with_step_adaption)
- [Optimization 3D Hook with Plane Constraint](use_cases/08_Optimization_3D_Hook_plane_constraint)
- [Packaging - 3D Shell](use_cases/09_Packaging_3D_Shell)

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# Making KratosMultiphysics backward compatible with python 2.6 and 2.7
from __future__ import print_function, absolute_import, division

# Import Kratos core and apps
import KratosMultiphysics as KM

# Additional imports
from KratosMultiphysics.ShapeOptimizationApplication import optimizer_factory

# Read parameters
with open("optimization_parameters.json",'r') as parameter_file:
parameters = KM.Parameters(parameter_file.read())

# Defining the model_part
model = KM.Model()

# Create optimizer and perform optimization
optimizer = optimizer_factory.CreateOptimizer(parameters["optimization_settings"], model)
# Making KratosMultiphysics backward compatible with python 2.6 and 2.7
from __future__ import print_function, absolute_import, division

# Import Kratos core and apps
import KratosMultiphysics as KM

# Additional imports
from KratosMultiphysics.ShapeOptimizationApplication import optimizer_factory

# Read parameters
with open("optimization_parameters.json",'r') as parameter_file:
parameters = KM.Parameters(parameter_file.read())

# Defining the model_part
model = KM.Model()

# Create optimizer and perform optimization
optimizer = optimizer_factory.CreateOptimizer(parameters["optimization_settings"], model)
optimizer.Optimize()
File renamed without changes

0 comments on commit a3329b2

Please sign in to comment.