The Open FUSION Toolkit 1.0.0-8905cc5
Modeling tools for plasma and fusion research and engineering
Loading...
Searching...
No Matches
Data Types | Functions/Subroutines | Variables
oft_hcurl_grad_operators Module Reference

Detailed Description

FE operators for full H(Curl) + Grad(H^1) space.

Authors
Chris Hansen
Date
August 2011

Data Types

type  oft_hcurl_grad_cinterp
 Interpolate \( \nabla \times \) of a H(Curl) + Grad(H^1) vector field. More...
 
type  oft_hcurl_grad_czerob
 Needs docs. More...
 
type  oft_hcurl_grad_dinterp
 Interpolate \( \nabla \times \) of a H(Curl) + Grad(H^1) vector field. More...
 
type  oft_hcurl_grad_divout
 Clean the divergence from a H(Curl) + Grad(H^1) vector field. More...
 
type  oft_hcurl_grad_gzero
 Orthogonalize a H(Curl) + Grad(H^1) vector field by zeroing the gradient subspace. More...
 
type  oft_hcurl_grad_gzerop
 Needs docs. More...
 
type  oft_hcurl_grad_rinterp
 Interpolate a H(Curl) + Grad(H^1) vector field. More...
 
type  oft_hcurl_grad_zerob
 Needs docs. More...
 
type  oft_hcurl_grad_zeroi
 Needs docs. More...
 
type  oft_ml_hcurl_grad_vecspace
 Needs docs. More...
 

Functions/Subroutines

subroutine base_pop (self, acors, afine)
 Transfer a base level Lagrange scalar field to the next MPI level.
 
subroutine base_push (self, afine, acors)
 Transfer a MPI level Lagrange scalar field to the base level.
 
subroutine cinterp_apply (self, cell, f, gop, val)
 Reconstruct \( \nabla \times \) of a H(Curl) + Grad(H^1) vector field.
 
subroutine curl_zerob_apply (self, a)
 Zero the curl components of a H(Curl) + Grad(H^1) vector field at all boundary nodes.
 
subroutine dinterp_apply (self, cell, f, gop, val)
 Reconstruct \( \nabla \cdot \) of a H(Curl) + Grad(H^1) vector field.
 
subroutine divout_apply (self, a)
 Remove divergence from a H(Curl) + Grad(H^1) vector field by adding a gradient correction.
 
subroutine divout_delete (self)
 Clean-up internal storage for a oft_hcurl_grad_divout object.
 
subroutine divout_setup (self, ml_hcurl_grad_rep, bc, solver)
 Setup matrix and solver with default.
 
subroutine grad_zerop_apply (self, a)
 Zero the gradient components of a H(Curl) + Grad(H^1) vector field at all boundary nodes.
 
subroutine hcurl_grad_bmc (mesh, a, hcpc, hcpv, new_tol)
 Compute the 0-th order gradient due to a jump plane.
 
subroutine hcurl_grad_curltp (hcurl_grad_fe, a, b)
 Apply the curl transpose operator to a H(Curl) + Grad(H^1) field.
 
subroutine hcurl_grad_div (hcurl_grad_fe, a, b)
 Apply the divergence operator to a H(Curl) + Grad(H^1) field.
 
subroutine hcurl_grad_getmop (hcurl_grad_rep, mat, bc)
 Construct mass matrix for a H(Curl) + Grad(H^1) representation.
 
subroutine hcurl_grad_getmop_pre (ml_hcurl_aug_obj, pre, mats, level, nlevels)
 Compute eigenvalues and smoothing coefficients for the operator H(Curl) + Grad(H^1) mass matrix.
 
subroutine hcurl_grad_grad (hcurl_grad_fe, a, b, keep_boundary)
 Add the gradient of a H^1 scalar field to a H(Curl) + Grad(H^1) vector field.
 
subroutine hcurl_grad_gradtp (h1_fe, a, b)
 Apply the transposed gradient operator to a H(Curl) + Grad(H^1) vector field.
 
real(r8) function hcurl_grad_jump_error (hcurl_grad_fe, u, quad_order)
 Evaluate the jump error in a field over internal faces.
 
subroutine hcurl_grad_mc (mesh, a, hcpc, hcpv, new_tol)
 Compute the 0-th order gradient due to a jump plane.
 
