On Thu, May 3, 2012 at 9:20 PM, Sanjay Govindjee wrote:
> We have some code that has worked up through petsc-3.1 and we are in the
> process of updating it to petsc-3.2.
>
> One thing that I can not find mentioned in the change logs (looking all
> the way back to petsc-2.1.0) or the FAQs is the e
On May 3, 2012, at 9:39 PM, Blaise Bourdin wrote:
> Hi,
>
> As a side note: this is actually a problem I have met in one of the TS
> examples. When using fortran datatypes, the statements "A=0" and "if (A .eq.
> 0)" are not valid. They would require overloading the assignment and
> comparison
Hi,
As a side note: this is actually a problem I have met in one of the TS
examples. When using fortran datatypes, the statements "A=0" and "if (A .eq.
0)" are not valid. They would require overloading the assignment and comparison
operators.
Can anybody see an alternative?
Blaise
>
> VecVa
VecValid was unsafe because it looks inside a data structure that may or not
be valid.
In Fortran the safe way to do this is to set the value to 0 right after
declaration and then check if not zero. So
MatA
A = 0
...
if (A .eq. 0) then
call VecCreate(
Thanks. I think this will work for us.
-sanjay
On 5/3/12 7:22 PM, Barry Smith wrote:
>VecValid was unsafe because it looks inside a data structure that may or
> not be valid.
>
> In Fortran the safe way to do this is to set the value to 0 right after
> declaration and then check if not
The entry points for our code can vary. Thus a vector for example can
get created in a handful
of routines. But it is possible that the vector has already been
created in another routine. So
we perform a VecValid check on it. If it is false we create it, else we
go on and use it. Also at
th
We have some code that has worked up through petsc-3.1 and we are in the
process of updating it to petsc-3.2.
One thing that I can not find mentioned in the change logs (looking all
the way back to petsc-2.1.0) or the FAQs is the elimination of the
VecValid and MatValid tests.
We used to perfo
VecValid is gone in 3.2 with no mention in the Changes. Is there any
replacement?
Dominik
On Fri, Oct 21, 2011 at 15:23, Dominik Szczerba wrote:
> VecValid is gone in 3.2 with no mention in the Changes. Is there any
> replacement?
>
You can use
PetscValidHeaderSpecific(vec,VEC_CLASSID,argnum);
if you are validating function arguments. VecValid() didn't have meaningful
semantics when