Dear All,
I'm new to dealii and worked through the tutorials. I am currently trying
to an implement a 6th order parabolic equation by breaking it into three
second order equations.
Thus I have a FeSystem (and tried to mimic tutorial step-21) with dim = 2
using
fe(FE_Q<dim>(degree), 1,FE_Q<dim>(degree),1,FE_Q<dim>(degree),1)
I used random initializing to initialize one of the variables
class InitialValues : public Function<dim>{
public: InitialValues() : Function<dim>(dim + 1){}
virtual void vector_value(const Point<dim> & /*p*/,Vector<double> &
values) const override{
Assert(values.size() == dim + 1,ExcDimensionMismatch(values.size(),
dim + 1));
values(0) = 0.0; // inital condition for mu
double fMin = -0.1;
double fMax = 0.5;
double f = (double)rand() / (double)RAND_MAX;
values(1) = fMin + f * (fMax - fMin); // initial condition for psi
values(2) = 0.0; // initial condition for omega }};
Then in run()
Question (1) Should I use VectorTools::project or VectorTools::interpolate
for initializing the variables?
VectorTools::project(dof_handler,constraints,QGauss<dim>(degree +
1),InitialValues<dim>(),old_solution);
VectorTools::interpolate(dof_handler,InitialValues<dim>(),old_solution);
Both the initial conditions are not giving the desired steady state
solution (possibly there is a bug that is not related with the initial
condition). However, I want to make sure I understand how to set up initial
condition generated using random values.
Question (2)Though, I set the initial condition only to one of the three
solution variables, in the output I see all three variables initialized
(with values different from zero) at time zero. I copied ‘output’ from
tutorial step-21. Maybe the output is not generated at time zero or I made
a mistake in the set up InitialValues?
Question (3)Since, I have a system of three variables (each with
FE_Q<dim>(1) finite element space) in my function InitialValues I only
defined InitialValues::vector_value and not InitialValues::value. Did I do
right?
Thank you and I look forward to your response.
Best regards,
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 the Google Groups
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/dealii/04ab9bf4-32ea-4a84-849a-7c996d1b1ed5n%40googlegroups.com.