Skip to main content

Questions tagged [programming-paradigms]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
0 answers
108 views

Coding a performant flexible scientific code with Python

I aim to code a PDE flexible fast PDE solver. I read and noticed multiple approaches: Python + Numba Python + Cython Python + some compiled language (c++/fortran) The equations to be solved are ...
mle's user avatar
  • 147
3 votes
2 answers
745 views

C++ Run-time parameter constants

I am developing a code to simulate a Non-Volatile Memory (NVM). For that, I need several constants (memory dimensions, feature size, temperature etc.). Until then, all my constants were defined at ...
VIlaX's user avatar
  • 33
-2 votes
1 answer
91 views

How to get 10 in computer science, using the number 4 exactly four times, and two signs exactly and two operation + exactly? [closed]

How to get 10 in computer science, using the number 4 exactly four times, and two signs exactly and two operation + exactly ?
Extrazlove's user avatar
5 votes
3 answers
149 views

Naming scientific output files

What's the best practice for naming output files from scripts that you're experimenting with? I'm trying different parameters in my data generation script and I'd like to keep track of which files ...
Jess's user avatar
  • 51
9 votes
4 answers
1k views

Using global variables when doing scientific computing

I was taught in my freshman college computer programming course that using global variables is almost always a bad idea. However, I have found that when designing Fortran programs for very complex ...
Craig Feinstein's user avatar
2 votes
1 answer
100 views

Use of structs in Axisymmetric Finite Volume method

This might be better somewhere else, but I'll give it a try here first. I'm implementing a finite volume scheme for an axisymmetric problem in C, and am looking for a more efficient way to handle all ...
Bob Dobalina's user avatar
7 votes
1 answer
368 views

How to avoid overflow error in program that computes product of two numbers, such that when one is big enough to cause overflow, other is $0$?

Let us say that I have a function like so: def f(x): return g(x)*h(x) Now, g(x) and ...
bzm3r's user avatar
  • 659
54 votes
9 answers
12k views

Functional Programming and Scientific Computing

I apologize if this is a vague question, but here goes: Over the past few years, functional programming has received a lot of attention in the Software Engineering community. Many have started using ...
Inquest's user avatar
  • 3,384
7 votes
2 answers
245 views

Caching mechanism

I've been having problems designing an effective caching mechanism. The mechanism is to be used as part of a project developing scientific software. The goal is to save computation time by loading ...
Ofer's user avatar
  • 173
5 votes
1 answer
312 views

Recommendation for a python book for data processing

I've been doing FORTRAN programming for 10 years and I've started using python for a few years now, mostly for data processing. I've been lucky enough to work with people that are knowledgeable ...
FrenchKheldar's user avatar
8 votes
2 answers
2k views

Large array in GMP

If I want to use large array say mpz_t A[100000], I got "Segmentation fault (core dumped)" during my compilation. Is there any easier way to solve this?
user12290's user avatar
  • 275
16 votes
3 answers
2k views

Why would a computational scientist need to implement their own version of std::complex?

Many of the better-known C++ libraries in computational science such as Eigen, Trilinos, and deal.II use the standard C++ template header library object, ...
Aron Ahmadia's user avatar
  • 6,901
19 votes
6 answers
3k views

To what extent is generic and meta-programming using C++ templates useful in computational science?

The C++ language provides generic programming and metaprogramming through templates. These techniques have found their way into many large-scale scientific computing packages (e.g., MPQC, LAMMPS, CGAL,...
Deathbreath's user avatar
  • 1,032
3 votes
3 answers
2k views

What modern OOP features should a computational scientist use? [closed]

Many computational scientists that I know of, including myself for example, are not computer scientists. As such they are often not very well aware more advanced techniques in OOP. On the other hand, ...
mmirzadeh's user avatar
  • 1,435
13 votes
5 answers
2k views

C++ or Python for a development of CFD library

What would you say would be the advantages/disadvantages of two approaches to coding a general (finite volume, fem, dg) library for Computational Continuum Mechanics? This is how I see things right ...
tmaric's user avatar
  • 1,906
36 votes
2 answers
8k views

Mathematical Libraries for OpenCL?

I am looking for information from anyone that has tried to use OpenCL in their scientific code. Has anyone tried (recently) ViennaCL? If so, how does it compare to cusp? What about OCLTools? Does it ...
Sean Farley's user avatar
  • 1,370
23 votes
6 answers
5k views

Future of OpenCL?

The OpenCL programming paradigm promises to be a royalty free opens standard for heterogenous computing. Should we invest our time in developing software based on OpenCL? Pros/cons?
Allan P. Engsig-Karup's user avatar
105 votes
14 answers
12k views

Is it worthwhile to write unit tests for scientific research codes?

I am strongly convinced of the value of using tests that verify a complete program (e.g. convergence tests), including an automated set of regression tests. After reading some programming books, I've ...
David Ketcheson's user avatar
18 votes
3 answers
395 views

What programming strategies can I take for easily modifying algorithm parameters?

Developing scientific algorithms is a highly iterative process often involving changing lots of parameters that I will want to vary either as part of my experimental design or as part of tweaking ...
Scottie T's user avatar
  • 289
37 votes
7 answers
2k views

What programming paradigms should I be investing in if I want my code to run on petascale machines in the future?

It's pretty clear from a survey of the top500 that the industry is trending towards an exponential increase in processing cores. The largest supercomputers all use MPI for communication between nodes,...
Aron Ahmadia's user avatar
  • 6,901