https://github.com/hpc-maths/GenEO
Revision b8b685a5bb56b588b304581cb8d77beefbf7757e authored by Nicole Spillane on 06 May 2021, 20:32:45 UTC, committed by Nicole Spillane on 06 May 2021, 20:32:45 UTC
1 parent c87fb92
Tip revision: b8b685a5bb56b588b304581cb8d77beefbf7757e authored by Nicole Spillane on 06 May 2021, 20:32:45 UTC
Preconditioners for Apos are partly implemented, for H2_AS the GenEO eigenproblem for eigmax is not implemented, consider using AMPCG, our cg solvers are broken
Preconditioners for Apos are partly implemented, for H2_AS the GenEO eigenproblem for eigmax is not implemented, consider using AMPCG, our cg solvers are broken
Tip revision: b8b685a
rhs.py
# Authors:
# Loic Gouarin <loic.gouarin@cmap.polytechnique.fr>
# Nicole Spillane <nicole.spillane@cmap.polytechnique.fr>
#
# License: BSD 3 clause
from .utils import buildVecWithFunction
from.assembling import buildMassMatrix
def buildRHS(da, h, apply_func):
"""
Construct the right hand side of the elasticity problem.
Parameters
==========
da : petsc.DMDA
The mesh structure.
h : list
The space step in each direction.
apply_func: function
Function corresponding to the f (rhs, or source term) in the
elasticity problem.
Returns
=======
b: petsc.Vec
The right hand side.
"""
b = da.createGlobalVec()
A = buildMassMatrix(da, h)
A.assemble()
tmp = buildVecWithFunction(da, apply_func)
A.mult(tmp, b)
return b

Computing file changes ...