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: 2021-09-27 00:31:26.751973, revision {‘base’: ‘778659c7’}, dependency revisions {PT_C: 31642c1e,eikonal: b58be0de,elasticity: e4d37cfa}

Runtime: 0:00:00.288095
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: 2021-09-27 00:31:27.070724, revision {‘base’: ‘778659c7’}, dependency revisions {PT_C: 31642c1e,eikonal: b58be0de,elasticity: e4d37cfa}

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