Comments (6)
I changed the name of the issue. Did I get it right, is that what you want to do?
What do you mean by?
... but actually there is no difference in the body of these functions, hence it does not help.
from fenics-adapter.
Yes.
I should now refer to precice.pyx
functions and not PySolverInterface
due to #25. I just mean that simple changing from e.g. write_block_scalar_data()
to write_block_vector_data()
in fenicsadapter.py
does not help. Using vector-valued functions yields the same error in both cases. This is understandable as the implementation of "scalar" and "vector" version of read
and write
does not differ (it is the same code). Please compare
https://github.com/precice/precice/blob/develop/src/precice/bindings/python/precice.pyx#L259-L281 and https://github.com/precice/precice/blob/develop/src/precice/bindings/python/precice.pyx#L300-L322
I will push the draft of structural solver, so the error (TypeError: only size-1 arrays can be converted to Python scalars) can be reproduced.
from fenics-adapter.
This is understandable as the implementation of "scalar" and "vector" version of
read
andwrite
does not differ (it is the same code)
Well, it does call two different preCICE methods that do different things. Probably, I understand better what you mean when you push the draft of the structural solver.
Also for the vector-valued case: len(value_indices)
!= len(values)
.
Still values
needs to be one-dimensional array (of size numberOfVertices
times dimensions
). Maybe you are looking for the method ravel ?
from fenics-adapter.
@uekerman Thanks, I did not know that it must be one-dim array. Using ravel
helped, but just to make sure: from [ [u1, v1], [u2, v2] ...] form we want [ u1, v1, u2, v2, ...] and not [ u1, u2, ... v1, v2, ... ], right?
The issue cannot be closed yet though, there are further modifications in fenicsadapter.py
required.
from fenics-adapter.
but just to make sure: from [ [u1, v1], [u2, v2] ...] form we want [ u1, v1, u2, v2, ...] and not [ u1, u2, ... v1, v2, ... ], right?
Exactly! See also the API documentation
from fenics-adapter.
Closed. Vector valued data is supported since #38 has been merged.
from fenics-adapter.
Related Issues (20)
- Compute CouplingExpression from point data via Minimization on P0DG function space HOT 9
- Reactivate systemtest HOT 2
- from fenics import * avoids publishing HOT 2
- Properly define FEniCS dependency? HOT 3
- Outdated documentation regarding actions HOT 4
- Homogenize citation information HOT 4
- Support FEniCSx HOT 1
- The Config object can not find the adapter configuration file HOT 1
- Error at any run: "Illegal instruction (core dumped)" on Ubuntu 21.10
- Restrictions on using adapter for 3D cases HOT 7
- Painfully slow mapping with volumetric coupling HOT 1
- Installation issues for fenics version (2:0.4.1.2) HOT 5
- Mesh connectivity information not defined for all scenarios in 2D and 3D cases
- Remove duplicates in citation information HOT 1
- precice/fenics-adapter:latest is not stable but the develop release HOT 2
- Volume coupling and nearest projection mapping do not integrate well and are untested
- recommended install fails under Ubuntu HOT 2
- Make limitations of the adapter more evident in the documentation
- Double-boundary points warning HOT 2
- Support checkpointing of multiple fields
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 fenics-adapter.