Subversion Repositories slepc-dev

Rev

Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2116 Rev 2213
Line 53... Line 53...
{
{
  PetscErrorCode ierr;
  PetscErrorCode ierr;
  PetscScalar    p;
  PetscScalar    p;
 
 
  PetscFunctionBegin;
  PetscFunctionBegin;
  PetscValidHeaderSpecific(ip,IP_COOKIE,1);
  PetscValidHeaderSpecific(ip,IP_CLASSID,1);
  PetscValidHeaderSpecific(x,VEC_COOKIE,2);
  PetscValidHeaderSpecific(x,VEC_CLASSID,2);
  PetscValidPointer(norm,3);
  PetscValidPointer(norm,3);
 
 
  if (!ip->matrix && ip->bilinear_form == IP_INNER_HERMITIAN) {
  if (!ip->matrix && ip->bilinear_form == IP_INNER_HERMITIAN) {
    ierr = VecNorm(x,NORM_2,norm);CHKERRQ(ierr);
    ierr = VecNorm(x,NORM_2,norm);CHKERRQ(ierr);
  } else {
  } else {
Line 101... Line 101...
{
{
  PetscErrorCode ierr;
  PetscErrorCode ierr;
  PetscScalar    p;
  PetscScalar    p;
 
 
  PetscFunctionBegin;
  PetscFunctionBegin;
  PetscValidHeaderSpecific(ip,IP_COOKIE,1);
  PetscValidHeaderSpecific(ip,IP_CLASSID,1);
  PetscValidHeaderSpecific(x,VEC_COOKIE,2);
  PetscValidHeaderSpecific(x,VEC_CLASSID,2);
  PetscValidPointer(norm,3);
  PetscValidPointer(norm,3);
 
 
  if (!ip->matrix && ip->bilinear_form == IP_INNER_HERMITIAN) {
  if (!ip->matrix && ip->bilinear_form == IP_INNER_HERMITIAN) {
    ierr = VecNormBegin(x,NORM_2,norm);CHKERRQ(ierr);
    ierr = VecNormBegin(x,NORM_2,norm);CHKERRQ(ierr);
  } else {
  } else {
Line 141... Line 141...
{
{
  PetscErrorCode ierr;
  PetscErrorCode ierr;
  PetscScalar    p;
  PetscScalar    p;
 
 
  PetscFunctionBegin;
  PetscFunctionBegin;
  PetscValidHeaderSpecific(ip,IP_COOKIE,1);
  PetscValidHeaderSpecific(ip,IP_CLASSID,1);
  PetscValidHeaderSpecific(x,VEC_COOKIE,2);
  PetscValidHeaderSpecific(x,VEC_CLASSID,2);
  PetscValidPointer(norm,3);
  PetscValidPointer(norm,3);
 
 
  if (!ip->matrix && ip->bilinear_form == IP_INNER_HERMITIAN) {
  if (!ip->matrix && ip->bilinear_form == IP_INNER_HERMITIAN) {
    ierr = VecNormEnd(x,NORM_2,norm);CHKERRQ(ierr);
    ierr = VecNormEnd(x,NORM_2,norm);CHKERRQ(ierr);
  } else {
  } else {
Line 196... Line 196...
PetscErrorCode IPInnerProduct(IP ip,Vec x,Vec y,PetscScalar *p)
PetscErrorCode IPInnerProduct(IP ip,Vec x,Vec y,PetscScalar *p)
{
{
  PetscErrorCode ierr;
  PetscErrorCode ierr;
 
 
  PetscFunctionBegin;
  PetscFunctionBegin;
  PetscValidHeaderSpecific(ip,IP_COOKIE,1);
  PetscValidHeaderSpecific(ip,IP_CLASSID,1);
  PetscValidHeaderSpecific(x,VEC_COOKIE,2);
  PetscValidHeaderSpecific(x,VEC_CLASSID,2);
  PetscValidHeaderSpecific(y,VEC_COOKIE,3);
  PetscValidHeaderSpecific(y,VEC_CLASSID,3);
  PetscValidScalarPointer(p,4);
  PetscValidScalarPointer(p,4);
     
     
  ierr = PetscLogEventBegin(IP_InnerProduct,ip,x,0,0);CHKERRQ(ierr);
  ierr = PetscLogEventBegin(IP_InnerProduct,ip,x,0,0);CHKERRQ(ierr);
  ip->innerproducts++;
  ip->innerproducts++;
  if (ip->matrix) {
  if (ip->matrix) {
Line 246... Line 246...
PetscErrorCode IPInnerProductBegin(IP ip,Vec x,Vec y,PetscScalar *p)
PetscErrorCode IPInnerProductBegin(IP ip,Vec x,Vec y,PetscScalar *p)
{
{
  PetscErrorCode ierr;
  PetscErrorCode ierr;
 
 
  PetscFunctionBegin;
  PetscFunctionBegin;
  PetscValidHeaderSpecific(ip,IP_COOKIE,1);
  PetscValidHeaderSpecific(ip,IP_CLASSID,1);
  PetscValidHeaderSpecific(x,VEC_COOKIE,2);
  PetscValidHeaderSpecific(x,VEC_CLASSID,2);
  PetscValidHeaderSpecific(y,VEC_COOKIE,3);
  PetscValidHeaderSpecific(y,VEC_CLASSID,3);
  PetscValidScalarPointer(p,4);
  PetscValidScalarPointer(p,4);
 
 
  ierr = PetscLogEventBegin(IP_InnerProduct,ip,x,0,0);CHKERRQ(ierr);
  ierr = PetscLogEventBegin(IP_InnerProduct,ip,x,0,0);CHKERRQ(ierr);
  ip->innerproducts++;
  ip->innerproducts++;
  if (ip->matrix) {
  if (ip->matrix) {
Line 298... Line 298...
PetscErrorCode IPInnerProductEnd(IP ip,Vec x,Vec y,PetscScalar *p)
PetscErrorCode IPInnerProductEnd(IP ip,Vec x,Vec y,PetscScalar *p)
{
{
  PetscErrorCode ierr;
  PetscErrorCode ierr;
 
 
  PetscFunctionBegin;
  PetscFunctionBegin;
  PetscValidHeaderSpecific(ip,IP_COOKIE,1);
  PetscValidHeaderSpecific(ip,IP_CLASSID,1);
  PetscValidHeaderSpecific(x,VEC_COOKIE,2);
  PetscValidHeaderSpecific(x,VEC_CLASSID,2);
  PetscValidHeaderSpecific(y,VEC_COOKIE,3);
  PetscValidHeaderSpecific(y,VEC_CLASSID,3);
  PetscValidScalarPointer(p,4);
  PetscValidScalarPointer(p,4);
 
 
  ierr = PetscLogEventBegin(IP_InnerProduct,ip,x,0,0);CHKERRQ(ierr);
  ierr = PetscLogEventBegin(IP_InnerProduct,ip,x,0,0);CHKERRQ(ierr);
  if (ip->matrix) {
  if (ip->matrix) {
    if (ip->bilinear_form == IP_INNER_HERMITIAN) {
    if (ip->bilinear_form == IP_INNER_HERMITIAN) {
Line 354... Line 354...
PetscErrorCode IPMInnerProduct(IP ip,Vec x,PetscInt n,const Vec y[],PetscScalar *p)
PetscErrorCode IPMInnerProduct(IP ip,Vec x,PetscInt n,const Vec y[],PetscScalar *p)
{
{
  PetscErrorCode ierr;
  PetscErrorCode ierr;
 
 
  PetscFunctionBegin;
  PetscFunctionBegin;
  PetscValidHeaderSpecific(ip,IP_COOKIE,1);
  PetscValidHeaderSpecific(ip,IP_CLASSID,1);
  PetscValidHeaderSpecific(x,VEC_COOKIE,3);
  PetscValidHeaderSpecific(x,VEC_CLASSID,3);
  PetscValidPointer(y,4);
  PetscValidPointer(y,4);
  PetscValidHeaderSpecific(*y,VEC_COOKIE,4);
  PetscValidHeaderSpecific(*y,VEC_CLASSID,4);
  PetscValidScalarPointer(p,5);
  PetscValidScalarPointer(p,5);
 
 
  ierr = PetscLogEventBegin(IP_InnerProduct,ip,x,0,0);CHKERRQ(ierr);
  ierr = PetscLogEventBegin(IP_InnerProduct,ip,x,0,0);CHKERRQ(ierr);
  ip->innerproducts += n;
  ip->innerproducts += n;
  if (ip->matrix) {
  if (ip->matrix) {
Line 406... Line 406...
PetscErrorCode IPMInnerProductBegin(IP ip,Vec x,PetscInt n,const Vec y[],PetscScalar *p)
PetscErrorCode IPMInnerProductBegin(IP ip,Vec x,PetscInt n,const Vec y[],PetscScalar *p)
{
{
  PetscErrorCode ierr;
  PetscErrorCode ierr;
 
 
  PetscFunctionBegin;
  PetscFunctionBegin;
  PetscValidHeaderSpecific(ip,IP_COOKIE,1);
  PetscValidHeaderSpecific(ip,IP_CLASSID,1);
  PetscValidHeaderSpecific(x,VEC_COOKIE,3);
  PetscValidHeaderSpecific(x,VEC_CLASSID,3);
  if (n == 0) PetscFunctionReturn(0);
  if (n == 0) PetscFunctionReturn(0);
  PetscValidPointer(y,4);
  PetscValidPointer(y,4);
  PetscValidHeaderSpecific(*y,VEC_COOKIE,4);
  PetscValidHeaderSpecific(*y,VEC_CLASSID,4);
  PetscValidScalarPointer(p,5);
  PetscValidScalarPointer(p,5);
 
 
  ierr = PetscLogEventBegin(IP_InnerProduct,ip,x,0,0);CHKERRQ(ierr);
  ierr = PetscLogEventBegin(IP_InnerProduct,ip,x,0,0);CHKERRQ(ierr);
  ip->innerproducts += n;
  ip->innerproducts += n;
  if (ip->matrix) {
  if (ip->matrix) {
Line 461... Line 461...
PetscErrorCode IPMInnerProductEnd(IP ip,Vec x,PetscInt n,const Vec y[],PetscScalar *p)
PetscErrorCode IPMInnerProductEnd(IP ip,Vec x,PetscInt n,const Vec y[],PetscScalar *p)
{
{
  PetscErrorCode ierr;
  PetscErrorCode ierr;
 
 
  PetscFunctionBegin;
  PetscFunctionBegin;
  PetscValidHeaderSpecific(ip,IP_COOKIE,1);
  PetscValidHeaderSpecific(ip,IP_CLASSID,1);
  PetscValidHeaderSpecific(x,VEC_COOKIE,3);
  PetscValidHeaderSpecific(x,VEC_CLASSID,3);
  if (n == 0) PetscFunctionReturn(0);
  if (n == 0) PetscFunctionReturn(0);
  PetscValidPointer(y,4);
  PetscValidPointer(y,4);
  PetscValidHeaderSpecific(*y,VEC_COOKIE,4);
  PetscValidHeaderSpecific(*y,VEC_CLASSID,4);
  PetscValidScalarPointer(p,5);
  PetscValidScalarPointer(p,5);
 
 
  ierr = PetscLogEventBegin(IP_InnerProduct,ip,x,0,0);CHKERRQ(ierr);
  ierr = PetscLogEventBegin(IP_InnerProduct,ip,x,0,0);CHKERRQ(ierr);
  if (ip->matrix) {
  if (ip->matrix) {
    if (ip->bilinear_form == IP_INNER_HERMITIAN) {
    if (ip->bilinear_form == IP_INNER_HERMITIAN) {