diff --git a/src/fenicsxconcrete/sensor_definition/displacement_sensor.py b/src/fenicsxconcrete/sensor_definition/displacement_sensor.py index aba4d36..a4b9154 100644 --- a/src/fenicsxconcrete/sensor_definition/displacement_sensor.py +++ b/src/fenicsxconcrete/sensor_definition/displacement_sensor.py @@ -34,11 +34,11 @@ def measure(self, problem: MaterialProblem) -> None: t : time of measurement for time dependent problems, default is 1 """ # get displacements - bb_tree = df.geometry.BoundingBoxTree(problem.experiment.mesh, problem.experiment.mesh.topology.dim) + bb_tree = df.geometry.bb_tree(problem.experiment.mesh, problem.experiment.mesh.topology.dim) cells = [] # Find cells whose bounding-box collide with the points - cell_candidates = df.geometry.compute_collisions(bb_tree, [self.where]) + cell_candidates = df.geometry.compute_collisions_points(bb_tree, [self.where]) # Choose one of the cells that contains the point colliding_cells = df.geometry.compute_colliding_cells(problem.experiment.mesh, cell_candidates, [self.where]) diff --git a/src/fenicsxconcrete/sensor_definition/doh_sensor.py b/src/fenicsxconcrete/sensor_definition/doh_sensor.py index cc10eb0..661d391 100644 --- a/src/fenicsxconcrete/sensor_definition/doh_sensor.py +++ b/src/fenicsxconcrete/sensor_definition/doh_sensor.py @@ -48,11 +48,11 @@ def measure(self, problem: MaterialProblem) -> None: # project stress onto visualization space # finding the cells corresponding to the point - bb_tree = df.geometry.BoundingBoxTree(problem.experiment.mesh, problem.experiment.mesh.topology.dim) + bb_tree = df.geometry.bb_tree(problem.experiment.mesh, problem.experiment.mesh.topology.dim) cells = [] # Find cells whose bounding-box collide with the points - cell_candidates = df.geometry.compute_collisions(bb_tree, [self.where]) + cell_candidates = df.geometry.compute_collisions_points(bb_tree, [self.where]) # Choose one of the cells that contains the point colliding_cells = df.geometry.compute_colliding_cells(problem.experiment.mesh, cell_candidates, [self.where]) diff --git a/src/fenicsxconcrete/sensor_definition/strain_sensor.py b/src/fenicsxconcrete/sensor_definition/strain_sensor.py index 26b4ad9..79fb521 100644 --- a/src/fenicsxconcrete/sensor_definition/strain_sensor.py +++ b/src/fenicsxconcrete/sensor_definition/strain_sensor.py @@ -42,17 +42,17 @@ def measure(self, problem: MaterialProblem) -> None: strain_function = project( strain, # stress fct from problem - df.fem.TensorFunctionSpace(problem.experiment.mesh, problem.q_fields.plot_space_type), # tensor space + df.fem.functionspace(problem.experiment.mesh, problem.q_fields.plot_space_type), # tensor space problem.q_fields.measure, ) # project stress onto visualization space # finding the cells corresponding to the point - bb_tree = df.geometry.BoundingBoxTree(problem.experiment.mesh, problem.experiment.mesh.topology.dim) + bb_tree = df.geometry.bb_tree(problem.experiment.mesh, problem.experiment.mesh.topology.dim) cells = [] # Find cells whose bounding-box collide with the points - cell_candidates = df.geometry.compute_collisions(bb_tree, [self.where]) + cell_candidates = df.geometry.compute_collisions_points(bb_tree, [self.where]) # Choose one of the cells that contains the point colliding_cells = df.geometry.compute_colliding_cells(problem.experiment.mesh, cell_candidates, [self.where]) diff --git a/src/fenicsxconcrete/sensor_definition/stress_sensor.py b/src/fenicsxconcrete/sensor_definition/stress_sensor.py index 305675f..dc581b0 100644 --- a/src/fenicsxconcrete/sensor_definition/stress_sensor.py +++ b/src/fenicsxconcrete/sensor_definition/stress_sensor.py @@ -42,16 +42,16 @@ def measure(self, problem: MaterialProblem) -> None: stress_function = project( stress, # stress fct from problem - df.fem.TensorFunctionSpace(problem.experiment.mesh, problem.q_fields.plot_space_type), # tensor space + df.fem.functionspace(problem.experiment.mesh, problem.q_fields.plot_space_type), # tensor space problem.q_fields.measure, ) # finding the cells corresponding to the point - bb_tree = df.geometry.BoundingBoxTree(problem.experiment.mesh, problem.experiment.mesh.topology.dim) + bb_tree = df.geometry.bb_tree(problem.experiment.mesh, problem.experiment.mesh.topology.dim) cells = [] # Find cells whose bounding-box collide with the points - cell_candidates = df.geometry.compute_collisions(bb_tree, [self.where]) + cell_candidates = df.geometry.compute_collisions_points(bb_tree, [self.where]) # Choose one of the cells that contains the point colliding_cells = df.geometry.compute_colliding_cells(problem.experiment.mesh, cell_candidates, [self.where]) diff --git a/src/fenicsxconcrete/sensor_definition/temperature_sensor.py b/src/fenicsxconcrete/sensor_definition/temperature_sensor.py index 05c8173..f010986 100644 --- a/src/fenicsxconcrete/sensor_definition/temperature_sensor.py +++ b/src/fenicsxconcrete/sensor_definition/temperature_sensor.py @@ -34,11 +34,11 @@ def measure(self, problem: MaterialProblem) -> None: t : time of measurement for time dependent problems, default is 1 """ # get displacements - bb_tree = df.geometry.BoundingBoxTree(problem.experiment.mesh, problem.experiment.mesh.topology.dim) + bb_tree = df.geometry.bb_tree(problem.experiment.mesh, problem.experiment.mesh.topology.dim) cells = [] # Find cells whose bounding-box collide with the points - cell_candidates = df.geometry.compute_collisions(bb_tree, [self.where]) + cell_candidates = df.geometry.compute_collisions_points(bb_tree, [self.where]) # Choose one of the cells that contains the point colliding_cells = df.geometry.compute_colliding_cells(problem.experiment.mesh, cell_candidates, [self.where]) diff --git a/src/fenicsxconcrete/sensor_definition/youngs_modulus_sensor.py b/src/fenicsxconcrete/sensor_definition/youngs_modulus_sensor.py index cd521df..34fcffe 100644 --- a/src/fenicsxconcrete/sensor_definition/youngs_modulus_sensor.py +++ b/src/fenicsxconcrete/sensor_definition/youngs_modulus_sensor.py @@ -48,11 +48,11 @@ def measure(self, problem: MaterialProblem) -> None: # project stress onto visualization space # finding the cells corresponding to the point - bb_tree = df.geometry.BoundingBoxTree(problem.experiment.mesh, problem.experiment.mesh.topology.dim) + bb_tree = df.geometry.bb_tree(problem.experiment.mesh, problem.experiment.mesh.topology.dim) cells = [] # Find cells whose bounding-box collide with the points - cell_candidates = df.geometry.compute_collisions(bb_tree, [self.where]) + cell_candidates = df.geometry.compute_collisions_points(bb_tree, [self.where]) # Choose one of the cells that contains the point colliding_cells = df.geometry.compute_colliding_cells(problem.experiment.mesh, cell_candidates, [self.where])