Software engineer for scientific projects and not only.
andrsd / godzilla Goto Github PK
View Code? Open in Web Editor NEWFEM framework
Home Page: https://andrsd.github.io/godzilla/
License: MIT License
FEM framework
Home Page: https://andrsd.github.io/godzilla/
License: MIT License
This will load a mesh from a GMSH file.
dt
problem:
type: XYZTransientProblem
ts_adapt:
type: XYZTSAdapt
params
TransientInterface
that will be called from TSAdaptChoose_godzilla
. It will look like:
PetscErrorCode ts_adapt_choose(PetscReal h,PetscInt *next_sc,PetscReal *next_h,PetscBool *accept,PetscReal *wlte,PetscReal *wltea,PetscReal *wlter)
ts_adapt_choose
(the usual)TransientInterface
will extract TSAdapt
from its TS
objectCFL time adaptation is already in PETSc, so also be able to use the schemes in PETSc. Maybe via this syntax:
problem:
type: XYZTransientProblem
ts_adapt:
scheme: <PETSc TSAdapt scheme>
min: <value>
max: <value>
Allow boolean-valued input parameters.
params.add_param<bool>("name", ...);
params.add_param<PetscBool>("name", ...); (?)
User should be able to do:
param: [on | off | true | false | yes | no]
%
is cool and all that, but seems to be more error prone. {}
is modern and the recommended way in fmt
.
So we can do things like:
a
defined over the whole domaina
is restricted to label1
and set using an aux field objecta
is restricted to label2
and set using some other aux field objectWhen interval
is specified but on
does not have timestep
, then no output happens. This is not what a user would expect, so we need to warn them, so they can fix the input file before running and not finding any expected output.
Enable adaptive mesh refinements
Info:
Tasks:
When an ExodusII file is loaded, it contains labels for named side sets. However, user can refer to the boundary (side set) via its ID.
We want to create labels that will be named using the ID, i.e. if there is a side set with ID 1000, its name will be "1000". Then, we will keep a map from IDs to names around, so we will have 1000 -> "name"
and also "name" -> 1000
.
Then, we will need API to get label given a side set name. It will look for the name first, and if there is no such name, it will try to use the "ID" version.
Output object to store time-dependent scalar values as a CSV file.
Something like this:
time,pps1,pps2
0,val1,val2
...
t,valX,valY
Use this sphinx-material for the doco pages.
Allow users to select time integration scheme for implicit and explicit solvers.
Implicit:
beuler
cn
Explicit:
euler
ssp
rk
[1fe,2a,3,3bs,4,5f,5dp,5bs]
TSRKSetType
to set the type, default is 3BS
There is more in PETSc. Some types will need extra parameters specified -> stronger input parameter validation will be needed.
Add a check that HDFOutput
is using UnstructuredMesh
. If not report that to a user.
When trying to do this:
ierr = PetscViewerCreate(comm(), &this->viewer);
ierr = PetscViewerSetType(this->viewer, PETSCVIEWEREXODUSII);
ierr = PetscViewerFileSetMode(this->viewer, FILE_MODE_WRITE);
ierr = DMView(dm, this->viewer);
ierr = VecView(vec, this->viewer);
The code crashes inside PETSc with a segfault.
Add a check that VTKOutput
is using a UnstructuredMesh
. If not report that to a user.
Allow things like this:
functions:
linipol1:
type: LinearInterpolation
x: [0, 1, 2, 3]
y: [10, 5, 6, 2]
...
bcs:
left:
type: DirichletBC
boundary: ...
value: '10*linipol1(t)'
Wherever we expect parsed expression we should be able to use function specified via functions
block, with their names.
void * ctx
as a last argument.Note functions will have to be build quite early, but that should not be a problem.
I want to be able to do:
for (auto & : mesh.get_element_range()) {
// e is now cell ID
}
The same for vertices.
gcc
needs different flags than clang.
Make cmake/CodeCoverage.cmake
aware of the compiler used and set the correct flags.
Figure out how or where is llvm-profdata
is on home brew, then turn code coverage for macOS on again.
Figure out how to generate code coverage on linux
Something similar to boost::mpi
If parameter is defined as std::vector<T>
and is specified as a scalar value T
in the input file, the code crashes.
Add check into GYMLFile
if the param exists as vector and if not, then load is as a scalar value and turn it into an array.
InputParameters
to Parameters
(we are using namespaces, so we can avoid name collisions easily)valid_params
to parameters
This is to avoid name clashes when the library is used by applications
We refer to cells ad elements in the API. Should remove all references to elements and replace it with cells.
This will match PETSc API closer
Use exodusIIcpp for exodus i/o.
Note: node sets are not really being used ATM, so not doing that.
Allow users to specify which variables should be stored into the output file.
By variables we really mean field variables and postprocessor values. In ExodusII lingo, those are all referred to as variables.
Create an example that solves incompressible NS equations
Report some information about the mesh:
Also install config files for pkg-config
ExodusIIOutput::write_info()
should query application name and version. It should not hardcode "godzilla" and its version.
Files are created by applications, so they need to take credit/blame.
Nemesis is now part of ExodusII - if we run in parallel, use that API to save data.
This should save some communication
Write PPS values as global variables into ExodusII files.
On Mac, we have to do this in the build system
if (DEFINED ENV{CONDA_PREFIX})
set(CMAKE_BUILD_RPATH $ENV{CONDA_PREFIX}/lib)
endif()
This is a dirty hack to get installed godzilla
link properly to a godzilla-based application.
However, this is causing a problem for developers of the godzilla library, since the build binaries like tests or examples are picking up the installed lib instead of the one we built.
So, developers have to do make install
in their workflow, which is tedious and sometimes they (i.e. I) forget and weird problems can occur.
Add tools so that users can do performance logging.
Start here
Rename the method so it better describes the action
Like we have PiecewiseLinear
function, we want a piecewise constant one.
This simplifies the setup of problems with discontinuities, where we had to fake the discontinuity via piecewise linear function.
It is a macro, so needs to follow the coding standard
It is really ๐ when you think your input file parameter is correct, and you think the code is using it, but actually it does not.
Can spend hours on debugging your code when a proper warning would save you right there!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.