retrireve filename and length_multiplier from XML file and call methods similar to filename case for XML constructor

This commit is contained in:
lewisgross1296 2022-07-26 16:39:54 -05:00
parent 045bc34ec4
commit 5161da8031
2 changed files with 9 additions and 1 deletions

View file

@ -7,13 +7,13 @@
#include <unordered_map>
#include "hdf5.h"
#include "pugixml.hpp"
#include "xtensor/xtensor.hpp"
#include "openmc/memory.h" // for unique_ptr
#include "openmc/particle.h"
#include "openmc/position.h"
#include "openmc/vector.h"
#include "openmc/xml_interface.h"
#ifdef DAGMC
#include "moab/AdaptiveKDTree.hpp"

View file

@ -2324,6 +2324,14 @@ const std::string LibMesh::mesh_lib_type = "libmesh";
LibMesh::LibMesh(pugi::xml_node node) : UnstructuredMesh(node)
{
std::string& filename = node.get_node_value(node, "filename");
double length_multiplier = std::stod(node.get_node_value(node, "length_multiplier"));
set_mesh_pointer_from_filename(filename);
set_length_multiplier(length_multiplier);
if (specified_length_multiplier_) {
libMesh::MeshTools::Modification::scale(*m_, length_multiplier_);
}
m_->prepare_for_use();
initialize();
}