Skip to content

Instantly share code, notes, and snippets.

@hazelybell
Created May 28, 2013 18:03
Show Gist options
  • Save hazelybell/5664740 to your computer and use it in GitHub Desktop.
Save hazelybell/5664740 to your computer and use it in GitHub Desktop.
GRAPH VIZZZZZ
digraph G {
compound=true;
subgraph cluster_l1l2 {
style=filled;
shape=box;
fillcolor=lightgrey;
compound=true;
label="l1l2.F90";
start [shape=circle, style=filled, fillcolor=white, label="BEGIN PROGRAM"];
end [shape=circle, style=filled, fillcolor=white, label="END PROGRAM"];
subgraph cluster_t1 {
style=filled;
fillcolor=white;
label="Test Driver\nPhase 1";
init [shape=box, label="Set domain size and resolution"];
}
subgraph cluster_t2 {
style=filled;
fillcolor=white;
label="Test Driver\nPhase 2";
t2 [shape=box, label="Set thickness,\ntraction,\nboundary conditions,\nA parameter"];
}
subgraph cluster_rect_grid_to_triangles {
style=filled;
fillcolor=white;
label="rect_grid_to_triangles";
rect_grid_to_triangles [shape=box, label="Generate triangular mesh"];
}
subgraph cluster_duv_dz {
style=filled;
fillcolor=white;
label="duv_dz";
duv_dz [shape=box, label="Compute vertical deformation"];
}
subgraph cluster_fem_imr {
style=filled;
fillcolor=white;
label="fem_imr";
{
fem_imr [shape=box, label="Zero all output variables"];
fem_imr_pc [shape=box, label="Compute domain size"];
compute_resid [shape=box, label="Compute element residuals from point residuals"];
sort_resid [shape=box, label="Sort elements by residual"];
resid_ok [shape=diamond, label="Is residual acceptable\nor max mesh refinement\niterations reached?"];
output_triangles [shape=polygon,skew=.4,sides=4,label="Output geometry"];
output_data [shape=polygon,skew=.4,sides=4,label="Output point data"];
generate_new_points [shape=box,label="Generate new points\nat the centroid of the\nelements with the\nworst residuals"];
fill_in_data [shape=box,label="Fill in point data and\nguesses for new points"];
fem_imr -> fem_imr_pc;
compute_resid -> sort_resid;
sort_resid -> resid_ok;
resid_ok -> output_triangles [label=" Yes"];
output_triangles -> output_data;
resid_ok -> generate_new_points [label=" No"];
generate_new_points -> fill_in_data;
fem_imr_pc -> compute_resid [style="invis"];
}
}
subgraph cluster_fem_l1l2 {
style=filled;
fillcolor=white;
label="fem_l1l2";
fem_l1l2 [shape=box,label="Set physical constants,\nalgorithm parameters,\nand convienence variables"];
A_B [shape=box,label="Compute initial B parameter values"];
init_guess [shape=box,label="Initialize guess, solution, and residual"];
copy_reset [shape=box, label="Copy solution to guess and reset linear problem\nand jacobian matrices and forcing arrays"];
vel_sqr [shape=box, label="Compute velocity squared and\nbasal traction coefficients for each point"];
per_elt [shape=box, label="Compute per-element data:\n\ngeometry,\ntest function derivatives,\n2-D and 3-D strain rates,\nice viscosity,\nthickness,\nbasal traction,\nvelocities,\nproblem and jacobian matrix contributions\n(for each coupled equation ordered pair),\nsurface derivatives,\nforce due to gravity,\ncontribution to vertical equation coefficients,\ncontribution to point surface derivatives,\ncontribution to point viscosities,\nand contribution to point strain"];
per_pt [shape=box, label="Compute vertical equation matrix\ncontributions and deformation per point"];
bcs [shape=box, label="Compute boundary condition contribution to forcing arrays"];
dirichlet [shape=box, label="Apply dirichlet boundary conditions by either\nlangrangians or forced equality\nto matrices and arrays"];
compute_resid1 [shape=box, label="Compute true residual"];
solve [shape=box, label="Linear solve"];
compute_update [shape=box, label="Compute solution update"];
nl_resid_ok [shape=diamond, label="Is residual acceptable\nor max nonlinear solve\niterations reached?"];
return [shape=box, label="Return last solution,\nsecond to last residual,\nand last update increment vectors\nper point"];
fem_l1l2 -> A_B;
A_B -> init_guess [style=invis];
init_guess -> copy_reset;
copy_reset -> vel_sqr;
vel_sqr -> per_elt;
per_elt -> per_pt;
per_pt -> bcs;
bcs -> dirichlet;
dirichlet -> compute_resid1;
compute_resid1 -> solve;
solve -> compute_update;
compute_update -> nl_resid_ok;
nl_resid_ok -> return [label=" Yes"];
nl_resid_ok -> copy_reset [label=" No"];
}
subgraph cluster_add_neighbor {
style=filled;
fillcolor=white;
label="maybe_add_neighbor";
add_neighbor [shape=box, label="Accumulate list of sorted,\nunique neighbors"];
}
subgraph cluster_analyze_mesh {
style=filled;
fillcolor=white;
label="analyze_mesh";
analyze_mesh [shape=box, label="For each element:\n\nadd neighbor points to neighbor lists,\ncompute minimum edge length"];
neighbor_self [shape=box, label="Add each point to its own neighbor list"];
triangle_neighbors [shape=box, label="For each element:\n\nbuild list of neighbor elements"];
boundaries [shape=box, label="For each side of each element:\n\ndetermine if that edge is a boundary"];
normals [shape=box, label="Build list of boundary points\nand their normals"];
analyze_mesh -> neighbor_self -> triangle_neighbors -> boundaries -> normals;
}
subgraph cluster_init_k_sparsity {
style=filled;
fillcolor=white;
label="init_k_sparsity";
init_k_sparsity [shape=box, label="Build matrix sparsity pattern:\n\nfor every ordered pair of\npoint-equation pairs\nfor which the points are neighbors\nand the equations directly coupled\nmark a matrix element non-zero\nand add to the nonzero element count"];
}
subgraph cluster_int_quad {
style=filled;
fillcolor=white;
label="int_quad";
int_quad [shape=box, label="Gaussian quadrature rule integration"];
}
start -> init [lhead=cluster_t1];
init -> rect_grid_to_triangles [lhead=cluster_rect_grid_to_triangles];
rect_grid_to_triangles -> t2 [lhead=cluster_t2];
t2 -> fem_imr [lhead=cluster_fem_imr];
fem_imr_pc -> fem_l1l2 [lhead=cluster_fem_l1l2];
return -> compute_resid;
fill_in_data -> fem_l1l2 [lhead=cluster_fem_l1l2];
A_B -> analyze_mesh [lhead=cluster_analyze_mesh];
normals -> init_k_sparsity [lhead=cluster_init_k_sparsity];
init_k_sparsity -> init_guess;
per_pt -> duv_dz [lhead=cluster_duv_dz];
duv_dz -> per_pt;
per_elt -> int_quad [lhead=cluster_int_quad];
int_quad -> per_elt;
analyze_mesh -> add_neighbor [lhead=cluster_add_neighbor];
add_neighbor -> analyze_mesh;
neighbor_self -> add_neighbor [lhead=cluster_add_neighbor];
add_neighbor -> neighbor_self;
}
subgraph cluster_mrgrnkf90 {
style=filled;
shape=box;
fillcolor=lightgrey;
compound=true;
label="mrgrnk.f90";
subgraph cluster_mrgrnk {
style=filled;
fillcolor=white;
label="MRGRNK";
MRGRNK [shape=box, label="Merge sort and return rank"];
}
}
subgraph cluster_slap {
style=filled;
shape=box;
fillcolor=lightgrey;
compound=true;
label="SLAP Library";
subgraph cluster_dsdbcg {
style=filled;
fillcolor=white;
label="DSDBCG";
DSDBCG [shape=box, label="Double precision Bi-Conjugate Gradient Solve"];
}
}
sort_resid -> MRGRNK [lhead=cluster_mrgrnk];
MRGRNK -> sort_resid;
output_data -> end;
solve->DSDBCG [lhead=cluster_dsdbcg];
DSDBCG->solve;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment