Subversion Repositories slepc-dev

Rev

Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2337 Rev 2341
Line 18... Line 18...
   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
*/
*/
 
 
#include "private/vecimpl.h"          /*I  "petscvec.h"   I*/
#include "private/vecimpl.h"          /*I  "petscvec.h"   I*/
#include "veccomp_private.h"
#include <private/vecimplslepc.h>     /*I "slepcvec.h" I*/
#include <slepcvec.h>
 
 
 
typedef struct {
 
  PetscInt      n,        /* number of active subvectors */
 
                N,        /* virtual global size */
 
                lN,       /* virtual local size */
 
                friends;  /* number of vectors sharing this structure */
 
} Vec_Comp_N;
 
 
 
typedef struct {
 
  Vec           *x;       /* the vectors */
 
  PetscInt      nx;       /* number of available subvectors */
 
  Vec_Comp_N    *n;       /* structure shared by friend vectors */
 
} Vec_Comp;
 
 
 
#if defined(PETSC_USE_DEBUG)
 
#define PetscValidVecComp(y) \
 
  if (((Vec_Comp*)(y)->data)->nx < ((Vec_Comp*)(y)->data)->n->n) { \
 
    return PetscError(((PetscObject)(*((Vec_Comp*)(y)->data)->x))->comm,__LINE__,PETSC_FUNCTION_NAME,__FILE__,__SDIR__,PETSC_ERR_ARG_WRONG,PETSC_ERROR_INITIAL,"Invalid number of subvectors required!");}
 
#else
 
#define PetscValidVecComp(y)
 
#endif
 
 
 
static PetscErrorCode VecCreate_Comp_Private(Vec v,Vec *x,PetscInt nx,PetscBool x_to_me,Vec_Comp_N* n);
 
 
 
#include "veccomp0.h"
#include "veccomp0.h"
 
 
#define __WITH_MPI__
#define __WITH_MPI__
#include "veccomp0.h"
#include "veccomp0.h"
Line 74... Line 50...
  }
  }
  ierr = PetscFree(vs->x);CHKERRQ(ierr);
  ierr = PetscFree(vs->x);CHKERRQ(ierr);
  ierr = PetscFree(vs);CHKERRQ(ierr);
  ierr = PetscFree(vs);CHKERRQ(ierr);
  PetscFunctionReturn(0);
  PetscFunctionReturn(0);
}
}
 
 
 
 
static struct _VecOps DvOps = {VecDuplicate_Comp, /* 1 */
static struct _VecOps DvOps = {VecDuplicate_Comp, /* 1 */
            VecDuplicateVecs_Default,
            VecDuplicateVecs_Default,
            VecDestroyVecs_Default,
            VecDestroyVecs_Default,
            VecDot_Comp_MPI,
            VecDot_Comp_MPI,