Comments (4)
This issue has been mentioned on preCICE Forum on Discourse. There might be relevant details there:
https://precice.discourse.group/t/how-to-couple-multiple-datas-into-fenics/1070/2
from fenics-adapter.
How many different fields would we want to support? Something like def initialize(self, coupling_subdomain, mesh, read_function, read_function2, write_function, write_function2, dimension=2):
where we support a fixed amount of fields (here 2 for write and read each) or something like def initialize(self, coupling_subdomain, mesh, read_function_list, write_function_list, dimension=2):
where we could support as many read/write fields as we have entries in the read/write function lists?
from fenics-adapter.
How many different fields would we want to support? Something like
def initialize(self, coupling_subdomain, mesh, read_function, read_function2, write_function, write_function2, dimension=2):
where we support a fixed amount of fields (here 2 for write and read each) or something likedef initialize(self, coupling_subdomain, mesh, read_function_list, write_function_list, dimension=2):
where we could support as many read/write fields as we have entries in the read/write function lists?
Definitely option two. I don't have a good idea at the moment how we could get the interface right. I think it would be good to still give a user that just wants to provide a single read and/or write function to directly provide the function: initialize(..., my_read_function, my_write_function)
, not initialize(..., [my_read_function], [my_write_function])
.
It might also be a good idea to think about using a dictionary instead of a list, because this would reduce the possibility to mix up write and read functions. For prototyping this idea, we can use the multiple-perpendicular-flaps tutorial. This might look like
initialize(..., {'Displacement-Upstream': write_function_1, 'Displacement-Downstream': write_function_2}, {'Stress-Upstream': read_function_1, 'Stress-Downstream': read_function_2})
Another important point: How would the corresponding adapter config look like? If we follow the dictionary approach, we might even entirely remove write_data_name
and read_data_name
there, because they are not needed anymore, if the user has to provide them anyway to identify the read/write functions.
from fenics-adapter.
I would also agree that option 2 where an arbitrary number of read and write fields are supported is the way to go. Have a dictionary where the keys are the names of the data and the values are the corresponding functions sounds like a good idea right now. I would suggest keeping the write_data_name
and read_data_name
fields in the adapter configuration for now as we can use these fields to check if the user has actually provided the correct names in the dictionary.
A bigger question is whether we should work on the design of this feature in the fenics-adapter or the fenicsx-adapter. In theory we would need this implementation in both the adapters, and I estimate that the function touched in this implementation are more on the user side (that is they are in fenicsprecice.py
). But let us be careful to plan something which is doable for @PhilipHildebrand.
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.