Skip to content
Snippets Groups Projects
Commit fd1406eb authored by Sebastian Eibl's avatar Sebastian Eibl
Browse files

output material parameters

parent 059bac46
No related merge requests found
......@@ -311,5 +311,21 @@ std::vector<MaterialID> Material::findPrefix( const std::string& prefix )
}
//*************************************************************************************************
std::string Material::toString( const MaterialID& v )
{
std::stringstream ss;
ss << "Material " << Material::getName(v) << "\n"
<< " density = " << Material::getDensity(v) << "\n"
<< " cor = " << Material::getRestitution(v) << "\n"
<< " csf = " << Material::getStaticFriction(v) << "\n"
<< " cdf = " << Material::getDynamicFriction(v) << "\n"
<< " poisson = " << Material::getPoissonRatio(v) << "\n"
<< " young = " << Material::getYoungModulus(v) << "\n"
<< " stiffness = " << Material::getStiffness(v) << "\n"
<< " dampingN = " << Material::getDampingN(v) << "\n"
<< " dampingT = " << Material::getDampingT(v);
return ss.str();
}
} // namespace pe
} // namespace walberla
......@@ -15,7 +15,6 @@
//
//! \file Materials.h
//! \author Klaus Iglberger
//! \author Sebastian Eibl <sebastian.eibl@fau.de>
//! \brief Header file for materials
//
//======================================================================================================================
......@@ -27,6 +26,7 @@
// Includes
//*************************************************************************************************
#include <iostream>
#include <string>
#include <vector>
#include <pe/Types.h>
......@@ -150,6 +150,7 @@ public:
static inline real_t getDampingN( MaterialID material1, MaterialID material2 );
static inline real_t getDampingT( MaterialID material );
static inline real_t getDampingT( MaterialID material1, MaterialID material2 );
static std::string toString( const MaterialID& v );
//@}
//**********************************************************************************************
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment