# Questions tagged [programming-paradigms]

The tag has no usage guidance.

20 questions
Filter by
Sorted by
Tagged with
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 ...
• 147
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 ...
• 33
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 ?
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 ...
• 51
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 ...
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 ...
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 ...
• 659
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 ...
• 3,384
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 ...
• 173
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 ...
• 1,308
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?
• 275
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, ...
• 6,901
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,...
• 1,032
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, ...
• 1,435
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 ...
• 1,906
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 ...
• 1,370
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?
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 ...
• 16.6k
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 ...
• 289