This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Complex shapes in Underworld: Voxels, binvox and the Cow\n", | |
"\n", | |
"This notebook describes a possible method for importing complex geometries onto Underworld particles\n", | |
"\n", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# get the development version | |
FROM underworldcode/underworld2_untested:dev | |
MAINTAINER [email protected] | |
# modify original underworldcode/underworld2 images | |
RUN apt-get update -qq && DEBIAN_FRONTEND=noninteractive \ | |
apt-get remove petsc-dev -yq && \ | |
apt-get autoremove -yq && \ | |
apt-get install -yq \ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
# fst_var -> the swarm variable for the finite strain tensor | |
# vField -> the velocity field | |
gradV = vField.fn_gradient | |
srFn = fn.tensor.symmetric( gradV ) | |
a_velocity = 0.5*(gradV[1] - gradV[2]) # angular velocity | |
def rotateTensor2D(t, theta): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static char help[] = "Poiseuille Flow in 2d and 3d channels with finite elements.\n\ | |
We solve the Poiseuille flow problem in a rectangular\n\ | |
domain, using a parallel unstructured mesh (DMPLEX) to discretize it.\n\n\n"; | |
/*F | |
A Poiseuille flow is a steady-state isoviscous Stokes flow in a pipe of constant cross-section. We discretize using the | |
finite element method on an unstructured mesh. The weak form equations are | |
\begin{align*} | |
< \nabla v, \nu (\nabla u + {\nabla u}^T) > - < \nabla\cdot v, p > + < v, \Delta \hat n >_{\Gamma_o} = 0 | |
< q, \nabla\cdot u > = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# coding: utf-8 | |
import underworld as uw | |
import numpy as np | |
import glucifer | |
import time | |
# In[11]: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
** Copyright (c) 2005-2010, Monash University | |
** All rights reserved. | |
** Redistribution and use in source and binary forms, with or without modification, | |
** are permitted provided that the following conditions are met: | |
** | |
** * Redistributions of source code must retain the above copyright notice, | |
** this list of conditions and the following disclaimer. | |
** * Redistributions in binary form must reproduce the above copyright | |
** notice, this list of conditions and the following disclaimer in the |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer