@@ -390,7 +390,7 @@ def update_constitutive_law(self):
390390 self .update_tangent_blocks ()
391391 self .update_internal_state_variables ()
392392
393- def get_state_variable (self , name , project_on = None ):
393+ def get_state_variable (self , name , project_on = None , as_tensor = False ):
394394 """
395395 Returns the function associated with an internal state variable
396396
@@ -411,9 +411,9 @@ def get_state_variable(self, name, project_on=None):
411411 if project_on is None :
412412 return self .state_variables ["internal" ][name ].function
413413 else :
414- return self .state_variables ["internal" ][name ].project_on (* project_on )
414+ return self .state_variables ["internal" ][name ].project_on (* project_on , as_tensor )
415415
416- def get_flux (self , name , project_on = None ):
416+ def get_flux (self , name , project_on = None , as_tensor = False ):
417417 """
418418 Returns the function associated with a flux
419419
@@ -434,9 +434,9 @@ def get_flux(self, name, project_on=None):
434434 if project_on is None :
435435 return self .fluxes [name ].function
436436 else :
437- return self .fluxes [name ].project_on (* project_on )
437+ return self .fluxes [name ].project_on (* project_on , as_tensor )
438438
439- def get_gradient (self , name , project_on = None ):
439+ def get_gradient (self , name , project_on = None , as_tensor = False ):
440440 """
441441 Returns the function associated with a gradient
442442
@@ -457,7 +457,7 @@ def get_gradient(self, name, project_on=None):
457457 if project_on is None :
458458 return self .gradients [name ].function
459459 else :
460- return self .gradients [name ].project_on (* project_on )
460+ return self .gradients [name ].project_on (* project_on , as_tensor )
461461
462462 def get_dissipated_energy (self ):
463463 """Dissipated energy computed from MFront @DissipatedEnergy"""
0 commit comments