コード例 #1
0
void
hypre_F90_IFACE(hypre_sstructflexgmressetprecond, HYPRE_SSTRUCTFLEXGMRESSETPRECOND)
   (hypre_F90_Obj *solver,
    hypre_F90_Int *precond_id,
    hypre_F90_Obj *precond_solver,
    hypre_F90_Int *ierr)
/*------------------------------------------
 *    precond_id flags mean:
 *    2 - setup a split-solver preconditioner
 *    3 - setup a syspfmg preconditioner
 *    8 - setup a DiagScale preconditioner
 *    9 - no preconditioner setup
 *----------------------------------------*/

{
   if(*precond_id == 2)
   {
      *ierr = (hypre_F90_Int)
         (HYPRE_SStructFlexGMRESSetPrecond(
             hypre_F90_PassObj (HYPRE_SStructSolver, solver),
             HYPRE_SStructSplitSolve,
             HYPRE_SStructSplitSetup,
             hypre_F90_PassObjRef (HYPRE_SStructSolver, precond_solver)));
   }

   else if(*precond_id == 3)
   {
      *ierr = (hypre_F90_Int)
         (HYPRE_SStructFlexGMRESSetPrecond(
             hypre_F90_PassObj (HYPRE_SStructSolver, solver),
             HYPRE_SStructSysPFMGSolve,
             HYPRE_SStructSysPFMGSetup,
             hypre_F90_PassObjRef (HYPRE_SStructSolver, precond_solver)));
   }

   else if(*precond_id == 8)
   {
      *ierr = (hypre_F90_Int)
         (HYPRE_SStructFlexGMRESSetPrecond(
             hypre_F90_PassObj (HYPRE_SStructSolver, solver),
             HYPRE_SStructDiagScale,
             HYPRE_SStructDiagScaleSetup,
             hypre_F90_PassObjRef (HYPRE_SStructSolver, precond_solver)));
   }
   else if(*precond_id == 9)
   {
      *ierr = 0;
   }

   else
   {
      *ierr = -1;
   }

}
コード例 #2
0
ファイル: F90_HYPRE_ams.c プロジェクト: ducpdx/hypre
void
hypre_F90_IFACE(hypre_amscreate, HYPRE_AMSCREATE)
   ( hypre_F90_Obj *solver,
     hypre_F90_Int *ierr)
{
   *ierr = (hypre_F90_Int)
      ( HYPRE_AMSCreate(
           hypre_F90_PassObjRef (HYPRE_Solver, solver) ) );
}
コード例 #3
0
void
hypre_F90_IFACE(hypre_structsetupmatvec, HYPRE_STRUCTSETUPMATVEC)
   (hypre_F90_Obj *mv,
    hypre_F90_Int *ierr)
{
   *ierr = (hypre_F90_Int)
      ( HYPRE_StructSetupMatvec(
           hypre_F90_PassObjRef (HYPRE_MatvecFunctions, mv)));
}
コード例 #4
0
void
hypre_F90_IFACE(hypre_parcsrhybridcreate, HYPRE_PARCSRHYBRIDCREATE)
   (hypre_F90_Obj *solver,
    hypre_F90_Int *ierr)
{
   *ierr = (hypre_F90_Int)
      (HYPRE_ParCSRHybridCreate(
          hypre_F90_PassObjRef (HYPRE_Solver, solver) ));
}
コード例 #5
0
void
hypre_F90_IFACE(hypre_schwarzcreate, HYPRE_SCHWARZCREATE)
   (hypre_F90_Obj *solver,
    hypre_F90_Int *ierr)
{
   *ierr = (hypre_F90_Int)
      ( HYPRE_SchwarzCreate(
           hypre_F90_PassObjRef (HYPRE_Solver, solver)));
}
コード例 #6
0
ファイル: F90_HYPRE_parcsr_int.c プロジェクト: LLNL/COGENT
void
hypre_F90_IFACE(hypre_parcsrsetupmatvec, HYPRE_PARCSRSETUPMATVEC)
   (hypre_F90_Obj *mv,
    hypre_F90_Int *ierr)
{
   *ierr = (hypre_F90_Int)
      ( HYPRE_ParCSRSetupMatvec(
           hypre_F90_PassObjRef (HYPRE_MatvecFunctions, mv)));
}
コード例 #7
0
void 
hypre_F90_IFACE(hypre_euclidcreate, HYPRE_EUCLIDCREATE)
   (hypre_F90_Comm *comm,
    hypre_F90_Obj *solver,
    hypre_F90_Int *ierr)
{
   *ierr = (hypre_F90_Int) HYPRE_EuclidCreate(
      hypre_F90_PassComm (comm),
      hypre_F90_PassObjRef (HYPRE_Solver, solver) );
}
コード例 #8
0
void
hypre_F90_IFACE(hypre_sstructgmrescreate, HYPRE_SSTRUCTGMRESCREATE)
   (hypre_F90_Comm *comm,
    hypre_F90_Obj  *solver,
    hypre_F90_Int *ierr)
{
   *ierr = (hypre_F90_Int) HYPRE_SStructGMRESCreate(
      hypre_F90_PassComm(comm),
      hypre_F90_PassObjRef(HYPRE_SStructSolver,solver));
}
コード例 #9
0
ファイル: F90_HYPRE_parcsr_gmres.c プロジェクト: ducpdx/hypre
void
hypre_F90_IFACE(hypre_parcsrgmrescreate, HYPRE_PARCSRGMRESCREATE)
   ( hypre_F90_Comm *comm,
     hypre_F90_Obj *solver,
     hypre_F90_Int *ierr    )
{
   *ierr = (hypre_F90_Int)
      ( HYPRE_ParCSRGMRESCreate(
           hypre_F90_PassComm (comm),
           hypre_F90_PassObjRef (HYPRE_Solver, solver) ) );
}
コード例 #10
0
void
hypre_F90_IFACE(hypre_parcsrpilutcreate, HYPRE_PARCSRPILUTCREATE)
   ( hypre_F90_Comm *comm,
     hypre_F90_Obj *solver,
     hypre_F90_Int *ierr    )
{
   *ierr = (hypre_F90_Int)
      ( HYPRE_ParCSRPilutCreate(
           hypre_F90_PassComm (comm),
           hypre_F90_PassObjRef (HYPRE_Solver, solver) ) );
}
コード例 #11
0
void
hypre_F90_IFACE(hypre_sstructsplitcreate, HYPRE_SSTRUCTSPLITCREATE)
   (hypre_F90_Comm *comm,
    hypre_F90_Obj *solver_ptr,
    hypre_F90_Int *ierr)
{
   *ierr = (hypre_F90_Int)
      (HYPRE_SStructSplitCreate(
          hypre_F90_PassComm (comm),
          hypre_F90_PassObjRef (HYPRE_SStructSolver, solver_ptr) ) );
}
コード例 #12
0
void
hypre_F90_IFACE(hypre_parcsrbicgstabcreate, HYPRE_PARCSRBICGSTABCREATE)
   ( hypre_F90_Comm *comm,
     hypre_F90_Obj *solver,
     hypre_F90_Int *ierr    )
{
   *ierr = (hypre_F90_Int)
      ( HYPRE_ParCSRBiCGSTABCreate(
           hypre_F90_PassComm (comm),
           hypre_F90_PassObjRef (HYPRE_Solver, solver) ) );
}
コード例 #13
0
void
hypre_F90_IFACE(hypre_structsmgcreate, HYPRE_STRUCTSMGCREATE)
   ( hypre_F90_Comm *comm,
     hypre_F90_Obj *solver,
     hypre_F90_Int *ierr   )
{
   *ierr = (hypre_F90_Int)
      ( HYPRE_StructSMGCreate(
           hypre_F90_PassComm (comm),
           hypre_F90_PassObjRef (HYPRE_StructSolver, solver) ) );
}
コード例 #14
0
void
hypre_F90_IFACE(hypre_sstructmaxwellcreate, HYPRE_SSTRUCTMAXWELLCREATE)
   (hypre_F90_Comm *comm,
    hypre_F90_Obj *solver,
    hypre_F90_Int *ierr)
{
   *ierr = (hypre_F90_Int)
      (HYPRE_SStructMaxwellCreate(
          hypre_F90_PassComm (comm),
          hypre_F90_PassObjRef (HYPRE_SStructSolver, solver)) );
}
コード例 #15
0
void
hypre_F90_IFACE(hypre_structbicgstabcreate, HYPRE_STRUCTBICGSTABCREATE)
   ( hypre_F90_Comm *comm,
     hypre_F90_Obj *solver,
     hypre_F90_Int *ierr   )
{
   *ierr = (hypre_F90_Int)
      ( HYPRE_StructBiCGSTABCreate(
           hypre_F90_PassComm (comm),
           hypre_F90_PassObjRef (HYPRE_StructSolver, solver) ) );
}
コード例 #16
0
void
hypre_F90_IFACE(hypre_maxwellgrad, HYPRE_MAXWELLGRAD)
   (hypre_F90_Obj *grid,
    hypre_F90_Obj *T,
    hypre_F90_Int *ierr)
{
   *ierr = (hypre_F90_Int)
      ( HYPRE_MaxwellGrad(
           hypre_F90_PassObj (HYPRE_SStructGrid, grid),
           hypre_F90_PassObjRef (HYPRE_ParCSRMatrix, T) ) );
}
コード例 #17
0
void
hypre_F90_IFACE(hypre_structhybridcreate, HYPRE_STRUCTHYBRIDCREATE)
   ( hypre_F90_Comm *comm,
     hypre_F90_Obj *solver,
     hypre_F90_Int *ierr   )
{
   *ierr = (hypre_F90_Int)
      ( HYPRE_StructHybridCreate(
           hypre_F90_PassComm (comm),
           hypre_F90_PassObjRef (HYPRE_StructSolver, solver) ) );
}
コード例 #18
0
void
hypre_F90_IFACE(hypre_structjacobicreate, HYPRE_STRUCTJACOBICREATE)
   ( hypre_F90_Comm *comm,
     hypre_F90_Obj *solver,
     hypre_F90_Int *ierr   )
{
   *ierr = (hypre_F90_Int)
      ( HYPRE_StructJacobiCreate(
           hypre_F90_PassComm (comm),
           hypre_F90_PassObjRef (HYPRE_StructSolver, solver) ) );
}
コード例 #19
0
void
hypre_F90_IFACE(hypre_parcsrbicgstabgetprecond, HYPRE_PARCSRBICGSTABGETPRECOND)
   ( hypre_F90_Obj *solver,
     hypre_F90_Obj *precond_solver_ptr,
     hypre_F90_Int *ierr                )
{
   *ierr = (hypre_F90_Int)
      ( HYPRE_ParCSRBiCGSTABGetPrecond(
           hypre_F90_PassObj (HYPRE_Solver, solver),
           hypre_F90_PassObjRef (HYPRE_Solver, precond_solver_ptr) ) );

}
コード例 #20
0
void
hypre_F90_IFACE(hypre_structstencilcreate, HYPRE_STRUCTSTENCILCREATE)
   ( hypre_F90_Int *dim,
     hypre_F90_Int *size,
     hypre_F90_Obj *stencil,
     hypre_F90_Int *ierr    )
{
   *ierr = (hypre_F90_Int) HYPRE_StructStencilCreate(
      hypre_F90_PassInt (dim),
      hypre_F90_PassInt (size),
      hypre_F90_PassObjRef (HYPRE_StructStencil, stencil) );
}
コード例 #21
0
ファイル: F90_HYPRE_parcsr_gmres.c プロジェクト: ducpdx/hypre
void
hypre_F90_IFACE(hypre_parcsrgmresgetprecond, HYPRE_PARCSRGMRESGETPRECOND)
   ( hypre_F90_Obj *solver,
     hypre_F90_Obj *precond_solver_ptr,
     hypre_F90_Int *ierr                )
{
   *ierr = (hypre_F90_Int)
      ( HYPRE_ParCSRGMRESGetPrecond(
           hypre_F90_PassObj (HYPRE_Solver, solver),
           hypre_F90_PassObjRef (HYPRE_Solver, precond_solver_ptr) ) );

}
コード例 #22
0
void
hypre_F90_IFACE(hypre_structvectorgetmigratecom, HYPRE_STRUCTVECTORGETMIGRATECOM)
   ( hypre_F90_Obj *from_vector,
     hypre_F90_Obj *to_vector,
     hypre_F90_Obj *comm_pkg,
     hypre_F90_Int *ierr        )
{
   *ierr = (hypre_F90_Int)
      ( HYPRE_StructVectorGetMigrateCommPkg(
           hypre_F90_PassObj (HYPRE_StructVector, from_vector),
           hypre_F90_PassObj (HYPRE_StructVector, to_vector),
           hypre_F90_PassObjRef (HYPRE_CommPkg, comm_pkg)    ) );
}
コード例 #23
0
void
hypre_F90_IFACE(hypre_structgridcreate, HYPRE_STRUCTGRIDCREATE)
   ( hypre_F90_Comm *comm,
     hypre_F90_Int *dim,
     hypre_F90_Obj *grid,
     hypre_F90_Int *ierr )
{
   *ierr = (hypre_F90_Int)
      ( HYPRE_StructGridCreate(
           hypre_F90_PassComm (comm),
           hypre_F90_PassInt (dim),
           hypre_F90_PassObjRef (HYPRE_StructGrid, grid) ) );
}
コード例 #24
0
void
hypre_F90_IFACE(hypre_sstructmatrixcreate, HYPRE_SSTRUCTMATRIXCREATE)
   (hypre_F90_Comm *comm,
    hypre_F90_Obj *graph,
    hypre_F90_Obj *matrix_ptr,
    hypre_F90_Int *ierr)
{
   *ierr = (hypre_F90_Int)
      (HYPRE_SStructMatrixCreate(
          hypre_F90_PassComm (comm),
          hypre_F90_PassObj (HYPRE_SStructGraph, graph),
          hypre_F90_PassObjRef (HYPRE_SStructMatrix, matrix_ptr) ) );
}
コード例 #25
0
void
hypre_F90_IFACE(hypre_sstructvectorcreate, HYPRE_SSTRUCTVECTORCREATE)
   (hypre_F90_Comm *comm,
    hypre_F90_Obj *grid,
    hypre_F90_Obj *vector_ptr,
    hypre_F90_Int *ierr)
{
   *ierr = (hypre_F90_Int)
      (HYPRE_SStructVectorCreate(
          hypre_F90_PassComm (comm),
          hypre_F90_PassObj (HYPRE_SStructGrid, grid),
          hypre_F90_PassObjRef (HYPRE_SStructVector, vector_ptr) ) );
}
コード例 #26
0
void
hypre_F90_IFACE(hypre_sstructgridcreate, HYPRE_SSTRUCTGRIDCREATE)
   (hypre_F90_Comm   *comm,
    hypre_F90_Int    *ndim,
    hypre_F90_Int    *nparts,
    hypre_F90_ObjRef *grid_ptr,
    hypre_F90_Int    *ierr)
{
   *ierr = (hypre_F90_Int) HYPRE_SStructGridCreate(
      hypre_F90_PassComm   (comm),
      hypre_F90_PassInt    (ndim),
      hypre_F90_PassInt    (nparts),
      hypre_F90_PassObjRef (HYPRE_SStructGrid, grid_ptr) );
}
コード例 #27
0
void 
hypre_F90_IFACE(hypre_parvectorread, HYPRE_PARVECTORREAD)
   ( hypre_F90_Comm *comm,
     hypre_F90_Obj *vector,
     char     *file_name,
     hypre_F90_Int *ierr       )
{
   *ierr = (hypre_F90_Int)
      ( HYPRE_ParVectorRead(
           hypre_F90_PassComm (comm),
           (char *)    file_name,
           hypre_F90_PassObjRef (HYPRE_ParVector, vector) ) );

}
コード例 #28
0
void
hypre_F90_IFACE(hypre_parvectorcreate, HYPRE_PARVECTORCREATE)
   ( hypre_F90_Comm *comm,
     hypre_F90_Int *global_size,
     hypre_F90_IntArray *partitioning,
     hypre_F90_Obj *vector,
     hypre_F90_Int *ierr )
{
   *ierr = (hypre_F90_Int) HYPRE_ParVectorCreate(
      hypre_F90_PassComm (comm),
      hypre_F90_PassInt (global_size),
      hypre_F90_PassIntArray (partitioning),
      hypre_F90_PassObjRef (HYPRE_ParVector, vector) );

}
コード例 #29
0
void
hypre_F90_IFACE(hypre_sstructmaxwellphysbdy, HYPRE_SSTRUCTMAXWELLPHYSBDY) 
   (hypre_F90_Obj *grid_l, 
    hypre_F90_Int *num_levels,
    HYPRE_Int      (*rfactors)[3],
    HYPRE_Int      (***BdryRanks_ptr),
    HYPRE_Int      (**BdryRanksCnt_ptr),
    hypre_F90_Int *ierr)
{
   *ierr = (hypre_F90_Int)
      ( HYPRE_SStructMaxwellPhysBdy( 
           hypre_F90_PassObjRef (HYPRE_SStructGrid, grid_l),
           hypre_F90_PassInt (num_levels),
           rfactors[3],
           BdryRanks_ptr,
           BdryRanksCnt_ptr ));
}
コード例 #30
0
ファイル: F90_HYPRE_ams.c プロジェクト: ducpdx/hypre
void
hypre_F90_IFACE(hypre_amsconstructdiscretegradient, HYPRE_AMSCONSTRUCTDISCRETEGRADIENT)
   ( hypre_F90_Obj *A,
     hypre_F90_Obj *x_coord,
     hypre_F90_IntArray *edge_vertex,
     hypre_F90_Int *edge_orientation,
     hypre_F90_Obj *G,
     hypre_F90_Int *ierr)
{
   *ierr = (hypre_F90_Int)
      ( HYPRE_AMSConstructDiscreteGradient(
           hypre_F90_PassObj (HYPRE_ParCSRMatrix, A),
           hypre_F90_PassObj (HYPRE_ParVector, x_coord),
           hypre_F90_PassIntArray (edge_vertex),
           hypre_F90_PassInt (edge_orientation),
           hypre_F90_PassObjRef (HYPRE_ParCSRMatrix, G) ) );
}