fixed: neumann boundary condition without a specified value

now default to 0.0

git-svn-id: http://svn.sintef.no/trondheim/IFEM/trunk@2300 e10b68d5-8a6e-419e-a041-bce267b0401d
This commit is contained in:
akva
2013-04-09 12:50:50 +00:00
committed by Knut Morten Okstad
parent 0b652f9f9a
commit 4c3ab64cae

View File

@@ -297,12 +297,16 @@ bool SIMbase::parseBCTag (const TiXmlElement* elem)
std::cout <<"\tNeumann code "<< code <<" (generic)" << std::endl;
this->setPropertyType(code,Property::NEUMANN_GENERIC);
}
else if (elem->FirstChild()) {
else {
int ndir = 0;
std::string val = "0.0";
if (elem->FirstChild() && elem->FirstChild()->Value())
val = elem->FirstChild()->Value();
utl::getAttribute(elem,"direction",ndir);
std::cout <<"\tNeumann code "<< code <<" direction "<< ndir;
if (!type.empty()) std::cout <<" ("<< type <<")";
this->setNeumann(elem->FirstChild()->Value(),type,ndir,code);
this->setNeumann(val.c_str(),type,ndir,code);
std::cout << std::endl;
}
}