Skip to content

Commit d81ac7c

Browse files
author
aradermacher
committed
marked to delete
1 parent b64e3b4 commit d81ac7c

18 files changed

+38
-52
lines changed
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
from .base_material import MaterialProblem, QuadratureFields, SolutionFields
2-
#from .concrete_am import ConcreteAM, ConcreteThixElasticModel
3-
#from .concrete_thermo_mechanical import ConcreteThermoMechanical
4-
#from .linear_elasticity import LinearElasticity
2+
from .linear_elasticity import LinearElasticity
3+
from .fenics_constitutive import FenicsConstitutive

src/fenicsxconcrete/finite_element_problem/concrete_am_fc.py

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ def setup(self) -> None:
157157

158158
# boundaries
159159
bcs = self.experiment.create_displacement_boundary(self.V)
160-
# body_force_fct = self.experiment.create_body_force # TODO temp delete
161160
body_force_fct = self.experiment.create_body_force_am # with element activation
162161

163162
# define problem:
@@ -340,7 +339,7 @@ def update_path(self) -> None:
340339
for _ in load_idx:
341340
density[active_idx[load_idx]] = (
342341
self.q_array_path_time[active_idx[load_idx]] / self.p["load_time"]
343-
) # linear ramp #TODO check
342+
) # linear ramp
344343

345344
self.density_time.x.array[:] = density
346345
self.density_time.x.scatter_forward()
@@ -376,18 +375,21 @@ def pv_plot(self) -> None:
376375

377376

378377
# write further fields
379-
sigma_plot = df.fem.Function(self.plot_space_stress, name="Stress")
380-
project(self.q_fields.mandel_stress, self.plot_space_stress, ufl.dx, sigma_plot) #TODO: Check rule
381-
sigma_plot.x.scatter_forward()
382-
383-
density_plot = df.fem.Function(self.plot_space_alpha, name="Density")
384-
project(self.density_time, self.plot_space_alpha, ufl.dx, density_plot)
385-
density_plot.x.scatter_forward()
378+
sigma_plot = project(self.q_fields.mandel_stress, self.plot_space_stress, self.rule.dx)
379+
sigma_plot.name = "Stress"
380+
381+
density_plot = project(self.density_time, self.plot_space_alpha, self.rule.dx)
382+
density_plot.name = "Density"
383+
# density_plot = df.fem.Function(self.plot_space_alpha, name="Density")
384+
# project(self.density_time, self.plot_space_alpha, ufl.dx, density_plot)
385+
# density_plot.x.scatter_forward()
386386

387387
if self.a_plot:
388-
alpha_plot = df.fem.Function(self.plot_space_alpha, name="Alpha")
389-
project(self.q_fields.history_scalar, self.plot_space_alpha, ufl.dx, alpha_plot)
390-
alpha_plot.x.scatter_forward()
388+
alpha_plot = project(self.q_fields.history_scalar, self.plot_space_alpha, self.rule.dx)
389+
alpha_plot.name = "Alpha"
390+
# alpha_plot = df.fem.Function(self.plot_space_alpha, name="Alpha")
391+
# project(self.q_fields.history_scalar, self.plot_space_alpha, ufl.dx, alpha_plot)
392+
# alpha_plot.x.scatter_forward()
391393
# #
392394
## write to file
393395
with df.io.XDMFFile(self.mesh.comm, self.pv_output_file, "a") as f:

src/fenicsxconcrete/finite_element_problem/concrete_am.py renamed to src/fenicsxconcrete/finite_element_problem/delete_concrete_am.py

File renamed without changes.

src/fenicsxconcrete/finite_element_problem/concrete_thermo_mechanical.py renamed to src/fenicsxconcrete/finite_element_problem/delete_concrete_thermo_mechanical.py

File renamed without changes.

