Skip to content
New issue

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

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

Already on GitHub? # to your account

Feature/povolny1/multibody vtk #1742

Closed
wants to merge 43 commits into from
Closed

Conversation

povolny1
Copy link
Contributor

Adding in support for VTK output when using multiple mesh bodies.

rrsettgast and others added 30 commits November 5, 2021 12:54
…gianFEM to interface with multibody problems...WIP
…p<string,array1d<string>> SolverBase::m_meshTargets to hold target MeshBodies and regions instad of just regions.
…csLagrangeFEM. Intent is to replace m_solidMaterialNames in physics solvers...and replace all such fields in all solvers. This is not done in this commit.
…lidMechanicsLagrangiamFEM done...all other physics solvers do not compile yet!!
…ger is changed to support multi-bodies in develop
@povolny1 povolny1 self-assigned this Jan 21, 2022
void VTKVTMWriter::addDataToSubSubBlock( string const & blockName, string const & subBlockName, string const & subSubBlockName, string const & filePath, int mpiRank ) const
{
auto subBlockNode = m_vtmFile.child( "VTKFile" ).child( "vtkMultiBlockDataSet" ).find_child_by_attribute( "Block", "name", blockName.c_str() ).find_child_by_attribute( "Block", "name", subBlockName.c_str() );
auto subSubBlockNode = subBlockNode.find_child_by_attribute( "Block", "name", (blockName + "_" + subSubBlockName).c_str() );
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was pointed out in PR #1717 that this code should be refactored such that the naming convention blockName + "_" + subSubBlockName is established in a single scope, rather than split across two functions. Suggestions were to either group addSubSubBlock and addDataToSubSubBlock in a single function, or create a new additional function that is called by addSubSubBlock and addDataToSubSubBlock which returns blockName + "_" + subSubBlockName. Right now I'm leaning towards the latter since addSubSubBlock and addDataToSubSubBlock are called different amounts of times.

* @param[in] subSubBlockName Name of the subSubBlock (usually the name of the Region)
* @param[out] the sub-sub-block name consistent with the chosen naming convention
*/
string subSubBlockNamingConvention(string const & blockName, string const & subSubBlockName) const;
Copy link
Contributor

@TotoGaz TotoGaz Jan 22, 2022

Choose a reason for hiding this comment

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

This function can surely be static and private.
Do not use @param[out] here: the proper doxygen tag is @return.
Maybe rename into buildSubSubBLockName which is clearer? The fact that it abides by a naming convention is documented in your @brief.

@@ -711,6 +711,7 @@ void VTKPolyDataWriterInterface::writeSurfaceElementRegions( real64 const time,
* @param[in] vtmWriter a writer specialized for the VTM file format
*/
void writeVtmFile( real64 const time,
string const meshBodyName,
Copy link
Contributor

Choose a reason for hiding this comment

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

We usually provide string and constant references.

@povolny1 povolny1 marked this pull request as ready for review January 27, 2022 18:05
Base automatically changed from feature/settgast/multipleMeshBodies to develop February 11, 2022 17:50
@rrsettgast rrsettgast closed this Sep 7, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants