Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [programming-paradigms]

The tag has no usage guidance.

1
vote
0answers
44 views

find vector that minimize the (W-A*B)

I want find candidate of B vector that $$min|(W - A_i * B_i)|$$ $$ a_i > 0,\ A_i=\{a_0,...,a_i\},\ B_i=\{-1,0,1\}^i$$ for example, given $$W = 0.6$$ $$A_4 = [0.1, 0.2, 0.4, 0.7] $$ one of answer ...
6
votes
3answers
117 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 ...
8
votes
4answers
416 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 ...
1
vote
0answers
75 views

Numerical inversion involved confluent hypergeometric (1F1) (or Kummer function)

Edit: the question is solved ! Thank you for your time ! This problem arises when I tried to compute the valua of Asian call otions using Inverse Laplace transform method. Let $r=\mu = 0.15; \sigma ...
2
votes
1answer
73 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 ...
7
votes
1answer
235 views
36
votes
8answers
7k 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 ...
7
votes
2answers
222 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 ...
5
votes
1answer
264 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 ...
8
votes
2answers
1k 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?
13
votes
2answers
1k 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, ...
15
votes
6answers
2k 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,...
3
votes
3answers
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, ...
13
votes
5answers
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 ...
35
votes
2answers
7k 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 ...
21
votes
6answers
3k 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?
89
votes
14answers
8k 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 ...
17
votes
3answers
316 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 ...
36
votes
7answers
1k 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,...