Dear All,
I have gone through a lot of tutorials. I would like to understand the basic relation between dof_handler and FESystem. I am trying to solve two 4th order equations on the same mesh (or triangulation). And each equation is split into two second order equations.
FESystem<dim> fe_one, fe_two;
BlockSparseMatrix<double> system_matrix_one, system_matrix_two;
BlockVector<double> solution_one, solution_two;
BlockVector<double> old_solution_one, old_solution_two;
BlockVector<double> system_rhs_one, system_rhs_two;
Question (1) Do I need one or two dof_handler?
DoFHandler<dim> dof_handler;
Where,
fe_one(FE_Q<dim>(degree),1, FE_Q<dim>(degree),1)
fe_two(FE_Q<dim>(degree),1, FE_Q<dim>(degree),1)
Some additional information, both the fe_one and fe_two systems are independently solved in a semi-implicitly manner. Meaning system_matrix_one is a function of old_solution_one and old_solution_two, likewise for system_matrix_two.
Question (2) I am assuming one block spartisty_pattern is enough and use the same for both the system_matrix?
BlockSparsityPattern sparsity_pattern;
If there would be other multiple declarations please let me know. I look forward to your response.
Best regards,
Karthi.
Thank you very much for your response.
Now, I understand since the fe space is the same for the sub-problems I can use the same dof_handler for both.
Question (1) Does it mean when I distribute the dofs, I should do it twice with the same dof_handler?
dof_handler.distribute_dofs(fe_one);
dof_handler.distribute_dofs(fe_two);
Question(2) Currently, both the sub-problems solves almost the same pde and in
the future the number of subproblems can be more than two.
So I am planning to define a vector of FESystem<dim>.
std::vector<FESystem<dim>> fe;
In the body of the constructor I have
for(unsigned int i=0; i < num_index; i++)
fe.push_back({FE_Q<dim>(degree),1,FE_Q<dim>(degree)});
The above code compiles.
Likewise define a vector for system_matrix, solution, old_solution, system_rhs.
Is this the approach correct?
Question (3)
Can I do the same for FEValues?
std::vector<FEValues<dim>> fe_vector_values;
for(unsigned int i=0; i < num_index; i++)
fe_vector_values.push_back({fe_vector[i], quadrature_formula, update_values});
Strangely enough depending on where the above code is located,
it sometimes gives me compile errors.
If there is a better approach please let me know. Thank you!!
Best,
Karthi.
--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to a topic in the Google Groups "deal.II User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dealii/TyT5br2YYnM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dealii+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/0e23dcc8-d543-824a-1165-0c8bf008b350%40colostate.edu.