Comments (3)
Hi @karthichockalingam ,
You have to use a NonlinearForm
with an appropriately-prepared NonlinearFormIntegrator
for this - please check out #3975, I had pretty much this same question when first starting up with MFEM and hope that the linked discussion helps!
from mfem.
Thank you @j-signorelli for your response. I will have a look.
from mfem.
Hi @j-signorelli I was able to go over the issue and understand how to implement non-linear PDEs :)
Thanks a lot. Please let me know how I can make it a time-dependent problem.
In the sample non-linear code gist, shared by @pazner , the AddDomainIntegrator
is called using NonlinearForm
// 6. Set up the nonlinear form n(u,v) = (grad u, grad v) + (f(u), v)
NonlinearForm n(&fespace);
n.AddDomainIntegrator(new NonlinearMassIntegrator(fespace));
n.AddDomainIntegrator(new DiffusionIntegrator);
n.SetEssentialBC(boundary_dofs);
In the above code, I believe everything is assembled elementwise.
In ex16 were a time depenedent non-linear PDE is solved, the AddDomainIntegrator
is called using BilinearForm
void ConductionOperator::SetParameters(const Vector &u)
{
GridFunction u_alpha_gf(&fespace);
u_alpha_gf.SetFromTrueDofs(u);
for (int i = 0; i < u_alpha_gf.Size(); i++)
{
u_alpha_gf(i) = kappa + alpha*u_alpha_gf(i);
}
delete K;
K = new BilinearForm(&fespace);
GridFunctionCoefficient u_coeff(&u_alpha_gf);
K->AddDomainIntegrator(new DiffusionIntegrator(u_coeff));
K->Assemble();
K->FormSystemMatrix(ess_tdof_list, Kmat);
delete T;
T = NULL; // re-compute T on the next ImplicitSolve
}
Maybe ex16, K
is to setting up the global assembly of Kmat
. I am not sure if I should proceed element-wise or by globally assembled matrix to make the problem time-dependent. If I should be using NonlinearForm
or not.
If the sample non-linear code gist can be extended to time-dependent problems, it would be helpful.
Many thanks!!
from mfem.
Related Issues (20)
- Missing documentation
- Boundary LF Integrators fast assembly minor bug
- Periodical BC and the GetVertex function HOT 11
- Electromagnetic skin effect in different wire shapes, in 2D. HOT 4
- Unexpected performance of different preconditioners HOT 5
- inconformity of DOF for Nedelec Finite Element Space HOT 4
- 【The use of HypreParVector】 HOT 1
- Custom IntegrationRule for VectorFEMassIntegrator HOT 2
- Add device tests of Example 14 (DG diffusion) HOT 3
- How to inverse block opeator matrix
- Possible memory leakage of HypreParMatrix HOT 2
- Evaluating integrals of shape functions in neighboring elements HOT 13
- 【VectorDomainLFIntegrator does not provided enough constructors】 HOT 3
- Changes to `socketbuf` result in `SocketStream` objects returning true even if not connected (e.g., to GLVis) HOT 5
- 【Is PWFunctionCoefficient possible?】 HOT 1
- Strange failure in LOBPCG::Solve() HOT 4
- Coefficient Projection for IGA Spaces HOT 5
- Apply double cross of a function by normal vector for Nedelec space.
- Fix the FMS unit test and the FMS example file `data/star-q3.fms`
- 3D electromagnetic proximity effect
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.