Commit ccbf9a09 authored by Baptiste Durand's avatar Baptiste Durand

Minor fixes or changes

parent 55cf5c62
.vscode/
old_lib & drafts/
issues & misc/
*.pyc
*.brep
*.msh
*.xml
t1.py
t10.py
t10_modif.py
geometry_essai1_abandon.py
boolean.py
classes_geometriques_backup_13avril.py
draft.py
explore_library.py
gen.py
gmsh_brouillon.py
gmsh_mesh.py
gui.py
libgmsh.so
periodic.py
activity.log
test_convert_import_mesh/
TODO.txt
*.xdmf
*.h5
*.egg-info
*.egg-info/
ho_homog.egg-info/top_level.txt
......@@ -68,7 +68,7 @@ gmsh.option.setNumber("Geometry.MatchMeshTolerance", 1e-12)
a = 1
b, k = a, a / 3
r = a / 1e4
r = a / 1e3
gmsh.logger.start()
rve_geo = mesh_generate_2D.Gmsh2DRVE.pantograph(a, b, k, r, name="panto_rve")
process_gmsh_log(gmsh.logger.get())
......@@ -86,15 +86,15 @@ gmsh.logger.stop()
gmsh.model.mesh.renumberNodes()
gmsh.model.mesh.renumberElements()
gmsh.write(str(rve_geo.mesh_abs_path))
rve_path, = msh_conversion(rve_geo.mesh_abs_path, ".xdmf")
rve_path = msh_conversion(rve_geo.mesh_abs_path, ".xdmf")
# * Step 3 : Build the mesh of the part from the mesh of the RVE
gmsh.logger.start()
part_geo = mesh_generate_2D.Gmsh2DPartFromRVE(rve_geo, (75, 1))
part_geo = mesh_generate_2D.Gmsh2DPartFromRVE(rve_geo, (10, 1))
process_gmsh_log(gmsh.logger.get())
gmsh.logger.stop()
part_path, = msh_conversion(part_geo.mesh_abs_path, ".xdmf")
part_path = msh_conversion(part_geo.mesh_abs_path, ".xdmf")
# * Step 4 : Defining the material properties
E, nu = 1.0, 0.3
......@@ -226,11 +226,11 @@ for key, scd_dict in hom_model.localization.items():
localztn_expr[key] = dict()
for scd_key, localztn_fields in scd_dict.items():
updated_key2 = key_conversion[scd_key]
localztn_expr[key][
updated_key2
] = list() # 1 field per component of U, E, EG and EGG
localztn_expr[key][updated_key2] = list()
# 1 field per component of U, E, EG and EGG
for i, field in enumerate(localztn_fields):
new_fields = list() # 1 field per component of U, Sigma and Epsilon
new_fields = list()
# 1 field per component of U, Sigma and Epsilon
for component in field.split():
per_field = periodicity.PeriodicExpr(
component, rve_geo.gen_vect, degree=3
......
......@@ -120,8 +120,10 @@ class Fenics2DHomogenization(object):
elif self._solver["type"] == "LU":
self.solver = fe.LUSolver(self.K, self._solver["method"])
self.solver.parameters["symmetric"] = True
if not self._solver["preconditioner"] is None:
try:
self.solver.parameters.preconditioner = self._solver["preconditioner"]
except KeyError:
pass
# fe.info(self.solver.parameters, True)
self.localization = dict()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment