Exemple #1
0
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);
}
Exemple #2
0
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());
}
Exemple #3
0
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);
}