Dear all,
I'm trying to store data from _node_data associated with a Mesh on a degree
1 LAGRANGE basis in the code in order for this _node_data (supposed to be a
smooth function) to be used in the rhs of my Poisson problem.
>
> Add a second system, an ExplicitSystem, to your EquationSystems. Add
> a single variable to it. Load data as a solution into that, and query
> it when you're integrating your real system.
Does it mean I just do something very similar to example 3 (poisson
problem) and use my _node_data as the "exact_solution"? I'm not quite sure
how to set up the problem though... I'm guessing I'm doing a linear
interpolation of my data... In that case, do I just do the following?
(Sorry, I need things spelled out more since I'm getting confused with the
data structures.)
for (unsigned int qp=0; qp<qrule.n_points(); qp++)
{
for (unsigned int i=0; i<phi.size(); i++)
for (unsigned int j=0; j<phi.size(); j++)
{
Ke(i,j) += JxW[qp]*(phi[i][qp]*phi[j][qp]);
}
{
//const Real x =
q_point[qp](0);
//const Real y =
q_point[qp](1);
//const Real eps =
1.e-3;
const Real fxy = 1;
for (unsigned int i=0; i<phi.size(); i++)
Fe(i) += JxW[qp]*fxy*phi[i][qp];
}
}
I tried to assign _node_data directy to _variables, but I guess a Variable
is not supposed to hold any value except to design what the name, ID and FE
type is for the solution of a problem? Please clarify...
Also, since I don't have the analytic form of my _node_data. When I define
it will it just become a bunch of if/then statements? (checking for xyz
values and then assigning the appropriate data value...)
Thanks,
Karen
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users