Skip to content

Conversation

@bodhinandach
Copy link
Contributor

@bodhinandach bodhinandach commented Aug 5, 2020

Describe the PR
This PR solves issue #594 to output variables from JSON with unknown type. A new map to link the string specified in JSON and a new VariableType class is created. Also, this removes the default output variables of displacements, velocities, stresses, and strains.

Every time a user wants to output a variable, just add the string and type to the list specified in src/mpm.cc and at the initialise() function in particle.tcc for which variable to return using lambda function.

The JSON list "vtk" is ready back to be used.

Related Issues/PRs
Issue #594

Additional context

  1. The current design work only for vector and tensor variables in particle, the scalar part is still ongoing development. (Done ✔️)
  2. @kks32 Maybe we might want to use the flat map that you test to have a fast retrieval. (Done using tsl_map ✔️)

@bodhinandach bodhinandach added this to the MPM Framework milestone Aug 5, 2020
@bodhinandach bodhinandach requested review from cbgeo and kks32 August 5, 2020 18:07
@bodhinandach bodhinandach self-assigned this Aug 5, 2020
@bodhinandach bodhinandach linked an issue Aug 5, 2020 that may be closed by this pull request
@bodhinandach bodhinandach requested a review from a team August 5, 2020 18:07
@codecov
Copy link

codecov bot commented Aug 5, 2020

Codecov Report

Merging #684 into develop will decrease coverage by 0.01%.
The diff coverage is 95.59%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #684      +/-   ##
===========================================
- Coverage    96.68%   96.67%   -0.01%     
===========================================
  Files          123      123              
  Lines        25391    25560     +169     
===========================================
+ Hits         24549    24710     +161     
- Misses         842      850       +8     
Impacted Files Coverage Δ
include/mesh.h 100.00% <ø> (ø)
include/particles/particle_base.h 100.00% <ø> (ø)
include/solvers/mpm_base.h 0.00% <ø> (ø)
tests/io/write_mesh_particles.cc 87.27% <ø> (ø)
tests/io/write_mesh_particles_unitcell.cc 87.26% <0.00%> (-0.41%) ⬇️
include/solvers/mpm_base.tcc 76.09% <87.18%> (+0.48%) ⬆️
include/particles/particle.tcc 93.93% <91.67%> (-0.20%) ⬇️
include/mesh.tcc 84.13% <100.00%> (+0.23%) ⬆️
include/particles/particle.h 100.00% <100.00%> (ø)
tests/mesh_test_2d.cc 98.46% <100.00%> (+0.02%) ⬆️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 11aba2b...9b388c2. Read the comment docs.

@kks32 kks32 removed the request for review from cbgeo August 10, 2020 23:22
@kks32 kks32 merged commit decce25 into develop Aug 15, 2020
@kks32 kks32 deleted the feature/vtk-output-vars branch August 15, 2020 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Output variable libraries

4 participants