Skip to content

Commit

Permalink
very minor change for clarity (and possibly minor efficiency)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmansour committed Mar 23, 2017
1 parent d4f8855 commit b1f001d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion underworld/systems/_stokes.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def fn_source(self, value):
self._compressibleTerm = sle.MatrixAssemblyTerm_NA__NB__Fn( integrationSwarm=intswarm,
assembledObject=self._mmatrix,
mesh=self._velocityField.mesh,
fn=-1.*self.fn_one_on_lambda )
fn=-self.fn_one_on_lambda )

if _fn_stresshistory != None:
self._vepTerm = sle.VectorAssemblyTerm_VEP__Fn( integrationSwarm=intswarm,
Expand Down

4 comments on commit b1f001d

@julesghub
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i left it in there for clarity!
i wasn't sure about the efficiency?
How is the -ve of a fn evaluated under the hood?

@jmansour
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i actually don't think it'll make a difference efficiency wise, as i believe the -ve is evaluated implicitly as was originally written here!

if you prefer, feel free to revert.

@lmoresi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this would be better being changed in the definition of this term under the hood.

@julesghub
Copy link
Member

@julesghub julesghub commented on b1f001d May 4, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For reference here is the where the -ve comes from. See the [M] part. It's from Hughes 2nd edition

I like the assembly term interface as it stands because it's reusable - we use it for the MeshVariable_Projection sle.... pretty cool.

image

Please sign in to comment.