CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums

Search Results

Register Blogs Community New Posts Updated Threads Search

Showing results 1 to 3 of 3
Search took 0.00 seconds.
Search: Posts Made By: AlexanderZ
Forum: Fluent UDF and Scheme Programming March 25, 2019, 00:27
Replies: 10
Views: 1,144
Posted By AlexanderZ
#include "udf.h" int n = 10,m =10; real **A; ...

#include "udf.h"
int n = 10,m =10;
real **A;

DEFINE_ON_DEMAND(Allocate_memory)
{
int i,j;
A= (real**)malloc((m)*sizeof(real*));
for (i=0; i<m; i++)
{
Forum: Fluent UDF and Scheme Programming March 4, 2019, 20:48
Replies: 10
Views: 1,144
Posted By AlexanderZ
I gave you code for memory allocation for 2D...

I gave you code for memory allocation for 2D array (matrix)
than you may define value of each element in matrix using 2 loops for i and j

you may do whatever you want. but reading/writing to file...
Forum: Fluent UDF and Scheme Programming March 3, 2019, 20:38
Replies: 10
Views: 1,144
Posted By AlexanderZ
#include udf.h int n,m,i; real **A; A=...

#include udf.h
int n,m,i;
real **A;
A= (real**)malloc((m)*sizeof(real*));
for (i=0; i<m; i++)
{
A[i] = (real*)malloc(n*sizeof(real));
}

you may use this array everywhere and update...
Showing results 1 to 3 of 3

 
Forum Jump

All times are GMT -4. The time now is 04:42.