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: 2023-12-06 00:06:23.957256, revision {‘base’: ‘f172baea’}, dependency revisions {PT_C: 31642c1e,cvsys: 69164767,eikonal: 5fbbfda3,elasticity: edfdcbb3}

Runtime: 0:00:00.841219
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: 2023-12-06 00:06:24.837028, revision {‘base’: ‘f172baea’}, dependency revisions {PT_C: 31642c1e,cvsys: 69164767,eikonal: 5fbbfda3,elasticity: edfdcbb3}

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