subroutine hcurl_grad_mloptions
 Read-in options for the basic H(Curl) + Grad(H^1) space ML preconditioners.
 
subroutine hcurl_grad_mop_eigs (ml_hcurl_aug_obj, minlev)
 Compute eigenvalues and smoothing coefficients for the mass matrix.
 
subroutine hcurl_grad_setup_interp (ml_hcurl_aug_rep, ml_h1_rep, create_full)
 Construct interpolation matrices on each MG level.
 
subroutine ml_vecspace_inject (self, afine, acors)
 Interpolate a coarse level Lagrange scalar field to the next finest level.
 
subroutine ml_vecspace_interp (self, acors, afine)
 Interpolate a coarse level Lagrange scalar field to the next finest level.
 
subroutine oft_hcurl_grad_bproject (hcurl_grad_rep, field, x)
 Boundary projection of a vector field onto a H(Curl) + Grad(H^1) basis.
 
subroutine oft_hcurl_grad_project (hcurl_grad_rep, field, x)
 Project a vector field onto a H(Curl) + Grad(H^1) basis.
 
subroutine rinterp_apply (self, cell, f, gop, val)
 Reconstruct a H(Curl) + Grad(H^1) vector field.
 
subroutine rinterp_delete (self)
 Destroy temporary internal storage.
 
subroutine rinterp_setup1 (self, hcurl_grad_rep)
 Setup interpolator for H(Curl) + Grad(H^1) vector fields.
 
subroutine rinterp_setup2 (self, hcurl_rep, hgrad_rep)
 Setup interpolator for H(Curl) + Grad(H^1) vector fields.
 
subroutine zerob_apply (self, a)
 Zero a H(Curl) + Grad(H^1) vector field at all boundary nodes.
 
subroutine zerob_delete (self)
 Zero a H(Curl) + Grad(H^1) vector field at all boundary nodes.
 
subroutine zerograd_apply (self, a)
 Needs docs.
 
subroutine zerograd_delete (self)
 Needs docs.
 
subroutine zeroi_apply (self, a)
 Zero a H(Curl) + Grad(H^1) vector field at all interior nodes.
 

Variables

real(r8), dimension(fem_max_levels), private df_mop =-1.d99
 Needs Docs.
 
integer(i4), dimension(fem_max_levels), private nu_mop =0
 Needs Docs.
 

Function/Subroutine Documentation

◆ base_pop()

subroutine base_pop ( class(oft_ml_fe_comp_vecspace), intent(inout)  self,
class(oft_vector), intent(inout)  acors,
class(oft_vector), intent(inout)  afine 
)

Transfer a base level Lagrange scalar field to the next MPI level.

Parameters
[in,out]acorsVector to transfer
[in,out]afineFine vector from transfer

◆ base_push()

subroutine base_push ( class(oft_ml_fe_comp_vecspace), intent(inout)  self,
class(oft_vector), intent(inout)  afine,
class(oft_vector), intent(inout)  acors 
)

Transfer a MPI level Lagrange scalar field to the base level.

Parameters
[in,out]afineVector to transfer
[in,out]acorsFine vector from transfer

◆ cinterp_apply()

subroutine cinterp_apply ( class(oft_hcurl_grad_cinterp), intent(inout)  self,
integer(i4), intent(in)  cell,
real(r8), dimension(:), intent(in)  f,
real(r8), dimension(3,4), intent(in)  gop,
real(r8), dimension(:), intent(out)  val 
)

Reconstruct \( \nabla \times \) of a H(Curl) + Grad(H^1) vector field.

Parameters
[in]cellCell for interpolation
[in]fPosition in cell in logical coord [4]
[in]gopLogical gradient vectors at f [3,4]
[out]valReconstructed field at f [3]

◆ curl_zerob_apply()

subroutine curl_zerob_apply ( class(oft_hcurl_grad_czerob), intent(inout)  self,
class(oft_vector), intent(inout)  a 
)

Zero the curl components of a H(Curl) + Grad(H^1) vector field at all boundary nodes.

Parameters
[in,out]aField to be zeroed

◆ dinterp_apply()

