Skip to content

Remove uses of global 'mesh' from Laplacian solvers - #1371

Merged
bendudson merged 4 commits into
nextfrom
Laplacian-localmesh-coords
Nov 15, 2018
Merged

Remove uses of global 'mesh' from Laplacian solvers#1371
bendudson merged 4 commits into
nextfrom
Laplacian-localmesh-coords

Conversation

@johnomotani

Copy link
Copy Markdown
Contributor

Also put the call to getCoordinates(location) in the Laplacian::Laplacian constructor and keep a Coordinates* coords pointer as a member of Laplacian so we don't need to call getCoordinates() in 15 other places in the various implementations.

Pulls in to next a couple of extra commits from #1368; would it be better to make a separate PR for those?

Neater than previous mesh->getCoordinates(location) calls.
Pass the location to delp2solver in LaplaceNaulin.

Set location of result in solve() method of LaplaceXY, LaplaceXZcyclic
and LaplaceXZpetsc.
@johnomotani
johnomotani force-pushed the Laplacian-localmesh-coords branch 2 times, most recently from dd74771 to 3fc3fc5 Compare November 14, 2018 14:10
Allow Laplacian solvers to be initialized with a local Mesh object,
stored as Laplacian::localmesh. Use localmesh everywhere instead of
global mesh, or mesh from Field*D.getMesh() to ensure consistency
between initialization and solve methods. Includes ASSERT1 checks that
'localmesh == rhs.getMesh()', etc.
Always need the same Coordinates*, so call getCoordinates(location) once
in constructor instead of in each call to solve().
@johnomotani
johnomotani force-pushed the Laplacian-localmesh-coords branch from 3fc3fc5 to 8c88783 Compare November 14, 2018 14:35

@bendudson bendudson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @johnomotani !

@bendudson
bendudson merged commit a148277 into next Nov 15, 2018
@bendudson
bendudson deleted the Laplacian-localmesh-coords branch November 15, 2018 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants