This was tested on MacOSX Monterey with Intel processor inside a conda environement
- Create a new conda environment and activate it
conda create --name fenicsx
conda activate fenicsx
In this gist I will explain how to install the developmenent version of FEniCS from source inside a conda environement This installation was tested on MacOSX with Intel processor.
conda create --name fenics-dev
conda activate fenics-dev
| from typing import List | |
| def myrange(*args, **kwargs) -> List[float]: | |
| """Possible implementation of the built in range | |
| function in python. | |
| The range function in python takes various types of | |
| inputs and produces a sequenctial list of increasing | |
| or decreasing values. This is an alternative implementation, |
| name: in1910 | |
| channels: | |
| - default | |
| - conda-forge | |
| dependencies: | |
| - python | |
| - sphinx | |
| - pip | |
| - matplotlib | |
| - numpy |
| import datetime | |
| from pathlib import Path | |
| import os | |
| from collections import namedtuple | |
| import argparse | |
| File = namedtuple("File", ["path", "size", "mtime"]) | |
| def get_parser(): |
| import copy | |
| class A: | |
| def __init__(self, x): | |
| self.x = x | |
| def __repr__(self): | |
| return f"{self.x}" |
| import meshio | |
| import numpy as np | |
| import dolfin as df | |
| def gmsh2dolfin(msh_file, mesh_file, line_file=None): | |
| msh = meshio.gmsh.read(msh_file) | |
| line_cells = [] |
| PAPER = paper.tex # Change this to the name of the latex document | |
| PAPER.pdf = $(PAPER:%.tex=%.pdf) | |
| PAPER.aux = $(PAPER:%.tex=%.aux) | |
| # PDFLATEX = pdflatex -interaction scrollmode -file-line-error -halt-on-error -synctex=1 -shell-escape | |
| PDFLATEX = pdflatex | |
| BIBTEX = bibtex | |
| all: clean pdf | |
| pdf: $(PAPER) |
| def dec_with_kwargs(**params): | |
| def decorator(f): | |
| print(f"Calling decorator using params {params}") | |
| def wrap(*args, **kwargs): | |
| print(f"Calling wrap with args {args}, and kwargs {kwargs}") | |
| return f(*args, **kwargs) | |
| return wrap |
| #!/usr/bin/env python | |
| """ | |
| Extract text from pdf | |
| Install these dependencies first with e.g conda | |
| conda install pytesseract tesseract pdf2image | |
| """ | |
| import argparse |