subroutine dinterp_apply ( class(oft_hcurl_grad_dinterp), intent(inout)  self,
integer(i4), intent(in)  cell,
real(r8), dimension(:), intent(in)  f,
real(r8), dimension(3,4), intent(in)  gop,
real(r8), dimension(:), intent(out)  val 
)

Reconstruct \( \nabla \cdot \) of a H(Curl) + Grad(H^1) vector field.

Parameters
[in]cellCell for interpolation
[in]fPosition in cell in logical coord [4]
[in]gopLogical gradient vectors at f [3,4]
[out]valReconstructed field at f [1]

◆ divout_apply()

subroutine divout_apply ( class(oft_hcurl_grad_divout), intent(inout)  self,
class(oft_vector), intent(inout)  a 
)

Remove divergence from a H(Curl) + Grad(H^1) vector field by adding a gradient correction.

Parameters
[in,out]aField for divergence cleaning

◆ divout_delete()

subroutine divout_delete ( class(oft_hcurl_grad_divout), intent(inout)  self)

Clean-up internal storage for a oft_hcurl_grad_divout object.

◆ divout_setup()

subroutine divout_setup ( class(oft_hcurl_grad_divout), intent(inout)  self,
class(oft_ml_fem_comp_type), intent(inout), target  ml_hcurl_grad_rep,
character(len=*), intent(in)  bc,
class(oft_solver), intent(in), optional, target  solver 
)

Setup matrix and solver with default.

Parameters
[in]bcBoundary condition

◆ grad_zerop_apply()

subroutine grad_zerop_apply ( class(oft_hcurl_grad_gzerop), intent(inout)  self,
class(oft_vector), intent(inout)  a 
)

Zero the gradient components of a H(Curl) + Grad(H^1) vector field at all boundary nodes.

Parameters
[in,out]aField to be zeroed

◆ hcurl_grad_bmc()

subroutine hcurl_grad_bmc ( class(oft_mesh), intent(inout)  mesh,
class(oft_vector), intent(inout)  a,
real(r8), dimension(3), intent(in)  hcpc,
real(r8), dimension(3), intent(in)  hcpv,
real(r8), intent(in), optional  new_tol 
)

Compute the 0-th order gradient due to a jump plane.

The jump is represented as a circular surface defined by a center possition and surface normal. This method requires that the mesh contain a matching internal surface, such that no edge crosses the jump plane.

Note
The radius of the surface is represented by \( \left| hcpv \right| \)
Parameters
[in,out]aJump field
[in]hcpcJump plane center possition [3]
[in]hcpvJump plane normal vector [3]

◆ hcurl_grad_curltp()

subroutine hcurl_grad_curltp ( class(oft_fem_comp_type), intent(inout)  hcurl_grad_fe,
class(oft_vector), intent(inout)  a,
class(oft_vector), intent(inout)  b 
)

Apply the curl transpose operator to a H(Curl) + Grad(H^1) field.

Parameters
[in,out]aNeeds docs
[in,out]bNeeds docs

◆ hcurl_grad_div()

subroutine hcurl_grad_div ( class(oft_fem_comp_type), intent(inout)  hcurl_grad_fe,
class(oft_vector), intent(inout)  a,
class(oft_vector), intent(inout)  b 
)

Apply the divergence operator to a H(Curl) + Grad(H^1) field.

Parameters
[in,out]aNeeds docs
[in,out]bNeeds docs

◆ hcurl_grad_getmop()

subroutine hcurl_grad_getmop ( class(oft_fem_comp_type), intent(inout)  hcurl_grad_rep,
class(oft_matrix), intent(inout), pointer  mat,
character(len=*), intent(in)  bc 
)

Construct mass matrix for a H(Curl) + Grad(H^1) representation.

Supported boundary conditions

  • ‘'none’Full matrix -'zerob'` Dirichlet for all boundary DOF
    Parameters
    [in,out]matMatrix object
    [in]bcBoundary condition

◆ hcurl_grad_getmop_pre()

subroutine hcurl_grad_getmop_pre ( type(oft_ml_fem_comp_type), intent(inout), target  ml_hcurl_aug_obj,
class(oft_solver), intent(out), pointer  pre,
type(oft_matrix_ptr), dimension(:), intent(inout), pointer  mats,
integer(i4), intent(in), optional  level,
integer(i4), intent(in), optional  nlevels 
)

