43 DCOUT_V(
'P',
"DDLCompositeMaterial::processElement started");
51 mat =
DDMaterial( ddn, ev.
eval( nmspace, atts.find(
"density" )->second ));
70 if( myMF->
size() != myrMaterial->
size())
72 std::string msg =
"/nDDLCompositeMaterial::processElement found that the ";
73 msg +=
"number of MaterialFractions does not match the number ";
74 msg +=
"of rMaterial names for ";
75 msg += ddn.
ns() +
":" + ddn.
name() +
".";
78 for(
size_t i = 0;
i < myrMaterial->
size(); ++
i )
82 ev.
eval( nmspace, atts.find(
"fraction" )->second ));
89 DCOUT_V(
'P',
"DDLCompositeMaterial::processElement completed " << mat);
DDLMaterial processes Box elements.
DDLElementRegistry * myRegistry_
DDMaterial is used to define and access material information.
virtual const DDXMLAttribute & getAttributeSet(size_t aIndex=0) const
Get a "row" of attributes, i.e. one attribute set.
void throwError(const std::string &keyMessage) const
format std::string for throw an error.
const std::string & ns() const
Returns the namespace.
DDName is used to identify DDD entities uniquely.
type of data representation of DDCompactView
void preProcessElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv)
Called by loadAttributes AFTER attributes are loaded.
std::map< std::string, std::string > DDXMLAttribute
int addMaterial(const DDMaterial &m, double fm)
adds a material to the mixture proportional to its fraction-mass fm.
DDXMLElement * getElement(const std::string &name)
THE most important part. Getting the pointer to a given element type.
static value_type & instance()
~DDLCompositeMaterial()
Destructor.
DDLCompositeMaterial(DDLElementRegistry *myreg)
Constructor.
virtual size_t size(void) const
Number of elements accumulated.
virtual void setReference(const std::string &nmspace, DDCompactView &cpv)
Interface of an Expression Evaluator.
#define DCOUT_V(M_v_Y, M_v_S)
virtual double eval(const std::string &ns, const std::string &expr)=0
evaluate an expression expr inside the local namespace
This is a base class for processing XML elements in the DDD.
The main class for processing parsed elements.
virtual void clear(void)
clear this element's contents.
void processElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv)
Processing the element.
virtual const DDName getDDName(const std::string &defaultNS, const std::string &attname=std::string("name"), size_t aIndex=0)
const std::string & name() const
Returns the name.