Matlab implementation of BDDC method
I want to implement the BDDC preconditioner described in thesis, p. 20 in matlab. That would be nice if one can share an existing implementation.
See also questions close to this topic
How to define equality constraints for integer variables in PSO
I'm using Matlab's global optimization toolbox to optimize a cost function using PSO. Some of my input variables are involved in equality constraints and they must be integers. How can I define that in PSO?
I've tried to use a penalty function by adding this if statement in the cost function file,
if(ceil(x(1))+duration~= ceil(x(2))|| x(1)>x(2)) C=10000*C^2; end
x(1) is the starting time and x(2) is the ending time, the difference between the ending and starting time must be equal to the duration (initially defined). The time is supposed to be integer that's why I used ceil. Also, the starting time must be less than ending time (logically and as governed by the equation t_end-t_start=duration). when I run this,the output is non integer, and it doesn't satisfy the condition in the if statement, yet still the cost (C) is minimum. Am I missing something? or is there any alternative approach.
MATLAB Class-based unit tests: How to pass in variable to test
I'm not sure how to pass in variables when executing a unit test. These variables were created from another function not placed within the unit test.
classdef myTest < matlab.unittest.TestCase properties A, B, C end methods (Test) function testDataCoverage(testCase) expSol = afunction(A, B, C) actSol = 10 testCase.verifyEqual(testCase, actSol, expSol) end end end
I next tried to place the variable-creating function (getData) within the unit test but encountered this error:
Concrete class myTest does not define a TestParameter property named BNew for the dataCoverage method. Either implement the property or define the class as Abstract.
classdef myTest < matlab.unittest.TestCase properties end methods (Test) function testDataCoverage(testCase) [A, B, C] = getData() expSol = afunction(A, B, C) actSol = 10 testCase.verifyEqual(testCase, actSol, expSol) end function [A, B, C] = getData() ...code here... end function Sol = afunction(A, BNew, C) ...code here... end end end
MATLAB coordinates and matrices
x = [0 2]; y = [0 2]; z = [1 1; 2 2]; surf(x,y,z);
The data in z is based on the (x,y) coordinate. For example, at (0,0) the value is 1 and at (2,2) the value is 2. Now, I need to calculate z on the basis of a distance function. How do I put the resultant data in a matrix form as above.
How to implement a snapshot system in Spring Boot application?
as I mentioned I want to implement a backup/snapshot feature for my web app.
As for details, imagine each User has several Projects which has several Components which also has several Subcomponents. Those are the entities that I want to backup apart from User.
The goal that I want to achieve is that user may save the current state as a snapshot and later if he doesn't like the new configuration, can easily turn back to his save and there can be multiple snapshots. Those snapshots has to be read only.
I'm asking for a design architecture or style or any kind of idea to implement. That's why I didn't put my entities here.
Implementation concerns regarding IndetityServer4
I have some questions regarding Identityserver4 in the following context:
I have a number of domains (domainA, domainB, domainC ect.) and I’d like all of them to use Identityserver4 for authentication, but I’d like only one implementation of Identityserver4 (with asp.net identity and EF) and have the all domains use this implementation as clients. All domains is in a hosted environment with MS SQL as database, if that has any relevance.
Can IdentityServer4 run in a subfolder/area of domainA, and if so what are the necessary steps for getting this to work, e.g. the endpoints shown in the .well-known endpoint?
What are the pitfalls, if any, in hosting Identityserver4 in a subfolder/area under domainA, and also having domainA use Identityserver for authenticating users for the rest of the site, and how to avoid the pitfalls if there are any?
The authorization part that permits one user to do this and not that, and the opposite for another user is not the concern of Identityserver4, but the respective domains/sites own responsibility as I understand what I can find online. In order to make use of roles and roleclaims in asp.net identity core 2 in each domain/site there has to be a user in that domain/site, that has a reference to a user in Identityserver4 in order for the domain to use Identityserver4 for authentication.
How do I avoid that the user must register both on the domain and in Identityserver4, one registration would be preferable and have the other made behind the scenes along with the reference?
I hope someone can provide the answers to one or all of my questions. Links to relevant blogs etc. are welcome, but I have scoured the web to find useful answers without any luck – hopefully some of you have better search engine skills than me.