Lars Gregersen
                                                                                                                                                    COMSOL Employee
                                                         
                            
                                                                                                                                                
                         
                                                
    
        Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                11 months ago                            
                            
                                10 déc. 2024, 03:02 UTC−5                            
                        
                        
                                                    There is no general way to get the MATLAB function calls (or external functions) to work on a global scale. You can increase the block size and see if that works for your model, but even then there is a limit to how large blocks can be.
You can see if you can generate a global operator (e.g. an integral, max/min or something similar) that uses your custom functions as inputs.
Alternatively, you can solve the model. Use the COMSOL API do extract the data and calculate the quantities you need. You can then feed the calculated data into your model and solve the model again if that is required.
    -------------------
    Lars Gregersen
Comsol Denmark                                                
 
                                                
                            There is no general way to get the MATLAB function calls (or external functions) to work on a global scale. You can increase the block size and see if that works for your model, but even then there is a limit to how large blocks can be.
You can see if you can generate a global operator (e.g. an integral, max/min or something similar) that uses your custom functions as inputs.
Alternatively, you can solve the model. Use the COMSOL API do extract the data and calculate the quantities you need. You can then feed the calculated data into your model and solve the model again if that is required.
                        
                                                
                                                                                                            
                                             
                        
                        
                                                
    
        Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                11 months ago                            
                            
                                10 déc. 2024, 20:15 UTC−5                            
                        
                        
                                                    Hi Lars,
Many thanks for your reply~ Could you let me how to increase the block size? 
And, I am wondering why the interface is designed to only send data in blocks?
Thanks!
                                                 
                                                
                            Hi Lars,
Many thanks for your reply~ Could you let me how to increase the block size? 
And, I am wondering why the interface is designed to only send data in blocks?
Thanks!