From: edgar <edg...@cr...> - 2021-08-23 13:14:36
|
Dear Paul and Hubert, Thank you very much. I had tried by changing libMesh::Number to libMesh::Real, and I was getting an error. I thought that it was related to PETSc, but now that Hubert mentions about the solvers, I guess that he is right. I am getting this: error: no matching function for call to 'libMesh::DirichletBoundary::DirichletBoundary(std::set<short int>&, std::vector<unsigned int>&, libMesh::ConstFunction<double>, libMesh::VariableIndexing)' 66 | libMesh::LOCAL_VARIABLE_ORDER); ... --- 8< snip ---- error: cannot convert 'libMesh::DenseMatrix<double>' to 'libMesh::DenseMatrix<std::complex<double> >&' 150 | dof_map.heterogenously_constrain_element_matrix_and_vector (Ke, Fe, dof_indices); Thank you both. I will live with my complex numbers :D . On 2021-08-23 13:02, Hubert Weissmann wrote: > Hi Edgar, > > yes you are right. Sorry; than I misinterpreted your question. > Than I agree with Paul below; but AFAIK the `Systems` matrix/rhs (and > thus solution) allways are of `Number` type!? > > At least for the `Linear` systems, I am not aware of a builtin way to > change this. > > Best regards > > > On 8/23/21 2:58 PM, Paul T. Bauman wrote: >> Hi Edgar, >> >> The way I think you'll want to handle this is using libMesh's built-in >> numeric types. libMesh::Number will be a complex-valued quantity when >> libMesh is compiled with complex numbers and a standard float when >> not. >> libMesh::Real will always be a standard float, regardless of the >> complex >> mode that libMesh is configured with. So the part of your program that >> you >> wish to be real-valued, use libMesh::Real. >> >> HTH, >> >> Paul > > > _______________________________________________ > Libmesh-users mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/libmesh-users |