Comments (9)
I have created a new API for geometry related objects. For the moment these 3 abstract types are enough:
-
Grid
Represents a FE mesh / grid. That is, list of nodal coordinates, and for each cell, the list of node ids on the boundary of the cell. The cells of the grid can be of any order. -
Triangulation
. Represents a cloud of patches and provides the geomap. Minimum needed for cell-wise integration. -
GridGraph
. Represents the connectivity information needed to generate the dof numbers in a FE space.
Usage:
using Numa.Geometry
using Numa.Geometry.Cartesian # defines the struct CartesianGrid
grid = CartesianGrid(partition=(10,20),domain=(0,1,0,1),order=1) # domain, and order are optional
trian = triangulation(grid) # Generates the Triangulation associated with this grid
graph = gridgraph(grid) # Generates the GridGraph associated with this grid.
phi = geomap(trian)
@show celltovefs(graph) # Show vefs for each cell
@show veftocells(graph) # Show cells around each vef
The FE space can already be rewritten in terms of this API. @santiagobadia, do I try to do this (i.e., to substitute Mesh
and StructHexMesh
for this new API), or do you prefer to do it yourself?
from gridap.jl.
Ok, I can do it!
from gridap.jl.
I have put some comments in the module. You can take them into consideration if you want.
I have changed the FESpace, but still,
- FESpace must have a
CellValue{RefFE}
instead of only one RefFE.
from gridap.jl.
I have answered, the comments in line in the code. You can easily see them with git diff.
- FESpace must have a
CellValue{RefFE}
instead of only one RefFE.
Note that this would be type unstable since the template parameter is not a concrete type. The way to go IMHO is to have a tuple of RefFE and then a CellValue{Int} that indexes it.
EDIT
This would also work
struct ConreteFESpace{....,R<:CellValue{<:RefFE}}
...
RefFEs::R
...
end
from gridap.jl.
Yes, I wrote it fast but I wanted to templatize FESpace with respect to typeof(reffe_array)
.
If what you wrote works, perfect.
from gridap.jl.
@fverdugo Could you put in the diagonal of connections the obvious identity? I see it is already in vertices but not for higher dimensional objects. It will help me to create a nface_dofs array, in which cells are also included.
By the way, I would stick to the following notation: Given a D dim environment
nface (or nf) : nfaces of dim 0:D
vef: nfaces of dim 0:D-1 (without D-dim nfaces, i.e., cells)
from gridap.jl.
Just do
(Numa) pkg> up UnstructuredGrids
and then remove the if in https://github.com/lssc-team/Numa.jl/blob/659af7b407cee9fe8896338a1edc897f172cf25b/src/Geometry/Unstructured.jl#L76
and the assertion in https://github.com/lssc-team/Numa.jl/blob/659af7b407cee9fe8896338a1edc897f172cf25b/src/Geometry/Geometry.jl#L216
from gridap.jl.
Perfect! I have now cells too...
from gridap.jl.
This issue has become obsolete. Closing it.
from gridap.jl.
Related Issues (20)
- Visualization of the solution of a multifield time dependant problem
- non-deterministic matrix assembly for multiple domains HOT 6
- Extraction of Neumann boundary HOT 1
- Error in fine to coarse fields tests with order 0 HOT 1
- Normal displacement boundary condition in linear elasticity problems HOT 3
- To-think: a less restrictive type for the type of the operator in `LinearSolver` abstract interface?
- Eigen-values and vectors of SymTensorValue HOT 3
- Refactoring of the ODE module
- Solving non-linear coupled PDEs HOT 2
- Gridap and solvers from DifferentialEquations.jl HOT 10
- Neumann boundary conditions and different geometries HOT 3
- Computing gradient wrt Dirichlet data
- confusion about vectors sizes HOT 4
- `MultiFieldFESpace` with complex numbers HOT 2
- Error with the function `_point_to_cell ` when using a triangular mesh
- Wrong result when multiplying integrand with scalar when using `InterfaceTriangulation`
- Incorrect Assertion on boundary faces integral HOT 3
- ode_start() in Generalized_Alpha results into singular system HOT 2
- Leftover ideas for ODEs
- `mean` operator + `SkeletonPair`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gridap.jl.