@@ -55,7 +55,8 @@ 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+ if MPI .comm_world .rank == 0 :
59+ print ("Settings for the Newton solver will be overwritten" )
5960 self ._newton_solver = value
6061 else :
6162 raise TypeError ("accepted type for newton_solver is fenics.NewtonSolver" )
@@ -102,7 +103,8 @@ def initialise(self, mesh, materials, dt=None):
102103 self .define_newton_solver ()
103104
104105 # Boundary conditions
105- print ("Defining boundary conditions" )
106+ if MPI .comm_world .rank == 0 :
107+ 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,9 @@ def initialise_concentrations(self):
177179 concentration .test_function = list (split (self .v ))[index ]
178180 index += 1
179181
180- print ("Defining initial values" )
182+ if MPI .comm_world .rank == 0 :
183+ print ("Defining initial values" )
184+
181185 field_to_component = {
182186 "solute" : 0 ,
183187 "0" : 0 ,
@@ -253,7 +257,9 @@ def define_variational_problem(self, materials, mesh, dt=None):
253257 dt (festim.Stepsize, optional): the stepsize, only needed if
254258 self.settings.transient is True. Defaults to None.
255259 """
256- print ("Defining variational problem" )
260+ if MPI .comm_world .rank == 0 :
261+ print ("Defining variational problem" )
262+
257263 expressions = []
258264 F = 0
259265
0 commit comments