30 curr_err +=
"material not declared; unknown material!";
31 result.first = curr_err;
37 curr_err +=
"material name=" + mip.
name().
ns() +
":" + mip.
name().
name()
38 +
" is declared but not defined";
39 result.first = curr_err;
48 curr_err += no_density;
60 curr_err += no_composites;
65 curr_err =
" NOT-DEFINED ";
69 result.first=curr_err;
75 std::pair< std::string, std::string >
res(
"",
"");
84 result.first=curr_err;
97 std::vector< std::pair< std::string, std::string > >
errors;
101 for(
const auto&
i :
mr ) {
102 std::pair<std::string, std::string>
error(
"",
"");
106 errors.emplace_back(error);
111 os <<
"[DDCore:Report] Materials " << std::endl;
112 os << s << mr.size() <<
" Materials declared" << std::endl;
113 os << s <<
"detected errors:" << errors.size() << std::endl;
114 for(
auto j : errors ) {
115 os << std::endl << s << j.second <<
" " << j.first << std::endl;
double a() const
returns the atomic mass
def_type isDefined() const
static PFTauRenderPlugin instance
DDMaterial is used to define and access material information.
const std::string & ns() const
Returns the namespace.
bool DDCheckMaterial(DDMaterial &mip, std::pair< std::string, std::string > &result, int rlevel=0)
double z() const
retruns the atomic number
const std::string fullname() const
FractionV::value_type constituent(int i) const
returns the i-th compound material and its fraction-mass
bool DDCheckMaterials(std::ostream &os, std::vector< std::pair< std::string, std::string >> *res)
Checks all registered materials and sends a report /p os.
double density() const
returns the density
int noOfConstituents() const
returns the number of compound materials or 0 for elementary materials
const std::string & name() const
Returns the name.