Hello-

I am wanting to implement a similar automatic adaptivity scheme as is in
example 18. However, in testing the example itself I've run into a few
issues.

1. If in the ex18.in file, the global tolerance is set to anything nonzero,
the code breaks in the uniform_refinement_estimator.C on line 297 because it
is looking for an adjoint_solution that has not been computed.

It seems to me that the problem is that even though no solution_vector is
passed into the estimate_error routine from ex18.C, the "if" check on line
290 in uniform_refinement_estimator.C is failing because the NULL
solution_vector (originally "passed" into estimate_error) was wrapped into
the map object solution_vectors which was then passed to the routine
_estimate_error and thus, in the check, is not perceived as null.

Here is the "wrapping" in estimate_error I am referring to:

std::map<const System*, const NumericVector<Number>* > solution_vectors;
solution_vectors[&_system] = solution_vector;

Perhaps a solution would be to check on line 290 "if(!solution_vectors[0])"
instead of "if(!solution_vectors)"?

2. If you perform an adaptive strategy based on a target number of elements
with PetscDiffSolver instead of the default NewtonSolver, there is a crash
during the residual assembly after the refinement. (Everything seems to work
if NewtonSolver is used.)

PetscDiffSolver calls enforce_constraints_exactly without including the
vector, so in the routine enforce_constraints_exactly the vector v is
initialized with the call

  v = system.solution.get();

However, in the following lines of code, it is evident that this is
recognized as type SERIAL, PARALLEL, or GHOST in dof_map_constraints.C. What
else would it be?

Does anyone have any thoughts on this problem? I couldn't find anywhere I
thought something was going wrong.

Thanks!
Andrea
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to