From b38caabe71a7594d0bb58822b0196c92d45ccab1 Mon Sep 17 00:00:00 2001 From: RemDelaporteMathurin Date: Fri, 21 Nov 2025 16:47:26 -0500 Subject: [PATCH] removed loop --- src/festim/hydrogen_transport_problem.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/festim/hydrogen_transport_problem.py b/src/festim/hydrogen_transport_problem.py index e783f1a39..b971d39bb 100644 --- a/src/festim/hydrogen_transport_problem.py +++ b/src/festim/hydrogen_transport_problem.py @@ -1318,12 +1318,8 @@ def convert_advection_term_to_fenics_objects(self): for advec_term in self.advection_terms: if isinstance(advec_term, AdvectionTerm): for spe in advec_term.species: - for subdomain in spe.subdomains: - V = spe.subdomain_to_function_space[subdomain] - - advec_term.velocity.convert_input_value( - function_space=V, t=self.t - ) + V = spe.subdomain_to_function_space[advec_term.subdomain] + advec_term.velocity.convert_input_value(function_space=V, t=self.t) def define_boundary_conditions(self): for bc in self._unpacked_bcs: @@ -1436,7 +1432,7 @@ def create_subdomain_formulation(self, subdomain: _subdomain.VolumeSubdomain): conc = spe.subdomain_to_solution[subdomain] vel = adv_term.velocity.fenics_object - + # print(vel.x.array) form += ufl.inner(ufl.dot(ufl.grad(conc), vel), v) * self.dx( subdomain.id )