From: Francesco B. <fra...@po...> - 2014-03-02 18:50:02
|
Dear libMesh users and developers, I have a NumericVector v that stores a discretized function and I would like to use this vector v as a Dirichlet BC for a system s via the DirichletBoundary class. I guess I could use something like DirichletBoundary( MeshFunction(v) ) but, at least if the vector v and the system s are defined on the same mesh and with the same FE discretization, is there any more efficient way to do this? Thanks, Best regards, Francesco |
From: Roy S. <roy...@ic...> - 2014-03-03 13:02:23
|
On Sun, 2 Mar 2014, Francesco Ballarin wrote: > I have a NumericVector v that stores a discretized function and I would > like to use this vector v as a Dirichlet BC for a system s via the > DirichletBoundary class. > I guess I could use something like > DirichletBoundary( MeshFunction(v) ) > but, at least if the vector v and the system s are defined on the same mesh > and with the same FE discretization, is there any more efficient way to do > this? At the moment, no. Ideally we ought to have a DirichletBoundary capable of optionally taking an FEMFunctionBase rather than just a FunctionBase, but that would be a significant patch to write; I wouldn't suggest you bother with it unless profiling tells you you have a bottleneck in the constraint creation. The inefficient code path will be O(N^(2/3) log N) instead of O(N^{2/3}), but that will still be asymptotically cheaper than your solve. --- Roy |