Gradient Computation

Module: devtests.FEMLIB.gradient.run

Section author: Gernot Plank <gernot.plank@medunigraz.at>

This script tests the gradient computation tool FEMLIB/GlGradient

Problem Setup

This test defines a small cuboid and prescribes the scalar field f(x)=r^2 where r is the distance to the origin.

../../_images/gradient.png

Tests

trg_vtx

Generate scalar test data \phi at mesh nodes, compute gradient at mesh nodes and compare \nabla \phi against reference.

Tags: FAST FEMLIB SERIAL

Checks:

  • Compare against stored reference: max_error(gradient.vtx.grad.vec)

Last run: 2024-02-29 00:06:17.816122, revision {‘base’: ‘cbf8efd0’}, dependency revisions {PT_C: 31642c1e,cvsys: 593686bc,eikonal: 5fbbfda3,elasticity: 4d92ddfc}

Runtime: 0:00:00.750913
ALL PASSED
  PASS max_error(gradient.vtx.grad.vec): 9.000000000033287e-09

trg_ctr

Generate scalar test data \phi on mesh nodes, compute gradient at element centers and compare \nabla \phi against reference.

Tags: FAST FEMLIB SERIAL

Checks:

  • Compare against stored reference: max_error(gradient.ctr.mag.dat)

Last run: 2024-02-29 00:06:18.598682, revision {‘base’: ‘cbf8efd0’}, dependency revisions {PT_C: 31642c1e,cvsys: 593686bc,eikonal: 5fbbfda3,elasticity: 4d92ddfc}

Runtime: 0:00:00.534547
ALL PASSED
  PASS max_error(gradient.ctr.mag.dat): 1.1999999999972102e-08