Lars Gregersen
COMSOL Employee
Please login with a confirmed email address before reporting spam
Posted:
8 years ago
Jun 28, 2016, 5:01 a.m. EDT
Hi
You probably don't want 4096 distinct materials in your model. Are you refractive indices for each domain really unique?
You should keep the number of materials to a minimum and assign the domain numbers to each material.
Using parfor will most likely not give you any performance gain - and it may cause problems.
When making a lot of changes to your model you can speed up things by using the disableUpdates method. This is described in the LiveLink for Matlab User's Guide in the section titled "Improving Performance for Large Models".
--
Lars Gregersen
Comsol Denmark
Hi
You probably don't want 4096 distinct materials in your model. Are you refractive indices for each domain really unique?
You should keep the number of materials to a minimum and assign the domain numbers to each material.
Using parfor will most likely not give you any performance gain - and it may cause problems.
When making a lot of changes to your model you can speed up things by using the disableUpdates method. This is described in the LiveLink for Matlab User's Guide in the section titled "Improving Performance for Large Models".
--
Lars Gregersen
Comsol Denmark
Please login with a confirmed email address before reporting spam
Posted:
8 years ago
Jun 28, 2016, 6:16 a.m. EDT
THANKS very much.
These 4096 domains do not have to use 4096 distinct materials. The difference is only in their relative permittivity. So do you have any suggestions to achieve this goal.
Thanks again.
THANKS very much.
These 4096 domains do not have to use 4096 distinct materials. The difference is only in their relative permittivity. So do you have any suggestions to achieve this goal.
Thanks again.
Lars Gregersen
COMSOL Employee
Please login with a confirmed email address before reporting spam
Posted:
8 years ago
Jun 28, 2016, 9:11 a.m. EDT
Hi
If you only have a set of a few refractive indices to work with then I suggest you create these as materials and give them proper names. This makes it easier to follow your modelling later.
If you really have 4096 distinct values that depend on which domain you are in then I suggest you create an interpolation table (using the nearest neighbour method). Use the variable "dom" as the input and have the refractive index as a output.
Then you just need to find which domain number (dom) corresponds to each domain in your geometry. You can use the functions mphselectbox or mphselectcoords for this.
--
Lars Gregersen
Comsol Denmark
THANKS very much.
These 4096 domains do not have to use 4096 distinct materials. The difference is only in their relative permittivity. So do you have any suggestions to achieve this goal.
Thanks again.
Hi
If you only have a set of a few refractive indices to work with then I suggest you create these as materials and give them proper names. This makes it easier to follow your modelling later.
If you really have 4096 distinct values that depend on which domain you are in then I suggest you create an interpolation table (using the nearest neighbour method). Use the variable "dom" as the input and have the refractive index as a output.
Then you just need to find which domain number (dom) corresponds to each domain in your geometry. You can use the functions mphselectbox or mphselectcoords for this.
--
Lars Gregersen
Comsol Denmark
[QUOTE]
THANKS very much.
These 4096 domains do not have to use 4096 distinct materials. The difference is only in their relative permittivity. So do you have any suggestions to achieve this goal.
Thanks again.
[/QUOTE]
Please login with a confirmed email address before reporting spam
Posted:
8 years ago
Jun 30, 2016, 3:13 a.m. EDT
THANK YOU VERY MUCH.
Following your instructions, finally I did it.
THANK YOU VERY MUCH.
Following your instructions, finally I did it.