learn-physics-0.4.1: Haskell code for learning physics

Stabilityexperimental
MaintainerScott N. Walck <walck@lvc.edu>
Safe HaskellTrustworthy

Physics.Learn.Volume

Contents

Description

This module contains functions for working with Volumes and volume integrals over Volumes.

Synopsis

Volumes

data Volume Source

Volume is a parametrized function from three parameters to space, lower and upper limits on the first parameter, lower and upper limits for the second parameter (expressed as functions of the first parameter), and lower and upper limits for the third parameter (expressed as functions of the first and second parameters).

Constructors

Volume 

Fields

volumeFunc :: (Double, Double, Double) -> Position

function from 3 parameters to space

loLimit :: Double

s_a

upLimit :: Double

s_b

loCurve :: Double -> Double

t_a(s)

upCurve :: Double -> Double

t_b(s)

loSurf :: Double -> Double -> Double

u_a(s,t)

upSurf :: Double -> Double -> Double

u_b(s,t)

unitBall :: VolumeSource

A unit ball, centered at the origin.

unitBallCartesian :: VolumeSource

A unit ball, centered at the origin. Specified in Cartesian coordinates.

centeredBall :: Double -> VolumeSource

A ball with given radius, centered at the origin.

ballSource

Arguments

:: Double

radius

-> Position

center

-> Volume

ball with given radius and center

Ball with given radius and center.

northernHalfBall :: VolumeSource

Upper half ball, unit radius, centered at origin.

centeredCylinder :: Double -> Double -> VolumeSource

Cylinder with given radius and height. Circular base of the cylinder is centered at the origin. Circular top of the cylinder lies in plane z = h.

shiftVolume :: Displacement -> Volume -> VolumeSource

Shift a volume by a displacement.

Volume Integral

volumeIntegralSource

Arguments

:: (VectorSpace v, Scalar v ~ Double) 
=> Int

number of intervals for first parameter (s)

-> Int

number of intervals for second parameter (t)

-> Int

number of intervals for third parameter (u)

-> Field v

scalar or vector field

-> Volume

the volume

-> v

scalar or vector result

A volume integral