On 4/13/20 6:00 PM, Krishnakumar Gopalakrishnan wrote:
I am currently working on Step-52, which solves the diffusion equation.

I now want to disable the Method of Manufactured Solutions (MMS) i.e. get rid of the forcing function which produces an expected analytical solution, in the direction towards solving my real-world problem.  I also have set the absorption coefficient to zero, so that the diffusion equation reduces to a form analogous to the heat-equation.

Currently, the initial condition is set to be the zero vector.

As a first step, I'd like to set my initial solution to be sin(b*x) * sin(b*y).

I am currently interested in using only the embedded explicit method driver function. Within this, I suspect that the lines of interest are the following:

solution = 0.;
constraint_matrix.distribute(solution);


But I am not quite sure how can this initial condition be imposed. Any help will be much appreciated.

You will want to take a look at step-25. That program uses VectorTools::project(), but you can also use VectorTools::interpolate() instead.

Best
 W.


--
------------------------------------------------------------------------
Wolfgang Bangerth          email:                 bange...@colostate.edu
                           www: http://www.math.colostate.edu/~bangerth/

--
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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/462c6c7a-341d-1657-559e-d7a2a3164771%40colostate.edu.

Reply via email to