Compute eigenvalues and smoothing coefficients for the operator H(Curl) + Grad(H^1) mass matrix.

◆ hcurl_grad_grad()

subroutine hcurl_grad_grad ( class(oft_fem_comp_type), intent(inout)  hcurl_grad_fe,
class(oft_vector), intent(inout)  a,
class(oft_vector), intent(inout)  b,
logical, intent(in), optional  keep_boundary 
)

Add the gradient of a H^1 scalar field to a H(Curl) + Grad(H^1) vector field.

Note
By default the 0-th order gradient subspace is represented on the H(Curl) DOF, use the keep_boundary flag otherwise
Parameters
[in,out]aScalar field
[in,out]bVector field for gradient
[in]keep_boundaryFlag to keep 0-th order boundary component (optional)

◆ hcurl_grad_gradtp()

subroutine hcurl_grad_gradtp ( class(oft_afem_type), intent(inout)  h1_fe,
class(oft_vector), intent(inout)  a,
class(oft_vector), intent(inout)  b 
)

Apply the transposed gradient operator to a H(Curl) + Grad(H^1) vector field.

Parameters
[in,out]aInput field
[in,out]b\( G^{T} a \)

◆ hcurl_grad_jump_error()

real(r8) function hcurl_grad_jump_error ( class(oft_fem_comp_type), intent(inout)  hcurl_grad_fe,
class(oft_vector), intent(inout)  u,
integer(i4), intent(in)  quad_order 
)

Evaluate the jump error in a field over internal faces.

Note
Currently faces on domain boundaries are skipped, this is due to the fact that evaluting the error would require costly communication.
Returns
Jump error metric
Parameters
[in,out]uH(Curl) + Grad(H^1) vector field to evaluate
[in]quad_orderDesired quadrature order for integration

◆ hcurl_grad_mc()

subroutine hcurl_grad_mc ( class(oft_mesh), intent(inout)  mesh,
class(oft_vector), intent(inout)  a,
real(r8), dimension(3), intent(in)  hcpc,
real(r8), dimension(3), intent(in)  hcpv,
real(r8), intent(in), optional  new_tol 
)

Compute the 0-th order gradient due to a jump plane.

The jump is represented as a circular surface defined by a center possition and surface normal. This method requires that the mesh contain a matching internal surface, such that no edge crosses the jump plane.

Note
The radius of the surface is represented by \( \left| hcpv \right| \)
Parameters
[in,out]aJump field
[in]hcpcJump plane center possition [3]
[in]hcpvJump plane normal vector [3]

◆ hcurl_grad_mloptions()

subroutine hcurl_grad_mloptions

Read-in options for the basic H(Curl) + Grad(H^1) space ML preconditioners.

◆ hcurl_grad_mop_eigs()

subroutine hcurl_grad_mop_eigs ( type(oft_ml_fem_comp_type), intent(inout), target  ml_hcurl_aug_obj,
integer(i4), intent(in)  minlev 
)

Compute eigenvalues and smoothing coefficients for the mass matrix.

◆ hcurl_grad_setup_interp()

subroutine hcurl_grad_setup_interp ( class(oft_ml_fem_comp_type), intent(inout)  ml_hcurl_aug_rep,
class(oft_ml_fem_type), intent(inout)  ml_h1_rep,
logical, intent(in), optional  create_full 
)

Construct interpolation matrices on each MG level.

◆ ml_vecspace_inject()

subroutine ml_vecspace_inject ( class(oft_ml_hcurl_grad_vecspace), intent(inout)  self,
class(oft_vector), intent(inout)  afine,
class(oft_vector), intent(inout)  acors 
)

Interpolate a coarse level Lagrange scalar field to the next finest level.

Note
The global Lagrange level in incremented by one in this subroutine
Parameters
[in,out]afineFine vector from interpolation
[in,out]acorsVector to interpolate

◆ ml_vecspace_interp()

subroutine ml_vecspace_interp ( class(oft_ml_hcurl_grad_vecspace), intent(inout)  self,
class(oft_vector), intent(inout)  acors,
class(oft_vector), intent(inout)  afine 
)

Interpolate a coarse level Lagrange scalar field to the next finest level.

