Kevin,
here is the Tria element code (simple version):
/*First get back the area of the base*/
area_base=this->GetArea();
/*Now get the average height*/
Input* surface_input = inputs->GetInput(SurfaceEnum); _assert_(surface_input);
Input* base_input = inputs->GetInput(BaseEnum); _assert_(base_input);
surface_input->GetInputAverage(&surface);
base_input->GetInputAverage(&base);
Haverage=surface-base;
return area_base*Haverage;
As you can see, we are computing the average H thickness and then simple multiply. Then we have an MPI_Gather
sum operation on all the elements to return the combined volume.
Hope that helps!
Eric L.