Changing step-14 to the prablem with coefficients

52 views
Skip to first unread message

Anna Avdeeva

unread,
Mar 10, 2016, 5:53:06 AM3/10/16
to deal.II User Group
I am trying to implement 3D electromagnetic modelling code with adaptive mesh refinement based on goal-oriented error estimator (as in
Alexander V. Grayver and Tzanio V. Kolev (2015). ”Large-scale 3D geoelectromagnetic modeling using parallel adaptive high-order finite element method.” GEOPHYSICS, 80(6), E277-E291.
doi: 10.1190/geo2015-0013.1).
As far as I understand, such error estimator is implemented in step-14, and this is why I took this tutorial program as a template.
Step-14 is rather complex in its structure, and I am not quite sure what is the best way to pass necessary parameters (conductivity, permeability and all the info about the background model) to both right hand side and the solver.
I would very much appreciate if somebody give me an advice.

Thank you very much in advance.
 

Wolfgang Bangerth

unread,
Mar 10, 2016, 10:10:36 AM3/10/16
to dea...@googlegroups.com
On 03/10/2016 04:53 AM, Anna Avdeeva wrote:
>
> Step-14 is rather complex in its structure, and I am not quite sure what
> is the best way to pass necessary parameters (conductivity, permeability
> and all the info about the background model) to both right hand side and
> the solver.
> I would very much appreciate if somebody give me an advice.

Anna -- it's difficult to answer questions at this level of generality.
Did you read through the program and try a few things?

It's true that step-14 is (maybe overly) complicated. It was written at
a time when we were worse at software design than we are today.

Best
W.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@math.tamu.edu
www: http://www.math.tamu.edu/~bangerth/

Tobi Young

unread,
Mar 10, 2016, 12:10:34 PM3/10/16
to dealii
>> Step-14 is rather complex in its structure, and I am not quite sure what
>> is the best way to pass necessary parameters (conductivity, permeability
>> and all the info about the background model) to both right hand side and
>> the solver.
>> I would very much appreciate if somebody give me an advice.
>
>
> Anna -- it's difficult to answer questions at this level of generality. Did
> you read through the program and try a few things?

As Wolfgang says, it is tricky to answer such a general question.

Have you looked at step-8? This step adds coefficients to the rhs
vector and matrix.
I suggest that as a good starting point to figure out what you want to do.

Best,
Toby

Thomas Wick

unread,
Mar 10, 2016, 2:36:11 PM3/10/16
to dea...@googlegroups.com
Despite what Tobi and Wolfgang wrote. If you really want
to use step-14 as template (I did it actually in past),
the easiest way is to define a class
at the very beginning:

class Parameters
{
public:
double XX = YY;
unsigned int ZZ = etc.

};

and then you pass this class to all other objects.

With this you are quite flexible in choosing all
parameters and passing them to matrix and right hand side functions.
This worked well for me.

Best Thomas

++--------------------------------------------++
Dr. Thomas Wick
Research Scientist at RICAM Linz, Austria

Email: thoma...@ricam.oeaw.ac.at
www: http://people.ricam.oeaw.ac.at/t.wick/
++--------------------------------------------++
--

Anna Avdeeva

unread,
Mar 11, 2016, 2:51:14 AM3/11/16
to deal.II User Group
I started with modifying the RightHandSide class. The way I tried to go about it is to give arguments sigma,mu, sigma_0, mu_0, depth_0, omega to the constructor of the RightHandSide class. But then I got stuck since I was not sure where the object of this class is actually created.

Do you have a more modern tutorial program that implements goal-oriented error estimator?

If not, I will continue with step-14 and will try what Thomas said.

Wolfgang Bangerth

unread,
Mar 11, 2016, 5:06:19 PM3/11/16
to dea...@googlegroups.com
On 03/11/2016 01:51 AM, Anna Avdeeva wrote:
> I started with modifying the RightHandSide class. The way I tried to go about it is to give arguments sigma,mu, sigma_0, mu_0, depth_0, omega to the constructor of the RightHandSide class. But then I got stuck since I was not sure where the object of this class is actually created.
>
> Do you have a more modern tutorial program that implements goal-oriented error estimator?

That's what it is. I'm afraid you will have to find yourself through the
maze :-(
Reply all
Reply to author
Forward
0 new messages