Comments (4)
On Fri, 26 Apr 2013, Benjamin S. Kirk wrote:
I was looking into the DofMap::dof_indices()function to see what I might do to speed it up.
Sounds great! It'll be interesting to figure out how to benchmark the
change well, though...
What I see is that it becomes a double switch which dispatches to another double switch, and it
gets called obviously for each node on the element.I was thinking about making the current n_dof_at_node() a private member of FEInterface, and
using it to build up static arrays, say_n_dofs_at_node[DIM][FETYPE][ELEM_TYPE][NODENUM];
Isn't "turn switch statements into branch tables" a common compiler
optimization anyway? Although that's a compiler optimization we may
be inadvertently disabling with our sparse enum. It'd be interesting
to start by just packing the enum and seeing if the code gets any
faster with g++ or icpc.
but to do this right, it will probably involve cleaning up our
FE_FAMILY enum so it is packed, which means writing a string or
something instead of a number to the restart files.@roystgnr, @jwpeterson, @pbauman, @friedmud - Thoughts on this
I want to support old xdr/xda restart files indefinitely, so that's
going to require maintaining an "old number to new-number/string"
table somewhere.
I'd like us to move to something more extensible for a restart file
format in the future. I was originally thinking hdf5-based; now that
that describes exodus/nemesis too I'm wondering if it might be
possible to add extensions there. This might be too much work for us
to bite off right now, but it might be a reason to just use the old
numbering via translation in XDR/XDA I/O for now, then switch to a
less ambiguous string identifier at the same time we're changing the
rest of the format too.
or on the broader issue of FEInterface altogether?
I despised the mass of switches in FEInterface until roughly last
week, when I discovered myself having to recommend basically the exact
same design pattern to someone to make up for the inability to do
templated virtual functions in C++.
Roy
from libmesh.
Yaagh. I thought maybe the email-mangling that you guys had noticed had something to do with HTML email, but the quote characters and paragraph breaks in my alpine output just got shredded there.
from libmesh.
Isn't "turn switch statements into branch tables" a common compiler optimization anyway? Although that's a compiler optimization we may be inadvertently disabling with our sparse enum. It'd be interesting to start by just packing the enum and seeing if the code gets any faster with g++ or icpc.
It is, but when we have a double switch that then makes a function call to another double switch in a different translation unit and don't usually do inter-procedural optimization I can't imagine a compiler in the world that could do that too efficiently...
As for the restart bit - yes, probably worth its own thread. In the meantime I can have a simple int->string mapping to handle old restart files.
from libmesh.
On Fri, Apr 26, 2013 at 1:20 PM, roystgnr [email protected] wrote:
Sounds great! It'll be interesting to figure out how to benchmark the
change well, though...
I will be able to tell you how much of a speed up it is... we spend a
decent amount of time in dof_indices()....
from libmesh.
Related Issues (20)
- Create is_hierarchic shim in FEInterface
- Support repair of mixed-order meshes in `UnstructuredMesh::all_second_order()` HOT 1
- When is the next release ? HOT 3
- Hardcoded /usr/include/tirpc path HOT 3
- Enhance MeshFunction to handle vector variables
- Assessment of the difficulty in porting CPU architecture for libmesh HOT 1
- Uniform serial data access to vector and tensor types HOT 2
- Enabling threaded print of element information HOT 1
- Abaqus mesh reading new error
- Incorrect VTK configuration flag suggested by configure HOT 8
- Installation with mac M1 HOT 8
- Support mixed-order meshes in `find_neighbors()`, `stitch_meshes()` HOT 1
- Spurious -I/usr/include/tirpc is added when autodetecting libtirpc in linker path
- Refactor HDG NS example to use FEMContext
- VTK output then read loses block id information HOT 5
- MatSetValues_MPIAIJ() triggers malloc error at line 565 during libMesh termination HOT 6
- Installation error due to petsc compatibility HOT 12
- constrain_element_matrix changes the col_dofs vector size HOT 3
- Investigating the possibility of only having one solution vector in systems HOT 3
- Make Abaqus node/side ID maps available
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 libmesh.