Fast Auxiliary Space Preconditioning 2.7.7 Aug/28/2022
PreDataInit.c File Reference

Initialize important data structures. More...

#include "fasp.h"
#include "fasp_functs.h"

Go to the source code of this file.

Functions

void fasp_precond_data_init (precond_data *pcdata)
 Initialize precond_data. More...
 
AMG_datafasp_amg_data_create (SHORT max_levels)
 Create and initialize AMG_data for classical and SA AMG. More...
 
void fasp_amg_data_free (AMG_data *mgl, AMG_param *param)
 Free AMG_data data memeory space. More...
 
AMG_data_bsrfasp_amg_data_bsr_create (SHORT max_levels)
 Create and initialize AMG_data data sturcture for AMG/SAMG (BSR format) More...
 
void fasp_amg_data_bsr_free (AMG_data_bsr *mgl)
 Free AMG_data_bsr data memeory space. More...
 
void fasp_ilu_data_create (const INT iwk, const INT nwork, ILU_data *iludata)
 Allocate workspace for ILU factorization. More...
 
void fasp_ilu_data_free (ILU_data *iludata)
 Create ILU_data sturcture. More...
 
void fasp_swz_data_free (SWZ_data *swzdata)
 Free SWZ_data data memeory space. More...
 

Detailed Description

Initialize important data structures.

Note
This file contains Level-4 (Pre) functions. It requires: AuxMemory.c, AuxVector.c, BlaSparseBSR.c, and BlaSparseCSR.c

Copyright (C) 2009–Present by the FASP team. All rights reserved.

Released under the terms of the GNU Lesser General Public License 3.0 or later.

Warning
Every structures should be initialized before usage.

Definition in file PreDataInit.c.

Function Documentation

◆ fasp_amg_data_bsr_create()

AMG_data_bsr * fasp_amg_data_bsr_create ( SHORT  max_levels)

Create and initialize AMG_data data sturcture for AMG/SAMG (BSR format)

Parameters
max_levelsMax number of levels allowed
Returns
Pointer to the AMG_data data structure
Author
Xiaozhe Hu
Date
08/07/2011

Definition at line 181 of file PreDataInit.c.

◆ fasp_amg_data_bsr_free()

void fasp_amg_data_bsr_free ( AMG_data_bsr mgl)

Free AMG_data_bsr data memeory space.

Parameters
mglPointer to the AMG_data_bsr
Author
Xiaozhe Hu, Chensong Zhang
Date
2013/02/13

Modified by Chensong Zhang on 08/14/2017: Check for max_levels == 1

Definition at line 213 of file PreDataInit.c.

◆ fasp_amg_data_create()

AMG_data * fasp_amg_data_create ( SHORT  max_levels)

Create and initialize AMG_data for classical and SA AMG.

Parameters
max_levelsMax number of levels allowed
Returns
Pointer to the AMG_data data structure
Author
Chensong Zhang
Date
2010/04/06

Definition at line 64 of file PreDataInit.c.

◆ fasp_amg_data_free()

void fasp_amg_data_free ( AMG_data mgl,
AMG_param param 
)

Free AMG_data data memeory space.

Parameters
mglPointer to the AMG_data
paramPointer to AMG parameters
Author
Chensong Zhang
Date
2010/04/06

Modified by Chensong Zhang on 05/05/2013: Clean up param as well! Modified by Hongxuan Zhang on 12/15/2015: Free memory for Intel MKL PARDISO Modified by Chunsheng Feng on 02/12/2017: Permute A back to its origin for ILUtp Modified by Chunsheng Feng on 08/11/2017: Check for max_levels == 1

Definition at line 101 of file PreDataInit.c.

◆ fasp_ilu_data_create()

void fasp_ilu_data_create ( const INT  iwk,
const INT  nwork,
ILU_data iludata 
)

Allocate workspace for ILU factorization.

Parameters
iwkSize of the index array
nworkSize of the work array
iludataPointer to the ILU_data
Author
Chensong Zhang
Date
2010/04/06

Modified by Chunsheng Feng on 02/12/2017: add iperm array for ILUtp

Definition at line 265 of file PreDataInit.c.

◆ fasp_ilu_data_free()

void fasp_ilu_data_free ( ILU_data iludata)

Create ILU_data sturcture.

Parameters
iludataPointer to ILU_data
Author
Chensong Zhang
Date
2010/04/03

Modified by Chunsheng Feng on 02/12/2017: add iperm array for ILUtp

Definition at line 300 of file PreDataInit.c.

◆ fasp_precond_data_init()

void fasp_precond_data_init ( precond_data pcdata)

Initialize precond_data.

Parameters
pcdataPreconditioning data structure
Author
Chensong Zhang
Date
2010/03/23

Definition at line 33 of file PreDataInit.c.

◆ fasp_swz_data_free()

void fasp_swz_data_free ( SWZ_data swzdata)

Free SWZ_data data memeory space.

Parameters
swzdataPointer to the SWZ_data for Schwarz methods
Author
Xiaozhe Hu
Date
2010/04/06

Definition at line 341 of file PreDataInit.c.