src/fenicsxconcrete/finite_element_problem/fenics_constitutive.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def solve(self) -> None:
182182
self.compute_residuals() # for residual sensor
183183
for sensor_name in self.sensors:
184184
# go through all sensors and measure
185-
self.sensors[sensor_name].measure(self) # TODO: problems with stress sensor
185+
self.sensors[sensor_name].measure(self)
186186

187187
def compute_residuals(self) -> None:
188188
"""defines what to do, to compute the residuals. Called in solve for sensors"""
@@ -197,19 +197,16 @@ def pv_plot(self) -> None:
197197
if self.p["degree"] > 1:
198198
# project displacement to linear space for writing
199199
V_project = df.fem.functionspace(self.experiment.mesh, ("CG", 1, (self.p["dim"],)))
200-
disp_plot = df.fem.Function(V_project, name="displacement")
201-
#disp_plot.interpolate(self.fields.displacement)
202-
project(self.fields.displacement, V_project, ufl.dx, disp_plot)
203-
disp_plot.x.scatter_forward()
200+
disp_plot = project(self.fields.displacement, V_project, self.rule.dx)
204201
else:
205202
disp_plot = self.fields.displacement
206-
disp_plot.x.scatter_forward()
203+
disp_plot.name = "displacement"
207204

208205

209206
# write further fields
210-
sigma_plot = df.fem.Function(self.plot_space_stress, name="Stress")
211-
project(self.q_fields.mandel_stress, self.plot_space_stress, ufl.dx, sigma_plot) #TODO: Check rule
212-
sigma_plot.x.scatter_forward()
207+
sigma_plot = project(self.q_fields.mandel_stress, self.plot_space_stress, self.rule.dx)
208+
sigma_plot.name = "Stress"
209+
213210
# #
214211
## write to file
215212
with df.io.XDMFFile(self.mesh.comm, self.pv_output_file, "a") as f:

src/fenicsxconcrete/finite_element_problem/linear_elasticity.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,13 +157,10 @@ def pv_plot(self) -> None:
157157
if self.p["degree"] > 1:
158158
# project displacement to linear space for writing
159159
V_project = df.fem.functionspace(self.experiment.mesh, ("CG", 1, (self.p["dim"],)))
160-
disp_plot = df.fem.Function(V_project, name="displacement")
161-
#disp_plot.interpolate(self.fields.displacement)
162-
project(self.fields.displacement, V_project, ufl.dx, disp_plot)
163-
disp_plot.x.scatter_forward()
160+
disp_plot = project(self.fields.displacement, V_project, ufl.dx)
164161
else:
165162
disp_plot = self.fields.displacement
166-
disp_plot.x.scatter_forward()
163+
disp_plot.name = "displacement"
167164

168165
with df.io.XDMFFile(self.mesh.comm, self.pv_output_file, "a") as f:
169166
f.write_function(disp_plot, self.time)
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
from .base_sensor import BaseSensor, PointSensor
22
from .displacement_sensor import DisplacementSensor
3-
from .doh_sensor import DOHSensor
43
from .reaction_force_sensor import ReactionForceSensor
54
from .sensor_schema import generate_sensor_schema
65
from .strain_sensor import StrainSensor
76
from .stress_sensor import StressSensor
8-
from .temperature_sensor import TemperatureSensor
97
from .youngs_modulus_sensor import YoungsModulusSensor

src/fenicsxconcrete/sensor_definition/doh_sensor.py renamed to src/fenicsxconcrete/sensor_definition/delete_doh_sensor.py

File renamed without changes.

src/fenicsxconcrete/sensor_definition/temperature_sensor.py renamed to src/fenicsxconcrete/sensor_definition/delete_temperature_sensor.py

File renamed without changes.

src/fenicsxconcrete/util/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from .logger import LogMixin
2-
from .mori_tanaka_homogenization import ConcreteHomogenization
32
from .parameters import Parameters
43
from .projection import project
54
from .quadrature import QuadratureEvaluator, QuadratureRule

0 commit comments

Comments
 (0)