| Line 303... |
Line 303... |
{
|
{
|
PetscFunctionBegin;
|
PetscFunctionBegin;
|
PetscValidHeaderSpecific(ip,IP_CLASSID,1);
|
PetscValidHeaderSpecific(ip,IP_CLASSID,1);
|
PetscValidPointer(type,2);
|
PetscValidPointer(type,2);
|
*type = ((PetscObject)ip)->type_name;
|
*type = ((PetscObject)ip)->type_name;
|
|
PetscFunctionReturn(0);
|
|
}
|
|
|
|
#undef __FUNCT__
|
|
#define __FUNCT__ "IPSetDefaultType_Private"
|
|
/*
|
|
Sets the default IP type, depending on whether complex arithmetic
|
|
is used or not.
|
|
*/
|
|
PetscErrorCode IPSetDefaultType_Private(IP ip)
|
|
{
|
|
PetscErrorCode ierr;
|
|
|
|
PetscFunctionBegin;
|
|
PetscValidHeaderSpecific(ip,IP_CLASSID,1);
|
|
#if defined(PETSC_USE_COMPLEX)
|
|
ierr = IPSetType(ip,IPSESQUILINEAR);CHKERRQ(ierr);
|
|
#else
|
|
ierr = IPSetType(ip,IPBILINEAR);CHKERRQ(ierr);
|
|
#endif
|
PetscFunctionReturn(0);
|
PetscFunctionReturn(0);
|
}
|
}
|
|
|
#undef __FUNCT__
|
#undef __FUNCT__
|
#define __FUNCT__ "IPSetFromOptions"
|
#define __FUNCT__ "IPSetFromOptions"
|
| Line 332... |
Line 352... |
PetscErrorCode ierr;
|
PetscErrorCode ierr;
|
|
|
PetscFunctionBegin;
|
PetscFunctionBegin;
|
PetscValidHeaderSpecific(ip,IP_CLASSID,1);
|
PetscValidHeaderSpecific(ip,IP_CLASSID,1);
|
if (!IPRegisterAllCalled) { ierr = IPRegisterAll(PETSC_NULL);CHKERRQ(ierr); }
|
if (!IPRegisterAllCalled) { ierr = IPRegisterAll(PETSC_NULL);CHKERRQ(ierr); }
|
|
/* Set default type (we do not allow changing it with -ip_type) */
|
if (!((PetscObject)ip)->type_name) {
|
if (!((PetscObject)ip)->type_name) {
|
/* Set default type (we do not allow changing it with -ip_type) */
|
ierr = IPSetDefaultType_Private(ip);CHKERRQ(ierr);
|
#if defined(PETSC_USE_COMPLEX)
|
|
ierr = IPSetType(ip,IPSESQUILINEAR);CHKERRQ(ierr);
|
|
#else
|
|
ierr = IPSetType(ip,IPBILINEAR);CHKERRQ(ierr);
|
|
#endif
|
|
}
|
}
|
ierr = PetscOptionsBegin(((PetscObject)ip)->comm,((PetscObject)ip)->prefix,"Inner Product (IP) Options","IP");CHKERRQ(ierr);
|
ierr = PetscOptionsBegin(((PetscObject)ip)->comm,((PetscObject)ip)->prefix,"Inner Product (IP) Options","IP");CHKERRQ(ierr);
|
i = ip->orthog_type;
|
i = ip->orthog_type;
|
ierr = PetscOptionsEList("-ip_orthog_type","Orthogonalization method","IPSetOrthogonalization",orth_list,2,orth_list[i],&i,PETSC_NULL);CHKERRQ(ierr);
|
ierr = PetscOptionsEList("-ip_orthog_type","Orthogonalization method","IPSetOrthogonalization",orth_list,2,orth_list[i],&i,PETSC_NULL);CHKERRQ(ierr);
|
j = ip->orthog_ref;
|
j = ip->orthog_ref;
|