Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extrapolation of integration point values to nodes #1145

Merged
merged 2 commits into from
Apr 28, 2016
Merged

Conversation

chleh
Copy link
Collaborator

@chleh chleh commented Apr 16, 2016

Follow-up of #1161.

This PR now compiles also with PETSc. However, I think it currently does not make sense to make it also run with PETSc, there are simply too many odds and ends, e.g.:

  • we cannot write to ghost nodes and sum up ghost nodes etc.
  • the unit test fails because NodePartitionedMesh is hard-wired into MeshComponentMap for the PETSc build.

Future work will also be to extend the extrapolator to multi-component variables.

The files related to this PR are all in NumLib/Extrapolation and Tests/Numlib
I think it's best to wait with the review until #1161 is merged and this branch is rebased.

In the meantime the unit test will give you an impression how the interpolation looks like from the user side: https://github.com/chleh/ogs6/blob/extrapol/Tests/NumLib/TestExtrapolation.cpp
Soon there will be a further PR connecting the Extrapolator to the Process.

Note: With this PR the LocalLinearLeastSquaresExtrapolator from NumLib uses SerialExecutor from AssemblerLib.

@ogsbot
Copy link
Member

ogsbot commented Apr 16, 2016

Jenkins: OGS-6/Linux-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Linux-PRs/1608/

@ogsbot
Copy link
Member

ogsbot commented Apr 16, 2016

Jenkins: OGS-6/Gui/Gui-Linux-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Gui/job/Gui-Linux-PRs/1576/

@ogsbot
Copy link
Member

ogsbot commented Apr 16, 2016

Jenkins: OGS-6/Win-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Win-PRs/1490/

@ogsbot
Copy link
Member

ogsbot commented Apr 16, 2016

Jenkins: OGS-6/Gui/Win-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Gui/job/Win-PRs/1466/

@ogsbot
Copy link
Member

ogsbot commented Apr 17, 2016

Jenkins: OGS-6/Linux-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Linux-PRs/1609/

@ogsbot
Copy link
Member

ogsbot commented Apr 17, 2016

Jenkins: OGS-6/Gui/Mac-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Gui/job/Mac-PRs/1471/

// TODO: for now always zeroth component is used
auto const& indices = _local_to_global(element_index, 0).rows;

_nodal_values.add(indices, tmp); // TODO does that give rise to PETSc problems?
Copy link
Member

Choose a reason for hiding this comment

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

For the current node wise partitioning, it is Ok.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

My comment was more related to negative indices. I think, they will pose some problems.

Copy link
Member

Choose a reason for hiding this comment

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

I see.

@ogsbot
Copy link
Member

ogsbot commented Apr 21, 2016

Jenkins: OGS-6/Mac-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Mac-PRs/1541/

@ogsbot
Copy link
Member

ogsbot commented Apr 21, 2016

Jenkins: OGS-6/Gui/Gui-Linux-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Gui/job/Gui-Linux-PRs/1626/

@ogsbot
Copy link
Member

ogsbot commented Apr 21, 2016

Jenkins: OGS-6/Linux-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Linux-PRs/1655/

@ogsbot
Copy link
Member

ogsbot commented Apr 21, 2016

Jenkins: OGS-6/Win-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Win-PRs/1533/

@ogsbot
Copy link
Member

ogsbot commented Apr 21, 2016

Jenkins: OGS-6/Gui/Win-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Gui/job/Win-PRs/1511/

@endJunction
Copy link
Member

This needs a presentation/review/discussion round table meeting (PRDRTM for short)

@endJunction
Copy link
Member

endJunction commented Apr 24, 2016

Extrapolator.h lacks copyright header. Please check all other files too.
Also the include guards' names do not correspond to dir/file, but this is not so important... ✅

@chleh
Copy link
Collaborator Author

chleh commented Apr 24, 2016

PRDRTM is a bad acronym: You cannot read it as a word.
Can we make the PRDRTM tomorrow (i.e., on monday)?

// Passing _dof_table works, because this process has only one variable
// and the variable has exactly one component.
_extrapolator.reset(new ExtrapolatorImplementation(
{ 0u, 0u, nullptr, _dof_table.get(), &mesh }));
Copy link
Member

Choose a reason for hiding this comment

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

Improve matrix spec ctor.

Copy link
Member

Choose a reason for hiding this comment

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

&mesh -> nullptr.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Improve matrix spec ctor.

@endJunction, you could do that when resolving the dependency of matrix specs on the doftable.

@ogsbot
Copy link
Member

ogsbot commented Apr 25, 2016

Jenkins: OGS-6/Win-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Win-PRs/1558/

// counts the writes to each nodal value, i.e., the summands in order to
// compute the average afterwards
auto counts =
MathLib::MatrixVectorTraits<GlobalVector>::newInstance(_nodal_values);
Copy link
Member

Choose a reason for hiding this comment

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

Get count information from the DOF table, no need for an extra vector.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't see instantly, how I can get the number of neighbouring elements to a node directly from the dof table. Please tell me.
If it is currently not possible, I'd suggest to keep my code as it is.

Copy link
Member

Choose a reason for hiding this comment

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

There is LocalToGlobalIndexMap::getNumElementDOF() but we need the other way around relation. Keep it for now...

GlobalVector& counts
)
{
auto const& gp_vals = loc_asm.getIntegrationPointValues(
Copy link
Member

@endJunction endJunction Apr 25, 2016

Choose a reason for hiding this comment

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

better names. ✅

@ogsbot
Copy link
Member

ogsbot commented Apr 25, 2016

Jenkins: OGS-6/Gui/Win-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Gui/job/Win-PRs/1536/

Eigen::VectorXd tmp = (N*N.transpose()).ldlt().solve(N*gpvs);

// TODO: for now always zeroth component is used
auto const& indices = _local_to_global(element_index, 0).rows;
Copy link
Member

@endJunction endJunction Apr 25, 2016

Choose a reason for hiding this comment

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

global indices. ✅

@ogsbot
Copy link
Member

ogsbot commented Apr 25, 2016

Jenkins: OGS-6/Mac-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Mac-PRs/1574/

@ogsbot
Copy link
Member

ogsbot commented Apr 25, 2016

Jenkins: OGS-6/Gui/Gui-Linux-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Gui/job/Gui-Linux-PRs/1659/

@ogsbot
Copy link
Member

ogsbot commented Apr 25, 2016

Jenkins: OGS-6/Linux-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Linux-PRs/1689/

@ogsbot
Copy link
Member

ogsbot commented Apr 25, 2016

Jenkins: OGS-6/Win-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Win-PRs/1567/

@ogsbot
Copy link
Member

ogsbot commented Apr 25, 2016

Jenkins: OGS-6/Gui/Win-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Gui/job/Win-PRs/1544/

@ogsbot
Copy link
Member

ogsbot commented Apr 25, 2016

Jenkins: OGS-6/Win-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Win-PRs/1570/

@ogsbot
Copy link
Member

ogsbot commented Apr 25, 2016

Jenkins: OGS-6/Gui/Win-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Gui/job/Win-PRs/1547/

@TomFischer
Copy link
Member

👍

1 similar comment
@wenqing
Copy link
Member

wenqing commented Apr 27, 2016

👍

@chleh chleh merged commit e754b2a into ufz:master Apr 28, 2016
@chleh chleh deleted the extrapol branch April 28, 2016 08:38
@ogsbot
Copy link
Member

ogsbot commented Jun 19, 2020

OpenGeoSys development has been moved to GitLab.

See this pull request on GitLab.

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.

5 participants