PetscTypeCompare

Compares two PETSc types, returns 1 if they are the same

Input Parameter

type1 - first type
type2 - second type

Synopsis

int PetscTypeCompare(type1,type2)

Usage

     VecType type;
     VecGetType(v,&type);
     if (PetscTypeCompare(type1,VEC_MPI)) {
       ....
     }

Notes

Equivalent to PetscStrcmp((char*)type1,(char*)type2)

Only works for new-style types that are char*

See Also

VecGetType(), KSPGetType(), PCGetType(), SNESGetType()

Keywords

comparing types

Level:intermediate
Location:src/sys/src/utils/str.c
System Index
Table of Contents