Hi Julian, On Wed, Aug 31, 2016 at 3:40 AM, Julian Andrej <j...@tf.uni-kiel.de> wrote:
> > so we are elaborating FEM libraries for a project we are attempting. > One requirement is, that we want to assemble FEM matrices/vector into > PETSc objects, which libMesh obviously provides. Is there a way, to > just assemble the matrices by providing element based loops, so that > we can work with the plain PETSc Mat/Vec afterwards? > > Basically we want to hand off the FEM stuff to libMesh and do > everything else on our own with the assembled objects. > If I understand what you're asking, then just about any of the examples ( http://libmesh.github.io/examples.html) should illustrate this, e.g. for Poisson: https://github.com/libMesh/libmesh/tree/master/examples/introduction/introduction_ex3. In particular, if you built libMesh with PETSc, the NumericVector and SparseMatrix objects will be PetscVector and PetscMatrix, respectively, so you can cast and grab the raw Vec and Mat objects from the System::solution and ImplicitSystem::matrix. HTH, Paul P.S. Note that we have interfaces to PETSc's solvers so you'll be able to do all the command line foo for the PETSc solvers so you wouldn't need to rewrite solvers yourself. Just my two cents. ------------------------------------------------------------------------------ _______________________________________________ Libmesh-users mailing list Libmesh-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-users