@@ -55,7 +55,9 @@ def newton_solver(self, value):
5555 self ._newton_solver = value
5656 elif isinstance (value , NewtonSolver ):
5757 if self ._newton_solver :
58- print ("Settings for the Newton solver will be overwritten" )
58+ festim .festim_print (
59+ "Settings for the Newton solver will be overwritten"
60+ )
5961 self ._newton_solver = value
6062 else :
6163 raise TypeError ("accepted type for newton_solver is fenics.NewtonSolver" )
@@ -102,7 +104,7 @@ def initialise(self, mesh, materials, dt=None):
102104 self .define_newton_solver ()
103105
104106 # Boundary conditions
105- print ("Defining boundary conditions" )
107+ festim . festim_print ("Defining boundary conditions" )
106108 self .create_dirichlet_bcs (materials , mesh )
107109 if self .settings .transient :
108110 self .traps .define_variational_problem_extrinsic_traps (mesh .dx , dt , self .T )
@@ -177,7 +179,8 @@ def initialise_concentrations(self):
177179 concentration .test_function = list (split (self .v ))[index ]
178180 index += 1
179181
180- print ("Defining initial values" )
182+ festim .festim_print ("Defining initial values" )
183+
181184 field_to_component = {
182185 "solute" : 0 ,
183186 "0" : 0 ,
@@ -253,7 +256,9 @@ def define_variational_problem(self, materials, mesh, dt=None):
253256 dt (festim.Stepsize, optional): the stepsize, only needed if
254257 self.settings.transient is True. Defaults to None.
255258 """
256- print ("Defining variational problem" )
259+ if MPI .comm_world .rank == 0 :
260+ print ("Defining variational problem" )
261+
257262 expressions = []
258263 F = 0
259264
0 commit comments