Note
The global Lagrange level in incremented by one in this subroutine
Parameters
[in,out]acorsVector to interpolate
[in,out]afineFine vector from interpolation

◆ oft_hcurl_grad_bproject()

subroutine oft_hcurl_grad_bproject ( class(oft_fem_comp_type), intent(inout)  hcurl_grad_rep,
class(fem_interp), intent(inout)  field,
class(oft_vector), intent(inout)  x 
)

Boundary projection of a vector field onto a H(Curl) + Grad(H^1) basis.

Note
This subroutine only performs the integration of the field with boundary test functions for a H(Curl) + Grad(H^1) basis
Parameters
[in,out]fieldVector field for projection
[in,out]xField projected onto H(Curl) + Grad(H^1) basis

◆ oft_hcurl_grad_project()

subroutine oft_hcurl_grad_project ( class(oft_fem_comp_type), intent(inout)  hcurl_grad_rep,
class(fem_interp), intent(inout)  field,
class(oft_vector), intent(inout)  x 
)

Project a vector field onto a H(Curl) + Grad(H^1) basis.

Note
This subroutine only performs the integration of the field with test functions for a H(Curl) + Grad(H^1) basis. To retrieve the correct projection the result must be multiplied by the inverse of the mass matrix
Parameters
[in,out]fieldVector field for projection
[in,out]xField projected onto H(Curl) + Grad(H^1) basis

◆ rinterp_apply()

subroutine rinterp_apply ( class(oft_hcurl_grad_rinterp), intent(inout)  self,
integer(i4), intent(in)  cell,
real(r8), dimension(:), intent(in)  f,
real(r8), dimension(3,4), intent(in)  gop,
real(r8), dimension(:), intent(out)  val 
)

Reconstruct a H(Curl) + Grad(H^1) vector field.

Parameters
[in]cellCell for interpolation
[in]fPosition in cell in logical coord [4]
[in]gopLogical gradient vectors at f [3,4]
[out]valReconstructed field at f [3]

◆ rinterp_delete()

subroutine rinterp_delete ( class(oft_hcurl_grad_rinterp), intent(inout)  self)

Destroy temporary internal storage.

◆ rinterp_setup1()

subroutine rinterp_setup1 ( class(oft_hcurl_grad_rinterp), intent(inout)  self,
class(oft_fem_comp_type), intent(inout), target  hcurl_grad_rep 
)

Setup interpolator for H(Curl) + Grad(H^1) vector fields.

Fetches local representation used for interpolation from vector object

◆ rinterp_setup2()

subroutine rinterp_setup2 ( class(oft_hcurl_grad_rinterp), intent(inout)  self,
class(oft_afem_type), intent(inout), target  hcurl_rep,
class(oft_afem_type), intent(inout), target  hgrad_rep 
)

Setup interpolator for H(Curl) + Grad(H^1) vector fields.

Fetches local representation used for interpolation from vector object

◆ zerob_apply()

subroutine zerob_apply ( class(oft_hcurl_grad_zerob), intent(inout)  self,
class(oft_vector), intent(inout)  a 
)

Zero a H(Curl) + Grad(H^1) vector field at all boundary nodes.

Parameters
[in,out]aField to be zeroed

◆ zerob_delete()

subroutine zerob_delete ( class(oft_hcurl_grad_zerob), intent(inout)  self)

Zero a H(Curl) + Grad(H^1) vector field at all boundary nodes.

◆ zerograd_apply()

subroutine zerograd_apply ( class(oft_hcurl_grad_gzero), intent(inout)  self,
class(oft_vector), intent(inout)  a 
)

Needs docs.

◆ zerograd_delete()

subroutine zerograd_delete ( class(oft_hcurl_grad_gzero), intent(inout)  self)

Needs docs.

◆ zeroi_apply()

subroutine zeroi_apply ( class(oft_hcurl_grad_zeroi), intent(inout)  self,
class(oft_vector), intent(inout)  a 
)

Zero a H(Curl) + Grad(H^1) vector field at all interior nodes.

Parameters
[in,out]aField to be zeroed

Variable Documentation

◆ df_mop

real(r8), dimension(fem_max_levels), private df_mop =-1.d99
private

Needs Docs.

◆ nu_mop

integer(i4), dimension(fem_max_levels), private nu_mop =0
private

Needs Docs.