Skip to content
This repository has been archived by the owner on Jul 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1 from tsinghua-TEEP/elliptic-grid-gen
Browse files Browse the repository at this point in the history
  • Loading branch information
Gravifer authored Apr 29, 2021
2 parents dffa0e4 + bd454fe commit cb21368
Show file tree
Hide file tree
Showing 7 changed files with 230 additions and 21 deletions.
128 changes: 119 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,137 @@ variables:
orbs:
codecov: codecov/[email protected] # need to allow 3rd party orbs in project settings on circleci
python: circleci/[email protected]
coverage-reporter: codacy/[email protected]

jobs:
instantiate:
working_directory: ~/CFD2021Projects # Clone into a directory whose name matches your Package.
docker:
- image: julia:1.6.0 # image comes from Docker hub
steps:
- attach_workspace:
at: ..
# - restore_cache:
# name: Restore source code cache
# keys:
# - source-{{ .Branch }}-{{ .Revision }}
# - source-{{ .Branch }}-
# - source-
- checkout
# - run:
# name: Git GC
# command: git gc
# - save_cache:
# name: Cache source code
# key: source-v1-{{ .Branch }}-{{ .Revision }}
# paths:
# - ".git"

- restore_cache:
# name: Restore Julia artifact cache
# keys:
# - julia-artifacts-{{ arch }}-{{ .Branch }}-{{ checksum "Manifest.toml" }}
# - julia-artifacts-{{ arch }}-{{ .Branch }}-
# - julia-artifacts-
name: Restore Julia cache
keys:
- julia-cache-{{ arch }}-{{ .Branch }}-{{ checksum "Manifest.toml" }}
- julia-cache-{{ arch }}-{{ .Branch }}-
- julia-cache-
- run:
name: Instantiate the package
command: julia -e 'using Pkg; Pkg.activate(pwd()); Pkg.update(); Pkg.instantiate();'
- save_cache:
# name: Save Julia artifacts
# key: julia-artifacts-{{ arch }}-{{ .Branch }}-{{ checksum "Manifest.toml" }}
# paths:
# - ~/.julia/artifacts
name: Save Julia cache
key: julia-cache-{{ arch }}-{{ .Branch }}-{{ checksum "Manifest.toml" }}
paths:
- ~/.julia
- persist_to_workspace:
root: ..
paths:
- ./CFD2021Projects
- ./.julia

build:
working_directory: /root/project/CFD2021Projects # Clone into a directory whose name matches your Package.
docker:
- image: julia:1.6.0 # image comes from Docker hub
steps:
- attach_workspace:
at: ..
- restore_cache:
name: Restore Julia cache
keys:
- julia-cache-{{ arch }}-{{ .Branch }}-{{ checksum "Manifest.toml" }}
- julia-cache-{{ arch }}-{{ .Branch }}-
- julia-cache-
- run:
name: Build the package
command: julia -e 'using Pkg; Pkg.activate(pwd()); Pkg.build(); Pkg.precompile();'
- save_cache:
name: Save Julia cache
key: julia-cache-{{ arch }}-{{ .Branch }}-{{ checksum "Manifest.toml" }}
paths:
- ~/.julia
- persist_to_workspace:
root: ..
paths:
- ./CFD2021Projects
- ./.julia

test:
working_directory: /root/project/CFD2021Projects # Clone into a directory whose name matches your Package.
docker:
- image: julia:1.6.0 # image comes from Docker hub
steps:
- checkout
- attach_workspace:
at: ..

- restore_cache:
name: Restore Julia cache
keys:
- julia-cache-{{ arch }}-{{ .Branch }}-{{ checksum "Manifest.toml" }}
- julia-cache-{{ arch }}-{{ .Branch }}-
- julia-cache-
- run:
name: Install and Test this package
command: julia -e 'using Pkg; Pkg.activate(pwd()); Pkg.update(); Pkg.build(); Pkg.test(; coverage=true);'
# - run:
# name: Process and uplode code-coverage
# command: julia -e 'using Pkg; Pkg.activate(pwd()); using Coverage; Codecov.submit_local(process_folder())'
# env:
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
name: Test the package
command: julia -e 'using Pkg; Pkg.activate(pwd()); Pkg.test(; coverage=true);'
- save_cache:
name: Save Julia cache
key: julia-cache-{{ arch }}-{{ .Branch }}-{{ checksum "Manifest.toml" }}
paths:
- ~/.julia

