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

Enabled parallel computing with PETSc in deformation analysis #1838

Merged
merged 3 commits into from Jun 21, 2017

Conversation

Projects
None yet
2 participants
@wenqing
Member

wenqing commented Jun 14, 2017

as titled.

File SmallDeformationCommon/Common.h is removed, and its associated part is removed as well. With the functions in that file, the nodal force vector computation is repeated.

If the removed part is needed, commit
[pDM] Corrected getNodalForces for parallel computing 4289841
, which corrects the parallel nodal force computation, will be selected.

A test with linear element is added to the Ctest list.

testparalleldm

@wenqing

This comment has been minimized.

Member

wenqing commented Jun 14, 2017

To resolve issue #1765.
Future work: secondary variable output under MPI.

@wenqing

This comment has been minimized.

Member

wenqing commented Jun 14, 2017

This PR follows up PR #1797.

@endJunction

This comment has been minimized.

Member

endJunction commented Jun 14, 2017

Extending of mechanics processes for parallel runs is great. We could use some speedup along this lines.
Removing nodal force computation is not an option at all. There is material forces added to the same interface.

@wenqing

This comment has been minimized.

Member

wenqing commented Jun 15, 2017

Added Common.h again. The file has been changed for parallel computing, however the functions in it are not used in this PR after commit 4289841.

@endJunction

This comment has been minimized.

Member

endJunction commented Jun 16, 2017

I'm not sure about the changes to the computation of the nodal forces. When source terms would be added to the process (e.g. gravity) would this require changes to the nodal forces computation?

Independent of this, could you please drop the commit which is removing the "Common.h" file?

The independent calculation of the nodal forces allows an integration into other (small deformation) processes like HM. Now this become more difficult I think.

Let's discuss this before more time is invested in the changes.

@wenqing

This comment has been minimized.

Member

wenqing commented Jun 19, 2017

@endJunction From the point view of computational mechanics, which originated the FEM, the discretized weak form terms of all source terms and also coupled terms in the momentum balance equation are added to nodal force to have momentum balance numerically. Therefore using the RHS of the system of equation of deformation process as the nodal force is corrected except for the case of M being coupled to other processes and the monolithic scheme being applied. Under such consideration, I think, we only need to computing the extra contribution to the nodal force from the coupled terms in the process classes of HM, TM or THM with monolithic scheme.

@wenqing

This comment has been minimized.

Member

wenqing commented Jun 19, 2017

or using the current nodal force computation in Common.h but add computation of total stress in HydroMechanicsFEM and other similar assemblers.

*_nodal_forces, _local_assemblers, *_local_to_global_index_map);
std::transform(_nodal_forces->begin(), _nodal_forces->end(),
_nodal_forces->begin(),
std::bind1st(std::multiplies<double>(), -1.0));

This comment has been minimized.

@wenqing

wenqing Jun 20, 2017

Member
transform(n.b, n.e, o.b, [](double v) { return -v;});

This comment has been minimized.

@wenqing

wenqing Jun 20, 2017

Member

Changed by amending the second commit.

@wenqing wenqing force-pushed the wenqing:parallelDM branch 2 times, most recently from a738986 to 02b52f9 Jun 20, 2017

b.copyValues(*_nodal_forces);
std::transform(_nodal_forces->begin(), _nodal_forces->end(),
_nodal_forces->begin(), [](double val) { return -val;});

This comment has been minimized.

@wenqing

wenqing Jun 20, 2017

Member

Setting negative values of _nodal_forces is moved here.

@@ -201,14 +204,6 @@ class SmallDeformationProcess final : public Process
_local_assemblers, *_local_to_global_index_map, x, t, dt);
}
void postTimestepConcreteProcess(GlobalVector const&) override

This comment has been minimized.

@wenqing

wenqing Jun 20, 2017

Member

Removed this overloaded member.

@wenqing wenqing force-pushed the wenqing:parallelDM branch from 02b52f9 to 00d96c5 Jun 21, 2017

@endJunction endJunction merged commit 97e8f78 into ufz:master Jun 21, 2017

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/jenkins/pr-merge This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@wenqing

This comment has been minimized.

Member

wenqing commented Jun 21, 2017

Data pointer has been updated.

@endJunction endJunction referenced this pull request Jun 22, 2017

Merged

Small fixes #1847

@wenqing wenqing referenced this pull request Sep 26, 2017

Merged

Material forces #1936

4 of 4 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment