void LinearSolver::mesh_loaded(CMesh& mesh) { CSimpleSolver::mesh_loaded(mesh); // Set the region of all children to the root region of the mesh std::vector<URI> root_regions; root_regions.push_back(mesh.topology().uri()); configure_option_recursively(Solver::Tags::regions(), root_regions); }
void CSimpleSolver::mesh_loaded(CMesh& mesh) { m_mesh = mesh.as_ptr<CMesh>(); Physics::PhysModel& phys_model = physics(); // Update the dimensions on the physics phys_model.variable_manager().configure_option("dimensions", mesh.topology().geometry().dim()); }
void create_constant_scalar_field(CMesh& mesh, const std::string& field_name, const std::string& var_name, const Real value) { MeshTerm<1, ScalarField> heat(field_name, var_name); mesh.create_scalar_field(field_name, var_name, CField::Basis::POINT_BASED); for_each_node(mesh.topology(), heat = value); }