- run:
name: Process code-coverage
name: Process code coverage
command: julia -e 'using Pkg; Pkg.activate(pwd()); using Coverage, Glob; coverage = process_folder(); coverage = append!(coverage, vcat(process_folder.(glob("**/src/"))...)); LCOV.writefile("coverage-lcov.info", coverage)'
- codecov/upload:
file: "coverage-lcov.info"
token: ${CODECOV_TOKEN}
- coverage-reporter/send_report:
coverage-reports: 'coverage-lcov.info'
project-token: ${CODACY_PROJECT_TOKEN}
- persist_to_workspace:
root: ..
paths:
- ./CFD2021Projects
- ./.julia

# Orchestrate our job run sequence
workflows: # cf.: https://circleci.com/docs/2.0/sample-config/
build_and_test:
jobs:
- instantiate
- build:
requires:
- instantiate
- test:
requires:
- instantiate

# version: 2.1

Expand Down
17 changes: 17 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
# Label to use when marking an issue as stale
staleLabel: wontfix
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
14 changes: 14 additions & 0 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: TagBot
on:
issue_comment:
types:
- created
workflow_dispatch:
jobs:
TagBot:
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
runs-on: ubuntu-latest
steps:
- uses: JuliaRegistries/TagBot@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
19 changes: 19 additions & 0 deletions .licrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[licenses]
# This indicates which are the only licenses that Licensebat will accept.
# The rest will be flagged as not allowed.
accepted = ["MIT", "MSC", "BSD"]
# This will indicate which licenses are not accepted.
# The rest will be accepted, except for the unknown licenses or dependencies without licenses.
# unaccepted = ["LGPL"]
# Note that only one of the previous options can be enabled at once.
# If both of them are informed, only accepted will be considered.

[dependencies]
# This will allow users to flag some dependencies so that Licensebat will not check for their license.
ignored=["ignored_dep1", "ignored_dep2"]

[behavior]
# False by default, if true, it will only run the checks when one of the dependency files or the .licrc file has been modified.
run_only_on_dependency_modification = true
# False by default, if true, it will never block the build.
do_not_block_pr = false
39 changes: 28 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,47 @@

<!-- [![CMake](https://github.com/tsinghua-TEEP/CFD2021-G4-Projects/actions/workflows/cmake.yml/badge.svg)](https://github.com/tsinghua-TEEP/CFD2021-G4-Projects/actions/workflows/cmake.yml) !-->
<!-- [![Python package with Conda](https://github.com/tsinghua-TEEP/CFD2021-G4-Projects/actions/workflows/python-package-conda.yml/badge.svg)](https://github.com/tsinghua-TEEP/CFD2021-G4-Projects/actions/workflows/python-package-conda.yml) !-->
[![CircleCI](https://circleci.com/gh/tsinghua-TEEP/CFD2021-G4-Projects.svg?style=shield&circle-token=9b51e15e5ced695a347386f06bdc605e23e7d8e5)](https://github.com/tsinghua-TEEP/CFD2021-G4-Projects/actions)
[![codecov](https://codecov.io/gh/tsinghua-TEEP/CFD2021-G4-Projects/branch/main/graph/badge.svg?token=9R7SWYU9W5)](https://codecov.io/gh/tsinghua-TEEP/CFD2021-G4-Projects)
[![wakatime](https://wakatime.com/badge/github/tsinghua-TEEP/CFD2021-G4-Projects.svg)](https://wakatime.com/badge/github/tsinghua-TEEP/CFD2021-G4-Projects)
[![Codacy grade](https://img.shields.io/codacy/grade/8ddf95075915482d8708388554f16386?label=quality&logo=Codacy)](https://www.codacy.com?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=tsinghua-TEEP/CFD2021-G4-Projects&amp;utm_campaign=Badge_Grade)<!-- ![codacy](https://app.codacy.com/project/badge/Grade/8ddf95075915482d8708388554f16386?label=) !-->
[![CircleCI build status](https://img.shields.io/circleci/build/gh/tsinghua-TEEP/CFD2021-G4-Projects?label=build&logo=CircleCI&token=9b51e15e5ced695a347386f06bdc605e23e7d8e5)](https://github.com/tsinghua-TEEP/CFD2021-G4-Projects/actions)<!-- ![circleci](https://circleci.com/gh/tsinghua-TEEP/CFD2021-G4-Projects.svg?style=shield&label=CircleCI&logo=CircleCI&circle-token=9b51e15e5ced695a347386f06bdc605e23e7d8e5) !-->
[![CodeCov coverage](https://img.shields.io/codecov/c/gh/tsinghua-TEEP/CFD2021-G4-Projects?logo=CodeCov&logoColor=white&token=9R7SWYU9W5)](https://codecov.io/gh/tsinghua-TEEP/CFD2021-G4-Projects)<!-- ![codecov](https://codecov.io/gh/tsinghua-TEEP/CFD2021-G4-Projects/branch/main/graph/badge.svg?token=9R7SWYU9W5&logoColor=white&style=flat) !-->
[![License: Apache-2.0](https://img.shields.io/badge/license-APL2-blue.svg?logo=Apache&style=flat)](https://github.com/tsinghua-TEEP/CFD2021-G4-Projects/blob/main/LICENSE)
[![Wakatime timing](https://wakatime.com/badge/github/tsinghua-TEEP/CFD2021-G4-Projects.svg?logo=WakaTime&style=flat)](https://wakatime.com/badge/github/tsinghua-TEEP/CFD2021-G4-Projects)
[![ColPrac: Contributor's Guide](https://img.shields.io/badge/ColPrac-Contributor's%20Guide-blueviolet?logo=Julia&logoColor=white&style=flat)](https://github.com/SciML/ColPrac)
[![GitHub Repository Discussions](https://img.shields.io/badge/GitHub-Discussions-blueviolet?logo=github&style=flat)](https://github.com/tsinghua-TEEP/CFD2021-G4-Projects/discussions)
[![Zoom meeting](https://img.shields.io/static/v1?logo=LiveChat&logoColor=white&label=meeting&message=Zoom&style=flat&color=2D8CFF)](https://us02web.zoom.us/j/88643726401?pwd=V3BNdTV4TWlvZmZkd2VoSHZ0Y2Q0Zz09)
<!-- [![Dependabot Status](https://api.dependabot.com/badges/status?host=github&repo=tsinghua-TEEP/CFD2021-G4-Projects)](https://dependabot.com) !-->

This repository dedicates to the team projects
related to the CFD course, 2021 spring, at SAS, THU.
related to the [computational fluid dynamics course](http://reserves.lib.tsinghua.edu.cn/Courses/CourseDetail?courseId=cb3f2412-7ba3-465f-a8b8-c24061b136d9) by [Prof. Ren](http://www.hy.tsinghua.edu.cn/info/1154/1826.htm), 2021 spring, at SAS, THU.
Efforts are contributed by a joined 4-member group.
For practice and performance, we attempt to use the
[Julia](https://julialang.org) programming langrage in these projects.
[![Julia](https://img.shields.io/static/v1?logo=Julia&logoColor=white&label=&message=Julia&color=9558B2)](https://julialang.org)
programming language in these projects.

## Configuration

The project is mainly written in [Julia](https://julialang.org), although FORTRAN, C/C++, Python, Wolfram, MATLAB are also marginally used. As CFD is a mature community we utilized various robust tools built by the community, which require user/contributors to do some preparation before setting the project up.
The project is mainly written in
Julia<!-- [![Julia](https://img.shields.io/static/v1?logo=Julia&logoColor=white&label=&message=Julia&color=9558B2)](https://julialang.org) !-->,
albeit
[![FORTRAN](https://img.shields.io/static/v1?logo=Fortran&label=&message=FORTRAN&color=4D41B1)](https://fortran-lang.org)
[![C/C++](https://img.shields.io/static/v1?logo=Coursera&label=&message=C/C%2B%2B&color=00599C)](https://isocpp.org)
[![Python](https://img.shields.io/static/v1?logo=Python&logoColor=white&label=&message=Python&color=3776AB)](https://www.python.org)
[![Wolfram](https://img.shields.io/static/v1?logo=Wolfram-Language&logoColor=white&label=&message=Wolfram&color=DD1100)](https://www.wolfram.com)
[![MATLAB](https://img.shields.io/static/v1?logo=MathWorks&logoColor=white&label=&message=MATLAB&color=0076A8)](https://www.mathworks.com)
may also marginally used.
As [CFD](https://en.wikipedia.org/wiki/Computational_fluid_dynamics) is a mature community we utilized various robust tools built by the community, which require user/contributors to do some preparation before setting the project up.

### Prerequisites

To use or contribute to the project, these tools should be previously installed:

- [Julia](https://julialang.org) (1.6.0 and above)
- [Python](https://www.python.org) (3.8 and above)
- [Conda](https://docs.conda.io) (4.5 and above)
- [![Julia](https://img.shields.io/static/v1?logo=Julia&logoColor=white&label=Julia&message=1.6.0+and+above&color=9558B2)](https://julialang.org)
- [![Python](https://img.shields.io/static/v1?logo=Python&logoColor=white&label=Python&message=3.8+++and+above&color=3776AB)](https://www.python.org)
- [![Conda](https://img.shields.io/static/v1?logo=Anaconda&logoColor=white&label=Conda&message=4.5+++and+above&color=44A833)](https://docs.conda.io)

### Setup

- Clone the repository with git:
- Clone the repository with [![Git](https://img.shields.io/static/v1?logo=Git&logoColor=white&label=&message=Git&color=F05032)](https://git-scm.com):
```shell
git clone [email protected]:tsinghua-TEEP/CFD2021-G4-Projects.git
```
Expand Down Expand Up @@ -69,4 +84,6 @@ for geometrical and general setups.
- [ ] General purpose solver for the inverted Poisson equation. (see ``gauss-seidel.jl`` from ``CFD-Julia``)
- [ ] Processing general [NACA airfoils](https://en.wikipedia.org/wiki/NACA_airfoil)
(formula generation, discretization, splining, etc.)
- [ ] Port the output to standard [Gmsh](http://gmsh.info) format.
- [ ] Port the output to standard
[![Gmsh](https://img.shields.io/static/v1?logo=Vercel&logoColor=white&label=&message=Gmsh&color=000000)](https://gmsh.info)
format.
32 changes: 32 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# -*- coding: utf-8 -*-
"""Setup script of the project.
Not yet implemented. The following is an example of a python module docstring.
Example:
Examples can be given using either the ``Example`` or ``Examples``
sections. Sections support any reStructuredText formatting, including
literal blocks::
$ python example_google.py
Section breaks are created by resuming unindented text. Section breaks
are also implicitly created anytime a new section starts.
Attributes:
module_level_variable1 (int): Module level variables may be documented in
either the ``Attributes`` section of the module docstring, or in an
inline docstring immediately following the variable.
Either form is acceptable, but the two should not be mixed. Choose
one convention to document module level variables and be consistent
with it.
Todo:
* For module TODOs
* You have to also use ``sphinx.ext.todo`` extension
.. _Google Python Style Guide:
http://google.github.io/styleguide/pyguide.html
"""
2 changes: 1 addition & 1 deletion src/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Shared source files

This directory holds shared source code among projects.
This directory holds shared source code among projects.
Content:

- misc-tuils.jl
Expand Down

0 comments on commit cb21368

Please sign in to comment.