Skip to content

Instantly share code, notes, and snippets.

View mrklein's full-sized avatar

Alexey Matveichev mrklein

View GitHub Profile
#include "Time.H"
#include "argList.H"
#include "fvMesh.H"
#include "volFields.H"
#include "pointFields.H"
#include "dimensionedScalar.H"
#include "constants.H"
#include "interpolatePointToCell.H"
using namespace Foam;
#!/usr/bin/env ipython
# -*- coding: utf-8 -*-
import sys
import vtk
import numpy as np
import matplotlib.pyplot as plt
def _read_data(filename):
daphne:renumber$ ./Allwmake -q -s
wmakeLnIncludeAll: starting wmakeLnInclude processes on 4 cores
searching . for 'Make' directories
ln: ./SloanRenumber/lnInclude
ln: ./zoltanRenumber/lnInclude
ln: ./renumberMethods/lnInclude
$HOME/OpenFOAM/OpenFOAM-dev/src/renumber/renumberMethods
wmkdep: OppositeFaceCellWaveName.C
wmkdep: structuredRenumber.C
wmkdep: randomRenumber.C
class Parmgridgen < Formula
homepage "http://www-users.cs.umn.edu/~moulitsa/software.html"
url "https://github.com/mrklein/ParMGridGen/archive/v0.0.2.tar.gz"
sha256 "b3875d877def79c5fe37df0c9b1a43a47b3a99e8714f654a44d2010ce338ea93"
depends_on :mpi => :cc
def install
ENV.deparallelize
class Parmgridgen < Formula
homepage "http://www-users.cs.umn.edu/~moulitsa/software.html"
url "https://github.com/mrklein/ParMGridGen/archive/v0.0.2.tar.gz"
sha256 "b3875d877def79c5fe37df0c9b1a43a47b3a99e8714f654a44d2010ce338ea93"
depends_on :mpi => :cc
def install
ENV.deparallelize
$ /Applications/scilab-6.0.0-beta-1.app/Contents/MacOS/bin/scilab
dyld: Library not loaded: /sw/lib/libnghttp2.14.dylib
Referenced from: /Applications/scilab-6.0.0-beta-1.app/Contents/MacOS/lib/thirdparty/10.11//libcurl.4.dylib
Reason: image not found
Writing relative error in U to ".../tutorials/cylinder/0/error"
dyld: lazy symbol binding failed: Symbol not found: __ZN6mousselsERNS_7OstreamEl
Referenced from: .../platforms/darwin64_clang_dp_int64_opt/bin/mousse-potential
Expected in: flat namespace
#include "fvCFD.H"
#include "uniformSet.H"
#include "meshSearch.H"
#include "constants.H"
using Foam::constant::mathematical::pi;
int main(int argc, char *argv[])
@mrklein
mrklein / vtk-unstructured-grid-plot.py
Last active September 22, 2022 12:07
Read, cut and plot VTK file with python-vtk and matplotlib
%matplotlib inline
filename = 'vtk-plot_0.vtk'
import vtk
from numpy import zeros
import matplotlib.pyplot as plt
reader = vtk.vtkUnstructuredGridReader()
reader.SetFileName(filename)
@mrklein
mrklein / plot_vtk.py
Last active August 11, 2024 15:50
Plot VTK with matplotlib
#!/usr/bin/env python
import os
import numpy as np
import vtk
import matplotlib.pyplot as plt
def load_velocity(filename):
if not os.path.exists(filename):