Comments (4)
Hi Mikhail,
Can you provide more details about your use case?
Of the two options you are proposing, I think the second one is better, because it will also enable the use of FormLinearSystem()
, at least in some case.
Cheers,
Tzanio
from mfem.
Hi Tzanio,
My goal is to compute a dense matrix D = W^T * S * W
, where S
is a full matrix of a bilinear form, and W
is a dense matrix each column X_i
of which is a solution of the equation S*X_i = 0
, where i
corresponds to a boundary degree of freedom, i.e. W = DenseMatrix(fespace.GetVSize(), n_bdr_dofs)
. To solve many equations S*X_i = 0
I use the FormLinearSystem
function, which creates mat_e
, eliminates rows and columns corresponding to boundary dofs, and finalizes the matrix, so when I compute D
using D = RAP(S, W);
, the S
matrix is not full, and I need it to be without boundary conditions applied.
What I do right now is - I compute S
two times: first time - to compute W
, and the second time - to compute D
. That works fine, but I'm wondering if I can do it more efficiently.
Thanks,
Mikhail
from mfem.
Hi Mikhail,
If I understand correctly, D
is the Schur complement with respect to the boundary? The action of D
can probably be computed more efficiently than solving the many systems, but if you need the actual dense matrix itself, than I what you are doing is certainly a valid approach.
If you want to restore the full matrix, you probably want to call
SparseMatrix * Add(const SparseMatrix & A, const SparseMatrix & B);
though depending on the sizes, this may not be more efficient than reassembly.
Hope this helps,
Tzanio
from mfem.
Hi Tzanio,
Thank you for the reply. I do need the dense matrix W
itself, so I need to construct it explicitly. I'm going to follow your advice on the computation of the full matrix using Add()
function, therefore I created a pull request to get an access to the mat_e
matrix.
Thank you,
Mikhail
from mfem.
Related Issues (20)
- SuperLU_DIST version 5 and 6 support issue HOT 4
- PardisoSolver and CPardisoSolver should be updated for single precision
- fespace update fails for h derefinement after p adaption HOT 1
- Update FindPETSc cmake module HOT 9
- Request for input: Laplace-based linear and bilinear integrators HOT 12
- ParLinearForm does not match with local vector and HypreParMatrix HOT 4
- Memory allocation issues with `FindPointsGSLIB` HOT 4
- A quick question (efficient method for copying components in gridfunctions?) HOT 2
- FindPtsGSLIB Question HOT 1
- Question about potential AMR improvements HOT 2
- Can MFEM built with mumps with a different gcc version? HOT 3
- Error when reading a Cubit mesh HOT 3
- Regarding implementation of implicit thermal conduction in Joule miniapp HOT 3
- How to get hanging nodes and two parent nodes of each for a generated NCmesh from uniform mesh
- non-linear diffusion problem
- Transferring gradients between submeshes for Neumann boundary conditions HOT 5
- ImplicitSolve in Time dependent operator with Partial Assembly
- Make double normal trace jump bilinearform integrator
- Boundary integration of H(curl) problems HOT 1
- How to prevent negative value with Legendre basis? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mfem.